pgbundle 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pgbundle/base_source.rb +1 -0
- data/lib/pgbundle/database.rb +3 -2
- data/lib/pgbundle/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d565474e6a86bb7ab08baf6f64394389358b2a5
|
4
|
+
data.tar.gz: 0d03a67c757989c2f9cfa398f8b07dd87eecc017
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61b312c36bb8432a22adfd95997cb7dfc95c1f4a3163862a67fa5bd3ffb7b2981e650e736c0779a366f72bfaf750cbb9b29f78a643d48ca2ea1c23d0583f502c
|
7
|
+
data.tar.gz: a6d7a8f2d7d1757ac79d1a396eaae48f4b3b71de11a79b2ee1b4064abf3dcc43304384286b26b1277468a53285fe8a1a57f54a7358566d3c6809d83562ec8fa1
|
data/lib/pgbundle/base_source.rb
CHANGED
data/lib/pgbundle/database.rb
CHANGED
@@ -6,7 +6,7 @@ module PgBundle
|
|
6
6
|
# on a typical environment ssh access is needed if the database host differs from
|
7
7
|
# the Pgfile host
|
8
8
|
class Database
|
9
|
-
attr_accessor :name, :user, :host, :system_user, :use_sudo, :port
|
9
|
+
attr_accessor :name, :user, :host, :system_user, :use_sudo, :port, :force_ssh
|
10
10
|
def initialize(name, opts = {})
|
11
11
|
@name = name
|
12
12
|
@user = opts[:user] || 'postgres'
|
@@ -14,6 +14,7 @@ module PgBundle
|
|
14
14
|
@use_sudo = opts[:use_sudo] || false
|
15
15
|
@system_user = opts[:system_user] || 'postgres'
|
16
16
|
@port = opts[:port] || 5432
|
17
|
+
@force_ssh = opts[:force_ssh] || false
|
17
18
|
end
|
18
19
|
|
19
20
|
def connection
|
@@ -95,7 +96,7 @@ module PgBundle
|
|
95
96
|
end
|
96
97
|
|
97
98
|
def run(cmd)
|
98
|
-
if host == 'localhost'
|
99
|
+
if host == 'localhost' && !force_ssh
|
99
100
|
local cmd
|
100
101
|
else
|
101
102
|
remote cmd
|
data/lib/pgbundle/version.rb
CHANGED