Sha256: 0f52c3904278c794b0cf15dc09c9415aa215bbe134a94ee43573a3433fed6338

Contents?: true

Size: 418 Bytes

Versions: 11

Compression:

Stored size: 418 Bytes

Contents

class Unicorns
	
	include Watchman
	
	def self.data
		out = PS.data.inject({:masters => [], :workers => []}) do |acc,line|
			if line[:command][/^start master/]
				acc[:masters] << line
			end
			if line[:command][/^start worker/]
				acc[:workers] << line
			end
			acc
		end
		out.merge({:num_masters => out[:masters].count, :num_workers => out[:workers].count, :summary => [:num_masters, :num_workers]})
	end
	
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
city-watch-0.4.6 lib/city_watch/watchmen/unicorns.rb
city-watch-0.4.5 lib/city_watch/watchmen/unicorns.rb
city-watch-0.4.4 lib/city_watch/watchmen/unicorns.rb
city-watch-0.4.3 lib/city_watch/watchmen/unicorns.rb
city-watch-0.4.2 lib/city_watch/watchmen/unicorns.rb
city-watch-0.4.1 lib/city_watch/watchmen/unicorns.rb
city-watch-0.4.0 lib/city_watch/watchmen/unicorns.rb
city-watch-0.3.3 lib/city_watch/watchmen/unicorns.rb
city-watch-0.3.2 lib/city_watch/watchmen/unicorns.rb
city-watch-0.3.1 lib/city_watch/watchmen/unicorns.rb
city-watch-0.3.0 lib/city_watch/watchmen/unicorns.rb