Class: ASF::Site
- Inherits:
-
Object
- Object
- ASF::Site
- Defined in:
- lib/whimsy/asf/site.rb
Constant Summary collapse
- @@default =
add entries that are not currently defined in index.html (or elsewhere)
{ "brand management" => { link: "http://www.apache.org/foundation/marks/pmcs", text: "define how Apache projects should refer to trademarks and display their brand" }, "comdev" => { link: "http://community.apache.org/", text: "Resources to help people become involved with Apache projects" }, "executive assistant" => { link: "http://www.apache.org/foundation/ASF-EA.html", text: "Executive Assistant" }, "fundraising" => { link: "http://www.apache.org/foundation/contributing.html", text: "Fund Raising" }, "infrastructure" => { link: "http://www.apache.org/dev/infrastructure.html", text: "Infrastructure Team" }, "legal affairs" => { link: "http://www.apache.org/legal/", text: "Establishing and managing legal policies" }, "marketing and publicity" => { link: "http://www.apache.org/press/", text: "public relations and for the press-related issues" }, "security" => { link: "http://www.apache.org/security/", text: "Security Team" }, "tac" => { link: "http://www.apache.org/travel/", text: "Travel Assistance Committee" }, "w3c relations" => { link: "http://www.apache.org/foundation/foundation-projects.html#w3c", text: "Liaison between the ASF and the World Wide Web Consortium" }, }
- @@list =
{}
Class Method Summary collapse
Class Method Details
.find(committee) ⇒ Object
87 88 89 90 |
# File 'lib/whimsy/asf/site.rb', line 87 def self.find(committee) committee = committee.name if ASF::Committee == committee list[committee] end |
.list ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/whimsy/asf/site.rb', line 52 def self.list templates = ASF::SVN['asf/infrastructure/site/trunk/content'] file = "#{templates}/index.html" if not File.exist?(file) Wunderbar.error "Unable to find 'infrastructure/site/trunk/content'" return {} end return @@list if not @@list.empty? and File.mtime(file) == @@mtime @@mtime = File.mtime(file) @@list = @@default Committee.load_committee_info doc = Nokogiri::HTML.parse(File.read(file)) list = doc.at("#by_name") if list list.search('a').each do |a| @@list[Committee.find(a.text).name] = {link: a['href'], text: a['title']} end end list = doc.at("#by_category") if list list.search('a').each do |a| if a['title'] @@list[Committee.find(a.text).name] = {link: a['href'], text: a['title']} end end end @@list end |