shelly 0.2.23 → 0.2.24
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 +6 -0
- data/lib/shelly/cli/backup.rb +3 -2
- data/lib/shelly/cli/config.rb +1 -1
- data/lib/shelly/version.rb +1 -1
- data/spec/shelly/cli/backup_spec.rb +7 -2
- data/spec/shelly/cli/config_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWM5MmE2NjRhNGJmMjM1YzBjYzEzNWQwMzMxODlmZjlkZWZmZDU1YQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTQwNDM4OTY5NGU4NDI2MWY1MmUyN2JmZTNmOGZkZTFkZDc4OTljMA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTJhMTU1ZWQ5ZjgyNGEzNWRkYjBhZjAyYzUwN2VmMThiN2NlNDVmYmI3YTdk
|
10
|
+
MjQ1ZjI0OTA3Zjk3MjE5NjJiNmZkMmUyODdmOTU5ODBiNWJhMTQ3MTgxZTVm
|
11
|
+
ZDMzMWI0Zjk2NjQzNjY1YjQxZmU0YWZhMzcyNTdlMmQ3ZWFlYjg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzNhZTEzMjljOWYyNmEyOTQ2MDE0ZDYyZjkxZGIyMzkyYjJhMDE2ZGZkNGZk
|
14
|
+
NmUwZjE3Y2VlNTI2MWU2MGY4NTlkYzgzOTU3ODA1ZmFhMDIyZDA4OTdhYzFh
|
15
|
+
NjMyNzhlOTBmMjYzN2ZmNjRkZGU4OTcyNmM4Y2U4NTFjMzQzN2Y=
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 0.2.24 / 2013-06-04
|
2
|
+
|
3
|
+
* [bug] exit gracefully when downloaded or restored database backup doesn't exist
|
4
|
+
* [bug] 'shelly config list' doesn't quit with error if cloud has no configuration files
|
5
|
+
* [improvement] 'shelly backup download' is now aliased to 'shelly backup get'
|
6
|
+
|
1
7
|
## 0.2.23 / 2013-05-25
|
2
8
|
|
3
9
|
* [bug] `shelly add` ask for existing organization if user owns at least one
|
data/lib/shelly/cli/backup.rb
CHANGED
@@ -38,6 +38,7 @@ module Shelly
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
+
map "download" => :get
|
41
42
|
desc "get [FILENAME]", "Download database backup"
|
42
43
|
long_desc %{
|
43
44
|
Download given database backup to current directory.
|
@@ -53,7 +54,7 @@ module Shelly
|
|
53
54
|
say_new_line
|
54
55
|
say "Backup file saved to #{backup.filename}", :green
|
55
56
|
rescue Client::NotFoundException => e
|
56
|
-
raise unless e.resource == :
|
57
|
+
raise unless e.resource == :backup
|
57
58
|
say_error "Backup not found", :with_exit => false
|
58
59
|
say "You can list available backups with `shelly backup list` command"
|
59
60
|
end
|
@@ -91,7 +92,7 @@ module Shelly
|
|
91
92
|
say_new_line
|
92
93
|
say "Restore has been scheduled. Wait a few minutes till database is restored.", :green
|
93
94
|
rescue Client::NotFoundException => e
|
94
|
-
raise unless e.resource == :
|
95
|
+
raise unless e.resource == :backup
|
95
96
|
say_error "Backup not found", :with_exit => false
|
96
97
|
say "You can list available backups with `shelly backup list` command"
|
97
98
|
rescue Client::ConflictException => e
|
data/lib/shelly/cli/config.rb
CHANGED
data/lib/shelly/version.rb
CHANGED
@@ -79,6 +79,11 @@ describe Shelly::CLI::Backup do
|
|
79
79
|
hooks(@backup, :get).should include(:logged_in?)
|
80
80
|
end
|
81
81
|
|
82
|
+
it "should have a 'download' alias" do
|
83
|
+
@client.should_receive(:download_backup).with("foo-staging", "better.tar.gz", @bar.progress_callback)
|
84
|
+
invoke(@backup, :download, "better.tar.gz")
|
85
|
+
end
|
86
|
+
|
82
87
|
# multiple_clouds is tested in main_spec.rb in describe "#start" block
|
83
88
|
it "should ensure multiple_clouds check" do
|
84
89
|
@client.should_receive(:database_backup).with("foo-staging", "last")
|
@@ -107,7 +112,7 @@ describe Shelly::CLI::Backup do
|
|
107
112
|
|
108
113
|
context "on backup not found" do
|
109
114
|
it "it should display error message" do
|
110
|
-
exception = Shelly::Client::NotFoundException.new({"resource" => "
|
115
|
+
exception = Shelly::Client::NotFoundException.new({"resource" => "backup"})
|
111
116
|
@client.stub(:database_backup).and_raise(exception)
|
112
117
|
$stdout.should_receive(:puts).with(red "Backup not found")
|
113
118
|
$stdout.should_receive(:puts).with("You can list available backups with `shelly backup list` command")
|
@@ -237,7 +242,7 @@ describe Shelly::CLI::Backup do
|
|
237
242
|
|
238
243
|
context "on backup not found" do
|
239
244
|
it "should display error message" do
|
240
|
-
response = {"resource" => "
|
245
|
+
response = {"resource" => "backup"}
|
241
246
|
exception = Shelly::Client::NotFoundException.new(response)
|
242
247
|
@client.stub(:database_backup).and_raise(exception)
|
243
248
|
$stdout.should_receive(:puts).with(red "Backup not found")
|
@@ -42,6 +42,12 @@ describe Shelly::CLI::Config do
|
|
42
42
|
|
43
43
|
invoke(@config, :list)
|
44
44
|
end
|
45
|
+
|
46
|
+
it "should show no configuration files message" do
|
47
|
+
@client.should_receive(:app_configs).with("foo-production").and_return([])
|
48
|
+
$stdout.should_receive(:puts).with("Cloud foo-production has no configuration files")
|
49
|
+
invoke(@config, :list)
|
50
|
+
end
|
45
51
|
end
|
46
52
|
|
47
53
|
describe "#show" do
|
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.2.
|
4
|
+
version: 0.2.24
|
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: 2013-
|
11
|
+
date: 2013-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|