aptible-cli 0.7.3 → 0.7.4

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: ed6d33fb4df228f78616e5a2a612584c1595fbce
4
- data.tar.gz: 4795a89a24e7108ed2ee2c8eb590d331fbd4ecc6
3
+ metadata.gz: 02557871e371cd47bdc211ea7a52d11587c9c30c
4
+ data.tar.gz: 3f110a5037e15116cd05b55e591e72decd52b677
5
5
  SHA512:
6
- metadata.gz: 7d3e19769ee760b39e9d0fe388fdfa2a8c2dac97b78678758ecaacc467989982a34c993f9d606d09388053a8c7a3c1552b693896945ac596cc668896fc93325c
7
- data.tar.gz: 77b04483d2f82409cbc2c03ba05e0fa66b7041bfaf72646335064a305ebaa2ed3f65c9128d7345f8e76c6a726a3313e1ad690721bef5f804ffffd6a77dbd7529
6
+ metadata.gz: 235225b2aa1c1935f077efd0f23dd5e1af98d46a1a045ef7d1d4a1da6fb9537de0b347cfb6ce58b90605394c94bcbb78dd8fb4777fb4b36b05050c1615b156a3
7
+ data.tar.gz: cd51663f95904b23814bfa8d4c1db99357905ca7f4301cb60c5721e70cd8c4568b4a96407cd44e0e805e0e89478412d785949193b97892408f224cc7d4e98403
@@ -47,7 +47,7 @@ module Aptible
47
47
 
48
48
  def clone_database(source, dest_handle)
49
49
  op = source.create_operation!(type: 'clone', handle: dest_handle)
50
- poll_for_success(op)
50
+ attach_to_operation_logs(op)
51
51
 
52
52
  databases_from_handle(dest_handle, source.account).first
53
53
  end
@@ -72,7 +72,7 @@ module Aptible
72
72
 
73
73
  with_local_tunnel(database) do |tunnel_helper|
74
74
  auth = "aptible:#{database.passphrase}"
75
- host = "localhost:#{tunnel_helper.port}"
75
+ host = "localhost.aptible.in:#{tunnel_helper.port}"
76
76
  yield "postgresql://#{auth}@#{host}/db"
77
77
  end
78
78
  end
@@ -82,7 +82,7 @@ module Aptible
82
82
  uri = URI.parse(remote_url)
83
83
 
84
84
  "#{uri.scheme}://#{uri.user}:#{uri.password}@" \
85
- "127.0.0.1:#{local_port}#{uri.path}"
85
+ "localhost.aptible.in:#{local_port}#{uri.path}"
86
86
  end
87
87
 
88
88
  def ssh_env(database)
@@ -24,7 +24,9 @@ module Aptible
24
24
  '-o', 'TCPKeepAlive=yes',
25
25
  '-o', 'KeepAlive=yes',
26
26
  '-o', 'ServerAliveInterval=60',
27
- '-o', "LogLevel=#{log_level}"
27
+ '-o', "LogLevel=#{log_level}",
28
+ '-o', 'ControlMaster=no',
29
+ '-o', 'ControlPath=none'
28
30
  ]
29
31
  end
30
32
  end
@@ -58,12 +58,18 @@ module Aptible
58
58
 
59
59
  def stop
60
60
  fail 'You must call #start before calling #stop' if @pid.nil?
61
- Process.kill('HUP', @pid)
61
+ begin
62
+ Process.kill('HUP', @pid)
63
+ rescue Errno::ESRCH
64
+ nil # Dear Rubocop: I know what I'm doing.
65
+ end
62
66
  wait
63
67
  end
64
68
 
65
69
  def wait
66
70
  Process.wait @pid
71
+ rescue Errno::ECHILD
72
+ nil
67
73
  end
68
74
 
69
75
  def port
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module CLI
3
- VERSION = '0.7.3'.freeze
3
+ VERSION = '0.7.4'.freeze
4
4
  end
5
5
  end
@@ -22,7 +22,7 @@ describe Aptible::CLI::Agent do
22
22
 
23
23
  it 'should print a message about how to connect' do
24
24
  allow(Aptible::Api::Database).to receive(:all) { [database] }
25
- local_url = 'postgresql://aptible:password@127.0.0.1:4242/db'
25
+ local_url = 'postgresql://aptible:password@localhost.aptible.in:4242/db'
26
26
 
27
27
  expect(subject).to receive(:with_local_tunnel).with(database, 0)
28
28
  .and_yield(socat_helper)
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.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-15 00:00:00.000000000 Z
11
+ date: 2016-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aptible-api