pact 1.42.2 → 1.42.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +10 -0
- data/lib/pact/consumer/spec_hooks.rb +2 -2
- data/lib/pact/doc/sort_interactions.rb +2 -3
- data/lib/pact/provider/pact_helper_locator.rb +0 -1
- data/lib/pact/provider/pact_spec_runner.rb +5 -1
- data/lib/pact/provider/request.rb +1 -1
- data/lib/pact/provider/rspec.rb +1 -1
- data/lib/pact/provider/test_methods.rb +1 -1
- data/lib/pact/provider/world.rb +1 -1
- data/lib/pact/version.rb +1 -1
- data/pact.gemspec +0 -1
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5246cb251aaa720174fe319b2b7d0f0b9d73bedefb122549704f47db4340541c
|
4
|
+
data.tar.gz: e67c6ce61ec87143e7241bee0c1e5238d297dce10ad7b8659601c39d496014c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '082aafe21839f9a13a49ef86b2782582bdde8cca49ed6486125191950627c7d14e08c48c84e9e3e56ee499eb3535b9c9eab9fdb815a52256fa05aff3f2db7afa'
|
7
|
+
data.tar.gz: acacef55a6d67049dad4bcf3a8d30e200f4187ef08ff8cee0a52e74677fc603561a09afe6c4afbac7578cf223e3a4a81619df96b7e7062cec6b35e7554cc395b
|
data/CHANGELOG.md
CHANGED
@@ -29,7 +29,7 @@ module Pact
|
|
29
29
|
|
30
30
|
def after_suite
|
31
31
|
if Pact.consumer_world.any_pact_examples_ran?
|
32
|
-
Pact.consumer_world.consumer_contract_builders.each
|
32
|
+
Pact.consumer_world.consumer_contract_builders.each(&:write_pact)
|
33
33
|
Pact::Doc::Generate.call
|
34
34
|
Pact::MockService::AppManager.instance.kill_all
|
35
35
|
Pact::MockService::AppManager.instance.clear_all
|
@@ -37,4 +37,4 @@ module Pact
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
40
|
-
end
|
40
|
+
end
|
@@ -3,7 +3,7 @@ module Pact
|
|
3
3
|
class SortInteractions
|
4
4
|
|
5
5
|
def self.call interactions
|
6
|
-
interactions.
|
6
|
+
interactions.sort_by { |interaction| sortable_id(interaction) }
|
7
7
|
end
|
8
8
|
|
9
9
|
private
|
@@ -11,7 +11,6 @@ module Pact
|
|
11
11
|
def self.sortable_id interaction
|
12
12
|
"#{interaction.description.downcase} #{interaction.response.status} #{(interaction.provider_state || '').downcase}"
|
13
13
|
end
|
14
|
-
|
15
14
|
end
|
16
15
|
end
|
17
|
-
end
|
16
|
+
end
|
@@ -91,7 +91,7 @@ module Pact
|
|
91
91
|
::RSpec::Core::CommandLine.new(NoConfigurationOptions.new)
|
92
92
|
.run(::RSpec.configuration.output_stream, ::RSpec.configuration.error_stream)
|
93
93
|
end
|
94
|
-
options[:ignore_failures] ? 0 : exit_code
|
94
|
+
(all_pacts_pending? || options[:ignore_failures]) ? 0 : exit_code
|
95
95
|
end
|
96
96
|
|
97
97
|
def rspec_runner_options
|
@@ -159,6 +159,10 @@ module Pact
|
|
159
159
|
consumer_contract.to_json
|
160
160
|
end
|
161
161
|
|
162
|
+
def all_pacts_pending?
|
163
|
+
pact_urls.all?{ | pact_url| pact_url.metadata[:pending] }
|
164
|
+
end
|
165
|
+
|
162
166
|
def class_exists? name
|
163
167
|
Kernel.const_get name
|
164
168
|
rescue NameError
|
data/lib/pact/provider/rspec.rb
CHANGED
@@ -76,7 +76,7 @@ module Pact
|
|
76
76
|
pact_interaction: interaction,
|
77
77
|
pact_interaction_example_description: interaction_description_for_rerun_command(interaction),
|
78
78
|
pact_uri: options[:pact_uri],
|
79
|
-
pact_ignore_failures: options[:pact_uri].metadata[:pending]
|
79
|
+
pact_ignore_failures: options[:pact_uri].metadata[:pending] || options[:ignore_failures]
|
80
80
|
}
|
81
81
|
|
82
82
|
describe description_for(interaction), metadata do
|
@@ -46,7 +46,7 @@ module Pact
|
|
46
46
|
def tear_down_provider_states provider_states, consumer, options = {}
|
47
47
|
# If there are no provider state, execute with an nil state to ensure global and base states are executed
|
48
48
|
Pact.configuration.provider_state_tear_down.call(nil, consumer, options) if provider_states.nil? || provider_states.empty?
|
49
|
-
provider_states.
|
49
|
+
provider_states.reverse_each do | provider_state |
|
50
50
|
Pact.configuration.provider_state_tear_down.call(provider_state.name, consumer, options.merge(params: provider_state.params))
|
51
51
|
end
|
52
52
|
end
|
data/lib/pact/provider/world.rb
CHANGED
data/lib/pact/version.rb
CHANGED
data/pact.gemspec
CHANGED
@@ -26,7 +26,6 @@ Gem::Specification.new do |gem|
|
|
26
26
|
'documentation_uri' => 'https://github.com/pact-foundation/pact-ruby/blob/master/README.md'
|
27
27
|
}
|
28
28
|
|
29
|
-
gem.add_runtime_dependency 'randexp', '~> 0.1.7'
|
30
29
|
gem.add_runtime_dependency 'rspec', '>=2.14'
|
31
30
|
gem.add_runtime_dependency 'rack-test', '>= 0.6.3', '< 2.0.0'
|
32
31
|
gem.add_runtime_dependency 'thor'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pact
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.42.
|
4
|
+
version: 1.42.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Fraser
|
@@ -12,22 +12,8 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2019-11-
|
15
|
+
date: 2019-11-15 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
|
-
- !ruby/object:Gem::Dependency
|
18
|
-
name: randexp
|
19
|
-
requirement: !ruby/object:Gem::Requirement
|
20
|
-
requirements:
|
21
|
-
- - "~>"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.1.7
|
24
|
-
type: :runtime
|
25
|
-
prerelease: false
|
26
|
-
version_requirements: !ruby/object:Gem::Requirement
|
27
|
-
requirements:
|
28
|
-
- - "~>"
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
version: 0.1.7
|
31
17
|
- !ruby/object:Gem::Dependency
|
32
18
|
name: rspec
|
33
19
|
requirement: !ruby/object:Gem::Requirement
|
@@ -400,7 +386,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
400
386
|
version: '0'
|
401
387
|
requirements: []
|
402
388
|
rubyforge_project:
|
403
|
-
rubygems_version: 2.6
|
389
|
+
rubygems_version: 2.7.6
|
404
390
|
signing_key:
|
405
391
|
specification_version: 4
|
406
392
|
summary: Enables consumer driven contract testing, providing a mock service and DSL
|