lib/rstatsd/server.rb in rstatsd-0.2 vs lib/rstatsd/server.rb in rstatsd-0.3
- old
+ new
@@ -1,6 +1,6 @@
-require 'em-hiredis'
+require 'eventmachine'
require 'eventmachine_httpserver'
require 'evma_httpserver/response'
require 'erb'
require_relative './helpers'
@@ -24,11 +24,11 @@
response.content = File.open('templates/index.html').read
response.send_response
when '/stats'
Rstatsd::Chart.new(@http_query_string).draw_chart do |chart|
@chart = chart
- google_chart = ERB.new(File.open('templates/google_chart.erb').read).result(binding)
-
+ google_chart = ERB.new(File.open('templates/google_chart.erb').read).
+ result(binding)
response.content_type 'text/html'
response.content = google_chart
response.send_response
end
end