shelly 0.3.5.pre → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -7,6 +7,6 @@ rvm:
7
7
  - jruby-18mode
8
8
  - jruby-19mode
9
9
  notifications:
10
- email:
11
- recipients:
12
- - devs@shellycloud.com
10
+ email: false
11
+ campfire:
12
+ secure: 'ZSIx+w/r0QrOtpWu8EfmlypA9+pCRYSNU01Hv0ZvxOBu1EEp1Z/sDif0dCyyLrhv7lUOESdlcfmwVXUx93zEk2f+YMakG0NBnvMUhlkUhBLEsxDdPIgihhTirUIcWLrtPhtUbFA68/eXAP55wlz4Vcou5CHz8kk0+qmUX7QnqlI='
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.3.5 / 2013-07-17
2
+ * [feature] Create SSH tunnels to databases which allow to use third-party database tools.
3
+ * [bugfix] Handle case when no deployment logs are available
4
+
1
5
  ## 0.3.4 / 2013-07-02
2
6
 
3
7
  * [improvement] consistent output for `shelly start`, `shelly stop` and deployment progress
@@ -38,6 +38,10 @@ module Shelly
38
38
  say "username: #{conn['service']['username']}"
39
39
  say "password: #{conn['service']['password']}"
40
40
  app.setup_tunnel(conn, local_port)
41
+ rescue Client::NotFoundException => e
42
+ say_error e["message"]
43
+ rescue Client::ConflictException => e
44
+ say_error e["message"]
41
45
  end
42
46
  end
43
47
  end
@@ -1,3 +1,3 @@
1
1
  module Shelly
2
- VERSION = "0.3.5.pre"
2
+ VERSION = "0.3.5"
3
3
  end
@@ -61,5 +61,27 @@ describe Shelly::CLI::Database do
61
61
  @database.options = {:port => 10103}
62
62
  invoke(@database, :tunnel, "mongodb")
63
63
  end
64
+
65
+ context "on 404 response from API" do
66
+ it "should display error" do
67
+ ex = Shelly::Client::NotFoundException.new({"message" => "Virtual server not found"})
68
+ @app.should_receive(:tunnel_connection).and_raise(ex)
69
+ $stdout.should_receive(:puts).with(red "Virtual server not found")
70
+ lambda {
71
+ invoke(@database, :tunnel, "mongodb")
72
+ }.should raise_error(SystemExit)
73
+ end
74
+ end
75
+
76
+ context "on 409 response from API" do
77
+ it "should display error" do
78
+ ex = Shelly::Client::ConflictException.new({"message" => "Unknown service: postgres"})
79
+ @app.should_receive(:tunnel_connection).and_raise(ex)
80
+ $stdout.should_receive(:puts).with(red "Unknown service: postgres")
81
+ lambda {
82
+ invoke(@database, :tunnel, "mongodb")
83
+ }.should raise_error(SystemExit)
84
+ end
85
+ end
64
86
  end
65
87
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shelly
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: 6
5
- version: 0.3.5.pre
4
+ prerelease:
5
+ version: 0.3.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Shelly Cloud team
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-16 00:00:00.000000000 Z
12
+ date: 2013-07-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -351,9 +351,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
351
351
  required_rubygems_version: !ruby/object:Gem::Requirement
352
352
  none: false
353
353
  requirements:
354
- - - ! '>'
354
+ - - ! '>='
355
355
  - !ruby/object:Gem::Version
356
- version: 1.3.1
356
+ version: '0'
357
357
  requirements: []
358
358
  rubyforge_project: shelly
359
359
  rubygems_version: 1.8.23