aptible-cli 0.5.11 → 0.5.12

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: 83c8d5aef94c3083a5acc66a2ae9766964471c34
4
- data.tar.gz: de6908324648520c6ad266c9999ccf76735ff017
3
+ metadata.gz: 3b91df96ab6a1f0df93fa8c72e66c6a6a5099e71
4
+ data.tar.gz: b1eaf8c6e6d4977757d69056257ebb127bba4b62
5
5
  SHA512:
6
- metadata.gz: 05bfa932195e1876ad51ac749026fe81cfe48ff498da3433c46ddf094819f72eae3186490614f2044973ae6ca0e9dcd1410543fd62136ef592ef1655fefaf1a4
7
- data.tar.gz: ba1800894ca3af40b039ae8a26f67a4e75855fe39e37be36d8637b7e96badab8f8cd3e654e3a1345c11fb5852d4c2e472fe3f4ff6eef44a973ebbc871d013415
6
+ metadata.gz: 0c464c35948b299c8ea1dbdba6eb6aaa09ecdee76410b7e9ea80337fbbc9fc25c0b1cf5c53e400cd0aa810933b585230beb1bbdd9684531c1f15db3d09d248a7
7
+ data.tar.gz: a8b6e992a70e29e3fcb5ec9682d1527ab11b72f13f2b19732d4b90420adbe9db2a8e5b5b83f5e950adcdf10aaa6b330761f08d66d3821b69ca68325bad5df402
@@ -56,6 +56,15 @@ module Aptible
56
56
 
57
57
  say 'Creating tunnel...', :green
58
58
  say "Connect at #{local_url(database, local_port)}", :green
59
+
60
+ uri = URI(local_url(database, local_port))
61
+ db = uri.path.gsub(%r{^/}, '')
62
+ say 'Or, use the following arguments:', :green
63
+ say("* Host: #{uri.host}", :green)
64
+ say("* Port: #{uri.port}", :green)
65
+ say("* Username: #{uri.user}", :green) unless uri.user.empty?
66
+ say("* Password: #{uri.password}", :green)
67
+ say("* Database: #{db}", :green) unless db.empty?
59
68
  establish_connection(database, local_port)
60
69
  end
61
70
 
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module CLI
3
- VERSION = '0.5.11'
3
+ VERSION = '0.5.12'
4
4
  end
5
5
  end
@@ -33,6 +33,9 @@ describe Aptible::CLI::Agent do
33
33
  local_url = 'postgresql://aptible:password@127.0.0.1:4242/db'
34
34
  expect(subject).to receive(:say).with('Creating tunnel...', :green)
35
35
  expect(subject).to receive(:say).with("Connect at #{local_url}", :green)
36
+
37
+ # db:tunnel should also explain each component of the URL:
38
+ expect(subject).to receive(:say).exactly(6).times
36
39
  subject.send('db:tunnel', 'foobar')
37
40
  end
38
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aptible-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.11
4
+ version: 0.5.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-30 00:00:00.000000000 Z
11
+ date: 2015-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aptible-api
@@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
210
  version: '0'
211
211
  requirements: []
212
212
  rubyforge_project:
213
- rubygems_version: 2.2.2
213
+ rubygems_version: 2.4.5
214
214
  signing_key:
215
215
  specification_version: 4
216
216
  summary: Command-line interface for Aptible services