pgbundle 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pgbundle.rb +2 -2
- data/lib/pgbundle/database.rb +3 -2
- data/lib/pgbundle/dsl.rb +2 -0
- data/lib/pgbundle/github_source.rb +3 -2
- data/lib/pgbundle/version.rb +1 -1
- data/spec/Pgfile +1 -1
- data/spec/dsl_spec.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bc544b1d7c63c1b03cdcd5f1f2efba45a408513
|
4
|
+
data.tar.gz: e2442eed3ae4e85ba5c90eef2e6839424dd77852
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09fbc8bea557011fcafc1ca6c1e1c606767f86f270eac2ddfd78bad16c20a1182941790c93b21d3bd3456f1c967083687e5bd174a47e16071744880c2f34e6f5
|
7
|
+
data.tar.gz: 9a7c6cec293d210a87c9c65ab11f78a1646216a19fedb67c332bc0336ecb428e882ce73fe6853d8e8461e3221cfecf8f2a8aa66fc0f101d108d06e516102f3c8
|
data/lib/pgbundle.rb
CHANGED
data/lib/pgbundle/database.rb
CHANGED
@@ -6,18 +6,19 @@ 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
|
9
|
+
attr_accessor :name, :user, :host, :system_user, :use_sudo, :port
|
10
10
|
def initialize(name, opts = {})
|
11
11
|
@name = name
|
12
12
|
@user = opts[:user] || 'postgres'
|
13
13
|
@host = opts[:host] || 'localhost'
|
14
14
|
@use_sudo = opts[:use_sudo] || false
|
15
15
|
@system_user = opts[:system_user] || 'postgres'
|
16
|
+
@port = opts[:port] || 5432
|
16
17
|
end
|
17
18
|
|
18
19
|
def connection
|
19
20
|
@connection ||= begin
|
20
|
-
PG.connect(dbname: name, user: user, host: host)
|
21
|
+
PG.connect(dbname: name, user: user, host: host, port: port)
|
21
22
|
end
|
22
23
|
end
|
23
24
|
|
data/lib/pgbundle/dsl.rb
CHANGED
@@ -19,9 +19,10 @@ module PgBundle
|
|
19
19
|
|
20
20
|
def clone(dest)
|
21
21
|
# git clone user@git-server:project_name.git -b branch_name /some/folder
|
22
|
-
|
22
|
+
cmd = "git clone git@github.com:#{path}.git -b #{branch_name} --quiet --depth=1 #{clone_dir}"
|
23
|
+
%x((#{cmd} && rm -rf #{clone_dir}/.git}) 2>&1)
|
23
24
|
unless $?.success?
|
24
|
-
fail GitCommandError
|
25
|
+
fail GitCommandError, cmd
|
25
26
|
end
|
26
27
|
end
|
27
28
|
|
data/lib/pgbundle/version.rb
CHANGED
data/spec/Pgfile
CHANGED
data/spec/dsl_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pgbundle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel Kniep
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|