prodder 1.7.4 → 1.7.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d6ea348f3b248b5660b358f476eae0339608c3d0
4
- data.tar.gz: dcb3d21cb200fdce2755505f221c115da3b3548c
2
+ SHA256:
3
+ metadata.gz: 26e389eb90419a1ac54845075f953e58fd3b1035214854773ead1528c338707a
4
+ data.tar.gz: b57a008eca5e26de21fbbc47f25e7ffd582b6f5a0d5228e913154dbb502cfe5b
5
5
  SHA512:
6
- metadata.gz: 381f5e5da69fa8513382656c1734fd8b3aeb4cf33114652e7d46382f42fb58aae9f8c6e302bce3a7cff9f0d98417bbcabd787dc3dff41754cd7866945d5e198b
7
- data.tar.gz: 54c89d1d27dab947d1039c3347fae18c1e65641097163692fe5597360a940630d92bfefdf458c3f612d8cb371b655505b0348a7d2a236bc3611693d33e7384dc
6
+ metadata.gz: e856705e7bcdd77de90de067aa20093ada1e6da740bdb3643134de9b9c6a5e164776d7aa7c5f3f02b3bcf0f93bac526a56cda7ce0662d2beadb6410a896025ce
7
+ data.tar.gz: b36befbd98f1e3df3c7674f30fbc82f9ddd2766805c597e2f6340a3e0068dc6b72c54be7fc795f168bc3b3b67b9e4ae5742ed13c6f11a25d9a307084f21e9808
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ Gemfile.lock
1
2
  *.gem
2
3
  *.rbc
3
4
  .bundle
@@ -2,9 +2,9 @@ language: ruby
2
2
  cache: bundler
3
3
 
4
4
  rvm:
5
- - 2.3.0
6
- - 2.2.4
7
- - 2.1.8
5
+ - 2.4.2
6
+ - 2.3.5
7
+ - 2.2.8
8
8
 
9
9
  env:
10
10
  matrix:
@@ -28,17 +28,10 @@ before_install:
28
28
  - psql -U postgres -d postgres -c 'select setting from pg_settings where name = $m$server_version$m$;'
29
29
 
30
30
  script:
31
- - echo "===================================================="
32
- - echo "PG_VERSION|$PG_VERSION|"
33
- - echo "===================================================="
34
31
  - psql --version
35
- - echo "===================================================="
36
32
  - pg_lsclusters
37
- - echo "===================================================="
38
33
  - psql -U postgres -d postgres -c 'select 1;'
39
- - echo "===================================================="
40
34
  - ls -al `which pg_dump`
41
- - echo "===================================================="
42
35
  - bundle exec rake spec
43
36
  - bundle exec rake cucumber
44
37
 
data/Gemfile CHANGED
@@ -10,7 +10,7 @@ group :development, :test do
10
10
  gem 'pry'
11
11
  gem 'pry-remote'
12
12
  gem 'rspec'
13
- gem 'cucumber'
14
- gem 'aruba'
13
+ gem 'cucumber', '< 3' # FIXME
14
+ gem 'aruba', '~> 0.5.0'
15
15
  gem 'pg'
16
16
  end
@@ -2,7 +2,7 @@ Feature: Basic CLI usage
2
2
 
3
3
  Scenario: prodder help
4
4
  When I run `prodder help`
5
- Then the output should contain "Tasks:"
5
+ Then the output should contain "Commands:"
6
6
 
7
7
  Scenario: No config file supplied
8
8
  When I run `prodder`
@@ -16,7 +16,7 @@ Feature: prodder push
16
16
  Given the "blog" git repository does not allow pushing to it
17
17
  When I run `prodder push -c prodder.yml`
18
18
  Then the exit status should be 1
19
- And the output should contain "insufficient permission"
19
+ And the output should contain "remote rejected"
20
20
 
21
21
  Scenario: Push fails due to non-fast-forward
22
22
  Given a new commit is already in the "blog" git repository
@@ -5,8 +5,10 @@ Given 'a "$project" git repository' do |project|
5
5
  end
6
6
 
7
7
  run_simple "mkdir -p repos"
8
- run_simple "chmod -R a+w repos/#{project}.git" if File.exist? File.join(current_dir, "repos", "#{project}.git")
9
- remove_dir "repos/#{project}.git"
8
+ if File.exist? File.join(current_dir, "repos", "#{project}.git")
9
+ run_simple "chmod -R a+w repos/#{project}.git"
10
+ run_simple "rm -rf repos/#{project}.git"
11
+ end
10
12
  run_simple "cp -pR #{fixture_repo} repos/#{project}.git"
11
13
  end
12
14
 
@@ -29,37 +31,37 @@ end
29
31
  Then(/^(\d+) commits? by "([^"]+)" should be in the "([^"]+)" repository$/) do |n, author, project|
30
32
  in_workspace(project) do
31
33
  authors = `git log --pretty='format:%an'`.split("\n")
32
- authors.grep(/#{author}/).size.should == Integer(n)
34
+ expect(authors.grep(/#{author}/).size).to eq Integer(n)
33
35
  end
34
36
  end
35
37
 
36
38
  Then 'the file "$filename" should now be tracked' do |filename|
37
39
  in_current_dir do
38
40
  git = Prodder::Git.new(File.expand_path("prodder-workspace/blog"), nil)
39
- git.should be_tracked(filename)
41
+ expect(git).to be_tracked(filename)
40
42
  end
41
43
  end
42
44
 
43
45
  Then 'the latest commit should have changed "$file" to contain "$content"' do |filename, content|
44
46
  in_workspace('blog') do
45
47
  changed = `git show --name-only HEAD | grep #{filename}`.split("\n")
46
- changed.should_not be_empty
48
+ expect(changed).to_not be_empty
47
49
 
48
50
  diff = `git show HEAD | grep '#{content}'`.split("\n")
49
- diff.should_not be_empty
51
+ expect(diff).to_not be_empty
50
52
  end
51
53
  end
52
54
 
53
55
  Then 'the latest commit should not have changed "$filename"' do |filename|
54
56
  in_workspace('blog') do
55
57
  changed = `git show --name-only HEAD | grep #{filename}`.split("\n")
56
- changed.should be_empty
58
+ expect(changed).to be_empty
57
59
  end
58
60
  end
59
61
 
60
62
  Then 'the new commit should be in the remote repository' do
61
63
  in_current_dir do
62
64
  latest = `git --git-dir="./repos/blog.git" log | grep prodder`.split("\n")
63
- latest.should_not be_empty
65
+ expect(latest).to_not be_empty
64
66
  end
65
67
  end
@@ -45,7 +45,9 @@ module Prodder
45
45
  contents = File.readlines(structure_file_name)
46
46
  rgx = /^\-\- .* Type: INDEX; |^\-\- .* Type: TRIGGER; |^\-\- .* Type: FK CONSTRAINT; /
47
47
  structure, *quality = contents.slice_before(rgx).to_a
48
- quality_checks = structure.grep(/SET search_path/).last + quality.join
48
+ # the first search path setting for constraints gets left over
49
+ # in the structure, so we need to *attempt* to grab that
50
+ quality_checks = (structure.grep(/SET search_path/).last || '') + quality.join
49
51
 
50
52
  File.open(quality_check_file_name, 'w') { |f| f.write(quality_checks) }
51
53
  File.open(structure_file_name, 'w') { |f| f.write(structure.join) }
@@ -1,3 +1,3 @@
1
1
  module Prodder
2
- VERSION = "1.7.4"
2
+ VERSION = "1.7.5"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Prodder::Config, 'linting' do
3
+ RSpec.describe Prodder::Config, 'linting' do
4
4
  let(:valid_config) { YAML.load Prodder::Config.example_contents }
5
5
 
6
6
  def config_without(path)
@@ -21,7 +21,6 @@ describe Prodder::Config, 'linting' do
21
21
  end
22
22
 
23
23
  context 'missing required key:' do
24
-
25
24
  %w[structure_file
26
25
  seed_file
27
26
 
@@ -35,15 +34,14 @@ describe Prodder::Config, 'linting' do
35
34
  git/author
36
35
  ].each do |path|
37
36
  specify path do
38
- errors_for(config_without "blog/#{path}").should ==
39
- ["Missing required configuration key: blog/#{path}"]
37
+ expect(errors_for(config_without "blog/#{path}")).to eq ["Missing required configuration key: blog/#{path}"]
40
38
  end
41
39
  end
42
40
  end
43
41
 
44
42
  context 'optional keys:' do
45
43
  specify 'db/password' do
46
- errors_for(config_without 'blog/db/password').should be_empty
44
+ expect(errors_for(config_without 'blog/db/password')).to be_empty
47
45
  end
48
46
  end
49
47
 
@@ -53,12 +51,12 @@ describe Prodder::Config, 'linting' do
53
51
  expect {
54
52
  config.lint!
55
53
  }.to raise_error(Prodder::Config::LintError) { |ex|
56
- ex.errors.should == ['Missing required configuration key: blog/db/name']
54
+ expect(ex.errors).to eq ['Missing required configuration key: blog/db/name']
57
55
  }
58
56
  end
59
57
 
60
58
  it 'returns an empty collection if there are no errors' do
61
- Prodder::Config.new(valid_config).lint!.should == []
59
+ expect(Prodder::Config.new(valid_config).lint!).to eq []
62
60
  end
63
61
  end
64
62
  end
@@ -1,3 +1,7 @@
1
1
  require 'rspec'
2
2
  require 'pry'
3
3
  require 'prodder'
4
+
5
+ RSpec.configure do |config|
6
+ config.disable_monkey_patching!
7
+ 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.4
4
+ version: 1.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Hargraves
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-29 00:00:00.000000000 Z
11
+ date: 2018-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deject
@@ -35,7 +35,6 @@ files:
35
35
  - ".gitignore"
36
36
  - ".travis.yml"
37
37
  - Gemfile
38
- - Gemfile.lock
39
38
  - LICENSE.txt
40
39
  - README.md
41
40
  - Rakefile
@@ -83,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
82
  version: '0'
84
83
  requirements: []
85
84
  rubyforge_project:
86
- rubygems_version: 2.6.8
85
+ rubygems_version: 2.7.6
87
86
  signing_key:
88
87
  specification_version: 4
89
88
  summary: Maintain your Rails apps' structure, seed and quality_checks files using
@@ -1,64 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- aruba (0.5.1)
5
- childprocess (~> 0.3.6)
6
- cucumber (>= 1.1.1)
7
- rspec-expectations (>= 2.7.0)
8
- benzo (2.0.0)
9
- cocaine (~> 0.4.2)
10
- builder (3.1.4)
11
- childprocess (0.3.6)
12
- ffi (~> 1.0, >= 1.0.6)
13
- cocaine (0.4.2)
14
- coderay (1.0.8)
15
- cucumber (1.2.1)
16
- builder (>= 2.1.2)
17
- diff-lcs (>= 1.1.3)
18
- gherkin (~> 2.11.0)
19
- json (>= 1.4.6)
20
- deject (0.2.3)
21
- diff-lcs (1.1.3)
22
- ffi (1.2.0)
23
- gherkin (2.11.5)
24
- json (>= 1.4.6)
25
- json (1.8.3)
26
- method_source (0.8.1)
27
- pg (0.18.2)
28
- pry (0.9.10)
29
- coderay (~> 1.0.5)
30
- method_source (~> 0.8)
31
- slop (~> 3.3.1)
32
- pry-remote (0.1.6)
33
- pry (~> 0.9)
34
- slop (~> 3.0)
35
- rake (10.0.3)
36
- rspec (2.12.0)
37
- rspec-core (~> 2.12.0)
38
- rspec-expectations (~> 2.12.0)
39
- rspec-mocks (~> 2.12.0)
40
- rspec-core (2.12.2)
41
- rspec-expectations (2.12.1)
42
- diff-lcs (~> 1.1.3)
43
- rspec-mocks (2.12.1)
44
- slop (3.3.3)
45
- thor (0.16.0)
46
-
47
- PLATFORMS
48
- ruby
49
-
50
- DEPENDENCIES
51
- aruba
52
- benzo
53
- cocaine
54
- cucumber
55
- deject
56
- pg
57
- pry
58
- pry-remote
59
- rake
60
- rspec
61
- thor
62
-
63
- BUNDLED WITH
64
- 1.11.2