engineyard 1.4.6 → 1.4.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -218,9 +218,11 @@ module EY
218
218
 
219
219
  raise NoCommandError.new if cmd.nil? and hosts.size != 1
220
220
 
221
- hosts.each do |host|
221
+ exits = hosts.map do |host|
222
222
  system Escape.shell_command(['ssh', "#{environment.username}@#{host}", cmd].compact)
223
+ $?.exitstatus
223
224
  end
225
+ exit exits.detect {|status| !status.zero?} || 0
224
226
  end
225
227
 
226
228
  no_tasks do
@@ -74,12 +74,7 @@ module EY
74
74
 
75
75
  class ConfigurationError < EY::Error
76
76
  def initialize(key, value, source, message=nil)
77
- super(nil)
78
- @key, @value, @source, @message = key, value, source, message
79
- end
80
-
81
- def message
82
- %|"#{@key}" from #{@source} has invalid value: #{@value.inspect}#{": #{@message}" if @message}|
77
+ super %|"#{key}" from #{source} has invalid value: #{value.inspect}#{": #{message}" if message}|
83
78
  end
84
79
  end
85
80
  end
@@ -1,3 +1,3 @@
1
1
  module EY
2
- VERSION = '1.4.6'
2
+ VERSION = '1.4.7'
3
3
  end
@@ -111,6 +111,27 @@ describe "ey ssh with a command" do
111
111
  include_examples "it takes an environment name and an account name"
112
112
  end
113
113
 
114
+ describe "ey ssh with a command that fails" do
115
+ given "integration"
116
+
117
+ def extra_ey_options
118
+ ssh_cmd = "false" # fail immediately
119
+ {:prepend_to_path => {'ssh' => ssh_cmd}}
120
+ end
121
+
122
+ def command_to_run(opts)
123
+ cmd = %w[ssh ls]
124
+ cmd << "--environment" << opts[:environment] if opts[:environment]
125
+ cmd << "--account" << opts[:account] if opts[:account]
126
+ cmd
127
+ end
128
+
129
+ it "fails just like the ssh command fails" do
130
+ api_scenario "one app, one environment"
131
+ run_ey({:ssh_command => "ls", :environment => 'giblets', :verbose => true}, :expect_failure => true)
132
+ end
133
+ end
134
+
114
135
  describe "ey ssh with a multi-part command" do
115
136
  include_examples "running ey ssh"
116
137
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: engineyard
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 9
5
+ prerelease:
5
6
  segments:
6
7
  - 1
7
8
  - 4
8
- - 6
9
- segments_generated: true
10
- version: 1.4.6
9
+ - 7
10
+ version: 1.4.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - EY Cloud Team
@@ -15,249 +15,266 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-10 00:00:00 -08:00
18
+ date: 2011-11-16 00:00:00 -05:00
19
19
  default_executable: ey
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
23
25
  requirements:
24
26
  - - ~>
25
27
  - !ruby/object:Gem::Version
28
+ hash: 43
26
29
  segments:
27
30
  - 0
28
31
  - 14
29
32
  - 6
30
- segments_generated: true
31
33
  version: 0.14.6
32
- requirement: *id001
33
34
  name: thor
34
- prerelease: false
35
35
  type: :runtime
36
+ version_requirements: *id001
36
37
  - !ruby/object:Gem::Dependency
37
- version_requirements: &id002 !ruby/object:Gem::Requirement
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
38
41
  requirements:
39
42
  - - ~>
40
43
  - !ruby/object:Gem::Version
44
+ hash: 15
41
45
  segments:
42
46
  - 1
43
47
  - 6
44
48
  - 0
45
- segments_generated: true
46
49
  version: 1.6.0
47
- requirement: *id002
48
50
  name: rest-client
49
- prerelease: false
50
51
  type: :runtime
52
+ version_requirements: *id002
51
53
  - !ruby/object:Gem::Dependency
52
- version_requirements: &id003 !ruby/object:Gem::Requirement
54
+ prerelease: false
55
+ requirement: &id003 !ruby/object:Gem::Requirement
56
+ none: false
53
57
  requirements:
54
58
  - - ~>
55
59
  - !ruby/object:Gem::Version
60
+ hash: 13
56
61
  segments:
57
62
  - 1
58
63
  - 6
59
64
  - 1
60
- segments_generated: true
61
65
  version: 1.6.1
62
- requirement: *id003
63
66
  name: highline
64
- prerelease: false
65
67
  type: :runtime
68
+ version_requirements: *id003
66
69
  - !ruby/object:Gem::Dependency
67
- version_requirements: &id004 !ruby/object:Gem::Requirement
70
+ prerelease: false
71
+ requirement: &id004 !ruby/object:Gem::Requirement
72
+ none: false
68
73
  requirements:
69
74
  - - ">="
70
75
  - !ruby/object:Gem::Version
76
+ hash: 3
71
77
  segments:
72
78
  - 0
73
- segments_generated: true
74
79
  version: "0"
75
- requirement: *id004
76
80
  name: json_pure
77
- prerelease: false
78
81
  type: :runtime
82
+ version_requirements: *id004
79
83
  - !ruby/object:Gem::Dependency
80
- version_requirements: &id005 !ruby/object:Gem::Requirement
84
+ prerelease: false
85
+ requirement: &id005 !ruby/object:Gem::Requirement
86
+ none: false
81
87
  requirements:
82
88
  - - ~>
83
89
  - !ruby/object:Gem::Version
90
+ hash: 23
84
91
  segments:
85
92
  - 0
86
93
  - 0
87
94
  - 4
88
- segments_generated: true
89
95
  version: 0.0.4
90
- requirement: *id005
91
96
  name: escape
92
- prerelease: false
93
97
  type: :runtime
98
+ version_requirements: *id005
94
99
  - !ruby/object:Gem::Dependency
95
- version_requirements: &id006 !ruby/object:Gem::Requirement
100
+ prerelease: false
101
+ requirement: &id006 !ruby/object:Gem::Requirement
102
+ none: false
96
103
  requirements:
97
104
  - - "="
98
105
  - !ruby/object:Gem::Version
106
+ hash: 33
99
107
  segments:
100
108
  - 1
101
109
  - 5
102
- - 15
103
- segments_generated: true
104
- version: 1.5.15
105
- requirement: *id006
110
+ - 17
111
+ version: 1.5.17
106
112
  name: engineyard-serverside-adapter
107
- prerelease: false
108
113
  type: :runtime
114
+ version_requirements: *id006
109
115
  - !ruby/object:Gem::Dependency
110
- version_requirements: &id007 !ruby/object:Gem::Requirement
116
+ prerelease: false
117
+ requirement: &id007 !ruby/object:Gem::Requirement
118
+ none: false
111
119
  requirements:
112
120
  - - ~>
113
121
  - !ruby/object:Gem::Version
122
+ hash: 11
114
123
  segments:
115
124
  - 2
116
125
  - 1
117
126
  - 0
118
- segments_generated: true
119
127
  version: 2.1.0
120
- requirement: *id007
121
128
  name: net-ssh
122
- prerelease: false
123
129
  type: :runtime
130
+ version_requirements: *id007
124
131
  - !ruby/object:Gem::Dependency
125
- version_requirements: &id008 !ruby/object:Gem::Requirement
132
+ prerelease: false
133
+ requirement: &id008 !ruby/object:Gem::Requirement
134
+ none: false
126
135
  requirements:
127
136
  - - "="
128
137
  - !ruby/object:Gem::Version
138
+ hash: 5
129
139
  segments:
130
140
  - 2
131
141
  - 0
132
142
  - 5
133
- segments_generated: true
134
143
  version: 2.0.5
135
- requirement: *id008
136
144
  name: launchy
137
- prerelease: false
138
145
  type: :runtime
146
+ version_requirements: *id008
139
147
  - !ruby/object:Gem::Dependency
140
- version_requirements: &id009 !ruby/object:Gem::Requirement
148
+ prerelease: false
149
+ requirement: &id009 !ruby/object:Gem::Requirement
150
+ none: false
141
151
  requirements:
142
152
  - - ~>
143
153
  - !ruby/object:Gem::Version
154
+ hash: 3
144
155
  segments:
145
156
  - 2
146
157
  - 0
147
- segments_generated: true
148
158
  version: "2.0"
149
- requirement: *id009
150
159
  name: rspec
151
- prerelease: false
152
160
  type: :development
161
+ version_requirements: *id009
153
162
  - !ruby/object:Gem::Dependency
154
- version_requirements: &id010 !ruby/object:Gem::Requirement
163
+ prerelease: false
164
+ requirement: &id010 !ruby/object:Gem::Requirement
165
+ none: false
155
166
  requirements:
156
167
  - - ">="
157
168
  - !ruby/object:Gem::Version
169
+ hash: 3
158
170
  segments:
159
171
  - 0
160
- segments_generated: true
161
172
  version: "0"
162
- requirement: *id010
163
173
  name: rake
164
- prerelease: false
165
174
  type: :development
175
+ version_requirements: *id010
166
176
  - !ruby/object:Gem::Dependency
167
- version_requirements: &id011 !ruby/object:Gem::Requirement
177
+ prerelease: false
178
+ requirement: &id011 !ruby/object:Gem::Requirement
179
+ none: false
168
180
  requirements:
169
181
  - - ">="
170
182
  - !ruby/object:Gem::Version
183
+ hash: 3
171
184
  segments:
172
185
  - 0
173
- segments_generated: true
174
186
  version: "0"
175
- requirement: *id011
176
187
  name: rdoc
177
- prerelease: false
178
188
  type: :development
189
+ version_requirements: *id011
179
190
  - !ruby/object:Gem::Dependency
180
- version_requirements: &id012 !ruby/object:Gem::Requirement
191
+ prerelease: false
192
+ requirement: &id012 !ruby/object:Gem::Requirement
193
+ none: false
181
194
  requirements:
182
195
  - - ">="
183
196
  - !ruby/object:Gem::Version
197
+ hash: 3
184
198
  segments:
185
199
  - 0
186
- segments_generated: true
187
200
  version: "0"
188
- requirement: *id012
189
201
  name: fakeweb
190
- prerelease: false
191
202
  type: :development
203
+ version_requirements: *id012
192
204
  - !ruby/object:Gem::Dependency
193
- version_requirements: &id013 !ruby/object:Gem::Requirement
205
+ prerelease: false
206
+ requirement: &id013 !ruby/object:Gem::Requirement
207
+ none: false
194
208
  requirements:
195
209
  - - ">="
196
210
  - !ruby/object:Gem::Version
211
+ hash: 3
197
212
  segments:
198
213
  - 0
199
- segments_generated: true
200
214
  version: "0"
201
- requirement: *id013
202
215
  name: fakeweb-matcher
203
- prerelease: false
204
216
  type: :development
217
+ version_requirements: *id013
205
218
  - !ruby/object:Gem::Dependency
206
- version_requirements: &id014 !ruby/object:Gem::Requirement
219
+ prerelease: false
220
+ requirement: &id014 !ruby/object:Gem::Requirement
221
+ none: false
207
222
  requirements:
208
223
  - - ">="
209
224
  - !ruby/object:Gem::Version
225
+ hash: 3
210
226
  segments:
211
227
  - 0
212
- segments_generated: true
213
228
  version: "0"
214
- requirement: *id014
215
229
  name: fakefs
216
- prerelease: false
217
230
  type: :development
231
+ version_requirements: *id014
218
232
  - !ruby/object:Gem::Dependency
219
- version_requirements: &id015 !ruby/object:Gem::Requirement
233
+ prerelease: false
234
+ requirement: &id015 !ruby/object:Gem::Requirement
235
+ none: false
220
236
  requirements:
221
237
  - - ">="
222
238
  - !ruby/object:Gem::Version
239
+ hash: 3
223
240
  segments:
224
241
  - 0
225
- segments_generated: true
226
242
  version: "0"
227
- requirement: *id015
228
243
  name: sinatra
229
- prerelease: false
230
244
  type: :development
245
+ version_requirements: *id015
231
246
  - !ruby/object:Gem::Dependency
232
- version_requirements: &id016 !ruby/object:Gem::Requirement
247
+ prerelease: false
248
+ requirement: &id016 !ruby/object:Gem::Requirement
249
+ none: false
233
250
  requirements:
234
251
  - - ~>
235
252
  - !ruby/object:Gem::Version
253
+ hash: 19
236
254
  segments:
237
255
  - 0
238
256
  - 2
239
257
  - 2
240
- segments_generated: true
241
258
  version: 0.2.2
242
- requirement: *id016
243
259
  name: realweb
244
- prerelease: false
245
260
  type: :development
261
+ version_requirements: *id016
246
262
  - !ruby/object:Gem::Dependency
247
- version_requirements: &id017 !ruby/object:Gem::Requirement
263
+ prerelease: false
264
+ requirement: &id017 !ruby/object:Gem::Requirement
265
+ none: false
248
266
  requirements:
249
267
  - - ~>
250
268
  - !ruby/object:Gem::Version
269
+ hash: 21
251
270
  segments:
252
271
  - 1
253
272
  - 0
254
273
  - 1
255
- segments_generated: true
256
274
  version: 1.0.1
257
- requirement: *id017
258
275
  name: open4
259
- prerelease: false
260
276
  type: :development
277
+ version_requirements: *id017
261
278
  description: This gem allows you to deploy your rails application to the Engine Yard cloud directly from the command line.
262
279
  email: cloud@engineyard.com
263
280
  executables:
@@ -295,10 +312,45 @@ files:
295
312
  - lib/engineyard/ruby_ext.rb
296
313
  - lib/engineyard/thor.rb
297
314
  - lib/engineyard/version.rb
298
- - lib/engineyard/version_checker.rb
299
315
  - lib/engineyard.rb
300
316
  - LICENSE
301
317
  - README.rdoc
318
+ - spec/engineyard/api_spec.rb
319
+ - spec/engineyard/cli/api_spec.rb
320
+ - spec/engineyard/cli_spec.rb
321
+ - spec/engineyard/collection/apps_spec.rb
322
+ - spec/engineyard/collection/environments_spec.rb
323
+ - spec/engineyard/config_spec.rb
324
+ - spec/engineyard/model/api_struct_spec.rb
325
+ - spec/engineyard/model/environment_spec.rb
326
+ - spec/engineyard/model/instance_spec.rb
327
+ - spec/engineyard/repo_spec.rb
328
+ - spec/engineyard/resolver_spec.rb
329
+ - spec/engineyard_spec.rb
330
+ - spec/ey/deploy_spec.rb
331
+ - spec/ey/ey_spec.rb
332
+ - spec/ey/list_environments_spec.rb
333
+ - spec/ey/logs_spec.rb
334
+ - spec/ey/rebuild_spec.rb
335
+ - spec/ey/recipes/apply_spec.rb
336
+ - spec/ey/recipes/download_spec.rb
337
+ - spec/ey/recipes/upload_spec.rb
338
+ - spec/ey/rollback_spec.rb
339
+ - spec/ey/ssh_spec.rb
340
+ - spec/ey/status_spec.rb
341
+ - spec/ey/web/disable_spec.rb
342
+ - spec/ey/web/enable_spec.rb
343
+ - spec/ey/whoami_spec.rb
344
+ - spec/spec_helper.rb
345
+ - spec/support/bundled_ey
346
+ - spec/support/fake_awsm.rb
347
+ - spec/support/fake_awsm.ru
348
+ - spec/support/fixture_recipes.tgz
349
+ - spec/support/helpers.rb
350
+ - spec/support/matchers.rb
351
+ - spec/support/ruby_ext.rb
352
+ - spec/support/scenarios.rb
353
+ - spec/support/shared_behavior.rb
302
354
  has_rdoc: true
303
355
  homepage: http://github.com/engineyard/engineyard
304
356
  licenses: []
@@ -321,25 +373,27 @@ rdoc_options: []
321
373
  require_paths:
322
374
  - lib
323
375
  required_ruby_version: !ruby/object:Gem::Requirement
376
+ none: false
324
377
  requirements:
325
378
  - - ">="
326
379
  - !ruby/object:Gem::Version
380
+ hash: 3
327
381
  segments:
328
382
  - 0
329
- segments_generated: true
330
383
  version: "0"
331
384
  required_rubygems_version: !ruby/object:Gem::Requirement
385
+ none: false
332
386
  requirements:
333
387
  - - ">="
334
388
  - !ruby/object:Gem::Version
389
+ hash: 3
335
390
  segments:
336
391
  - 0
337
- segments_generated: true
338
392
  version: "0"
339
393
  requirements: []
340
394
 
341
395
  rubyforge_project:
342
- rubygems_version: 1.3.6
396
+ rubygems_version: 1.5.2
343
397
  signing_key:
344
398
  specification_version: 3
345
399
  summary: Command-line deployment for the Engine Yard cloud
@@ -1,8 +0,0 @@
1
- module EY
2
- class VersionChecker
3
- RUBYGEMS_ENDPOINT = 'https://rubygems.org/api/v1/versions/engineyard.json'
4
-
5
- def self.check
6
- end
7
- end
8
- end