diff --git a/lib/spec/lib/committee_spec.rb b/lib/spec/lib/committee_spec.rb index 169baf387d..9712531e15 100644 --- a/lib/spec/lib/committee_spec.rb +++ b/lib/spec/lib/committee_spec.rb @@ -24,6 +24,14 @@ Wunderbar.logger = nil # ensure we see warnings } describe "ASF::Committee::site" do + it "should return correct display_name initially" do + httpd = ASF::Committee['httpd'] + expect(httpd.display_name).to eq('HTTP Server') + end + it "should return correct display_name subsequently" do + httpd = ASF::Committee['httpd'] + expect(httpd.display_name).to eq('HTTP Server') + end it "should return string for 'httpd'" do res = ASF::Committee.find('HTTP Server').site expect(res).to match(%r{https?://httpd\.apache\.org/?}) diff --git a/lib/whimsy/asf/committee.rb b/lib/whimsy/asf/committee.rb index f39ac968e0..dfa80486fc 100644 --- a/lib/whimsy/asf/committee.rb +++ b/lib/whimsy/asf/committee.rb @@ -175,6 +175,7 @@ def self.load_committee_info(contents = nil, info = nil) @committee_mtime = File.mtime(file) @@svn_change = Time.parse(ASF::SVN.getInfoItem(file, 'last-changed-date')).gmtime + Wunderbar.debug "Parsing CI file" @nonpmcs, @officers, @committee_info = parse_committee_info_nocache(File.read(file)) end @committee_info @@ -795,4 +796,10 @@ def self.appendtlpmetadata(input, committee, description, date_established) end end + + # ensure the CI data is pre-loaded + # If this is not done, the first committee instance may be incomplete + Wunderbar.debug "Initialising CI file" + ASF::Committee.load_committee_info + end