shelly 0.4.41 → 0.4.42
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/main.rb +10 -3
- data/lib/shelly/version.rb +1 -1
- data/spec/shelly/app_spec.rb +9 -0
- data/spec/shelly/cli/main_spec.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd0f3635267e3be6e9d6fbff86054582b6ac3b9f
|
4
|
+
data.tar.gz: 63d62d167f8245525f44a317e39d72529f1a0037
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c4780ffcc4713f920354d5e7a4c9a8421b51382a956f3b0acea83023d28c016fe2a7cb1091093464ec8799d4963ed4c2a3b2f14a6d2d73233d85d332bb29593
|
7
|
+
data.tar.gz: 7dee1731a302343f71c175fe6dc87695639d21e55f77ee1d8b8a77d95d7f75a65a3ff11ddf61b4d1822422cae98877194eb9de834d1d7fb5acf3c65c94f20b51
|
data/CHANGELOG.md
CHANGED
data/lib/shelly/app.rb
CHANGED
@@ -235,8 +235,8 @@ module Shelly
|
|
235
235
|
shelly.delete_endpoint(code_name, uuid)
|
236
236
|
end
|
237
237
|
|
238
|
-
def rake(task)
|
239
|
-
ssh(:command => "rake_runner \"#{task}\"")
|
238
|
+
def rake(task, server = nil)
|
239
|
+
ssh(:command => "rake_runner \"#{task}\"", :server => server)
|
240
240
|
end
|
241
241
|
|
242
242
|
def dbconsole
|
data/lib/shelly/cli/main.rb
CHANGED
@@ -289,13 +289,20 @@ Wait until cloud is in 'turned off' state and try again.}
|
|
289
289
|
end
|
290
290
|
|
291
291
|
desc "rake TASK", "Run rake task"
|
292
|
-
method_option :cloud, :type => :string, :aliases => "-c",
|
292
|
+
method_option :cloud, :type => :string, :aliases => "-c",
|
293
|
+
:desc => "Specify cloud"
|
294
|
+
method_option :server, :type => :string, :aliases => "-s",
|
295
|
+
:desc => "Specify virtual server, it's random by default"
|
293
296
|
def rake(task = nil)
|
294
297
|
task = rake_args.join(" ")
|
295
298
|
app = multiple_clouds(options[:cloud], "rake #{task}")
|
296
|
-
app.rake(task)
|
299
|
+
app.rake(task, options[:server])
|
297
300
|
rescue Client::ConflictException
|
298
301
|
say_error "Cloud #{app} is not running. Cannot run rake task."
|
302
|
+
rescue Client::NotFoundException => e
|
303
|
+
raise unless e.resource == :virtual_server
|
304
|
+
say_error "Virtual server '#{options[:server]}' not found or" \
|
305
|
+
" not configured for running rake task."
|
299
306
|
end
|
300
307
|
|
301
308
|
desc "dbconsole", "Run rails dbconsole"
|
@@ -393,7 +400,7 @@ Wait until cloud is in 'turned off' state and try again.}
|
|
393
400
|
args.each do |arg|
|
394
401
|
case arg
|
395
402
|
when "rake", "--debug"
|
396
|
-
when "--cloud", "-c"
|
403
|
+
when "--cloud", "-c", "--server", "-s"
|
397
404
|
skip_next = true
|
398
405
|
else
|
399
406
|
out << arg unless skip_next
|
data/lib/shelly/version.rb
CHANGED
data/spec/shelly/app_spec.rb
CHANGED
@@ -421,6 +421,15 @@ describe Shelly::App do
|
|
421
421
|
@app.should_receive(:childprocess).with("ssh -o StrictHostKeyChecking=no -p 40010 -l foo -t -t console.example.com rake_runner \"test\"")
|
422
422
|
@app.rake("test")
|
423
423
|
end
|
424
|
+
|
425
|
+
context "when server option is present" do
|
426
|
+
it "should run rake task on given server" do
|
427
|
+
@client.should_receive(:tunnel).
|
428
|
+
with("foo-staging", "ssh", "app1").and_return({})
|
429
|
+
@app.should_receive(:childprocess)
|
430
|
+
@app.rake("test", "app1")
|
431
|
+
end
|
432
|
+
end
|
424
433
|
end
|
425
434
|
|
426
435
|
describe "#dbconsole" do
|
@@ -1442,7 +1442,7 @@ Wait until cloud is in 'turned off' state and try again.")
|
|
1442
1442
|
end
|
1443
1443
|
|
1444
1444
|
it "should invoke rake task" do
|
1445
|
-
@app.should_receive(:rake).with("db:migrate")
|
1445
|
+
@app.should_receive(:rake).with("db:migrate", nil)
|
1446
1446
|
invoke(@main, :rake, "db:migrate")
|
1447
1447
|
end
|
1448
1448
|
|
@@ -1450,7 +1450,7 @@ Wait until cloud is in 'turned off' state and try again.")
|
|
1450
1450
|
before { @main.unstub!(:rake_args) }
|
1451
1451
|
|
1452
1452
|
it "should return Array of rake arguments (skipping shelly gem arguments)" do
|
1453
|
-
argv = %w(rake -T db --cloud foo-production --debug)
|
1453
|
+
argv = %w(rake -T db --server app1 --cloud foo-production --debug)
|
1454
1454
|
@main.rake_args(argv).should == %w(-T db)
|
1455
1455
|
end
|
1456
1456
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.42
|
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-12-
|
11
|
+
date: 2014-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -359,7 +359,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
359
359
|
version: '0'
|
360
360
|
requirements: []
|
361
361
|
rubyforge_project: shelly
|
362
|
-
rubygems_version: 2.
|
362
|
+
rubygems_version: 2.4.5
|
363
363
|
signing_key:
|
364
364
|
specification_version: 4
|
365
365
|
summary: Shelly Cloud command line tool
|