prodder 1.7.4 → 1.7.5
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 +5 -5
- data/.gitignore +1 -0
- data/.travis.yml +3 -10
- data/Gemfile +2 -2
- data/features/prodder.feature +1 -1
- data/features/push.feature +1 -1
- data/features/step_definitions/git_steps.rb +10 -8
- data/lib/prodder/project.rb +3 -1
- data/lib/prodder/version.rb +1 -1
- data/spec/config_spec.rb +5 -7
- data/spec/spec_helper.rb +4 -0
- metadata +3 -4
- data/Gemfile.lock +0 -64
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 26e389eb90419a1ac54845075f953e58fd3b1035214854773ead1528c338707a
|
4
|
+
data.tar.gz: b57a008eca5e26de21fbbc47f25e7ffd582b6f5a0d5228e913154dbb502cfe5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e856705e7bcdd77de90de067aa20093ada1e6da740bdb3643134de9b9c6a5e164776d7aa7c5f3f02b3bcf0f93bac526a56cda7ce0662d2beadb6410a896025ce
|
7
|
+
data.tar.gz: b36befbd98f1e3df3c7674f30fbc82f9ddd2766805c597e2f6340a3e0068dc6b72c54be7fc795f168bc3b3b67b9e4ae5742ed13c6f11a25d9a307084f21e9808
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -2,9 +2,9 @@ language: ruby
|
|
2
2
|
cache: bundler
|
3
3
|
|
4
4
|
rvm:
|
5
|
-
- 2.
|
6
|
-
- 2.
|
7
|
-
- 2.
|
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
data/features/prodder.feature
CHANGED
data/features/push.feature
CHANGED
@@ -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 "
|
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
|
-
|
9
|
-
|
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.
|
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.
|
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.
|
48
|
+
expect(changed).to_not be_empty
|
47
49
|
|
48
50
|
diff = `git show HEAD | grep '#{content}'`.split("\n")
|
49
|
-
diff.
|
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.
|
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.
|
65
|
+
expect(latest).to_not be_empty
|
64
66
|
end
|
65
67
|
end
|
data/lib/prodder/project.rb
CHANGED
@@ -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
|
-
|
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) }
|
data/lib/prodder/version.rb
CHANGED
data/spec/config_spec.rb
CHANGED
@@ -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}").
|
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').
|
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.
|
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
|
59
|
+
expect(Prodder::Config.new(valid_config).lint!).to eq []
|
62
60
|
end
|
63
61
|
end
|
64
62
|
end
|
data/spec/spec_helper.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.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:
|
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
|
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
|
data/Gemfile.lock
DELETED
@@ -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
|