engineyard 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,6 +19,5 @@ module Spec
19
19
  FakeFS.without { Dir.chdir(@_original_wd.pop) }
20
20
  end
21
21
  end
22
-
23
22
  end
24
23
  end
@@ -142,7 +142,7 @@ module EY
142
142
 
143
143
  def define_git_repo(name, &setup)
144
144
  @git_repo_setup ||= {}
145
- raise "Attempted to redefine git repo #{name}; don't do that!" if @git_repo_setup.has_key?(name)
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
- end
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: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 1
10
- version: 1.2.1
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-25 00:00:00 -07:00
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: 7
27
+ hash: 39
29
28
  segments:
30
- - 1
31
- - 5
32
- - 2
33
- version: 1.5.2
29
+ - 0
30
+ - 14
31
+ - 0
32
+ version: 0.14.0
34
33
  requirement: *id001
35
34
  type: :runtime
36
- name: highline
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: 39
43
+ hash: 7
45
44
  segments:
46
- - 0
47
- - 14
48
- - 0
49
- version: 0.14.0
45
+ - 1
46
+ - 4
47
+ version: "1.4"
50
48
  requirement: *id002
51
49
  type: :runtime
52
- name: thor
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: 3
58
+ hash: 7
61
59
  segments:
62
- - 0
63
- version: "0"
60
+ - 1
61
+ - 5
62
+ - 2
63
+ version: 1.5.2
64
64
  requirement: *id003
65
65
  type: :runtime
66
- name: ruby-termios
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: 23
74
+ hash: 3
75
75
  segments:
76
76
  - 0
77
- - 0
78
- - 4
79
- version: 0.0.4
77
+ version: "0"
80
78
  requirement: *id004
81
79
  type: :runtime
82
- name: escape
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: 7
88
+ hash: 3
91
89
  segments:
92
- - 1
93
- - 4
94
- version: "1.4"
90
+ - 0
91
+ version: "0"
95
92
  requirement: *id005
96
93
  type: :runtime
97
- name: rest-client
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: 3
102
+ hash: 23
106
103
  segments:
107
104
  - 0
108
- version: "0"
105
+ - 0
106
+ - 4
107
+ version: 0.0.4
109
108
  requirement: *id006
110
109
  type: :runtime
111
- name: json_pure
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