]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/files/default/plugins/api_calls_
Remove trailing whitespace in ruby code
[chef.git] / cookbooks / munin / files / default / plugins / api_calls_
index 179c07fb52835a29818e3a2073cd69f33aeec3de..8cf836d79b1fbaacba95e4883d4b09039af7fa5e 100755 (executable)
@@ -5,7 +5,7 @@ require 'date'
 require 'hpricot'
 require 'open-uri'
 
-def uris_from_status(server) 
+def uris_from_status(server)
   file = open("http://#{server}/server-status").read
   doc = Hpricot.parse(file)
   tables = doc / 'table'
@@ -18,19 +18,19 @@ def uris_from_status(server)
 end
 
 CALL_TYPES = {
-  :map => "Map API calls", 
-  :upload => "Changeset diff uploads", 
-  :amf => "AMF API calls", 
-  :history => "Element history fetches", 
+  :map => "Map API calls",
+  :upload => "Changeset diff uploads",
+  :amf => "AMF API calls",
+  :history => "Element history fetches",
   :full => "Full element fetches",
   :trkpts => "GPX trackpoints calls",
-  :web => "Web site traffic", 
+  :web => "Web site traffic",
   :other => "Other API calls"
 }
 
 def categorise_uri(line)
   uri = line.split(" ")[1]
-  
+
   case uri
   when /api\/0\.6\/map/ then :map
   when /api\/0\.6\/changeset\/[0-9]*\/upload/ then :upload
@@ -62,7 +62,7 @@ else
     end
     h
   end
-  
+
   CALL_TYPES.keys.each do |type|
     count = counts[type] || 0
     puts "#{type}.value #{count}"