shelly 0.4.19 → 0.4.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/CHANGELOG.md +10 -0
- data/lib/shelly/app.rb +4 -4
- data/lib/shelly/cli/deploy.rb +3 -0
- data/lib/shelly/cli/file.rb +4 -4
- data/lib/shelly/cli/main/check.rb +4 -4
- data/lib/shelly/templates/Cloudfile.erb +1 -1
- data/lib/shelly/version.rb +1 -1
- data/spec/shelly/app_spec.rb +3 -3
- data/spec/shelly/cli/deploy_spec.rb +4 -1
- data/spec/shelly/cli/file_spec.rb +1 -1
- data/spec/shelly/cli/main_spec.rb +7 -7
- data/spec/shelly/cloudfile_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDdlYTA5ZTNlZDdhNTdhNDNmNjFiMzE2Njk0ZDZjN2NiOTBiZjYyMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NGNhNjJjZmIzZTE4NDkyMjIzOThkYWE0Yjk1Y2RjODdmNDJlODc0ZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NzI5YWUxNDAxNzExNGJkNjFiNGE1ZTM5NjAwN2ZiMmNjYjljODMzNmI5NDdk
|
10
|
+
ZTEyMjBkNzBhZWY2YmE2NDY0ZDNiMWZlNTFlNjVkMGE0MjFiZWY1M2Q1MDY5
|
11
|
+
NDkyZjUyYzY2NjQwNmM1YzE1YTYwZjY0MTc0MTdkZDFhZmIzYzM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjhkYjkwY2QxZTMwMzBjNDU5MzFlODZlMjVkNmQ0NmEwMTAzMTk5MWIxZGMw
|
14
|
+
MGFlYzhiNjBiNWVlOGYzZTk0YzE1ZjA5ODgyZGZkYjZmYjc2YTdjNGYzMWI4
|
15
|
+
ZDNlODlkMzYxZTMyNGYzYjhmOTdkM2Q2MDgzMTIzNzcyNDI5YmU=
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## 0.4.21 / 2014-01-15
|
2
|
+
|
3
|
+
* [improvement] destination path when uploading files to Shelly Cloud
|
4
|
+
`shelly files upload source destination`
|
5
|
+
|
6
|
+
## 0.4.20 / 2014-01-14
|
7
|
+
|
8
|
+
* [improvement] add 2.1.0 and rbx to supported ruby versions
|
9
|
+
* [improvement] `shelly deploy show` will show output of the on_restart hook
|
10
|
+
|
1
11
|
## 0.4.19 / 2013-12-26
|
2
12
|
|
3
13
|
* [bugfix] `shelly delete` fixed remove git remote when deleting cloud
|
data/lib/shelly/app.rb
CHANGED
@@ -299,9 +299,9 @@ module Shelly
|
|
299
299
|
ssh(:command => "ls -l #{persistent_disk}/#{path}")
|
300
300
|
end
|
301
301
|
|
302
|
-
def upload(source)
|
302
|
+
def upload(source, destination)
|
303
303
|
tunnel_connection.tap do |conn|
|
304
|
-
rsync(source, "#{conn['host']}:#{persistent_disk}", conn)
|
304
|
+
rsync(source, "#{conn['host']}:#{persistent_disk}/#{destination}", conn, "--relative")
|
305
305
|
end
|
306
306
|
end
|
307
307
|
|
@@ -452,8 +452,8 @@ module Shelly
|
|
452
452
|
"-o StrictHostKeyChecking=no -p #{conn['port']} -l #{conn['user']}"
|
453
453
|
end
|
454
454
|
|
455
|
-
def rsync(source, destination, conn)
|
456
|
-
system "rsync
|
455
|
+
def rsync(source, destination, conn, options = "")
|
456
|
+
system "rsync --archive --verbose --compress #{options} -e 'ssh #{ssh_options(conn)}' --progress #{source} #{destination}"
|
457
457
|
end
|
458
458
|
end
|
459
459
|
end
|
data/lib/shelly/cli/deploy.rb
CHANGED
@@ -55,6 +55,9 @@ module Shelly
|
|
55
55
|
if content["before_restart"]
|
56
56
|
say("Before restart hook", :green); say(content["before_restart"])
|
57
57
|
end
|
58
|
+
if content["on_restart"]
|
59
|
+
say("On restart hook", :green); say(content["on_restart"])
|
60
|
+
end
|
58
61
|
if content["delayed_job"]
|
59
62
|
say("Starting delayed job", :green); say(content["delayed_job"])
|
60
63
|
end
|
data/lib/shelly/cli/file.rb
CHANGED
@@ -20,10 +20,10 @@ module Shelly
|
|
20
20
|
say_error "Cloud #{app} wasn't deployed properly. Cannot list files."
|
21
21
|
end
|
22
22
|
|
23
|
-
desc "upload
|
24
|
-
def upload(
|
25
|
-
app = multiple_clouds(options[:cloud], "file upload #{
|
26
|
-
app.upload(
|
23
|
+
desc "upload SOURCE_PATH [DEST_PATH]", "Upload files to persistent data storage"
|
24
|
+
def upload(source, destination = ".")
|
25
|
+
app = multiple_clouds(options[:cloud], "file upload #{source} #{destination}")
|
26
|
+
app.upload(source, destination)
|
27
27
|
rescue Client::NotFoundException => e
|
28
28
|
say_error e["message"]
|
29
29
|
rescue Client::ConflictException
|
@@ -29,7 +29,7 @@ module Shelly
|
|
29
29
|
|
30
30
|
if structure.gemfile_ruby_version?
|
31
31
|
if structure.gemfile_engine == 'ruby'
|
32
|
-
print_check(!['1.8.7'
|
32
|
+
print_check(!['1.8.7'].include?(structure.gemfile_ruby_version),
|
33
33
|
"#{structure.gemfile_engine} #{structure.gemfile_ruby_version} is supported",
|
34
34
|
"#{structure.gemfile_engine} #{structure.gemfile_ruby_version} is currently unsupported\n See more at https://shellycloud.com/documentation/requirements#ruby_versions",
|
35
35
|
:show_fulfilled => verbose)
|
@@ -41,7 +41,7 @@ module Shelly
|
|
41
41
|
:show_fulfilled => verbose)
|
42
42
|
end
|
43
43
|
|
44
|
-
supported_jruby = '1.7.
|
44
|
+
supported_jruby = '1.7.10'
|
45
45
|
if structure.gemfile_engine == 'jruby'
|
46
46
|
print_check(!(structure.gemfile_ruby_version == '1.8.7' ||
|
47
47
|
structure.gemfile_engine_version != supported_jruby),
|
@@ -50,8 +50,8 @@ module Shelly
|
|
50
50
|
:show_fulfilled => verbose)
|
51
51
|
end
|
52
52
|
|
53
|
-
# other platforms:
|
54
|
-
unless ['jruby', 'ruby'].include?(structure.gemfile_engine)
|
53
|
+
# other platforms: mingw, mswin show instant error
|
54
|
+
unless ['jruby', 'ruby', 'rbx'].include?(structure.gemfile_engine)
|
55
55
|
print_check(false, "",
|
56
56
|
"Your ruby engine: #{structure.gemfile_engine} is currently unsupported\n See more at https://shellycloud.com/documentation/requirements#ruby_versions",
|
57
57
|
:show_fulfilled => verbose)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= @code_name %>:
|
2
|
-
ruby_version: <%= @ruby_version %> # 2.0.0, jruby, 1.9.3, 1.9.2 or ree-1.8.7
|
2
|
+
ruby_version: <%= @ruby_version %> # 2.1.0, 2.0.0, jruby, rbx, 1.9.3, 1.9.2 or ree-1.8.7
|
3
3
|
environment: <%= @environment %> # RAILS_ENV
|
4
4
|
monitoring_email: <%= @email %>
|
5
5
|
domains:
|
data/lib/shelly/version.rb
CHANGED
data/spec/shelly/app_spec.rb
CHANGED
@@ -479,8 +479,8 @@ describe Shelly::App do
|
|
479
479
|
@app.stub(:attributes => {"system_user" => "system_user"})
|
480
480
|
@client.stub(:tunnel).and_return(
|
481
481
|
{"host" => "console.example.com", "port" => "40010", "user" => "foo"})
|
482
|
-
@app.should_receive(:system).with("rsync
|
483
|
-
@app.upload("/path")
|
482
|
+
@app.should_receive(:system).with("rsync --archive --verbose --compress --relative -e 'ssh -o StrictHostKeyChecking=no -p 40010 -l foo' --progress /path console.example.com:/home/system_user/disk/.")
|
483
|
+
@app.upload("/path", ".")
|
484
484
|
end
|
485
485
|
end
|
486
486
|
|
@@ -489,7 +489,7 @@ describe Shelly::App do
|
|
489
489
|
@app.stub(:attributes => {"system_user" => "system_user"})
|
490
490
|
@client.stub(:tunnel).and_return(
|
491
491
|
{"host" => "console.example.com", "port" => "40010", "user" => "foo"})
|
492
|
-
@app.should_receive(:system).with("rsync
|
492
|
+
@app.should_receive(:system).with("rsync --archive --verbose --compress -e 'ssh -o StrictHostKeyChecking=no -p 40010 -l foo' --progress console.example.com:/home/system_user/disk/. /tmp")
|
493
493
|
@app.download(".", "/tmp")
|
494
494
|
end
|
495
495
|
end
|
@@ -107,6 +107,8 @@ describe Shelly::CLI::Deploy do
|
|
107
107
|
$stdout.should_receive(:puts).with("before symlink hook")
|
108
108
|
$stdout.should_receive(:puts).with(green "Before restart hook")
|
109
109
|
$stdout.should_receive(:puts).with("before restart hook")
|
110
|
+
$stdout.should_receive(:puts).with(green "On restart hook")
|
111
|
+
$stdout.should_receive(:puts).with("on restart hook")
|
110
112
|
$stdout.should_receive(:puts).with(green "Starting delayed job")
|
111
113
|
$stdout.should_receive(:puts).with("delayed jobs")
|
112
114
|
$stdout.should_receive(:puts).with(green "Starting sidekiq")
|
@@ -132,7 +134,8 @@ describe Shelly::CLI::Deploy do
|
|
132
134
|
"sidekiq" => "sidekiq workers", "db_migrate" => "rake db:migrate",
|
133
135
|
"after_restart" => "after restart hook", "before_restart" => "before restart hook",
|
134
136
|
"before_symlink" => "before symlink hook", "before_migrate" => "before migrate hook",
|
135
|
-
"after_successful_deploy_hook" => "after successful deploy hook"
|
137
|
+
"after_successful_deploy_hook" => "after successful deploy hook",
|
138
|
+
"on_restart" => "on restart hook"
|
136
139
|
}
|
137
140
|
end
|
138
141
|
end
|
@@ -60,7 +60,7 @@ describe Shelly::CLI::File do
|
|
60
60
|
it "should upload files" do
|
61
61
|
expected = {"host" => "console.example.com", "port" => "40010", "user" => "foo"}
|
62
62
|
@client.stub(:tunnel).and_return(expected)
|
63
|
-
@app.should_receive(:upload).with("some/path")
|
63
|
+
@app.should_receive(:upload).with("some/path", ".")
|
64
64
|
invoke(@cli_files, :upload, "some/path")
|
65
65
|
end
|
66
66
|
|
@@ -1658,9 +1658,9 @@ Wait until cloud is in 'turned off' state and try again.")
|
|
1658
1658
|
context "supported version" do
|
1659
1659
|
it "should show checked message" do
|
1660
1660
|
Bundler::Definition.stub_chain(:build, :ruby_version).
|
1661
|
-
and_return(mock(:engine => 'jruby', :version => '1.9.3', :engine_version => '1.7.
|
1661
|
+
and_return(mock(:engine => 'jruby', :version => '1.9.3', :engine_version => '1.7.10'))
|
1662
1662
|
|
1663
|
-
$stdout.should_receive(:puts).with(" #{green("✓")} jruby 1.7.
|
1663
|
+
$stdout.should_receive(:puts).with(" #{green("✓")} jruby 1.7.10 (1.9 mode) is supported")
|
1664
1664
|
invoke(@main, :check)
|
1665
1665
|
end
|
1666
1666
|
end
|
@@ -1668,9 +1668,9 @@ Wait until cloud is in 'turned off' state and try again.")
|
|
1668
1668
|
context "unsupported version" do
|
1669
1669
|
it "should show error message - ruby version" do
|
1670
1670
|
Bundler::Definition.stub_chain(:build, :ruby_version).
|
1671
|
-
and_return(mock(:engine => 'jruby', :version => '1.8.7', :engine_version => '1.7.
|
1671
|
+
and_return(mock(:engine => 'jruby', :version => '1.8.7', :engine_version => '1.7.10'))
|
1672
1672
|
|
1673
|
-
$stdout.should_receive(:puts).with(" #{red("✗")} Only jruby 1.7.
|
1673
|
+
$stdout.should_receive(:puts).with(" #{red("✗")} Only jruby 1.7.10 (1.9 mode) is currently supported\n See more at https://shellycloud.com/documentation/requirements#ruby_versions")
|
1674
1674
|
invoke(@main, :check)
|
1675
1675
|
end
|
1676
1676
|
|
@@ -1678,7 +1678,7 @@ Wait until cloud is in 'turned off' state and try again.")
|
|
1678
1678
|
Bundler::Definition.stub_chain(:build, :ruby_version).
|
1679
1679
|
and_return(mock(:engine => 'jruby', :version => '1.9.3', :engine_version => '1.7.3'))
|
1680
1680
|
|
1681
|
-
$stdout.should_receive(:puts).with(" #{red("✗")} Only jruby 1.7.
|
1681
|
+
$stdout.should_receive(:puts).with(" #{red("✗")} Only jruby 1.7.10 (1.9 mode) is currently supported\n See more at https://shellycloud.com/documentation/requirements#ruby_versions")
|
1682
1682
|
invoke(@main, :check)
|
1683
1683
|
end
|
1684
1684
|
end
|
@@ -1697,9 +1697,9 @@ Wait until cloud is in 'turned off' state and try again.")
|
|
1697
1697
|
context "other engines" do
|
1698
1698
|
it "should show unsupported error message" do
|
1699
1699
|
Bundler::Definition.stub_chain(:build, :ruby_version).
|
1700
|
-
and_return(mock(:engine => '
|
1700
|
+
and_return(mock(:engine => 'mswin', :version => '1.9.2'))
|
1701
1701
|
|
1702
|
-
$stdout.should_receive(:puts).with(" #{red("✗")} Your ruby engine:
|
1702
|
+
$stdout.should_receive(:puts).with(" #{red("✗")} Your ruby engine: mswin is currently unsupported\n See more at https://shellycloud.com/documentation/requirements#ruby_versions")
|
1703
1703
|
invoke(@main, :check)
|
1704
1704
|
end
|
1705
1705
|
end
|
@@ -106,7 +106,7 @@ config
|
|
106
106
|
FakeFS.deactivate!
|
107
107
|
expected = <<-config
|
108
108
|
foo-staging:
|
109
|
-
ruby_version: 1.9.3 # 2.0.0, jruby, 1.9.3, 1.9.2 or ree-1.8.7
|
109
|
+
ruby_version: 1.9.3 # 2.1.0, 2.0.0, jruby, rbx, 1.9.3, 1.9.2 or ree-1.8.7
|
110
110
|
environment: production # RAILS_ENV
|
111
111
|
monitoring_email: bob@example.com
|
112
112
|
domains:
|
@@ -138,7 +138,7 @@ config
|
|
138
138
|
@cloudfile.thin = 2
|
139
139
|
expected = <<-config
|
140
140
|
foo-staging:
|
141
|
-
ruby_version: 1.9.3 # 2.0.0, jruby, 1.9.3, 1.9.2 or ree-1.8.7
|
141
|
+
ruby_version: 1.9.3 # 2.1.0, 2.0.0, jruby, rbx, 1.9.3, 1.9.2 or ree-1.8.7
|
142
142
|
environment: production # RAILS_ENV
|
143
143
|
monitoring_email: bob@example.com
|
144
144
|
domains:
|
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.21
|
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:
|
11
|
+
date: 2014-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
type: :development
|