big_brother 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,11 +5,16 @@ module BigBrother
5
5
  set :raise_errors, false
6
6
 
7
7
  get "/" do
8
- clusters = BigBrother.clusters.map do |name, cluster|
9
- "#{cluster}: #{cluster.monitored? ? "running" : "not running"}"
10
- end.join("\n")
8
+ running, stopped = BigBrother.clusters.values.partition(&:monitored?)
11
9
 
12
- [200, "Big Brother: #{BigBrother::VERSION}\n\n#{clusters}\n"]
10
+ [200, <<-CONTENT]
11
+ Big Brother: #{BigBrother::VERSION}
12
+
13
+ Running:
14
+ #{running.map { |cluster| "+ #{cluster}\n" }.join}
15
+ Stopped:
16
+ #{stopped.map { |cluster| "- #{cluster}\n" }.join}
17
+ CONTENT
13
18
  end
14
19
 
15
20
  before "/cluster/:name" do |name|
@@ -1,3 +1,3 @@
1
1
  module BigBrother
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -17,10 +17,10 @@ module BigBrother
17
17
  get "/"
18
18
  last_response.status.should == 200
19
19
  last_response.body.should include("Big Brother: #{BigBrother::VERSION}")
20
- last_response.body.should include("one (1): not running")
21
- last_response.body.should include("two (2): not running")
22
- last_response.body.should include("three (3): running")
23
- last_response.body.should include("four (4): not running")
20
+ last_response.body.should include("- one (1)")
21
+ last_response.body.should include("- two (2)")
22
+ last_response.body.should include("+ three (3)")
23
+ last_response.body.should include("- four (4)")
24
24
  end
25
25
  end
26
26
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: big_brother
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-07-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thin
16
- requirement: &70318446355800 !ruby/object:Gem::Requirement
16
+ requirement: &70295616819500 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.3.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70318446355800
24
+ version_requirements: *70295616819500
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: async-rack
27
- requirement: &70318446354760 !ruby/object:Gem::Requirement
27
+ requirement: &70295616818500 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.5.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70318446354760
35
+ version_requirements: *70295616818500
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sinatra
38
- requirement: &70318446354160 !ruby/object:Gem::Requirement
38
+ requirement: &70295616817840 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '1.0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70318446354160
46
+ version_requirements: *70295616817840
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rack-fiber_pool
49
- requirement: &70318446353320 !ruby/object:Gem::Requirement
49
+ requirement: &70295616817080 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0.9'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70318446353320
57
+ version_requirements: *70295616817080
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: eventmachine
60
- requirement: &70318446352480 !ruby/object:Gem::Requirement
60
+ requirement: &70295616816140 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>'
@@ -68,10 +68,10 @@ dependencies:
68
68
  version: 1.0.0.beta.100
69
69
  type: :runtime
70
70
  prerelease: false
71
- version_requirements: *70318446352480
71
+ version_requirements: *70295616816140
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: em-http-request
74
- requirement: &70318446351200 !ruby/object:Gem::Requirement
74
+ requirement: &70295616814920 !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
77
77
  - - ~>
@@ -79,10 +79,10 @@ dependencies:
79
79
  version: '1.0'
80
80
  type: :runtime
81
81
  prerelease: false
82
- version_requirements: *70318446351200
82
+ version_requirements: *70295616814920
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: em-synchrony
85
- requirement: &70318446350420 !ruby/object:Gem::Requirement
85
+ requirement: &70295616814160 !ruby/object:Gem::Requirement
86
86
  none: false
87
87
  requirements:
88
88
  - - ~>
@@ -90,10 +90,10 @@ dependencies:
90
90
  version: '1.0'
91
91
  type: :runtime
92
92
  prerelease: false
93
- version_requirements: *70318446350420
93
+ version_requirements: *70295616814160
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: em-resolv-replace
96
- requirement: &70318446349600 !ruby/object:Gem::Requirement
96
+ requirement: &70295616813240 !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
99
  - - ~>
@@ -101,10 +101,10 @@ dependencies:
101
101
  version: '1.1'
102
102
  type: :runtime
103
103
  prerelease: false
104
- version_requirements: *70318446349600
104
+ version_requirements: *70295616813240
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: em-syslog
107
- requirement: &70318446348120 !ruby/object:Gem::Requirement
107
+ requirement: &70295616811960 !ruby/object:Gem::Requirement
108
108
  none: false
109
109
  requirements:
110
110
  - - ~>
@@ -112,10 +112,10 @@ dependencies:
112
112
  version: 0.0.2
113
113
  type: :runtime
114
114
  prerelease: false
115
- version_requirements: *70318446348120
115
+ version_requirements: *70295616811960
116
116
  - !ruby/object:Gem::Dependency
117
117
  name: rspec
118
- requirement: &70318446375200 !ruby/object:Gem::Requirement
118
+ requirement: &70295616839480 !ruby/object:Gem::Requirement
119
119
  none: false
120
120
  requirements:
121
121
  - - ~>
@@ -123,10 +123,10 @@ dependencies:
123
123
  version: 2.9.0
124
124
  type: :development
125
125
  prerelease: false
126
- version_requirements: *70318446375200
126
+ version_requirements: *70295616839480
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: rack-test
129
- requirement: &70318446374620 !ruby/object:Gem::Requirement
129
+ requirement: &70295616838880 !ruby/object:Gem::Requirement
130
130
  none: false
131
131
  requirements:
132
132
  - - ~>
@@ -134,10 +134,10 @@ dependencies:
134
134
  version: 0.6.1
135
135
  type: :development
136
136
  prerelease: false
137
- version_requirements: *70318446374620
137
+ version_requirements: *70295616838880
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: rake
140
- requirement: &70318446374180 !ruby/object:Gem::Requirement
140
+ requirement: &70295616838460 !ruby/object:Gem::Requirement
141
141
  none: false
142
142
  requirements:
143
143
  - - ! '>='
@@ -145,10 +145,10 @@ dependencies:
145
145
  version: '0'
146
146
  type: :development
147
147
  prerelease: false
148
- version_requirements: *70318446374180
148
+ version_requirements: *70295616838460
149
149
  - !ruby/object:Gem::Dependency
150
150
  name: rake_commit
151
- requirement: &70318446373460 !ruby/object:Gem::Requirement
151
+ requirement: &70295616837740 !ruby/object:Gem::Requirement
152
152
  none: false
153
153
  requirements:
154
154
  - - ~>
@@ -156,10 +156,10 @@ dependencies:
156
156
  version: '0.13'
157
157
  type: :development
158
158
  prerelease: false
159
- version_requirements: *70318446373460
159
+ version_requirements: *70295616837740
160
160
  - !ruby/object:Gem::Dependency
161
161
  name: vagrant
162
- requirement: &70318446372760 !ruby/object:Gem::Requirement
162
+ requirement: &70295616837060 !ruby/object:Gem::Requirement
163
163
  none: false
164
164
  requirements:
165
165
  - - ! '>='
@@ -167,7 +167,7 @@ dependencies:
167
167
  version: '0'
168
168
  type: :development
169
169
  prerelease: false
170
- version_requirements: *70318446372760
170
+ version_requirements: *70295616837060
171
171
  description: IPVS backend supervisor
172
172
  email:
173
173
  - code@getbraintree.com