noah 0.0.5 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. data/.gemtest +0 -0
  2. data/.gitignore +9 -0
  3. data/LICENSE +201 -0
  4. data/README.md +68 -212
  5. data/Rakefile +70 -41
  6. data/TODO.md +59 -0
  7. data/bin/noah +2 -1
  8. data/bin/noah-watcher.rb +93 -0
  9. data/config.ru +6 -3
  10. data/config/warble.rb +18 -0
  11. data/examples/README.md +116 -0
  12. data/examples/cluster.ru +2 -0
  13. data/examples/custom-watcher.rb +10 -0
  14. data/examples/httpclient-server.rb +7 -0
  15. data/examples/httpclient.rb +12 -0
  16. data/examples/httpclient2.rb +28 -0
  17. data/examples/js/FABridge.js +1452 -0
  18. data/examples/js/WebSocketMain.swf +830 -0
  19. data/examples/js/swfobject.js +851 -0
  20. data/examples/js/web_socket.js +312 -0
  21. data/examples/logger.rb +11 -0
  22. data/examples/reconfiguring-sinatra-watcher.rb +11 -0
  23. data/examples/reconfiguring-sinatra.rb +32 -0
  24. data/examples/simple-post.rb +17 -0
  25. data/examples/websocket.html +24 -0
  26. data/examples/websocket.rb +41 -0
  27. data/lib/noah.rb +5 -8
  28. data/lib/noah/app.rb +20 -268
  29. data/lib/noah/application_routes.rb +70 -0
  30. data/lib/noah/ark.rb +0 -0
  31. data/lib/noah/configuration_routes.rb +81 -0
  32. data/lib/noah/ephemeral_routes.rb +19 -0
  33. data/lib/noah/helpers.rb +12 -14
  34. data/lib/noah/host_routes.rb +69 -0
  35. data/lib/noah/models.rb +86 -5
  36. data/lib/noah/models/applications.rb +41 -0
  37. data/lib/noah/models/configurations.rb +49 -0
  38. data/lib/noah/models/ephemerals.rb +33 -0
  39. data/lib/noah/models/hosts.rb +56 -0
  40. data/lib/noah/models/services.rb +54 -0
  41. data/lib/noah/models/watchers.rb +54 -0
  42. data/lib/noah/passthrough.rb +11 -0
  43. data/lib/noah/service_routes.rb +71 -0
  44. data/lib/noah/validations.rb +1 -0
  45. data/lib/noah/validations/watcher_validations.rb +48 -0
  46. data/lib/noah/version.rb +1 -1
  47. data/lib/noah/watcher.rb +75 -0
  48. data/lib/noah/watcher_routes.rb +12 -0
  49. data/lib/vendor/em-hiredis/Gemfile +4 -0
  50. data/lib/vendor/em-hiredis/README.md +61 -0
  51. data/lib/vendor/em-hiredis/Rakefile +2 -0
  52. data/lib/vendor/em-hiredis/em-hiredis-0.0.1.gem +0 -0
  53. data/lib/vendor/em-hiredis/em-hiredis.gemspec +23 -0
  54. data/lib/vendor/em-hiredis/lib/em-hiredis.rb +22 -0
  55. data/lib/vendor/em-hiredis/lib/em-hiredis/client.rb +131 -0
  56. data/lib/vendor/em-hiredis/lib/em-hiredis/connection.rb +61 -0
  57. data/lib/vendor/em-hiredis/lib/em-hiredis/event_emitter.rb +29 -0
  58. data/lib/vendor/em-hiredis/lib/em-hiredis/version.rb +5 -0
  59. data/noah.gemspec +21 -17
  60. data/spec/application_spec.rb +30 -30
  61. data/spec/configuration_spec.rb +81 -14
  62. data/spec/ephemeral_spec.rb +52 -0
  63. data/spec/host_spec.rb +21 -21
  64. data/spec/noahapp_application_spec.rb +6 -6
  65. data/spec/noahapp_configuration_spec.rb +3 -3
  66. data/spec/noahapp_host_spec.rb +2 -2
  67. data/spec/noahapp_service_spec.rb +9 -9
  68. data/spec/noahapp_watcher_spec.rb +34 -0
  69. data/spec/service_spec.rb +27 -27
  70. data/spec/spec_helper.rb +13 -22
  71. data/spec/support/db/.keep +0 -0
  72. data/spec/support/test-redis.conf +8 -0
  73. data/spec/watcher_spec.rb +62 -0
  74. data/views/index.haml +21 -15
  75. metadata +124 -148
  76. data/Gemfile.lock +0 -85
  77. data/doc/coverage/index.html +0 -138
  78. data/doc/coverage/jquery-1.3.2.min.js +0 -19
  79. data/doc/coverage/jquery.tablesorter.min.js +0 -15
  80. data/doc/coverage/lib-helpers_rb.html +0 -393
  81. data/doc/coverage/lib-models_rb.html +0 -1449
  82. data/doc/coverage/noah_rb.html +0 -2019
  83. data/doc/coverage/print.css +0 -12
  84. data/doc/coverage/rcov.js +0 -42
  85. data/doc/coverage/screen.css +0 -270
  86. data/lib/noah/applications.rb +0 -46
  87. data/lib/noah/configurations.rb +0 -49
  88. data/lib/noah/hosts.rb +0 -54
  89. data/lib/noah/services.rb +0 -57
  90. data/lib/noah/watchers.rb +0 -18
metadata CHANGED
@@ -1,311 +1,293 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noah
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 5
9
- version: 0.0.5
4
+ prerelease:
5
+ version: 0.0.9
10
6
  platform: ruby
11
7
  authors:
12
- - lusis
8
+ - John E. Vincent
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2011-02-07 00:00:00 -05:00
13
+ date: 2011-03-08 00:00:00 -05:00
18
14
  default_executable:
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
21
- name: rake
17
+ name: hiredis
18
+ prerelease: false
22
19
  requirement: &id001 !ruby/object:Gem::Requirement
23
20
  none: false
24
21
  requirements:
25
22
  - - "="
26
23
  - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- - 8
30
- - 7
31
- version: 0.8.7
24
+ version: 0.3.1
32
25
  type: :runtime
33
- prerelease: false
34
26
  version_requirements: *id001
35
27
  - !ruby/object:Gem::Dependency
36
- name: sinatra
28
+ name: redis
29
+ prerelease: false
37
30
  requirement: &id002 !ruby/object:Gem::Requirement
38
31
  none: false
39
32
  requirements:
40
33
  - - "="
41
34
  - !ruby/object:Gem::Version
42
- segments:
43
- - 1
44
- - 1
45
- - 2
46
- version: 1.1.2
35
+ version: 2.1.1
47
36
  type: :runtime
48
- prerelease: false
49
37
  version_requirements: *id002
50
38
  - !ruby/object:Gem::Dependency
51
- name: sinatra-namespace
39
+ name: nest
40
+ prerelease: false
52
41
  requirement: &id003 !ruby/object:Gem::Requirement
53
42
  none: false
54
43
  requirements:
55
44
  - - "="
56
45
  - !ruby/object:Gem::Version
57
- segments:
58
- - 0
59
- - 6
60
- - 1
61
- version: 0.6.1
46
+ version: 1.1.0
62
47
  type: :runtime
63
- prerelease: false
64
48
  version_requirements: *id003
65
49
  - !ruby/object:Gem::Dependency
66
- name: ohm
50
+ name: rack
51
+ prerelease: false
67
52
  requirement: &id004 !ruby/object:Gem::Requirement
68
53
  none: false
69
54
  requirements:
70
55
  - - "="
71
56
  - !ruby/object:Gem::Version
72
- segments:
73
- - 0
74
- - 1
75
- - 3
76
- version: 0.1.3
57
+ version: 1.2.1
77
58
  type: :runtime
78
- prerelease: false
79
59
  version_requirements: *id004
80
60
  - !ruby/object:Gem::Dependency
81
- name: ohm-contrib
61
+ name: tilt
62
+ prerelease: false
82
63
  requirement: &id005 !ruby/object:Gem::Requirement
83
64
  none: false
84
65
  requirements:
85
66
  - - "="
86
67
  - !ruby/object:Gem::Version
87
- segments:
88
- - 0
89
- - 1
90
- - 0
91
- version: 0.1.0
68
+ version: 1.2.2
92
69
  type: :runtime
93
- prerelease: false
94
70
  version_requirements: *id005
95
71
  - !ruby/object:Gem::Dependency
96
- name: haml
72
+ name: sinatra
73
+ prerelease: false
97
74
  requirement: &id006 !ruby/object:Gem::Requirement
98
75
  none: false
99
76
  requirements:
100
77
  - - "="
101
78
  - !ruby/object:Gem::Version
102
- segments:
103
- - 3
104
- - 0
105
- - 25
106
- version: 3.0.25
79
+ version: 1.1.2
107
80
  type: :runtime
108
- prerelease: false
109
81
  version_requirements: *id006
110
82
  - !ruby/object:Gem::Dependency
111
- name: vegas
83
+ name: ohm
84
+ prerelease: false
112
85
  requirement: &id007 !ruby/object:Gem::Requirement
113
86
  none: false
114
87
  requirements:
115
88
  - - "="
116
89
  - !ruby/object:Gem::Version
117
- segments:
118
- - 0
119
- - 1
120
- - 8
121
- version: 0.1.8
90
+ version: 0.1.3
122
91
  type: :runtime
123
- prerelease: false
124
92
  version_requirements: *id007
125
93
  - !ruby/object:Gem::Dependency
126
- name: yajl-ruby
94
+ name: ohm-contrib
95
+ prerelease: false
127
96
  requirement: &id008 !ruby/object:Gem::Requirement
128
97
  none: false
129
98
  requirements:
130
99
  - - "="
131
100
  - !ruby/object:Gem::Version
132
- segments:
133
- - 0
134
- - 7
135
- - 9
136
- version: 0.7.9
101
+ version: 0.1.1
137
102
  type: :runtime
138
- prerelease: false
139
103
  version_requirements: *id008
140
104
  - !ruby/object:Gem::Dependency
141
- name: thin
105
+ name: haml
106
+ prerelease: false
142
107
  requirement: &id009 !ruby/object:Gem::Requirement
143
108
  none: false
144
109
  requirements:
145
110
  - - "="
146
111
  - !ruby/object:Gem::Version
147
- segments:
148
- - 1
149
- - 2
150
- - 7
151
- version: 1.2.7
112
+ version: 3.0.25
152
113
  type: :runtime
153
- prerelease: false
154
114
  version_requirements: *id009
155
115
  - !ruby/object:Gem::Dependency
156
- name: sinatra-reloader
116
+ name: vegas
117
+ prerelease: false
157
118
  requirement: &id010 !ruby/object:Gem::Requirement
158
119
  none: false
159
120
  requirements:
160
121
  - - "="
161
122
  - !ruby/object:Gem::Version
162
- segments:
163
- - 0
164
- - 5
165
- - 0
166
- version: 0.5.0
167
- type: :development
168
- prerelease: false
123
+ version: 0.1.8
124
+ type: :runtime
169
125
  version_requirements: *id010
170
126
  - !ruby/object:Gem::Dependency
171
- name: rspec
127
+ name: yajl-ruby
128
+ prerelease: false
172
129
  requirement: &id011 !ruby/object:Gem::Requirement
173
130
  none: false
174
131
  requirements:
175
- - - "="
132
+ - - ">="
176
133
  - !ruby/object:Gem::Version
177
- segments:
178
- - 2
179
- - 4
180
- - 0
181
- version: 2.4.0
182
- type: :development
183
- prerelease: false
134
+ version: "0"
135
+ type: :runtime
184
136
  version_requirements: *id011
185
137
  - !ruby/object:Gem::Dependency
186
- name: rcov
138
+ name: thin
139
+ prerelease: false
187
140
  requirement: &id012 !ruby/object:Gem::Requirement
188
141
  none: false
189
142
  requirements:
190
- - - "="
143
+ - - ">="
191
144
  - !ruby/object:Gem::Version
192
- segments:
193
- - 0
194
- - 9
195
- - 9
196
- version: 0.9.9
197
- type: :development
198
- prerelease: false
145
+ version: "0"
146
+ type: :runtime
199
147
  version_requirements: *id012
200
148
  - !ruby/object:Gem::Dependency
201
- name: rack-test
149
+ name: diff-lcs
150
+ prerelease: false
202
151
  requirement: &id013 !ruby/object:Gem::Requirement
203
152
  none: false
204
153
  requirements:
205
154
  - - "="
206
155
  - !ruby/object:Gem::Version
207
- segments:
208
- - 0
209
- - 5
210
- - 7
211
- version: 0.5.7
156
+ version: 1.1.2
212
157
  type: :development
213
- prerelease: false
214
158
  version_requirements: *id013
215
159
  - !ruby/object:Gem::Dependency
216
- name: ZenTest
160
+ name: sinatra-reloader
161
+ prerelease: false
217
162
  requirement: &id014 !ruby/object:Gem::Requirement
218
163
  none: false
219
164
  requirements:
220
165
  - - "="
221
166
  - !ruby/object:Gem::Version
222
- segments:
223
- - 4
224
- - 4
225
- - 2
226
- version: 4.4.2
167
+ version: 0.5.0
227
168
  type: :development
228
- prerelease: false
229
169
  version_requirements: *id014
230
170
  - !ruby/object:Gem::Dependency
231
- name: autotest
171
+ name: rspec
172
+ prerelease: false
232
173
  requirement: &id015 !ruby/object:Gem::Requirement
233
174
  none: false
234
175
  requirements:
235
- - - "="
176
+ - - ~>
236
177
  - !ruby/object:Gem::Version
237
- segments:
238
- - 4
239
- - 4
240
- - 6
241
- version: 4.4.6
178
+ version: "2.5"
242
179
  type: :development
243
- prerelease: false
244
180
  version_requirements: *id015
245
181
  - !ruby/object:Gem::Dependency
246
- name: autotest-growl
182
+ name: rcov
183
+ prerelease: false
247
184
  requirement: &id016 !ruby/object:Gem::Requirement
248
185
  none: false
249
186
  requirements:
250
187
  - - "="
251
188
  - !ruby/object:Gem::Version
252
- segments:
253
- - 0
254
- - 2
255
- - 9
256
- version: 0.2.9
189
+ version: 0.9.9
257
190
  type: :development
258
- prerelease: false
259
191
  version_requirements: *id016
192
+ - !ruby/object:Gem::Dependency
193
+ name: rack-test
194
+ prerelease: false
195
+ requirement: &id017 !ruby/object:Gem::Requirement
196
+ none: false
197
+ requirements:
198
+ - - "="
199
+ - !ruby/object:Gem::Version
200
+ version: 0.5.7
201
+ type: :development
202
+ version_requirements: *id017
260
203
  description: Application registry based on Apache Zookeeper
261
204
  email:
262
205
  - lusis.org+rubygems.org@gmail.com
263
206
  executables:
264
207
  - noah
208
+ - noah-watcher.rb
265
209
  extensions: []
266
210
 
267
211
  extra_rdoc_files: []
268
212
 
269
213
  files:
270
214
  - .autotest
215
+ - .gemtest
271
216
  - .gitignore
272
217
  - Gemfile
273
- - Gemfile.lock
218
+ - LICENSE
274
219
  - README.md
275
220
  - Rakefile
221
+ - TODO.md
276
222
  - autotest/discover.rb
277
223
  - bin/noah
224
+ - bin/noah-watcher.rb
278
225
  - config.ru
279
- - doc/coverage/index.html
280
- - doc/coverage/jquery-1.3.2.min.js
281
- - doc/coverage/jquery.tablesorter.min.js
282
- - doc/coverage/lib-helpers_rb.html
283
- - doc/coverage/lib-models_rb.html
284
- - doc/coverage/noah_rb.html
285
- - doc/coverage/print.css
286
- - doc/coverage/rcov.js
287
- - doc/coverage/screen.css
226
+ - config/warble.rb
227
+ - examples/README.md
228
+ - examples/cluster.ru
229
+ - examples/custom-watcher.rb
230
+ - examples/httpclient-server.rb
231
+ - examples/httpclient.rb
232
+ - examples/httpclient2.rb
233
+ - examples/js/FABridge.js
234
+ - examples/js/WebSocketMain.swf
235
+ - examples/js/swfobject.js
236
+ - examples/js/web_socket.js
237
+ - examples/logger.rb
238
+ - examples/reconfiguring-sinatra-watcher.rb
239
+ - examples/reconfiguring-sinatra.rb
240
+ - examples/simple-post.rb
241
+ - examples/websocket.html
242
+ - examples/websocket.rb
288
243
  - lib/noah.rb
289
244
  - lib/noah/app.rb
290
- - lib/noah/applications.rb
291
- - lib/noah/configurations.rb
245
+ - lib/noah/application_routes.rb
246
+ - lib/noah/ark.rb
247
+ - lib/noah/configuration_routes.rb
248
+ - lib/noah/ephemeral_routes.rb
292
249
  - lib/noah/helpers.rb
293
- - lib/noah/hosts.rb
250
+ - lib/noah/host_routes.rb
294
251
  - lib/noah/models.rb
295
- - lib/noah/services.rb
252
+ - lib/noah/models/applications.rb
253
+ - lib/noah/models/configurations.rb
254
+ - lib/noah/models/ephemerals.rb
255
+ - lib/noah/models/hosts.rb
256
+ - lib/noah/models/services.rb
257
+ - lib/noah/models/watchers.rb
258
+ - lib/noah/passthrough.rb
259
+ - lib/noah/service_routes.rb
260
+ - lib/noah/validations.rb
261
+ - lib/noah/validations/watcher_validations.rb
296
262
  - lib/noah/version.rb
297
- - lib/noah/watchers.rb
263
+ - lib/noah/watcher.rb
264
+ - lib/noah/watcher_routes.rb
265
+ - lib/vendor/em-hiredis/Gemfile
266
+ - lib/vendor/em-hiredis/README.md
267
+ - lib/vendor/em-hiredis/Rakefile
268
+ - lib/vendor/em-hiredis/em-hiredis-0.0.1.gem
269
+ - lib/vendor/em-hiredis/em-hiredis.gemspec
270
+ - lib/vendor/em-hiredis/lib/em-hiredis.rb
271
+ - lib/vendor/em-hiredis/lib/em-hiredis/client.rb
272
+ - lib/vendor/em-hiredis/lib/em-hiredis/connection.rb
273
+ - lib/vendor/em-hiredis/lib/em-hiredis/event_emitter.rb
274
+ - lib/vendor/em-hiredis/lib/em-hiredis/version.rb
298
275
  - noah.gemspec
299
276
  - spec/application_spec.rb
300
277
  - spec/configuration_spec.rb
278
+ - spec/ephemeral_spec.rb
301
279
  - spec/host_spec.rb
302
280
  - spec/noahapp_application_spec.rb
303
281
  - spec/noahapp_configuration_spec.rb
304
282
  - spec/noahapp_host_spec.rb
305
283
  - spec/noahapp_service_spec.rb
306
284
  - spec/noahapp_spec.rb
285
+ - spec/noahapp_watcher_spec.rb
307
286
  - spec/service_spec.rb
308
287
  - spec/spec_helper.rb
288
+ - spec/support/db/.keep
289
+ - spec/support/test-redis.conf
290
+ - spec/watcher_spec.rb
309
291
  - views/200.erb
310
292
  - views/404.erb
311
293
  - views/500.erb
@@ -324,23 +306,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
324
306
  requirements:
325
307
  - - ">="
326
308
  - !ruby/object:Gem::Version
327
- hash: -1893767332938043475
328
- segments:
329
- - 0
330
309
  version: "0"
331
310
  required_rubygems_version: !ruby/object:Gem::Requirement
332
311
  none: false
333
312
  requirements:
334
313
  - - ">="
335
314
  - !ruby/object:Gem::Version
336
- hash: -1893767332938043475
337
- segments:
338
- - 0
339
315
  version: "0"
340
316
  requirements: []
341
317
 
342
318
  rubyforge_project: noah
343
- rubygems_version: 1.3.7
319
+ rubygems_version: 1.5.3
344
320
  signing_key:
345
321
  specification_version: 3
346
322
  summary: Application registry based on Apache Zookeeper