shelly 0.1.19 → 0.1.20

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.
@@ -66,7 +66,8 @@ module Shelly
66
66
  say "Backup requested. It can take up to several minutes for " +
67
67
  "the backup process to finish.", :green
68
68
  rescue Client::ValidationException => e
69
- say_error e[:message]
69
+ e.each_error { |error| say_error error, :with_exit => false }
70
+ exit 1
70
71
  rescue Client::ConflictException => e
71
72
  say_error e[:message]
72
73
  end
@@ -1,3 +1,3 @@
1
1
  module Shelly
2
- VERSION = "0.1.19"
2
+ VERSION = "0.1.20"
3
3
  end
@@ -135,10 +135,10 @@ describe Shelly::CLI::Backup do
135
135
  end
136
136
 
137
137
  it "should display errors and exit 1 when kind is not valid" do
138
- response = {"message" => "Wrong KIND argument. User one of following: postgresql, mongodb, redis"}
138
+ response = {"errors" => [["kind", "is invalid"]]}
139
139
  exception = Shelly::Client::ValidationException.new(response)
140
140
  @client.should_receive(:request_backup).and_raise(exception)
141
- $stdout.should_receive(:puts).with(red response["message"])
141
+ $stdout.should_receive(:puts).with(red "Kind is invalid")
142
142
  lambda { invoke(@backup, :create) }.should raise_error(SystemExit)
143
143
  end
144
144
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shelly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.19
4
+ version: 0.1.20
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-24 00:00:00.000000000 Z
12
+ date: 2012-07-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec