prodder 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/features/dump.feature +12 -2
- data/lib/prodder/pg.rb +3 -2
- data/lib/prodder/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7018f84da517a86834a557666183b7a8fd81d9b3
|
4
|
+
data.tar.gz: 33a7fe098859ec975862a8413f29a38cf3a4a8e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c05ab47457496eeabdbcbe792dacd9069b5c1ef8d1f3c21ddc5bf81e460e9648994f6c2e5aa0352aac7ce1faba642acb0a7794844a7465f6c9670020e6eb4f27
|
7
|
+
data.tar.gz: 9258441141b1ec6f90052bf898c99735ad2cb9e2e7be3d334baa5ef1e9b4406b648554275196fd192736f91218184d0c26d064dccc9bfd4435e3b0a89fdb99b3
|
data/.travis.yml
CHANGED
@@ -18,7 +18,7 @@ before_install:
|
|
18
18
|
# install postgresql v9.5
|
19
19
|
- if [[ "$PG_VERSION" = "9.5" ]]; then echo "installing pg9.5"; sudo /etc/init.d/postgresql stop; sudo apt-get -y autoremove; sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 7FCC7D46ACCC4CF8; sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main 9.5" >> /etc/apt/sources.list.d/postgresql.list'; sudo apt-get update; sudo apt-get -y install postgresql-9.5; sudo cp /etc/postgresql/9.4/main/pg_hba.conf /etc/postgresql/9.5/main/pg_hba.conf; sudo sed -i 's/5433/5432/' /etc/postgresql/9.5/main/postgresql.conf; sudo /etc/init.d/postgresql restart; else echo "not installing pg9.5"; fi
|
20
20
|
# setup travis user
|
21
|
-
- if [[ "$PG_VERSION" = "9.5" ]]; then echo "setting up users for pg9.5"; PGUSER=postgres createuser --superuser travis; fi
|
21
|
+
- if [[ "$PG_VERSION" = "9.5" ]]; then echo "setting up users for pg9.5"; PGUSER=postgres createuser --superuser travis || true; fi
|
22
22
|
# setup pg_dump
|
23
23
|
- sudo ln -sfn /usr/lib/postgresql/$PG_VERSION/bin/pg_dump /usr/bin/pg_dump
|
24
24
|
# start up the specific version of PG
|
data/features/dump.feature
CHANGED
@@ -122,12 +122,22 @@ Feature: prodder dump
|
|
122
122
|
Scenario: Verify settings file contents
|
123
123
|
Given I add a custom parameter "c.p" with value "v" in the "blog" project's database
|
124
124
|
When I run `prodder dump -c prodder.yml`
|
125
|
-
Then the workspace file "blog/db/settings.sql" should match /ALTER DATABASE :DBNAME SET
|
125
|
+
Then the workspace file "blog/db/settings.sql" should match /ALTER DATABASE :DBNAME SET c.p=v;/
|
126
126
|
|
127
127
|
Scenario: Verify empty db setting is quoted
|
128
128
|
Given I add a custom parameter "empty.setting" with value "" in the "blog" project's database
|
129
129
|
When I run `prodder dump -c prodder.yml`
|
130
|
-
Then the workspace file "blog/db/settings.sql" should match /ALTER DATABASE :DBNAME SET
|
130
|
+
Then the workspace file "blog/db/settings.sql" should match /ALTER DATABASE :DBNAME SET empty.setting='';/
|
131
|
+
|
132
|
+
Scenario: Verify whitespace db setting is quoted
|
133
|
+
Given I add a custom parameter "whitespace.setting" with value " " in the "blog" project's database
|
134
|
+
When I run `prodder dump -c prodder.yml`
|
135
|
+
Then the workspace file "blog/db/settings.sql" should match /ALTER DATABASE :DBNAME SET whitespace.setting='';/
|
136
|
+
|
137
|
+
Scenario: Verify db settings are chomped
|
138
|
+
Given I add a custom parameter "k.v" with value "z" in the "blog" project's database
|
139
|
+
When I run `prodder dump -c prodder.yml`
|
140
|
+
Then the workspace file "blog/db/settings.sql" should not match /^\s*$/
|
131
141
|
|
132
142
|
Scenario: Exclude specified schemas from structure dump
|
133
143
|
Given the prodder config in "prodder.yml" excludes the schema "ads" from the dump of "blog"
|
data/lib/prodder/pg.rb
CHANGED
@@ -62,9 +62,10 @@ module Prodder
|
|
62
62
|
raise PGDumpError.new(err) if !success
|
63
63
|
File.open(filename, 'w') do |f|
|
64
64
|
out.each_line do |setting|
|
65
|
-
|
65
|
+
setting.gsub!(/\s+/, '')
|
66
|
+
unless setting.empty?
|
66
67
|
setting.chomp!
|
67
|
-
setting += "''" if setting.match
|
68
|
+
setting += "''" if setting.match(/=$/)
|
68
69
|
# using the magic of psql variables through :DBNAME
|
69
70
|
f.puts "ALTER DATABASE :DBNAME SET #{setting};"
|
70
71
|
end
|
data/lib/prodder/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prodder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Hargraves
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deject
|
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
85
|
rubyforge_project:
|
86
|
-
rubygems_version: 2.6.
|
86
|
+
rubygems_version: 2.6.8
|
87
87
|
signing_key:
|
88
88
|
specification_version: 4
|
89
89
|
summary: Maintain your Rails apps' structure, seed and quality_checks files using
|