shelly 0.4.37 → 0.4.38
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/shelly/app.rb +2 -2
- data/lib/shelly/cli/deploy.rb +3 -3
- data/lib/shelly/cli/main/add.rb +3 -1
- data/lib/shelly/client/apps.rb +2 -2
- data/lib/shelly/version.rb +1 -1
- data/spec/shelly/app_spec.rb +1 -1
- data/spec/shelly/cli/main_spec.rb +13 -1
- data/spec/shelly/client_spec.rb +2 -2
- metadata +39 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a378b3163f2759b50c3527162a36a2e448aaa0a2
|
4
|
+
data.tar.gz: e51cc9e70dc529e7ebf7e1b638dd7972afc4a94c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65b56e13341eb0e9ae7a8ed219c9537ab43d96c78b9c7e98ac9cb1f6c1d1d38752cc7f843b3105bbd30a5212aa95d236e97706be858c4af4ae0d23e577aeb0db
|
7
|
+
data.tar.gz: 605a7ea1cd53db41017d14f98432c793ac332983911425b325fed46885ebe8029860523070f487c40f61c84b480f68ccca80f18d3d52a17ac165b73ce6a0c43a
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## 0.4.38 / 2014-10-20
|
2
|
+
|
3
|
+
* [improvement] Deployment logs procesess moved after puma
|
4
|
+
* [improvement] User is able to choose zone while creating new cloud
|
5
|
+
|
1
6
|
## 0.4.37 / 2014-09-01
|
2
7
|
|
3
8
|
* [bugfix] print user-friendly message if user tries to finish maintenance, but
|
data/lib/shelly/app.rb
CHANGED
@@ -14,7 +14,7 @@ module Shelly
|
|
14
14
|
|
15
15
|
attr_accessor :code_name, :databases, :ruby_version, :environment,
|
16
16
|
:git_url, :domains, :web_server_ip, :size, :thin,
|
17
|
-
:organization_name, :
|
17
|
+
:organization_name, :zone, :usage, :traffic
|
18
18
|
|
19
19
|
def initialize(code_name = nil)
|
20
20
|
self.code_name = code_name
|
@@ -71,7 +71,7 @@ module Shelly
|
|
71
71
|
def create
|
72
72
|
attributes = {:code_name => code_name,
|
73
73
|
:organization_name => organization_name,
|
74
|
-
:
|
74
|
+
:zone => zone}
|
75
75
|
response = shelly.create_app(attributes)
|
76
76
|
assign_attributes(response)
|
77
77
|
end
|
data/lib/shelly/cli/deploy.rb
CHANGED
@@ -67,15 +67,15 @@ module Shelly
|
|
67
67
|
if content["clockwork"]
|
68
68
|
say("Starting clockwork", :green); say(content["clockwork"])
|
69
69
|
end
|
70
|
-
if content["processes"]
|
71
|
-
say("Starting processes", :green); say(content["processes"])
|
72
|
-
end
|
73
70
|
if content["thin_restart"]
|
74
71
|
say("Starting thin", :green); say(content["thin_restart"])
|
75
72
|
end
|
76
73
|
if content["puma_restart"]
|
77
74
|
say("Starting puma", :green); say(content["puma_restart"])
|
78
75
|
end
|
76
|
+
if content["processes"]
|
77
|
+
say("Starting processes", :green); say(content["processes"])
|
78
|
+
end
|
79
79
|
if content["after_restart"]
|
80
80
|
say("After restart hook", :green); say(content["after_restart"])
|
81
81
|
end
|
data/lib/shelly/cli/main/add.rb
CHANGED
@@ -28,7 +28,7 @@ module Shelly
|
|
28
28
|
app.databases = options["databases"] || ask_for_databases
|
29
29
|
app.size = options["size"] || "small"
|
30
30
|
app.organization_name = options["organization"] || ask_for_organization(options)
|
31
|
-
app.
|
31
|
+
app.zone = options["zone"]
|
32
32
|
|
33
33
|
app.create
|
34
34
|
say "Cloud '#{app}' created in '#{app.organization_name}' organization", :green
|
@@ -54,6 +54,8 @@ module Shelly
|
|
54
54
|
info_adding_cloudfile_to_repository
|
55
55
|
info_deploying_to_shellycloud(git_remote)
|
56
56
|
|
57
|
+
rescue Client::ConflictException => e
|
58
|
+
say_error e[:error]
|
57
59
|
rescue Client::ValidationException => e
|
58
60
|
e.each_error { |error| say_error error, :with_exit => false }
|
59
61
|
say_new_line
|
data/lib/shelly/client/apps.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
class Shelly::Client
|
2
2
|
def create_app(attributes)
|
3
3
|
organization = attributes.delete(:organization_name)
|
4
|
-
zone = attributes.delete(:
|
4
|
+
zone = attributes.delete(:zone)
|
5
5
|
post("/apps", :app => attributes, :organization_name => organization,
|
6
|
-
:
|
6
|
+
:zone => zone)
|
7
7
|
end
|
8
8
|
|
9
9
|
def delete_app(code_name)
|
data/lib/shelly/version.rb
CHANGED
data/spec/shelly/app_spec.rb
CHANGED
@@ -356,7 +356,7 @@ describe Shelly::App do
|
|
356
356
|
attributes = {
|
357
357
|
:code_name => "fooo",
|
358
358
|
:organization_name => nil,
|
359
|
-
:
|
359
|
+
:zone => nil
|
360
360
|
}
|
361
361
|
@client.should_receive(:create_app).with(attributes).and_return("git_url" => "git@git.shellycloud.com:fooo.git",
|
362
362
|
"domains" => %w(fooo.shellyapp.com))
|
@@ -371,7 +371,7 @@ More info at http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository\e[0m
|
|
371
371
|
end
|
372
372
|
|
373
373
|
it "should use zone from option" do
|
374
|
-
@app.should_receive(:
|
374
|
+
@app.should_receive(:zone=).with('eu1')
|
375
375
|
@main.options = {"zone" => "eu1"}
|
376
376
|
fake_stdin(["mycodename", ""]) do
|
377
377
|
invoke(@main, :add)
|
@@ -588,6 +588,18 @@ More info at http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository\e[0m
|
|
588
588
|
end.to raise_error(SystemExit)
|
589
589
|
end
|
590
590
|
|
591
|
+
it "should show conflict exception" do
|
592
|
+
exception = Shelly::Client::ConflictException.new({'error' => 'message'})
|
593
|
+
@app.should_receive(:create).and_raise(exception)
|
594
|
+
$stdout.should_receive(:puts).with(red "message")
|
595
|
+
|
596
|
+
expect do
|
597
|
+
fake_stdin(["foo", "none"]) do
|
598
|
+
invoke(@main, :add)
|
599
|
+
end
|
600
|
+
end.to raise_error(SystemExit)
|
601
|
+
end
|
602
|
+
|
591
603
|
context "organization" do
|
592
604
|
before do
|
593
605
|
@main.unstub(:ask_for_organization)
|
data/spec/shelly/client_spec.rb
CHANGED
@@ -171,9 +171,9 @@ describe Shelly::Client do
|
|
171
171
|
describe "#create_app" do
|
172
172
|
it "should send post with app's attributes" do
|
173
173
|
@client.should_receive(:post).with("/apps", :app => {:code_name => "foo",
|
174
|
-
:ruby_version => "1.9.2"}, :organization_name => "foo", :
|
174
|
+
:ruby_version => "1.9.2"}, :organization_name => "foo", :zone => 'eu1')
|
175
175
|
@client.create_app(:code_name => "foo", :ruby_version => "1.9.2",
|
176
|
-
:organization_name => "foo", :
|
176
|
+
:organization_name => "foo", :zone => "eu1")
|
177
177
|
end
|
178
178
|
end
|
179
179
|
|
metadata
CHANGED
@@ -1,237 +1,237 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shelly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.38
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shelly Cloud team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 2.11.0
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 2.11.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: simplecov
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: ruby_gntp
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rb-fsevent
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: fakefs
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - ~>
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 0.4.3
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ~>
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 0.4.3
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: fakeweb
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: pry
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: wijet-thor
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - ~>
|
129
|
+
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: 0.14.10
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - ~>
|
136
|
+
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: 0.14.10
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: rest-client
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: mime-types
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- - ~>
|
157
|
+
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '1.16'
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- - ~>
|
164
|
+
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '1.16'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: json
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
|
-
- -
|
171
|
+
- - ">="
|
172
172
|
- !ruby/object:Gem::Version
|
173
173
|
version: '0'
|
174
174
|
type: :runtime
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
|
-
- -
|
178
|
+
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: ruby-progressbar
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
|
-
- -
|
185
|
+
- - ">="
|
186
186
|
- !ruby/object:Gem::Version
|
187
187
|
version: '0'
|
188
188
|
type: :runtime
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
|
-
- -
|
192
|
+
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: launchy
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
|
-
- -
|
199
|
+
- - ">="
|
200
200
|
- !ruby/object:Gem::Version
|
201
201
|
version: '0'
|
202
202
|
type: :runtime
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
|
-
- -
|
206
|
+
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: netrc
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
|
-
- -
|
213
|
+
- - ">="
|
214
214
|
- !ruby/object:Gem::Version
|
215
215
|
version: '0'
|
216
216
|
type: :runtime
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
|
-
- -
|
220
|
+
- - ">="
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '0'
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
224
|
name: childprocess
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
226
226
|
requirements:
|
227
|
-
- -
|
227
|
+
- - ">="
|
228
228
|
- !ruby/object:Gem::Version
|
229
229
|
version: '0'
|
230
230
|
type: :runtime
|
231
231
|
prerelease: false
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
|
-
- -
|
234
|
+
- - ">="
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '0'
|
237
237
|
description: Tool for managing applications and clouds at shellycloud.com
|
@@ -242,8 +242,8 @@ executables:
|
|
242
242
|
extensions: []
|
243
243
|
extra_rdoc_files: []
|
244
244
|
files:
|
245
|
-
- .gitignore
|
246
|
-
- .travis.yml
|
245
|
+
- ".gitignore"
|
246
|
+
- ".travis.yml"
|
247
247
|
- CHANGELOG.md
|
248
248
|
- Gemfile
|
249
249
|
- LICENSE
|
@@ -343,17 +343,17 @@ require_paths:
|
|
343
343
|
- lib
|
344
344
|
required_ruby_version: !ruby/object:Gem::Requirement
|
345
345
|
requirements:
|
346
|
-
- -
|
346
|
+
- - ">="
|
347
347
|
- !ruby/object:Gem::Version
|
348
348
|
version: '0'
|
349
349
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
350
350
|
requirements:
|
351
|
-
- -
|
351
|
+
- - ">="
|
352
352
|
- !ruby/object:Gem::Version
|
353
353
|
version: '0'
|
354
354
|
requirements: []
|
355
355
|
rubyforge_project: shelly
|
356
|
-
rubygems_version: 2.4.
|
356
|
+
rubygems_version: 2.4.2
|
357
357
|
signing_key:
|
358
358
|
specification_version: 4
|
359
359
|
summary: Shelly Cloud command line tool
|