shelly 0.2.20 → 0.2.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/CHANGELOG.md +4 -0
- data/lib/shelly/app.rb +12 -0
- data/lib/shelly/cli/main.rb +15 -1
- data/lib/shelly/version.rb +1 -1
- data/spec/shelly/app_spec.rb +28 -0
- data/spec/shelly/cli/main_spec.rb +30 -2
- metadata +94 -71
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
M2E2MzQxMDcyNzUwM2RhMWE5OTZlNWM4MGFhODFjN2Q2YWI3YjcyNA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YTVkMDU5NmZhYTFlYWExNTNiYzE5YzYzYThmMTYzODliMDQ1NGU4ZA==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZTI3YmJmZjliYjk4ZDU1MGNjMDNkNGY5NTdkNGI3ZGRjMTY4ZGMwN2JjZjQ5
|
10
|
+
YWZjMGQ0YjEyNzI4MDAyMWFhNjNiN2VlOTkxNjM4OGNkZGY5ZDU5NTZhNDk4
|
11
|
+
OGI5ZjNlZDFlZGM4YzU5N2NmM2Y2MWM1N2JlNmNlZjIwNDE2YzA=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NTUwMzg3ZTkwY2I4Mzk0ZjMzNzE3MTkzY2EyOWZmNGQzODIyNWU2NmYwMTQz
|
14
|
+
Y2I2YzgyOTU3MzczZDNjMzU0NzBmMTg5OGViNWViYTQ4ODE3ZmQxNzI3ZjYy
|
15
|
+
ZWNhNmY3Y2U3MTlhZmJkNTYzZTA5ZmUzZWFjODgzOTE0MmEwODU=
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 0.2.21 / 2013-05-13
|
2
|
+
|
3
|
+
* [improvement] require 'puma' or 'thin' gems if present in Cloudfile when running `shelly check`
|
4
|
+
|
1
5
|
## 0.2.20 / 2013-05-09
|
2
6
|
|
3
7
|
* [improvement] `shelly info`, `shelly list` and `shelly organization list` now use the new state_description attribute returned by Shelly API
|
data/lib/shelly/app.rb
CHANGED
@@ -297,6 +297,18 @@ module Shelly
|
|
297
297
|
option?("sidekiq")
|
298
298
|
end
|
299
299
|
|
300
|
+
# Public: Thin app servers present?
|
301
|
+
# Returns true if thin is present
|
302
|
+
def thin?
|
303
|
+
option?("thin")
|
304
|
+
end
|
305
|
+
|
306
|
+
# Public: Puma app servers present?
|
307
|
+
# Returns true if puma is present
|
308
|
+
def puma?
|
309
|
+
option?("puma")
|
310
|
+
end
|
311
|
+
|
300
312
|
# Public: Return databases to backup for given Cloud in Cloudfile
|
301
313
|
# Returns Array of databases, except redis db
|
302
314
|
def backup_databases
|
data/lib/shelly/cli/main.rb
CHANGED
@@ -446,7 +446,7 @@ Wait until cloud is in 'turned off' state and try again.}
|
|
446
446
|
print_check(structure.gem?("thin") || structure.gem?("puma"),
|
447
447
|
"Web server gem is present",
|
448
448
|
"Missing web server gem in Gemfile. Currently supported: 'thin' and 'puma'",
|
449
|
-
:show_fulfilled => verbose)
|
449
|
+
:show_fulfilled => verbose, :failure_level => :warning)
|
450
450
|
|
451
451
|
print_check(structure.gem?("rake"), "Gem 'rake' is present",
|
452
452
|
"Gem 'rake' is missing in the Gemfile", :show_fulfilled => verbose)
|
@@ -487,6 +487,20 @@ Wait until cloud is in 'turned off' state and try again.}
|
|
487
487
|
"Gem 'sidekiq' is missing in the Gemfile for '#{app}' cloud",
|
488
488
|
:show_fulfilled => verbose)
|
489
489
|
end
|
490
|
+
|
491
|
+
if app.thin?
|
492
|
+
print_check(structure.gem?("thin"),
|
493
|
+
"Web server gem 'thin' is present",
|
494
|
+
"Gem 'thin' is missing in the Gemfile for '#{app}' cloud",
|
495
|
+
:show_fulfilled => verbose)
|
496
|
+
end
|
497
|
+
|
498
|
+
if app.puma?
|
499
|
+
print_check(structure.gem?("puma"),
|
500
|
+
"Web server gem 'puma' is present",
|
501
|
+
"Gem 'puma' is missing in the Gemfile for '#{app}' cloud",
|
502
|
+
:show_fulfilled => verbose)
|
503
|
+
end
|
490
504
|
end
|
491
505
|
end
|
492
506
|
|
data/lib/shelly/version.rb
CHANGED
data/spec/shelly/app_spec.rb
CHANGED
@@ -493,6 +493,34 @@ describe Shelly::App do
|
|
493
493
|
end
|
494
494
|
end
|
495
495
|
|
496
|
+
describe "#thin?" do
|
497
|
+
it "should return true if present" do
|
498
|
+
content = {"servers" => {"app1" => {"thin" => 1}}}
|
499
|
+
@app.stub(:content).and_return(content)
|
500
|
+
@app.thin?.should be_true
|
501
|
+
end
|
502
|
+
|
503
|
+
it "should return false if not present" do
|
504
|
+
content = {"servers" => {"app1" => {"size" => "small"}}}
|
505
|
+
@app.stub(:content).and_return(content)
|
506
|
+
@app.thin?.should be_false
|
507
|
+
end
|
508
|
+
end
|
509
|
+
|
510
|
+
describe "#puma?" do
|
511
|
+
it "should return true if present" do
|
512
|
+
content = {"servers" => {"app1" => {"puma" => true}}}
|
513
|
+
@app.stub(:content).and_return(content)
|
514
|
+
@app.puma?.should be_true
|
515
|
+
end
|
516
|
+
|
517
|
+
it "should return false if not present" do
|
518
|
+
content = {"servers" => {"app1" => {"size" => "small"}}}
|
519
|
+
@app.stub(:content).and_return(content)
|
520
|
+
@app.puma?.should be_false
|
521
|
+
end
|
522
|
+
end
|
523
|
+
|
496
524
|
describe "#application_logs_tail" do
|
497
525
|
it "should execute given block for logs fetched from API" do
|
498
526
|
@client.should_receive(:application_logs_tail).with("foo-staging").and_yield("GET / 127.0.0.1")
|
@@ -1557,7 +1557,7 @@ Wait until cloud is in 'turned off' state and try again.")
|
|
1557
1557
|
context "when neither thin nor puma present in Gemfile" do
|
1558
1558
|
it "should show that necessary gem doesn't exist" do
|
1559
1559
|
Bundler::Definition.stub_chain(:build, :specs, :map).and_return([])
|
1560
|
-
$stdout.should_receive(:puts).with(" #{
|
1560
|
+
$stdout.should_receive(:puts).with(" #{yellow("ϟ")} Missing web server gem in Gemfile. Currently supported: 'thin' and 'puma'")
|
1561
1561
|
invoke(@main, :check)
|
1562
1562
|
end
|
1563
1563
|
end
|
@@ -1612,7 +1612,7 @@ Wait until cloud is in 'turned off' state and try again.")
|
|
1612
1612
|
before do
|
1613
1613
|
cloud = mock(:code_name => "foo-staging", :cloud_databases => ["postgresql"],
|
1614
1614
|
:whenever? => true, :delayed_job? => true, :sidekiq? => true,
|
1615
|
-
:to_s => "foo-staging")
|
1615
|
+
:thin? => true, :puma? => true, :to_s => "foo-staging")
|
1616
1616
|
cloudfile = mock(:clouds => [cloud])
|
1617
1617
|
|
1618
1618
|
Shelly::Cloudfile.stub(:new).and_return(cloudfile)
|
@@ -1676,6 +1676,34 @@ Wait until cloud is in 'turned off' state and try again.")
|
|
1676
1676
|
invoke(@main, :check)
|
1677
1677
|
end
|
1678
1678
|
end
|
1679
|
+
|
1680
|
+
context "thin web server" do
|
1681
|
+
it "should show that necessary gem doesn't exist" do
|
1682
|
+
Bundler::Definition.stub_chain(:build, :specs, :map).and_return([])
|
1683
|
+
$stdout.should_receive(:puts).with(" #{red("✗")} Gem 'thin' is missing in the Gemfile for 'foo-staging' cloud")
|
1684
|
+
invoke(@main, :check)
|
1685
|
+
end
|
1686
|
+
|
1687
|
+
it "should show that necessary gem exists" do
|
1688
|
+
Bundler::Definition.stub_chain(:build, :specs, :map).and_return(["thin"])
|
1689
|
+
$stdout.should_receive(:puts).with(" #{green("✓")} Web server gem 'thin' is present")
|
1690
|
+
invoke(@main, :check)
|
1691
|
+
end
|
1692
|
+
end
|
1693
|
+
|
1694
|
+
context "puma web server" do
|
1695
|
+
it "should show that necessary gem doesn't exist" do
|
1696
|
+
Bundler::Definition.stub_chain(:build, :specs, :map).and_return([])
|
1697
|
+
$stdout.should_receive(:puts).with(" #{red("✗")} Gem 'puma' is missing in the Gemfile for 'foo-staging' cloud")
|
1698
|
+
invoke(@main, :check)
|
1699
|
+
end
|
1700
|
+
|
1701
|
+
it "should show that necessary gem exists" do
|
1702
|
+
Bundler::Definition.stub_chain(:build, :specs, :map).and_return(["puma"])
|
1703
|
+
$stdout.should_receive(:puts).with(" #{green("✓")} Web server gem 'puma' is present")
|
1704
|
+
invoke(@main, :check)
|
1705
|
+
end
|
1706
|
+
end
|
1679
1707
|
end
|
1680
1708
|
|
1681
1709
|
context "when bundler raise error" do
|
metadata
CHANGED
@@ -1,204 +1,207 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shelly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.2.20
|
4
|
+
version: 0.2.21
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Shelly Cloud team
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-13 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
prerelease: false
|
16
|
-
type: :development
|
17
14
|
name: rspec
|
18
|
-
|
19
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
20
16
|
requirements:
|
21
17
|
- - ~>
|
22
18
|
- !ruby/object:Gem::Version
|
23
19
|
version: 2.11.0
|
24
|
-
|
25
|
-
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 2.11.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
|
-
prerelease: false
|
32
|
-
type: :development
|
33
28
|
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
34
36
|
version_requirements: !ruby/object:Gem::Requirement
|
35
|
-
none: false
|
36
37
|
requirements:
|
37
38
|
- - ! '>='
|
38
39
|
- !ruby/object:Gem::Version
|
39
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: guard
|
40
43
|
requirement: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
44
|
requirements:
|
43
45
|
- - ! '>='
|
44
46
|
- !ruby/object:Gem::Version
|
45
47
|
version: '0'
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
prerelease: false
|
48
48
|
type: :development
|
49
|
-
|
49
|
+
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
none: false
|
52
51
|
requirements:
|
53
52
|
- - ! '>='
|
54
53
|
- !ruby/object:Gem::Version
|
55
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: guard-rspec
|
56
57
|
requirement: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
58
|
requirements:
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
prerelease: false
|
64
62
|
type: :development
|
65
|
-
|
63
|
+
prerelease: false
|
66
64
|
version_requirements: !ruby/object:Gem::Requirement
|
67
|
-
none: false
|
68
65
|
requirements:
|
69
66
|
- - ! '>='
|
70
67
|
- !ruby/object:Gem::Version
|
71
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: simplecov
|
72
71
|
requirement: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
72
|
requirements:
|
75
73
|
- - ! '>='
|
76
74
|
- !ruby/object:Gem::Version
|
77
75
|
version: '0'
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
prerelease: false
|
80
76
|
type: :development
|
81
|
-
|
77
|
+
prerelease: false
|
82
78
|
version_requirements: !ruby/object:Gem::Requirement
|
83
|
-
none: false
|
84
79
|
requirements:
|
85
80
|
- - ! '>='
|
86
81
|
- !ruby/object:Gem::Version
|
87
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: ruby_gntp
|
88
85
|
requirement: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
86
|
requirements:
|
91
87
|
- - ! '>='
|
92
88
|
- !ruby/object:Gem::Version
|
93
89
|
version: '0'
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
prerelease: false
|
96
90
|
type: :development
|
97
|
-
|
91
|
+
prerelease: false
|
98
92
|
version_requirements: !ruby/object:Gem::Requirement
|
99
|
-
none: false
|
100
93
|
requirements:
|
101
94
|
- - ! '>='
|
102
95
|
- !ruby/object:Gem::Version
|
103
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rb-fsevent
|
104
99
|
requirement: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
100
|
requirements:
|
107
101
|
- - ! '>='
|
108
102
|
- !ruby/object:Gem::Version
|
109
103
|
version: '0'
|
110
|
-
- !ruby/object:Gem::Dependency
|
111
|
-
prerelease: false
|
112
104
|
type: :development
|
113
|
-
|
105
|
+
prerelease: false
|
114
106
|
version_requirements: !ruby/object:Gem::Requirement
|
115
|
-
none: false
|
116
107
|
requirements:
|
117
108
|
- - ! '>='
|
118
109
|
- !ruby/object:Gem::Version
|
119
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: fakefs
|
120
113
|
requirement: !ruby/object:Gem::Requirement
|
121
|
-
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
121
|
requirements:
|
123
122
|
- - ! '>='
|
124
123
|
- !ruby/object:Gem::Version
|
125
124
|
version: '0'
|
126
125
|
- !ruby/object:Gem::Dependency
|
126
|
+
name: fakeweb
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ! '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
127
133
|
prerelease: false
|
128
|
-
type: :runtime
|
129
|
-
name: wijet-thor
|
130
134
|
version_requirements: !ruby/object:Gem::Requirement
|
131
|
-
none: false
|
132
135
|
requirements:
|
133
|
-
- -
|
136
|
+
- - ! '>='
|
134
137
|
- !ruby/object:Gem::Version
|
135
|
-
version: 0
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: wijet-thor
|
136
141
|
requirement: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
142
|
requirements:
|
139
143
|
- - ~>
|
140
144
|
- !ruby/object:Gem::Version
|
141
145
|
version: 0.14.9
|
142
|
-
- !ruby/object:Gem::Dependency
|
143
|
-
prerelease: false
|
144
146
|
type: :runtime
|
145
|
-
|
147
|
+
prerelease: false
|
146
148
|
version_requirements: !ruby/object:Gem::Requirement
|
147
|
-
none: false
|
148
149
|
requirements:
|
149
|
-
- -
|
150
|
+
- - ~>
|
150
151
|
- !ruby/object:Gem::Version
|
151
|
-
version:
|
152
|
+
version: 0.14.9
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rest-client
|
152
155
|
requirement: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
156
|
requirements:
|
155
157
|
- - ! '>='
|
156
158
|
- !ruby/object:Gem::Version
|
157
159
|
version: '0'
|
158
|
-
- !ruby/object:Gem::Dependency
|
159
|
-
prerelease: false
|
160
160
|
type: :runtime
|
161
|
-
|
161
|
+
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
none: false
|
164
163
|
requirements:
|
165
164
|
- - ! '>='
|
166
165
|
- !ruby/object:Gem::Version
|
167
166
|
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: json
|
168
169
|
requirement: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
170
|
requirements:
|
171
171
|
- - ! '>='
|
172
172
|
- !ruby/object:Gem::Version
|
173
173
|
version: '0'
|
174
|
-
- !ruby/object:Gem::Dependency
|
175
|
-
prerelease: false
|
176
174
|
type: :runtime
|
177
|
-
|
175
|
+
prerelease: false
|
178
176
|
version_requirements: !ruby/object:Gem::Requirement
|
179
|
-
none: false
|
180
177
|
requirements:
|
181
178
|
- - ! '>='
|
182
179
|
- !ruby/object:Gem::Version
|
183
180
|
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: progressbar
|
184
183
|
requirement: !ruby/object:Gem::Requirement
|
185
|
-
none: false
|
186
184
|
requirements:
|
187
185
|
- - ! '>='
|
188
186
|
- !ruby/object:Gem::Version
|
189
187
|
version: '0'
|
190
|
-
- !ruby/object:Gem::Dependency
|
191
|
-
prerelease: false
|
192
188
|
type: :runtime
|
193
|
-
|
189
|
+
prerelease: false
|
194
190
|
version_requirements: !ruby/object:Gem::Requirement
|
195
|
-
none: false
|
196
191
|
requirements:
|
197
192
|
- - ! '>='
|
198
193
|
- !ruby/object:Gem::Version
|
199
194
|
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: launchy
|
200
197
|
requirement: !ruby/object:Gem::Requirement
|
201
|
-
|
198
|
+
requirements:
|
199
|
+
- - ! '>='
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :runtime
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
202
205
|
requirements:
|
203
206
|
- - ! '>='
|
204
207
|
- !ruby/object:Gem::Version
|
@@ -273,26 +276,46 @@ files:
|
|
273
276
|
- spec/thor/options_spec.rb
|
274
277
|
homepage: http://shellycloud.com
|
275
278
|
licenses: []
|
279
|
+
metadata: {}
|
276
280
|
post_install_message:
|
277
281
|
rdoc_options: []
|
278
282
|
require_paths:
|
279
283
|
- lib
|
280
284
|
required_ruby_version: !ruby/object:Gem::Requirement
|
281
|
-
none: false
|
282
285
|
requirements:
|
283
286
|
- - ! '>='
|
284
287
|
- !ruby/object:Gem::Version
|
285
288
|
version: '0'
|
286
289
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
287
|
-
none: false
|
288
290
|
requirements:
|
289
291
|
- - ! '>='
|
290
292
|
- !ruby/object:Gem::Version
|
291
293
|
version: '0'
|
292
294
|
requirements: []
|
293
295
|
rubyforge_project: shelly
|
294
|
-
rubygems_version:
|
296
|
+
rubygems_version: 2.0.3
|
295
297
|
signing_key:
|
296
|
-
specification_version:
|
298
|
+
specification_version: 4
|
297
299
|
summary: Shelly Cloud command line tool
|
298
|
-
test_files:
|
300
|
+
test_files:
|
301
|
+
- spec/helpers.rb
|
302
|
+
- spec/input_faker.rb
|
303
|
+
- spec/shelly/app_spec.rb
|
304
|
+
- spec/shelly/backup_spec.rb
|
305
|
+
- spec/shelly/cli/backup_spec.rb
|
306
|
+
- spec/shelly/cli/config_spec.rb
|
307
|
+
- spec/shelly/cli/deploy_spec.rb
|
308
|
+
- spec/shelly/cli/file_spec.rb
|
309
|
+
- spec/shelly/cli/main_spec.rb
|
310
|
+
- spec/shelly/cli/organization_spec.rb
|
311
|
+
- spec/shelly/cli/runner_spec.rb
|
312
|
+
- spec/shelly/cli/user_spec.rb
|
313
|
+
- spec/shelly/client_spec.rb
|
314
|
+
- spec/shelly/cloudfile_spec.rb
|
315
|
+
- spec/shelly/download_progress_bar_spec.rb
|
316
|
+
- spec/shelly/model_spec.rb
|
317
|
+
- spec/shelly/organization_spec.rb
|
318
|
+
- spec/shelly/structure_validator_spec.rb
|
319
|
+
- spec/shelly/user_spec.rb
|
320
|
+
- spec/spec_helper.rb
|
321
|
+
- spec/thor/options_spec.rb
|