summaryrefslogtreecommitdiff
path: root/web/lib/reports.rb
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2010-11-13 21:31:39 +0100
committerJochen Topf <jochen@topf.org>2010-11-13 21:31:39 +0100
commit9db63dc2526bf0b2a94e7a6f37a0f7dabdb8f12d (patch)
tree0d2ae6de413c39c21d30aaf296a98ee37977ab45 /web/lib/reports.rb
parentc82bbe69572398d44187ca7b57b1ce572f435d65 (diff)
downloadtaginfo-9db63dc2526bf0b2a94e7a6f37a0f7dabdb8f12d.tar
taginfo-9db63dc2526bf0b2a94e7a6f37a0f7dabdb8f12d.tar.gz
Multiple changes
* Improved and cleaned up source import scripts * Improved some reports and report overview * New osmium version that uses a better hash function * Some experimental magic to include Javascipt in an easier way (tested in keys.erb)
Diffstat (limited to 'web/lib/reports.rb')
-rw-r--r--web/lib/reports.rb23
1 files changed, 14 insertions, 9 deletions
diff --git a/web/lib/reports.rb b/web/lib/reports.rb
index 99d500a..0895359 100644
--- a/web/lib/reports.rb
+++ b/web/lib/reports.rb
@@ -11,15 +11,19 @@ class Report
end
end
- def initialize(title, sources)
+ def initialize(title, *sources)
@@reports << self
@title = title
@sources = Hash.new
- sources.each do |s|
- @sources[s] = 1
+ sources.each do |id|
+ @sources[id] = 1
end
end
+ def uses_source?(id)
+ sources.has_key? id
+ end
+
def name
@title.gsub(/ /, '_').downcase
end
@@ -30,9 +34,10 @@ class Report
end
-Report.new 'Characters in Keys', %w(db)
-Report.new 'Frequently Used Keys Without Wiki Page', %w(db wiki)
-Report.new 'Key Lengths', %w(db)
-Report.new 'Language Comparison Table for Keys in the Wiki', %w(wiki)
-Report.new 'Languages', %w(wiki)
-Report.new 'Wiki Pages About Non-Existing Keys', %w(db wiki)
+Report.new 'Characters in Keys', :db
+Report.new 'Frequently Used Keys Without Wiki Page', :db, :wiki
+Report.new 'Key Lengths', :db
+Report.new 'Language Comparison Table for Keys in the Wiki', :wiki
+Report.new 'Languages', :wiki
+Report.new 'Wiki Pages About Non-Existing Keys', :db, :wiki
+