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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dd192bdbee3cd98e33fbd2e78a851b8d0cac5128
4
- data.tar.gz: d3761b36a486e6cfd94a29e16761bcd0e4e36d14
3
+ metadata.gz: 1e2ec5596d92a2d56dbcbeae58221571da725602
4
+ data.tar.gz: e3899ff0c3f649c2922b7cd5392a62eabb8f7520
5
5
  SHA512:
6
- metadata.gz: 3c511a51af3df6bb06929b837b24bbc9a161f3e7922349553b34bc4a7d15ab896f0f3bb4f80224bd340d3cbebf068ff80f352fcf9dfdc28b94f0e53efda93cab
7
- data.tar.gz: b4b29d932dd5ac3cca8d6db3410e1e6e82872370f4f0908d1ee24334b64f54571886dd1cf0fcada45f787690497ac25a6b8ec66314f7653f8ca5af54ace772cb
6
+ metadata.gz: 51bf3b3b7037a530f400e713a1e98a2566a03fadb0eda8a27b59f7f3823bd85f30c4e9dcf4e14ab9179d0b68e5e09f01d02843d9391cb6f17868d950b3510368
7
+ data.tar.gz: 62bc54dd793876dd9e15787382f733233acc7e087e2ceb272c5564dd1110aa7e4941960de874ec42175dc36db4f07a53a4f4948fda6512d67e1e1f20f1ddebfc
@@ -1,3 +1,7 @@
1
+ ## 0.5.7 / 2015-09-28
2
+
3
+ * [improvement] Handle 403 Forbidden response in database backups get cli
4
+
1
5
  ## 0.5.6 / 2015-08-31
2
6
 
3
7
  * [improvement] shelly rake accepts rake arguments and properly escapes whitespaces
@@ -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"
@@ -1,3 +1,3 @@
1
1
  module Shelly
2
- VERSION = "0.5.6"
2
+ VERSION = "0.5.7"
3
3
  end
@@ -120,7 +120,7 @@ describe Shelly::CLI::Backup do
120
120
  end
121
121
 
122
122
  context "on backup not found" do
123
- it "it should display error message" do
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.6
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-08-31 00:00:00.000000000 Z
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.3
362
+ rubygems_version: 2.4.8
363
363
  signing_key:
364
364
  specification_version: 4
365
365
  summary: Shelly Cloud command line tool