This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new d8196f02 Ensure first CI instance has access to parsed CI data
d8196f02 is described below
commit d8196f02b29c03a567269a7f62208ff797439d6e
Author: Sebb <[email protected]>
AuthorDate: Sun Jul 21 19:57:43 2024 +0100
Ensure first CI instance has access to parsed CI data
---
lib/spec/lib/committee_spec.rb | 8 ++++++++
lib/whimsy/asf/committee.rb | 7 +++++++
2 files changed, 15 insertions(+)
diff --git a/lib/spec/lib/committee_spec.rb b/lib/spec/lib/committee_spec.rb
index 169baf38..9712531e 100644
--- a/lib/spec/lib/committee_spec.rb
+++ b/lib/spec/lib/committee_spec.rb
@@ -24,6 +24,14 @@ describe ASF::Committee do
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 f39ac968..dfa80486 100644
--- a/lib/whimsy/asf/committee.rb
+++ b/lib/whimsy/asf/committee.rb
@@ -175,6 +175,7 @@ module ASF
@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 @@ module ASF
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