pact-provider-proxy 1.2.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/CHANGELOG.md +4 -0
- data/README.md +4 -0
- data/lib/pact/provider/proxy/proxy_pact_helper.rb +4 -0
- data/lib/pact/provider/proxy/task_helper.rb +1 -1
- data/lib/pact/provider/proxy/tasks/proxy_verification_task.rb +1 -9
- data/lib/pact/provider/proxy/version.rb +1 -1
- data/spec/fixtures/do_not_load_pact_helper.rb +1 -0
- data/spec/fixtures/template_pact_helper.rb +1 -1
- data/spec/support/custom_pact_helper.rb +1 -1
- data/spec/tasks.rake +11 -10
- metadata +22 -20
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
Y2E4OGQ2YzhkOTZlMjBkOTg1YThiNWUzOTU2ZmFiMzc2NjU4ZTg2MA==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 13cda2ff7c9bff50e701c7e3dc8807c55a8712d1
|
4
|
+
data.tar.gz: 2a5513606d8202a8a060a967c1d765b4ec40f19f
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
MzMyYjlhMGQ0ZDJiOTM3MDI3MzU2NjI1MzNlNTUxMzk5ZTFjMzRhZmEwMjgy
|
11
|
-
MDg3ODRjNmRhYTdmMWJlMmU2MTMwNmIxYzAzNmY2NWMxNTZjNWQ=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YzI3N2M4Y2ZiODI4ODQ2OTExZWRlZjU5M2Q5YzI1ZWE4MmM0OGM2ZDU1OTJj
|
14
|
-
NzdlYmRkNTU2NmZiMDQ1MTZlNjViNDBhMDFkNWI3NjJkMGQ4NjJmZjBlZDNl
|
15
|
-
ZGUyNGU4YjA2YjAwOWFjZjhjYzhlMjAzZjk2MGU3NTNmZjJjOGM=
|
6
|
+
metadata.gz: e855f9842307ba7c76acadf1f946fce4e99a9b87c230a47c6d43c2fff69db69798aab4b3febda4561f084b9e23a3885450dbed8e02b4bd4d22df5c3247654291
|
7
|
+
data.tar.gz: a25ba04fa5ee1b3b75d9c476f6c1d49ae94be71e78f4ad6880e297f456fd5e59f69f1e0e598c5223b0f6f8dde048d9eb4fadf414f71b1d161e8c35146b25e889
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
git log --pretty=format:' * %h - %s (%an, %ad)'
|
2
2
|
|
3
|
+
### 2.0.0 (14 November 2014)
|
4
|
+
|
5
|
+
* 4a95e2b - Removed automatic loading of pact_helper.rb. It was creating unexpected behaviour. (Beth, Fri Nov 14 16:19:20 2014 +1100)
|
6
|
+
|
3
7
|
### 1.2.0 (14 October 2014)
|
4
8
|
|
5
9
|
* 6a6695c - Forked and vendored rack-reverse-proxy because no one is maintaining or releasing the gem (bethesque, Tue Oct 14 11:41:37 2014 +1100)
|
data/README.md
CHANGED
@@ -68,6 +68,10 @@ end
|
|
68
68
|
|
69
69
|
If a ruby adapter to the underlying datastore cannot be used to set up provider states, shell scripts that invoke code in the native language might work. If you have access to the code base, another alternative could be to provide an endpoint on your app that sets up data inside itself, that is only mounted in test mode. eg 'http://localhost:8080/set-up-provider-state?name=a%20thing%20exists' and 'http://localhost:8080/tear-down-provider-state?name=a%20thing%20exists'
|
70
70
|
|
71
|
+
## Feature support
|
72
|
+
|
73
|
+
pact-provider-proxy is fully compatible with pacts generated by the Ruby implementation of Pact, including Pact::Terms. However, it does not yet support the v2.0 regular expression syntax implemented in the JVM version of Pact.
|
74
|
+
|
71
75
|
## Contributing
|
72
76
|
|
73
77
|
1. Fork it
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# This pact_helper is always set as the pact_helper for the `pact verify` command.
|
2
|
+
# If there was a pact_helper specified by the user, its location is stored in
|
3
|
+
# ENV['PACT_PROJECT_PACT_HELPER'] and it is loaded by this pact_helper.
|
4
|
+
|
1
5
|
require 'pact/provider/rspec'
|
2
6
|
require 'rack/reverse_proxy'
|
3
7
|
|
@@ -9,7 +9,7 @@ module Pact
|
|
9
9
|
extend self
|
10
10
|
|
11
11
|
def execute_pact_verify pact_uri = nil, pact_helper = nil
|
12
|
-
execute_cmd verify_command(pact_helper
|
12
|
+
execute_cmd verify_command(pact_helper, pact_uri)
|
13
13
|
end
|
14
14
|
|
15
15
|
def handle_verification_failure
|
@@ -29,14 +29,6 @@ module Pact
|
|
29
29
|
|
30
30
|
attr_reader :name
|
31
31
|
|
32
|
-
def project_pact_helper_path
|
33
|
-
begin
|
34
|
-
Pact::Provider::PactHelperLocater.pact_helper_path
|
35
|
-
rescue
|
36
|
-
''
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
32
|
def rake_task
|
41
33
|
namespace :pact do
|
42
34
|
desc "Verify running provider against the consumer pacts for #{name}"
|
@@ -48,7 +40,7 @@ module Pact
|
|
48
40
|
|
49
41
|
exit_statuses = pact_spec_configs.collect do | config |
|
50
42
|
ENV['PACT_PROVIDER_BASE_URL'] = @provider_base_url
|
51
|
-
ENV['PACT_PROJECT_PACT_HELPER'] = config[:pact_helper]
|
43
|
+
ENV['PACT_PROJECT_PACT_HELPER'] = config[:pact_helper]
|
52
44
|
Pact::Provider::Proxy::TaskHelper.execute_pact_verify config[:uri], proxy_pact_helper
|
53
45
|
end
|
54
46
|
|
@@ -0,0 +1 @@
|
|
1
|
+
raise "Should not be loaded!"
|
data/spec/tasks.rake
CHANGED
@@ -5,11 +5,6 @@ Pact::ProxyVerificationTask.new :monolith do | task |
|
|
5
5
|
task.provider_base_url 'http://localhost:9292'
|
6
6
|
end
|
7
7
|
|
8
|
-
Pact::ProxyVerificationTask.new :monolith_dynamic_pact_helper do | task |
|
9
|
-
task.pact_url './spec/support/pact.json'
|
10
|
-
task.provider_base_url 'http://localhost:9292'
|
11
|
-
end
|
12
|
-
|
13
8
|
Pact::ProxyVerificationTask.new :monolith_no_pact_helper do | task |
|
14
9
|
task.pact_url './spec/support/pact-with-no-provider-states.json'
|
15
10
|
task.provider_base_url 'http://localhost:9292'
|
@@ -33,13 +28,19 @@ task 'create_pact_helper' do
|
|
33
28
|
FileUtils.cp './spec/fixtures/template_pact_helper.rb', './spec/support/pact_helper.rb'
|
34
29
|
end
|
35
30
|
|
31
|
+
task 'create_pact_helper_that_should_not_be_loaded' do
|
32
|
+
FileUtils.cp './spec/fixtures/do_not_load_pact_helper.rb', './spec/support/pact_helper.rb'
|
33
|
+
end
|
34
|
+
|
36
35
|
task 'create_custom_pact_helper' do
|
37
36
|
FileUtils.cp './spec/fixtures/template_pact_helper.rb', './spec/support/custom_pact_helper.rb'
|
38
37
|
end
|
39
38
|
|
40
|
-
task 'pact:verify:monolith' => ['pact:test:spawn_test_monolith', 'create_custom_pact_helper']
|
41
|
-
task 'pact:verify:
|
42
|
-
|
39
|
+
task 'pact:verify:monolith' => ['pact:test:spawn_test_monolith', 'delete_pact_helper', 'create_custom_pact_helper']
|
40
|
+
task 'pact:verify:monolith_no_pact_helper' => ['pact:test:spawn_test_monolith', 'delete_pact_helper', 'create_pact_helper_that_should_not_be_loaded']
|
41
|
+
|
42
|
+
|
43
|
+
task :spec => ['pact:verify:monolith_no_pact_helper','pact:verify:monolith']
|
44
|
+
task :default => [:spec]
|
45
|
+
|
43
46
|
|
44
|
-
task :spec => ['pact:verify:monolith_no_pact_helper','pact:verify:monolith','pact:verify:monolith_dynamic_pact_helper']
|
45
|
-
task :default => [:spec]
|
metadata
CHANGED
@@ -1,103 +1,103 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pact-provider-proxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Beth
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pact
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 1.1.1
|
20
|
-
- - ~>
|
20
|
+
- - "~>"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '1.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 1.1.1
|
30
|
-
- - ~>
|
30
|
+
- - "~>"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '1.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: bundler
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - ~>
|
37
|
+
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '1.3'
|
40
40
|
type: :development
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
|
-
- - ~>
|
44
|
+
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '1.3'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rake
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- -
|
51
|
+
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '0'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- -
|
58
|
+
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: pry
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- -
|
65
|
+
- - ">="
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '0'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- -
|
72
|
+
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: rack
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- -
|
79
|
+
- - ">="
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: 1.0.0
|
82
82
|
type: :runtime
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- -
|
86
|
+
- - ">="
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: 1.0.0
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: rack-proxy
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
|
-
- - ~>
|
93
|
+
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0.5'
|
96
96
|
type: :runtime
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- - ~>
|
100
|
+
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0.5'
|
103
103
|
description: See summary
|
@@ -107,7 +107,7 @@ executables: []
|
|
107
107
|
extensions: []
|
108
108
|
extra_rdoc_files: []
|
109
109
|
files:
|
110
|
-
- .gitignore
|
110
|
+
- ".gitignore"
|
111
111
|
- CHANGELOG.md
|
112
112
|
- Gemfile
|
113
113
|
- LICENSE.txt
|
@@ -121,6 +121,7 @@ files:
|
|
121
121
|
- lib/pact/provider/proxy/version.rb
|
122
122
|
- pact-provider-proxy.gemspec
|
123
123
|
- script/update-rack-reverse-proxy.sh
|
124
|
+
- spec/fixtures/do_not_load_pact_helper.rb
|
124
125
|
- spec/fixtures/template_pact_helper.rb
|
125
126
|
- spec/support/custom_pact_helper.rb
|
126
127
|
- spec/support/pact-with-no-provider-states.json
|
@@ -154,21 +155,22 @@ require_paths:
|
|
154
155
|
- vendor/rack-reverse-proxy/lib
|
155
156
|
required_ruby_version: !ruby/object:Gem::Requirement
|
156
157
|
requirements:
|
157
|
-
- -
|
158
|
+
- - ">="
|
158
159
|
- !ruby/object:Gem::Version
|
159
160
|
version: '0'
|
160
161
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
162
|
requirements:
|
162
|
-
- -
|
163
|
+
- - ">="
|
163
164
|
- !ruby/object:Gem::Version
|
164
165
|
version: '0'
|
165
166
|
requirements: []
|
166
167
|
rubyforge_project:
|
167
|
-
rubygems_version: 2.
|
168
|
+
rubygems_version: 2.2.2
|
168
169
|
signing_key:
|
169
170
|
specification_version: 4
|
170
171
|
summary: Allows verification of a pact against a running provider
|
171
172
|
test_files:
|
173
|
+
- spec/fixtures/do_not_load_pact_helper.rb
|
172
174
|
- spec/fixtures/template_pact_helper.rb
|
173
175
|
- spec/support/custom_pact_helper.rb
|
174
176
|
- spec/support/pact-with-no-provider-states.json
|