Skip to content

Commit

Permalink
Ensure first CI instance has access to parsed CI data
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed Jul 21, 2024
1 parent f097455 commit d8196f0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/spec/lib/committee_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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/?})
Expand Down
7 changes: 7 additions & 0 deletions lib/whimsy/asf/committee.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit d8196f0

Please sign in to comment.