engineyard 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/engineyard/api.rb +5 -1
- data/lib/engineyard/cli.rb +1 -1
- data/lib/engineyard/cli/recipes.rb +3 -3
- data/lib/engineyard/collection/abstract.rb +9 -1
- data/lib/engineyard/error.rb +27 -6
- data/lib/engineyard/model/#api_struct.rb# +31 -0
- data/lib/engineyard/model/api_struct.rb +1 -0
- data/lib/engineyard/thor.rb +11 -1
- data/lib/engineyard/version.rb +1 -1
- data/spec/engineyard/#resolver_spec.rb# +41 -0
- data/spec/engineyard/api_spec.rb +30 -0
- data/spec/engineyard/collection/apps_spec.rb +2 -0
- data/spec/engineyard/collection/environments_spec.rb +2 -0
- data/spec/ey/list_environments_spec.rb +6 -0
- data/spec/ey/recipes/apply_spec.rb +6 -0
- data/spec/ey/recipes/download_spec.rb +6 -0
- data/spec/ey/recipes/upload_spec.rb +6 -0
- data/spec/ey/ssh_spec.rb +6 -0
- data/spec/spec_helper.rb +2 -6
- data/spec/support/#shared_behavior.rb# +275 -0
- data/spec/support/bundled_ey +4 -7
- data/spec/support/fake_awsm.ru +197 -313
- data/spec/support/git_repo.rb +0 -1
- data/spec/support/helpers.rb +1 -2
- data/spec/support/shared_behavior.rb +28 -1
- metadata +48 -43
data/spec/support/git_repo.rb
CHANGED
data/spec/support/helpers.rb
CHANGED
@@ -142,7 +142,7 @@ module EY
|
|
142
142
|
|
143
143
|
def define_git_repo(name, &setup)
|
144
144
|
@git_repo_setup ||= {}
|
145
|
-
|
145
|
+
return if @git_repo_setup.key?(name)
|
146
146
|
@git_repo_setup[name] = setup
|
147
147
|
end
|
148
148
|
|
@@ -162,6 +162,5 @@ module EY
|
|
162
162
|
end
|
163
163
|
@git_repo_dir_cache[name] = git_dir
|
164
164
|
end
|
165
|
-
|
166
165
|
end
|
167
166
|
end
|
@@ -22,6 +22,27 @@ module Spec
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
+
shared_examples_for "it requires an unambiguous git repo" do
|
26
|
+
include Spec::Helpers::SharedIntegrationTestUtils
|
27
|
+
|
28
|
+
define_git_repo('dup test') do
|
29
|
+
system("git remote add dup git://github.com/engineyard/dup.git")
|
30
|
+
end
|
31
|
+
|
32
|
+
use_git_repo('dup test')
|
33
|
+
|
34
|
+
before(:all) do
|
35
|
+
api_scenario "two apps, same git uri"
|
36
|
+
end
|
37
|
+
|
38
|
+
it "lists disambiguating environments to choose from" do
|
39
|
+
run_ey({}, {:expect_failure => true})
|
40
|
+
@err.should =~ /ambiguous/
|
41
|
+
@err.should =~ /specify one of the following environments/
|
42
|
+
@err.should =~ /giblets/
|
43
|
+
@err.should =~ /keycollector_production/
|
44
|
+
end
|
45
|
+
end
|
25
46
|
|
26
47
|
shared_examples_for "it takes an environment name" do
|
27
48
|
include Spec::Helpers::SharedIntegrationTestUtils
|
@@ -212,7 +233,7 @@ shared_examples_for "model collections" do
|
|
212
233
|
it "returns nil when it can't find anything" do
|
213
234
|
@collection.match_one("dev-and-production").should be_nil
|
214
235
|
end
|
215
|
-
|
236
|
+
end
|
216
237
|
|
217
238
|
describe "#match_one!" do
|
218
239
|
it "works when given an unambiguous substring" do
|
@@ -229,6 +250,12 @@ shared_examples_for "model collections" do
|
|
229
250
|
@collection.match_one!("app_staging").name.should == "app_staging"
|
230
251
|
end
|
231
252
|
|
253
|
+
it "raises an error when given an ambiguous exact string" do
|
254
|
+
lambda {
|
255
|
+
@collection.match_one!("app_duplicate")
|
256
|
+
}.should raise_error(@collection_class.ambiguous_error)
|
257
|
+
end
|
258
|
+
|
232
259
|
it "raises an error when it can't find anything" do
|
233
260
|
lambda {
|
234
261
|
@collection.match_one!("dev-and-production")
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: engineyard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 2
|
10
|
+
version: 1.2.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- EY Cloud Team
|
@@ -15,100 +15,100 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-31 00:00:00 -07:00
|
19
19
|
default_executable: ey
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
prerelease: false
|
23
22
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
23
|
none: false
|
25
24
|
requirements:
|
26
25
|
- - ~>
|
27
26
|
- !ruby/object:Gem::Version
|
28
|
-
hash:
|
27
|
+
hash: 39
|
29
28
|
segments:
|
30
|
-
-
|
31
|
-
-
|
32
|
-
-
|
33
|
-
version:
|
29
|
+
- 0
|
30
|
+
- 14
|
31
|
+
- 0
|
32
|
+
version: 0.14.0
|
34
33
|
requirement: *id001
|
35
34
|
type: :runtime
|
36
|
-
name:
|
37
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
name: thor
|
38
36
|
prerelease: false
|
37
|
+
- !ruby/object:Gem::Dependency
|
39
38
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
40
39
|
none: false
|
41
40
|
requirements:
|
42
41
|
- - ~>
|
43
42
|
- !ruby/object:Gem::Version
|
44
|
-
hash:
|
43
|
+
hash: 7
|
45
44
|
segments:
|
46
|
-
-
|
47
|
-
-
|
48
|
-
|
49
|
-
version: 0.14.0
|
45
|
+
- 1
|
46
|
+
- 4
|
47
|
+
version: "1.4"
|
50
48
|
requirement: *id002
|
51
49
|
type: :runtime
|
52
|
-
name:
|
53
|
-
- !ruby/object:Gem::Dependency
|
50
|
+
name: rest-client
|
54
51
|
prerelease: false
|
52
|
+
- !ruby/object:Gem::Dependency
|
55
53
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
56
54
|
none: false
|
57
55
|
requirements:
|
58
|
-
- -
|
56
|
+
- - ~>
|
59
57
|
- !ruby/object:Gem::Version
|
60
|
-
hash:
|
58
|
+
hash: 7
|
61
59
|
segments:
|
62
|
-
-
|
63
|
-
|
60
|
+
- 1
|
61
|
+
- 5
|
62
|
+
- 2
|
63
|
+
version: 1.5.2
|
64
64
|
requirement: *id003
|
65
65
|
type: :runtime
|
66
|
-
name:
|
67
|
-
- !ruby/object:Gem::Dependency
|
66
|
+
name: highline
|
68
67
|
prerelease: false
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
69
|
version_requirements: &id004 !ruby/object:Gem::Requirement
|
70
70
|
none: false
|
71
71
|
requirements:
|
72
|
-
- -
|
72
|
+
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
hash:
|
74
|
+
hash: 3
|
75
75
|
segments:
|
76
76
|
- 0
|
77
|
-
|
78
|
-
- 4
|
79
|
-
version: 0.0.4
|
77
|
+
version: "0"
|
80
78
|
requirement: *id004
|
81
79
|
type: :runtime
|
82
|
-
name:
|
83
|
-
- !ruby/object:Gem::Dependency
|
80
|
+
name: ruby-termios
|
84
81
|
prerelease: false
|
82
|
+
- !ruby/object:Gem::Dependency
|
85
83
|
version_requirements: &id005 !ruby/object:Gem::Requirement
|
86
84
|
none: false
|
87
85
|
requirements:
|
88
|
-
- -
|
86
|
+
- - ">="
|
89
87
|
- !ruby/object:Gem::Version
|
90
|
-
hash:
|
88
|
+
hash: 3
|
91
89
|
segments:
|
92
|
-
-
|
93
|
-
|
94
|
-
version: "1.4"
|
90
|
+
- 0
|
91
|
+
version: "0"
|
95
92
|
requirement: *id005
|
96
93
|
type: :runtime
|
97
|
-
name:
|
98
|
-
- !ruby/object:Gem::Dependency
|
94
|
+
name: json_pure
|
99
95
|
prerelease: false
|
96
|
+
- !ruby/object:Gem::Dependency
|
100
97
|
version_requirements: &id006 !ruby/object:Gem::Requirement
|
101
98
|
none: false
|
102
99
|
requirements:
|
103
|
-
- -
|
100
|
+
- - ~>
|
104
101
|
- !ruby/object:Gem::Version
|
105
|
-
hash:
|
102
|
+
hash: 23
|
106
103
|
segments:
|
107
104
|
- 0
|
108
|
-
|
105
|
+
- 0
|
106
|
+
- 4
|
107
|
+
version: 0.0.4
|
109
108
|
requirement: *id006
|
110
109
|
type: :runtime
|
111
|
-
name:
|
110
|
+
name: escape
|
111
|
+
prerelease: false
|
112
112
|
description: This gem allows you to deploy your rails application to the Engine Yard cloud directly from the command line.
|
113
113
|
email: cloud@engineyard.com
|
114
114
|
executables:
|
@@ -131,6 +131,7 @@ files:
|
|
131
131
|
- lib/engineyard/collection.rb
|
132
132
|
- lib/engineyard/config.rb
|
133
133
|
- lib/engineyard/error.rb
|
134
|
+
- lib/engineyard/model/#api_struct.rb#
|
134
135
|
- lib/engineyard/model/api_struct.rb
|
135
136
|
- lib/engineyard/model/app.rb
|
136
137
|
- lib/engineyard/model/environment.rb
|
@@ -145,6 +146,7 @@ files:
|
|
145
146
|
- lib/engineyard.rb
|
146
147
|
- LICENSE
|
147
148
|
- README.rdoc
|
149
|
+
- spec/engineyard/#resolver_spec.rb#
|
148
150
|
- spec/engineyard/api_spec.rb
|
149
151
|
- spec/engineyard/cli/api_spec.rb
|
150
152
|
- spec/engineyard/cli_spec.rb
|
@@ -169,6 +171,7 @@ files:
|
|
169
171
|
- spec/ey/web/disable_spec.rb
|
170
172
|
- spec/ey/web/enable_spec.rb
|
171
173
|
- spec/spec_helper.rb
|
174
|
+
- spec/support/#shared_behavior.rb#
|
172
175
|
- spec/support/bundled_ey
|
173
176
|
- spec/support/fake_awsm.ru
|
174
177
|
- spec/support/git_repo.rb
|
@@ -210,6 +213,7 @@ signing_key:
|
|
210
213
|
specification_version: 3
|
211
214
|
summary: Command-line deployment for the Engine Yard cloud
|
212
215
|
test_files:
|
216
|
+
- spec/engineyard/#resolver_spec.rb#
|
213
217
|
- spec/engineyard/api_spec.rb
|
214
218
|
- spec/engineyard/cli/api_spec.rb
|
215
219
|
- spec/engineyard/cli_spec.rb
|
@@ -234,6 +238,7 @@ test_files:
|
|
234
238
|
- spec/ey/web/disable_spec.rb
|
235
239
|
- spec/ey/web/enable_spec.rb
|
236
240
|
- spec/spec_helper.rb
|
241
|
+
- spec/support/#shared_behavior.rb#
|
237
242
|
- spec/support/bundled_ey
|
238
243
|
- spec/support/fake_awsm.ru
|
239
244
|
- spec/support/git_repo.rb
|