shelly 0.2.16 → 0.2.17

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.2.17 / 2013-04-12
2
+
3
+ * [feature] Added '--cloud code_name' to command given in output after failed `shelly redeploy` and `shelly stop`.
4
+
1
5
  ## 0.2.16 / 2013-04-04
2
6
 
3
7
  * [bug] `shelly add` now properly sets puma as web server when run under JRuby
@@ -619,7 +619,7 @@ Wait until cloud is in 'turned off' state and try again.}
619
619
 
620
620
  def info_adding_cloudfile_to_repository
621
621
  say_new_line
622
- say "Project is now configured for use with Shell Cloud:", :green
622
+ say "Project is now configured for use with Shelly Cloud:", :green
623
623
  say "You can review changes using", :green
624
624
  say " git status"
625
625
  end
@@ -161,7 +161,7 @@ More info at http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository}
161
161
  if @deployment["result"] == "success"
162
162
  say "#{action_name} successful", :green
163
163
  else
164
- say "#{action_name} failed. See logs with `shelly deploy show last`", :red
164
+ say "#{action_name} failed. See logs with `shelly deploy show last --cloud #{app}`", :red
165
165
  end
166
166
  end
167
167
  end
@@ -1,3 +1,3 @@
1
1
  module Shelly
2
- VERSION = "0.2.16"
2
+ VERSION = "0.2.17"
3
3
  end
@@ -496,7 +496,7 @@ More info at http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository\e[0m
496
496
  end
497
497
 
498
498
  it "should display info about adding Cloudfile to repository" do
499
- $stdout.should_receive(:puts).with("\e[32mProject is now configured for use with Shell Cloud:\e[0m")
499
+ $stdout.should_receive(:puts).with("\e[32mProject is now configured for use with Shelly Cloud:\e[0m")
500
500
  $stdout.should_receive(:puts).with("\e[32mYou can review changes using\e[0m")
501
501
  $stdout.should_receive(:puts).with(" git status")
502
502
  fake_stdin(["foooo", "none"]) do
@@ -848,16 +848,6 @@ Wait until cloud is in 'turned off' state and try again.")
848
848
  end
849
849
  end
850
850
 
851
- it "should exit if user doesn't have access to clouds in Cloudfile" do
852
- @client.stub(:stop_cloud).and_raise(Shelly::Client::NotFoundException.new("resource" => "cloud"))
853
- $stdout.should_receive(:puts).with(red "You have no access to 'foo-production' cloud defined in Cloudfile")
854
- lambda {
855
- fake_stdin(["yes"]) do
856
- invoke(@main, :stop)
857
- end
858
- }.should raise_error(SystemExit)
859
- end
860
-
861
851
  it "should stop the cloud" do
862
852
  $stdout.should_receive(:print).with("Are you sure you want to shut down 'foo-production' cloud (yes/no): ")
863
853
  $stdout.should_receive(:puts).with("\n")
@@ -868,43 +858,69 @@ Wait until cloud is in 'turned off' state and try again.")
868
858
  end
869
859
  end
870
860
 
871
- it "should show messages about app being deployed" do
872
- raise_conflict("state" => "deploying")
873
- $stdout.should_receive(:puts).with(red "Your cloud is currently being deployed and it can not be stopped.")
874
- lambda do
875
- fake_stdin(["yes"]) do
876
- invoke(@main, :stop)
877
- end
878
- end.should raise_error(SystemExit)
879
- end
880
-
881
- it "should show messge about app's no_code" do
882
- raise_conflict("state" => "no_code")
883
- @client.stub(:shellyapp_url).and_return("https://example.com")
884
- $stdout.should_receive(:puts).with(red "You need to deploy your cloud first.")
885
- $stdout.should_receive(:puts).with('More information can be found at:')
886
- $stdout.should_receive(:puts).with('https://example.com/documentation/deployment')
887
- lambda do
888
- fake_stdin(["yes"]) do
889
- invoke(@main, :stop)
890
- end
891
- end.should raise_error(SystemExit)
892
- end
861
+ context "on failure" do
862
+ context "when application is in deploy_failed state" do
863
+ it "should display error and `shelly deploy show last --cloud foo-production` command" do
864
+ @app.stub(:deployment => {"messages" => ["message1"],
865
+ "result" => "failure", "state" => "deploy_failed"})
893
866
 
894
- it "should show messge about app turning off" do
895
- raise_conflict("state" => "turning_off")
896
- $stdout.should_receive(:puts).with(red "Your cloud is turning off.")
897
- lambda do
898
- fake_stdin(["yes"]) do
899
- invoke(@main, :stop)
867
+ $stdout.should_receive(:puts).with(green "message1")
868
+ $stdout.should_receive(:puts).
869
+ with(red "Stopping cloud failed. See logs with `shelly deploy show last --cloud foo-production`")
870
+ fake_stdin(["yes"]) do
871
+ invoke(@main, :stop)
872
+ end
900
873
  end
901
- end.should raise_error(SystemExit)
902
- end
874
+ end
875
+
876
+ it "should exit if user doesn't have access to clouds in Cloudfile" do
877
+ @client.stub(:stop_cloud).and_raise(Shelly::Client::NotFoundException.new("resource" => "cloud"))
878
+ $stdout.should_receive(:puts).with(red "You have no access to 'foo-production' cloud defined in Cloudfile")
879
+ lambda {
880
+ fake_stdin(["yes"]) do
881
+ invoke(@main, :stop)
882
+ end
883
+ }.should raise_error(SystemExit)
884
+ end
885
+
886
+ it "should show messages about app being deployed" do
887
+ raise_conflict("state" => "deploying")
888
+ $stdout.should_receive(:puts).with(red "Your cloud is currently being deployed and it can not be stopped.")
889
+ lambda do
890
+ fake_stdin(["yes"]) do
891
+ invoke(@main, :stop)
892
+ end
893
+ end.should raise_error(SystemExit)
894
+ end
895
+
896
+ it "should show messge about app's no_code" do
897
+ raise_conflict("state" => "no_code")
898
+ @client.stub(:shellyapp_url).and_return("https://example.com")
899
+ $stdout.should_receive(:puts).with(red "You need to deploy your cloud first.")
900
+ $stdout.should_receive(:puts).with('More information can be found at:')
901
+ $stdout.should_receive(:puts).with('https://example.com/documentation/deployment')
902
+ lambda do
903
+ fake_stdin(["yes"]) do
904
+ invoke(@main, :stop)
905
+ end
906
+ end.should raise_error(SystemExit)
907
+ end
908
+
909
+ it "should show messge about app turning off" do
910
+ raise_conflict("state" => "turning_off")
911
+ $stdout.should_receive(:puts).with(red "Your cloud is turning off.")
912
+ lambda do
913
+ fake_stdin(["yes"]) do
914
+ invoke(@main, :stop)
915
+ end
916
+ end.should raise_error(SystemExit)
917
+ end
903
918
 
904
- def raise_conflict(options = {})
905
- body = {"state" => "no_code"}.merge(options)
906
- exception = Shelly::Client::ConflictException.new(body)
907
- @client.stub(:stop_cloud).and_raise(exception)
919
+ def raise_conflict(options = {})
920
+ body = {"state" => "no_code"}.merge(options)
921
+ exception = Shelly::Client::ConflictException.new(body)
922
+ @client.stub(:stop_cloud).and_raise(exception)
923
+ end
908
924
  end
909
925
  end
910
926
 
@@ -1333,6 +1349,17 @@ Wait until cloud is in 'turned off' state and try again.")
1333
1349
  end
1334
1350
 
1335
1351
  context "on redeploy failure" do
1352
+ context "when application is in deploy_failed state" do
1353
+ it "should display error and `shelly deploy show last --cloud foo-production` command" do
1354
+ @app.stub(:deployment => {"messages" => ["message1"],
1355
+ "result" => "failure", "state" => "deploy_failed"})
1356
+ $stdout.should_receive(:puts).with(green "message1")
1357
+ $stdout.should_receive(:puts).
1358
+ with(red "Cloud redeploy failed. See logs with `shelly deploy show last --cloud foo-production`")
1359
+ invoke(@main, :redeploy)
1360
+ end
1361
+ end
1362
+
1336
1363
  %w(deploying configuring).each do |state|
1337
1364
  context "when application is in #{state} state" do
1338
1365
  it "should display error that deploy is in progress" do
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shelly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.16
4
+ version: 0.2.17
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Shelly Cloud team
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-04-04 00:00:00.000000000 Z
12
+ date: 2013-04-12 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rspec
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rake
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ! '>='
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ! '>='
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: guard
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ! '>='
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ! '>='
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: guard-rspec
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ! '>='
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :development
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ! '>='
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: simplecov
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ! '>='
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ! '>='
81
92
  - !ruby/object:Gem::Version
@@ -83,6 +94,7 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: fakefs
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - ! '>='
88
100
  - !ruby/object:Gem::Version
@@ -90,6 +102,7 @@ dependencies:
90
102
  type: :development
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
107
  - - ! '>='
95
108
  - !ruby/object:Gem::Version
@@ -97,6 +110,7 @@ dependencies:
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: fakeweb
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
115
  - - ! '>='
102
116
  - !ruby/object:Gem::Version
@@ -104,6 +118,7 @@ dependencies:
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
123
  - - ! '>='
109
124
  - !ruby/object:Gem::Version
@@ -111,6 +126,7 @@ dependencies:
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: wijet-thor
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
131
  - - ~>
116
132
  - !ruby/object:Gem::Version
@@ -118,6 +134,7 @@ dependencies:
118
134
  type: :runtime
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
139
  - - ~>
123
140
  - !ruby/object:Gem::Version
@@ -125,6 +142,7 @@ dependencies:
125
142
  - !ruby/object:Gem::Dependency
126
143
  name: rest-client
127
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
128
146
  requirements:
129
147
  - - ! '>='
130
148
  - !ruby/object:Gem::Version
@@ -132,6 +150,7 @@ dependencies:
132
150
  type: :runtime
133
151
  prerelease: false
134
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
135
154
  requirements:
136
155
  - - ! '>='
137
156
  - !ruby/object:Gem::Version
@@ -139,6 +158,7 @@ dependencies:
139
158
  - !ruby/object:Gem::Dependency
140
159
  name: json
141
160
  requirement: !ruby/object:Gem::Requirement
161
+ none: false
142
162
  requirements:
143
163
  - - ! '>='
144
164
  - !ruby/object:Gem::Version
@@ -146,6 +166,7 @@ dependencies:
146
166
  type: :runtime
147
167
  prerelease: false
148
168
  version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
149
170
  requirements:
150
171
  - - ! '>='
151
172
  - !ruby/object:Gem::Version
@@ -153,6 +174,7 @@ dependencies:
153
174
  - !ruby/object:Gem::Dependency
154
175
  name: progressbar
155
176
  requirement: !ruby/object:Gem::Requirement
177
+ none: false
156
178
  requirements:
157
179
  - - ! '>='
158
180
  - !ruby/object:Gem::Version
@@ -160,6 +182,7 @@ dependencies:
160
182
  type: :runtime
161
183
  prerelease: false
162
184
  version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
163
186
  requirements:
164
187
  - - ! '>='
165
188
  - !ruby/object:Gem::Version
@@ -167,6 +190,7 @@ dependencies:
167
190
  - !ruby/object:Gem::Dependency
168
191
  name: launchy
169
192
  requirement: !ruby/object:Gem::Requirement
193
+ none: false
170
194
  requirements:
171
195
  - - ! '>='
172
196
  - !ruby/object:Gem::Version
@@ -174,6 +198,7 @@ dependencies:
174
198
  type: :runtime
175
199
  prerelease: false
176
200
  version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
177
202
  requirements:
178
203
  - - ! '>='
179
204
  - !ruby/object:Gem::Version
@@ -248,25 +273,26 @@ files:
248
273
  - spec/thor/options_spec.rb
249
274
  homepage: http://shellycloud.com
250
275
  licenses: []
251
- metadata: {}
252
276
  post_install_message:
253
277
  rdoc_options: []
254
278
  require_paths:
255
279
  - lib
256
280
  required_ruby_version: !ruby/object:Gem::Requirement
281
+ none: false
257
282
  requirements:
258
283
  - - ! '>='
259
284
  - !ruby/object:Gem::Version
260
285
  version: '0'
261
286
  required_rubygems_version: !ruby/object:Gem::Requirement
287
+ none: false
262
288
  requirements:
263
289
  - - ! '>='
264
290
  - !ruby/object:Gem::Version
265
291
  version: '0'
266
292
  requirements: []
267
293
  rubyforge_project: shelly
268
- rubygems_version: 2.0.2
294
+ rubygems_version: 1.8.24
269
295
  signing_key:
270
- specification_version: 4
296
+ specification_version: 3
271
297
  summary: Shelly Cloud command line tool
272
298
  test_files: []
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- N2U0NDkwODVjMjg1NGE3MGI1Y2QwYzc2MGVjMzFmYTQzMWYyMzkwYQ==
5
- data.tar.gz: !binary |-
6
- NDY3ZWEyNWNiMDVkNWViMjIxZDA3NTI0MjA2MjU2ZTU1OGRhOTdmYQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MzY5ZGRkNDcyMzdhNzk5OTcxNWU4ZmNlNjUxMWFhODQ4NzBlZjU4MWUyZWYw
10
- NGI1NmFkYTI4MzU0ZTc1YTQ2Njc0NTBhZmZmYTc5MjkzNjZiZDA5ZWI2NzY3
11
- ZmI3NzM1OTJkYWIyMWEzYzYyZjExNGI4MjEzNTQwZjhmOWM3ZDg=
12
- data.tar.gz: !binary |-
13
- Y2FlNjgyMDRhMWI1Mzk5Njg2MDZmZjA2YmE5M2U2M2VhZWVmYmUxNzdiMjkz
14
- MTczNjZiZDUzNTM4OWUyOTI4NTBhNTU0MjBlY2ZiMWNhNzcyMTVhY2FkOTY0
15
- NGFiNzZjNmVmMzQ4ZTdlYTI5M2ExZTA2MTk3OTczYTFhNGU4YjA=