]> git.openstreetmap.org Git - rails.git/blobdiff - script/statistics
Added natural=atoll to en.yml
[rails.git] / script / statistics
index 912302c2ee7bb4bd5d0c921679bb322a2fd475dd..cd9e9afa7f96c25b90a4b1eaca3719a94890dec7 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
 
 #!/usr/bin/env ruby
 
-require File.dirname(__FILE__) + "/../config/environment"
+require File.join(File.dirname(__FILE__), "..", "config", "environment")
 
 start_time = Time.now
 
 
 start_time = Time.now
 
@@ -15,7 +15,7 @@ puts "<h2>OpenStreetMap stats report run at #{start_time}</h2>"
 
 begin
   ActiveRecord::Base.transaction do
 
 begin
   ActiveRecord::Base.transaction do
-    user_count = User.where(:status => %w(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
     tracepoint_count = Tracepoint.count
     node_count = Node.where(:visible => true).count
     way_count = Way.where(:visible => true).count
@@ -86,7 +86,7 @@ rescue StandardError => e
   puts "<p><em>Exception: #{e}</em><br />#{e.backtrace.join('<br />')}</p>"
 end
 
   puts "<p><em>Exception: #{e}</em><br />#{e.backtrace.join('<br />')}</p>"
 end
 
-puts "<p>Report took #{(Time.new - start_time)} seconds to run</p>"
+puts "<p>Report took #{Time.new - start_time} seconds to run</p>"
 puts "</body>"
 puts "</html>"
 
 puts "</body>"
 puts "</html>"