lib/big_brother/app.rb in big_brother-0.4.1 vs lib/big_brother/app.rb in big_brother-0.5.0
- old
+ new
@@ -3,18 +3,16 @@
register Sinatra::Synchrony
set :raise_errors, false
get "/" do
- running, stopped = BigBrother.clusters.values.partition(&:monitored?)
-
[200, <<-CONTENT]
Big Brother: #{BigBrother::VERSION}
Running:
-#{running.map { |cluster| "+ #{cluster}\n" }.join}
+#{BigBrother.clusters.running.map { |cluster| "+ #{cluster}\n" }.join}
Stopped:
-#{stopped.map { |cluster| "- #{cluster}\n" }.join}
+#{BigBrother.clusters.stopped.map { |cluster| "- #{cluster}\n" }.join}
CONTENT
end
before "/cluster/:name" do |name|
@cluster = BigBrother.clusters[name]