pgbundle 0.0.17 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +5 -0
- data/README.md +3 -0
- data/lib/pgbundle/database.rb +14 -2
- data/lib/pgbundle/dsl.rb +1 -1
- data/lib/pgbundle/version.rb +1 -1
- data/pgbundle.gemspec +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 15dfb28b9fdc9700e097a5a57391cf3177ddb20fbcb12535335df559429e2ce5
|
4
|
+
data.tar.gz: e961ee85cbea6731f1a8358f1291ac102ad39b15c7e7540cd323716bbedfde4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2f24410fe6dd3bedf3622786caac2ec63055f2bda8452b2445fe55261c222a9e40e09582d155e5b70518cbb3b2ad1be148905f0ed37027e1236f8f8edef48a7
|
7
|
+
data.tar.gz: 99bb423f0d8a0daac1c8b3f1cd4e45820e223260749793007a6d4b4034edaaa89e56c5c43f485f7d9c1b7b524a0f6e73673353c92cdf2b0855a59865e1da65e7
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -76,6 +76,9 @@ pgx 'bar', '1.2.3', github: me/bar, requires: 'foo'
|
|
76
76
|
# set bar and boo as dependency for baz
|
77
77
|
# will automatically set foo as dependency as well
|
78
78
|
pgx 'baz', '0.2.3', github: me/baz, requires: ['bar', 'boo']
|
79
|
+
# installs jsquery with flag 'USE_PGXS=1'
|
80
|
+
# i.e. running make USE_PGXS=1 && make USE_PGXS=1 install
|
81
|
+
pgx 'jsquery', github: 'postgrespro/jsquery', flags: 'USE_PGXS=1'
|
79
82
|
```
|
80
83
|
|
81
84
|
## pgbundle commands
|
data/lib/pgbundle/database.rb
CHANGED
@@ -7,10 +7,12 @@ module PgBundle
|
|
7
7
|
# on a typical environment ssh access is needed if the database host differs from
|
8
8
|
# the Pgfile host
|
9
9
|
class Database
|
10
|
-
attr_accessor :name, :user, :host, :system_user, :use_sudo, :port, :force_ssh
|
10
|
+
attr_accessor :name, :user, :password, :host, :system_user, :use_sudo, :port, :force_ssh
|
11
|
+
|
11
12
|
def initialize(name, opts = {})
|
12
13
|
@name = name
|
13
14
|
@user = opts[:user] || 'postgres'
|
15
|
+
@password = opts[:password]
|
14
16
|
@host = opts[:host] || 'localhost'
|
15
17
|
@use_sudo = opts[:use_sudo] || false
|
16
18
|
@system_user = opts[:system_user] || 'postgres'
|
@@ -21,10 +23,20 @@ module PgBundle
|
|
21
23
|
|
22
24
|
def connection
|
23
25
|
@connection ||= begin
|
24
|
-
PG.connect(
|
26
|
+
PG.connect(connection_opts)
|
25
27
|
end
|
26
28
|
end
|
27
29
|
|
30
|
+
def connection_opts
|
31
|
+
{
|
32
|
+
dbname: name,
|
33
|
+
user: user,
|
34
|
+
password: password,
|
35
|
+
host: host,
|
36
|
+
port: port
|
37
|
+
}.compact
|
38
|
+
end
|
39
|
+
|
28
40
|
def to_s
|
29
41
|
"host: #{@host}:#{port} db: #{@name}"
|
30
42
|
end
|
data/lib/pgbundle/dsl.rb
CHANGED
@@ -4,13 +4,13 @@ module PgBundle
|
|
4
4
|
class Dsl
|
5
5
|
def initialize
|
6
6
|
@definition = Definition.new
|
7
|
-
@extensions = []
|
8
7
|
@databases = []
|
9
8
|
end
|
10
9
|
|
11
10
|
def eval_pgfile(pgfile, contents=nil)
|
12
11
|
contents ||= File.read(pgfile.to_s)
|
13
12
|
instance_eval(contents)
|
13
|
+
raise PgfileError, "no databases defined" if @databases.size == 0
|
14
14
|
@databases.map{|d| df = @definition.clone; df.database = d; df}
|
15
15
|
rescue SyntaxError => e
|
16
16
|
syntax_msg = e.message.gsub("#{pgfile}:", 'on line ')
|
data/lib/pgbundle/version.rb
CHANGED
data/pgbundle.gemspec
CHANGED
@@ -26,5 +26,5 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_dependency 'pg', '> 0.17'
|
27
27
|
spec.add_development_dependency 'rspec', '~> 2.14.0'
|
28
28
|
spec.add_development_dependency "bundler", ">= 1.5.0"
|
29
|
-
spec.add_development_dependency "rake"
|
29
|
+
spec.add_development_dependency "rake", "<= 11.0.0"
|
30
30
|
end
|
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.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel Kniep
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -112,16 +112,16 @@ dependencies:
|
|
112
112
|
name: rake
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - "<="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: 11.0.0
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - "<="
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: 11.0.0
|
125
125
|
description: bundler like postgres extension manager
|
126
126
|
email:
|
127
127
|
- manuel@adjust.com
|
@@ -132,6 +132,7 @@ extra_rdoc_files: []
|
|
132
132
|
files:
|
133
133
|
- ".gitignore"
|
134
134
|
- ".travis.yml"
|
135
|
+
- CHANGELOG.md
|
135
136
|
- Gemfile
|
136
137
|
- LICENSE.txt
|
137
138
|
- README.md
|
@@ -172,7 +173,7 @@ homepage: http://github.com/adjust/pgbundle
|
|
172
173
|
licenses:
|
173
174
|
- MIT
|
174
175
|
metadata: {}
|
175
|
-
post_install_message:
|
176
|
+
post_install_message:
|
176
177
|
rdoc_options: []
|
177
178
|
require_paths:
|
178
179
|
- lib
|
@@ -187,9 +188,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
188
|
- !ruby/object:Gem::Version
|
188
189
|
version: '0'
|
189
190
|
requirements: []
|
190
|
-
|
191
|
-
|
192
|
-
signing_key:
|
191
|
+
rubygems_version: 3.1.2
|
192
|
+
signing_key:
|
193
193
|
specification_version: 4
|
194
194
|
summary: bundling postgres extension
|
195
195
|
test_files:
|