prodder 1.7.1 → 1.7.2

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: 7f6f4835acc6e6921b002818c3cb4f9dde1547b5
4
- data.tar.gz: 8b8710f6358a343ec57afa2629c60c48aee99ca7
3
+ metadata.gz: 7018f84da517a86834a557666183b7a8fd81d9b3
4
+ data.tar.gz: 33a7fe098859ec975862a8413f29a38cf3a4a8e1
5
5
  SHA512:
6
- metadata.gz: 7dda8578941499f02a56e411914ede00f636e4287194f7cc7b0dff4f668577ace27e5b8b8242d9c4360198bca23fe80be5ea9b039029ae16eacb3d6b08942dfa
7
- data.tar.gz: 67d62816e83f9a0001e48886b46b7bb5fcdf597eff76fa3a9b8a7e36548e1018553aaa55df859c231b8c41bf4f89497f8ea554b4e6682e137bb26be17607b290
6
+ metadata.gz: c05ab47457496eeabdbcbe792dacd9069b5c1ef8d1f3c21ddc5bf81e460e9648994f6c2e5aa0352aac7ce1faba642acb0a7794844a7465f6c9670020e6eb4f27
7
+ data.tar.gz: 9258441141b1ec6f90052bf898c99735ad2cb9e2e7be3d334baa5ef1e9b4406b648554275196fd192736f91218184d0c26d064dccc9bfd4435e3b0a89fdb99b3
@@ -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
@@ -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 c.p=v;/
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 empty.setting='';/
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"
@@ -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
- unless setting.gsub(/\s+/, '').empty?
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
@@ -1,3 +1,3 @@
1
1
  module Prodder
2
- VERSION = "1.7.1"
2
+ VERSION = "1.7.2"
3
3
  end
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.1
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: 2016-10-25 00:00:00.000000000 Z
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.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