ridley 0.3.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.rbenv-version +1 -0
- data/.travis.yml +1 -0
- data/Gemfile +46 -1
- data/Guardfile +0 -1
- data/README.md +15 -0
- data/Thorfile +18 -15
- data/bootstrappers/omnibus.erb +73 -0
- data/lib/ridley/bootstrapper/context.rb +172 -0
- data/lib/ridley/bootstrapper.rb +99 -0
- data/lib/ridley/chain_link.rb +25 -0
- data/lib/ridley/connection.rb +27 -5
- data/lib/ridley/errors.rb +6 -1
- data/lib/ridley/logging.rb +30 -0
- data/lib/ridley/resources/client.rb +3 -3
- data/lib/ridley/resources/cookbook.rb +3 -3
- data/lib/ridley/resources/data_bag.rb +8 -8
- data/lib/ridley/resources/environment.rb +3 -3
- data/lib/ridley/resources/node.rb +57 -3
- data/lib/ridley/resources/role.rb +3 -3
- data/lib/ridley/resources/sandbox.rb +3 -3
- data/lib/ridley/ssh/response.rb +13 -0
- data/lib/ridley/ssh/response_set.rb +51 -0
- data/lib/ridley/ssh/worker.rb +71 -0
- data/lib/ridley/ssh.rb +74 -0
- data/lib/ridley/version.rb +1 -1
- data/lib/ridley.rb +42 -17
- data/ridley.gemspec +6 -17
- data/spec/acceptance/bootstrapping_spec.rb +29 -0
- data/spec/spec_helper.rb +19 -3
- data/spec/unit/ridley/bootstrapper/context_spec.rb +119 -0
- data/spec/unit/ridley/bootstrapper_spec.rb +86 -0
- data/spec/unit/ridley/resources/node_spec.rb +41 -1
- data/spec/unit/ridley/ssh_spec.rb +31 -0
- data/spec/unit/ridley_spec.rb +0 -6
- metadata +42 -185
- data/lib/ridley/context.rb +0 -25
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ridley
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,16 +9,16 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: json
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 1.5.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,15 +26,15 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 1.5.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
31
|
+
name: multi_json
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
none: false
|
34
34
|
requirements:
|
35
35
|
- - ! '>='
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
37
|
+
version: 1.0.4
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,15 +42,15 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
45
|
+
version: 1.0.4
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
47
|
+
name: chozo
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
none: false
|
50
50
|
requirements:
|
51
51
|
- - ! '>='
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: 0.2.2
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,9 +58,9 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 0.2.2
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
|
-
name: mixlib-
|
63
|
+
name: mixlib-log
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
|
-
name:
|
79
|
+
name: mixlib-authentication
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
81
81
|
none: false
|
82
82
|
requirements:
|
@@ -92,7 +92,7 @@ dependencies:
|
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
|
-
name:
|
95
|
+
name: addressable
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
@@ -108,13 +108,13 @@ dependencies:
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
|
-
name:
|
111
|
+
name: faraday
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
113
113
|
none: false
|
114
114
|
requirements:
|
115
115
|
- - ! '>='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: '0'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
requirements:
|
123
123
|
- - ! '>='
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
125
|
+
version: '0'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: activemodel
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,174 +156,14 @@ dependencies:
|
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: 3.2.0
|
158
158
|
- !ruby/object:Gem::Dependency
|
159
|
-
name:
|
159
|
+
name: celluloid
|
160
160
|
requirement: !ruby/object:Gem::Requirement
|
161
161
|
none: false
|
162
162
|
requirements:
|
163
163
|
- - ! '>='
|
164
164
|
- !ruby/object:Gem::Version
|
165
165
|
version: '0'
|
166
|
-
type: :
|
167
|
-
prerelease: false
|
168
|
-
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
|
-
requirements:
|
171
|
-
- - ! '>='
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
174
|
-
- !ruby/object:Gem::Dependency
|
175
|
-
name: rspec
|
176
|
-
requirement: !ruby/object:Gem::Requirement
|
177
|
-
none: false
|
178
|
-
requirements:
|
179
|
-
- - ! '>='
|
180
|
-
- !ruby/object:Gem::Version
|
181
|
-
version: '0'
|
182
|
-
type: :development
|
183
|
-
prerelease: false
|
184
|
-
version_requirements: !ruby/object:Gem::Requirement
|
185
|
-
none: false
|
186
|
-
requirements:
|
187
|
-
- - ! '>='
|
188
|
-
- !ruby/object:Gem::Version
|
189
|
-
version: '0'
|
190
|
-
- !ruby/object:Gem::Dependency
|
191
|
-
name: fuubar
|
192
|
-
requirement: !ruby/object:Gem::Requirement
|
193
|
-
none: false
|
194
|
-
requirements:
|
195
|
-
- - ! '>='
|
196
|
-
- !ruby/object:Gem::Version
|
197
|
-
version: '0'
|
198
|
-
type: :development
|
199
|
-
prerelease: false
|
200
|
-
version_requirements: !ruby/object:Gem::Requirement
|
201
|
-
none: false
|
202
|
-
requirements:
|
203
|
-
- - ! '>='
|
204
|
-
- !ruby/object:Gem::Version
|
205
|
-
version: '0'
|
206
|
-
- !ruby/object:Gem::Dependency
|
207
|
-
name: spork
|
208
|
-
requirement: !ruby/object:Gem::Requirement
|
209
|
-
none: false
|
210
|
-
requirements:
|
211
|
-
- - ! '>='
|
212
|
-
- !ruby/object:Gem::Version
|
213
|
-
version: '0'
|
214
|
-
type: :development
|
215
|
-
prerelease: false
|
216
|
-
version_requirements: !ruby/object:Gem::Requirement
|
217
|
-
none: false
|
218
|
-
requirements:
|
219
|
-
- - ! '>='
|
220
|
-
- !ruby/object:Gem::Version
|
221
|
-
version: '0'
|
222
|
-
- !ruby/object:Gem::Dependency
|
223
|
-
name: yard
|
224
|
-
requirement: !ruby/object:Gem::Requirement
|
225
|
-
none: false
|
226
|
-
requirements:
|
227
|
-
- - ! '>='
|
228
|
-
- !ruby/object:Gem::Version
|
229
|
-
version: '0'
|
230
|
-
type: :development
|
231
|
-
prerelease: false
|
232
|
-
version_requirements: !ruby/object:Gem::Requirement
|
233
|
-
none: false
|
234
|
-
requirements:
|
235
|
-
- - ! '>='
|
236
|
-
- !ruby/object:Gem::Version
|
237
|
-
version: '0'
|
238
|
-
- !ruby/object:Gem::Dependency
|
239
|
-
name: guard
|
240
|
-
requirement: !ruby/object:Gem::Requirement
|
241
|
-
none: false
|
242
|
-
requirements:
|
243
|
-
- - ! '>='
|
244
|
-
- !ruby/object:Gem::Version
|
245
|
-
version: '0'
|
246
|
-
type: :development
|
247
|
-
prerelease: false
|
248
|
-
version_requirements: !ruby/object:Gem::Requirement
|
249
|
-
none: false
|
250
|
-
requirements:
|
251
|
-
- - ! '>='
|
252
|
-
- !ruby/object:Gem::Version
|
253
|
-
version: '0'
|
254
|
-
- !ruby/object:Gem::Dependency
|
255
|
-
name: guard-rspec
|
256
|
-
requirement: !ruby/object:Gem::Requirement
|
257
|
-
none: false
|
258
|
-
requirements:
|
259
|
-
- - ! '>='
|
260
|
-
- !ruby/object:Gem::Version
|
261
|
-
version: '0'
|
262
|
-
type: :development
|
263
|
-
prerelease: false
|
264
|
-
version_requirements: !ruby/object:Gem::Requirement
|
265
|
-
none: false
|
266
|
-
requirements:
|
267
|
-
- - ! '>='
|
268
|
-
- !ruby/object:Gem::Version
|
269
|
-
version: '0'
|
270
|
-
- !ruby/object:Gem::Dependency
|
271
|
-
name: guard-spork
|
272
|
-
requirement: !ruby/object:Gem::Requirement
|
273
|
-
none: false
|
274
|
-
requirements:
|
275
|
-
- - ! '>='
|
276
|
-
- !ruby/object:Gem::Version
|
277
|
-
version: '0'
|
278
|
-
type: :development
|
279
|
-
prerelease: false
|
280
|
-
version_requirements: !ruby/object:Gem::Requirement
|
281
|
-
none: false
|
282
|
-
requirements:
|
283
|
-
- - ! '>='
|
284
|
-
- !ruby/object:Gem::Version
|
285
|
-
version: '0'
|
286
|
-
- !ruby/object:Gem::Dependency
|
287
|
-
name: guard-yard
|
288
|
-
requirement: !ruby/object:Gem::Requirement
|
289
|
-
none: false
|
290
|
-
requirements:
|
291
|
-
- - ! '>='
|
292
|
-
- !ruby/object:Gem::Version
|
293
|
-
version: '0'
|
294
|
-
type: :development
|
295
|
-
prerelease: false
|
296
|
-
version_requirements: !ruby/object:Gem::Requirement
|
297
|
-
none: false
|
298
|
-
requirements:
|
299
|
-
- - ! '>='
|
300
|
-
- !ruby/object:Gem::Version
|
301
|
-
version: '0'
|
302
|
-
- !ruby/object:Gem::Dependency
|
303
|
-
name: coolline
|
304
|
-
requirement: !ruby/object:Gem::Requirement
|
305
|
-
none: false
|
306
|
-
requirements:
|
307
|
-
- - ! '>='
|
308
|
-
- !ruby/object:Gem::Version
|
309
|
-
version: '0'
|
310
|
-
type: :development
|
311
|
-
prerelease: false
|
312
|
-
version_requirements: !ruby/object:Gem::Requirement
|
313
|
-
none: false
|
314
|
-
requirements:
|
315
|
-
- - ! '>='
|
316
|
-
- !ruby/object:Gem::Version
|
317
|
-
version: '0'
|
318
|
-
- !ruby/object:Gem::Dependency
|
319
|
-
name: redcarpet
|
320
|
-
requirement: !ruby/object:Gem::Requirement
|
321
|
-
none: false
|
322
|
-
requirements:
|
323
|
-
- - ! '>='
|
324
|
-
- !ruby/object:Gem::Version
|
325
|
-
version: '0'
|
326
|
-
type: :development
|
166
|
+
type: :runtime
|
327
167
|
prerelease: false
|
328
168
|
version_requirements: !ruby/object:Gem::Requirement
|
329
169
|
none: false
|
@@ -332,14 +172,14 @@ dependencies:
|
|
332
172
|
- !ruby/object:Gem::Version
|
333
173
|
version: '0'
|
334
174
|
- !ruby/object:Gem::Dependency
|
335
|
-
name:
|
175
|
+
name: net-ssh
|
336
176
|
requirement: !ruby/object:Gem::Requirement
|
337
177
|
none: false
|
338
178
|
requirements:
|
339
179
|
- - ! '>='
|
340
180
|
- !ruby/object:Gem::Version
|
341
181
|
version: '0'
|
342
|
-
type: :
|
182
|
+
type: :runtime
|
343
183
|
prerelease: false
|
344
184
|
version_requirements: !ruby/object:Gem::Requirement
|
345
185
|
none: false
|
@@ -348,14 +188,14 @@ dependencies:
|
|
348
188
|
- !ruby/object:Gem::Version
|
349
189
|
version: '0'
|
350
190
|
- !ruby/object:Gem::Dependency
|
351
|
-
name:
|
191
|
+
name: erubis
|
352
192
|
requirement: !ruby/object:Gem::Requirement
|
353
193
|
none: false
|
354
194
|
requirements:
|
355
195
|
- - ! '>='
|
356
196
|
- !ruby/object:Gem::Version
|
357
197
|
version: '0'
|
358
|
-
type: :
|
198
|
+
type: :runtime
|
359
199
|
prerelease: false
|
360
200
|
version_requirements: !ruby/object:Gem::Requirement
|
361
201
|
none: false
|
@@ -371,18 +211,23 @@ extensions: []
|
|
371
211
|
extra_rdoc_files: []
|
372
212
|
files:
|
373
213
|
- .gitignore
|
214
|
+
- .rbenv-version
|
374
215
|
- .travis.yml
|
375
216
|
- Gemfile
|
376
217
|
- Guardfile
|
377
218
|
- LICENSE
|
378
219
|
- README.md
|
379
220
|
- Thorfile
|
221
|
+
- bootstrappers/omnibus.erb
|
380
222
|
- lib/ridley.rb
|
223
|
+
- lib/ridley/bootstrapper.rb
|
224
|
+
- lib/ridley/bootstrapper/context.rb
|
225
|
+
- lib/ridley/chain_link.rb
|
381
226
|
- lib/ridley/connection.rb
|
382
|
-
- lib/ridley/context.rb
|
383
227
|
- lib/ridley/dsl.rb
|
384
228
|
- lib/ridley/errors.rb
|
385
229
|
- lib/ridley/log.rb
|
230
|
+
- lib/ridley/logging.rb
|
386
231
|
- lib/ridley/middleware.rb
|
387
232
|
- lib/ridley/middleware/chef_auth.rb
|
388
233
|
- lib/ridley/middleware/chef_response.rb
|
@@ -397,8 +242,13 @@ files:
|
|
397
242
|
- lib/ridley/resources/role.rb
|
398
243
|
- lib/ridley/resources/sandbox.rb
|
399
244
|
- lib/ridley/resources/search.rb
|
245
|
+
- lib/ridley/ssh.rb
|
246
|
+
- lib/ridley/ssh/response.rb
|
247
|
+
- lib/ridley/ssh/response_set.rb
|
248
|
+
- lib/ridley/ssh/worker.rb
|
400
249
|
- lib/ridley/version.rb
|
401
250
|
- ridley.gemspec
|
251
|
+
- spec/acceptance/bootstrapping_spec.rb
|
402
252
|
- spec/acceptance/client_resource_spec.rb
|
403
253
|
- spec/acceptance/cookbook_resource_spec.rb
|
404
254
|
- spec/acceptance/data_bag_item_resource_spec.rb
|
@@ -415,6 +265,8 @@ files:
|
|
415
265
|
- spec/support/each_matcher.rb
|
416
266
|
- spec/support/shared_examples/ridley_resource.rb
|
417
267
|
- spec/support/spec_helpers.rb
|
268
|
+
- spec/unit/ridley/bootstrapper/context_spec.rb
|
269
|
+
- spec/unit/ridley/bootstrapper_spec.rb
|
418
270
|
- spec/unit/ridley/connection_spec.rb
|
419
271
|
- spec/unit/ridley/errors_spec.rb
|
420
272
|
- spec/unit/ridley/middleware/chef_auth_spec.rb
|
@@ -429,6 +281,7 @@ files:
|
|
429
281
|
- spec/unit/ridley/resources/node_spec.rb
|
430
282
|
- spec/unit/ridley/resources/role_spec.rb
|
431
283
|
- spec/unit/ridley/resources/search_spec.rb
|
284
|
+
- spec/unit/ridley/ssh_spec.rb
|
432
285
|
- spec/unit/ridley_spec.rb
|
433
286
|
homepage: https://github.com/reset/ridley
|
434
287
|
licenses: []
|
@@ -450,7 +303,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
450
303
|
version: '0'
|
451
304
|
segments:
|
452
305
|
- 0
|
453
|
-
hash:
|
306
|
+
hash: -1500249916979899563
|
454
307
|
requirements: []
|
455
308
|
rubyforge_project:
|
456
309
|
rubygems_version: 1.8.23
|
@@ -458,6 +311,7 @@ signing_key:
|
|
458
311
|
specification_version: 3
|
459
312
|
summary: A reliable Chef API client with a clean syntax
|
460
313
|
test_files:
|
314
|
+
- spec/acceptance/bootstrapping_spec.rb
|
461
315
|
- spec/acceptance/client_resource_spec.rb
|
462
316
|
- spec/acceptance/cookbook_resource_spec.rb
|
463
317
|
- spec/acceptance/data_bag_item_resource_spec.rb
|
@@ -474,6 +328,8 @@ test_files:
|
|
474
328
|
- spec/support/each_matcher.rb
|
475
329
|
- spec/support/shared_examples/ridley_resource.rb
|
476
330
|
- spec/support/spec_helpers.rb
|
331
|
+
- spec/unit/ridley/bootstrapper/context_spec.rb
|
332
|
+
- spec/unit/ridley/bootstrapper_spec.rb
|
477
333
|
- spec/unit/ridley/connection_spec.rb
|
478
334
|
- spec/unit/ridley/errors_spec.rb
|
479
335
|
- spec/unit/ridley/middleware/chef_auth_spec.rb
|
@@ -488,5 +344,6 @@ test_files:
|
|
488
344
|
- spec/unit/ridley/resources/node_spec.rb
|
489
345
|
- spec/unit/ridley/resources/role_spec.rb
|
490
346
|
- spec/unit/ridley/resources/search_spec.rb
|
347
|
+
- spec/unit/ridley/ssh_spec.rb
|
491
348
|
- spec/unit/ridley_spec.rb
|
492
349
|
has_rdoc:
|
data/lib/ridley/context.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
module Ridley
|
2
|
-
# @api private
|
3
|
-
# @author Jamie Winsor <jamie@vialstudios.com>
|
4
|
-
class Context
|
5
|
-
attr_reader :resource
|
6
|
-
attr_reader :connection
|
7
|
-
|
8
|
-
# @param [Constant] resource
|
9
|
-
# the constant of the class to send class functions to
|
10
|
-
# @param [Ridley::Connection] connection
|
11
|
-
# the connection to use when sending class functions to resources
|
12
|
-
def initialize(resource, connection)
|
13
|
-
@resource = resource
|
14
|
-
@connection = connection
|
15
|
-
end
|
16
|
-
|
17
|
-
def new(*args)
|
18
|
-
resource.send(:new, connection, *args)
|
19
|
-
end
|
20
|
-
|
21
|
-
def method_missing(fun, *args, &block)
|
22
|
-
resource.send(fun, connection, *args, &block)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|