X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a3eb48385bcf1465339d473c0c1657e075cd507d..ef7f3d800cbdd49b692df10d312e5fd880e2e938:/script/statistics
diff --git a/script/statistics b/script/statistics
index ce785bb07..47a368a81 100755
--- a/script/statistics
+++ b/script/statistics
@@ -11,11 +11,11 @@ puts "
OpenStreetMap Statistics"
puts ""
puts ""
puts ""
-puts "OpenStreetMap stats report run at #{start_time.to_s}
"
+puts "OpenStreetMap stats report run at #{start_time}
"
begin
ActiveRecord::Base.transaction do
- user_count = User.where(:status => ["active", "confirmed", "suspended"]).count
+ user_count = User.where(:status => %w(active confirmed suspended)).count
tracepoint_count = Tracepoint.count
node_count = Node.where(:visible => true).count
way_count = Way.where(:visible => true).count
@@ -57,7 +57,7 @@ begin
puts "Nodes | #{day_count} | #{week_count} | #{month_count} |
"
puts ""
-
+
puts "Top users editing over the past...
"
puts ""
puts "Day | Week | Month |
"
@@ -83,10 +83,10 @@ begin
puts "
"
end
rescue Exception => e
- puts "Exception: #{e.to_s}
#{e.backtrace.join('
')}
"
+ puts "Exception: #{e}
#{e.backtrace.join('
')}
"
end
-puts "Report took #{(Time.new - start_time).to_s} seconds to run
"
+puts "Report took #{(Time.new - start_time)} seconds to run
"
puts ""
puts "