pact 1.12.1 → 1.13.0
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/pact/provider/configuration/configuration_extension.rb +18 -0
- data/lib/pact/provider/state/set_up.rb +13 -0
- data/lib/pact/provider/state/tear_down.rb +13 -0
- data/lib/pact/provider/test_methods.rb +4 -5
- data/lib/pact/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b7c1f10b20330a3cd61a9711a0006c1b68b405d
|
4
|
+
data.tar.gz: a5c26183ea7edfe7bbffa51d14b0cd6bdca99316
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc23c2a873a0c773e40f884e1c2f7fb9404cdcf727fcd10adb825614f14e28ddc77d3debb129916f0965b6fd721f6003248bc45037d7086233b347bcee510dfa
|
7
|
+
data.tar.gz: 4630267e5c71b46d053a1a2a6ce6131655fc7908b381e497a548474029c5481de635a7fd2ed2d1d01897b5ff2fa0c091786064535d55320b9b6e2b0f2faf579f
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,9 @@ Do this to generate your change history
|
|
2
2
|
|
3
3
|
git log --pretty=format:' * %h - %s (%an, %ad)' vX.Y.Z..HEAD
|
4
4
|
|
5
|
+
## 1.13.0 (26 May 2017)
|
6
|
+
* c9800b0 - Make the code to call for provider state set up and tear down configurable. (Beth Skurrie, Fri May 26 14:32:34 2017 +1000)
|
7
|
+
|
5
8
|
## 1.12.1 (23 May 2017)
|
6
9
|
* 47140b7 - Update .travis.yml to publish to rubygems (Beth Skurrie, Tue May 23 16:23:21 2017 +1000)
|
7
10
|
* 16c40bd - Use RSpec.configuration.reporter.failed_examples to get failed examples instead of the suite, as it is backwards compatible with rspec 3.0.0 (Beth Skurrie, Tue May 23 15:59:36 2017 +1000)
|
@@ -1,5 +1,7 @@
|
|
1
1
|
require 'pact/provider/state/provider_state'
|
2
2
|
require 'pact/provider/state/provider_state_configured_modules'
|
3
|
+
require 'pact/provider/state/set_up'
|
4
|
+
require 'pact/provider/state/tear_down'
|
3
5
|
|
4
6
|
module Pact
|
5
7
|
|
@@ -39,6 +41,22 @@ module Pact
|
|
39
41
|
@interactions_replay_order = interactions_replay_order.to_sym
|
40
42
|
end
|
41
43
|
|
44
|
+
def provider_state_set_up
|
45
|
+
@provider_state_set_up ||= Pact::Provider::State::SetUp
|
46
|
+
end
|
47
|
+
|
48
|
+
def provider_state_set_up= provider_state_set_up
|
49
|
+
@provider_state_set_up = provider_state_set_up
|
50
|
+
end
|
51
|
+
|
52
|
+
def provider_state_tear_down
|
53
|
+
@provider_state_tear_down ||= Pact::Provider::State::TearDown
|
54
|
+
end
|
55
|
+
|
56
|
+
def provider_state_tear_down= provider_state_tear_down
|
57
|
+
@provider_state_tear_down = provider_state_tear_down
|
58
|
+
end
|
59
|
+
|
42
60
|
def include mod
|
43
61
|
Pact::Provider::State::ProviderStateConfiguredModules.instance_eval do
|
44
62
|
include mod
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'pact/provider/state/provider_state_manager'
|
2
|
+
|
3
|
+
module Pact
|
4
|
+
module Provider
|
5
|
+
module State
|
6
|
+
class SetUp
|
7
|
+
def self.call provider_state_name, consumer, options = {}
|
8
|
+
State::ProviderStateManager.new(provider_state_name, consumer).set_up_provider_state
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'pact/provider/state/provider_state_manager'
|
2
|
+
|
3
|
+
module Pact
|
4
|
+
module Provider
|
5
|
+
module State
|
6
|
+
class TearDown
|
7
|
+
def self.call provider_state_name, consumer, options = {}
|
8
|
+
State::ProviderStateManager.new(provider_state_name, consumer).tear_down_provider_state
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -34,14 +34,13 @@ module Pact
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
def set_up_provider_state provider_state_name, consumer
|
38
|
-
|
37
|
+
def set_up_provider_state provider_state_name, consumer, options = {}
|
38
|
+
Pact.configuration.provider_state_set_up.call(provider_state_name, consumer, options)
|
39
39
|
end
|
40
40
|
|
41
|
-
def tear_down_provider_state provider_state_name, consumer
|
42
|
-
|
41
|
+
def tear_down_provider_state provider_state_name, consumer, options = {}
|
42
|
+
Pact.configuration.provider_state_tear_down.call(provider_state_name, consumer, options)
|
43
43
|
end
|
44
|
-
|
45
44
|
end
|
46
45
|
end
|
47
46
|
end
|
data/lib/pact/version.rb
CHANGED
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.
|
4
|
+
version: 1.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Fraser
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2017-05-
|
15
|
+
date: 2017-05-26 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: randexp
|
@@ -330,6 +330,8 @@ files:
|
|
330
330
|
- lib/pact/provider/state/provider_state_configured_modules.rb
|
331
331
|
- lib/pact/provider/state/provider_state_manager.rb
|
332
332
|
- lib/pact/provider/state/provider_state_proxy.rb
|
333
|
+
- lib/pact/provider/state/set_up.rb
|
334
|
+
- lib/pact/provider/state/tear_down.rb
|
333
335
|
- lib/pact/provider/test_methods.rb
|
334
336
|
- lib/pact/provider/verification_report.rb
|
335
337
|
- lib/pact/provider/verification_results/create.rb
|