aptible-cli 0.7.3 → 0.7.4
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02557871e371cd47bdc211ea7a52d11587c9c30c
|
4
|
+
data.tar.gz: 3f110a5037e15116cd05b55e591e72decd52b677
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
"
|
85
|
+
"localhost.aptible.in:#{local_port}#{uri.path}"
|
86
86
|
end
|
87
87
|
|
88
88
|
def ssh_env(database)
|
@@ -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
|
-
|
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
|
data/lib/aptible/cli/version.rb
CHANGED
@@ -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@
|
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.
|
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-
|
11
|
+
date: 2016-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aptible-api
|