shelly 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/shelly/cli/backup.rb +2 -0
- data/lib/shelly/version.rb +1 -1
- data/spec/shelly/cli/backup_spec.rb +10 -1
- 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: 1e2ec5596d92a2d56dbcbeae58221571da725602
|
4
|
+
data.tar.gz: e3899ff0c3f649c2922b7cd5392a62eabb8f7520
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51bf3b3b7037a530f400e713a1e98a2566a03fadb0eda8a27b59f7f3823bd85f30c4e9dcf4e14ab9179d0b68e5e09f01d02843d9391cb6f17868d950b3510368
|
7
|
+
data.tar.gz: 62bc54dd793876dd9e15787382f733233acc7e087e2ceb272c5564dd1110aa7e4941960de874ec42175dc36db4f07a53a4f4948fda6512d67e1e1f20f1ddebfc
|
data/CHANGELOG.md
CHANGED
data/lib/shelly/cli/backup.rb
CHANGED
@@ -58,6 +58,8 @@ module Shelly
|
|
58
58
|
raise unless e.resource == :backup
|
59
59
|
say_error "Backup not found", :with_exit => false
|
60
60
|
say "You can list available backups with `shelly backup list` command"
|
61
|
+
rescue Client::ForbiddenException => e
|
62
|
+
say_error e[:message]
|
61
63
|
end
|
62
64
|
|
63
65
|
desc "create [DB_KIND]", "Create backup of given database"
|
data/lib/shelly/version.rb
CHANGED
@@ -120,7 +120,7 @@ describe Shelly::CLI::Backup do
|
|
120
120
|
end
|
121
121
|
|
122
122
|
context "on backup not found" do
|
123
|
-
it "
|
123
|
+
it "should display error message" do
|
124
124
|
exception = Shelly::Client::NotFoundException.new({"resource" => "backup"})
|
125
125
|
@client.stub(:database_backup).and_raise(exception)
|
126
126
|
$stdout.should_receive(:puts).with(red "Backup not found")
|
@@ -129,6 +129,15 @@ describe Shelly::CLI::Backup do
|
|
129
129
|
end
|
130
130
|
end
|
131
131
|
|
132
|
+
context "on forbidden exception" do
|
133
|
+
it "should display error message" do
|
134
|
+
exception = Shelly::Client::ForbiddenException.new("message" => "error")
|
135
|
+
@client.stub(:database_backup).and_raise(exception)
|
136
|
+
$stdout.should_receive(:puts).with(red "error")
|
137
|
+
lambda { invoke(@backup, :get, "better.tar.gz") }.should raise_error(SystemExit)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
132
141
|
context "on unsupported exception" do
|
133
142
|
it "should re-raise it" do
|
134
143
|
exception = Shelly::Client::APIException.new
|
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.5.
|
4
|
+
version: 0.5.7
|
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: 2015-
|
11
|
+
date: 2015-09-28 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.4.
|
362
|
+
rubygems_version: 2.4.8
|
363
363
|
signing_key:
|
364
364
|
specification_version: 4
|
365
365
|
summary: Shelly Cloud command line tool
|