pact 1.9.0 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/pact/consumer/configuration/mock_service.rb +13 -8
- data/lib/pact/doc/interaction_view_model.rb +3 -2
- data/lib/pact/doc/markdown/interaction_renderer.rb +2 -1
- data/lib/pact/version.rb +1 -1
- data/pact.gemspec +0 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 138c143b83bdca0bd277cab32eb1c5edf1e8d919
|
4
|
+
data.tar.gz: 2c43a0204397d750405ab2b9ede4572aea43664e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6925419bdbbe2b757d2dc8e3593d196618a52dd4e16ae503bf57a5a16144ade6d9886f36c91c789c452220cd63e438bb2f32573cfe2b038265f143301e6ca2f5
|
7
|
+
data.tar.gz: 41fdcc6ab161e9b5d45510188673965a07e5cf938970e1b71a4791ba43fd0e712e2f0a17e4e484c6627c842d7125a256c86c64d3c7df337fe9a27d4fbbb4f1dd
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,17 @@ 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.9.1 (3 May 2016)
|
6
|
+
* b3409a7 - Accept nil port as find and use available port (Taiki Ono, Wed Mar 16 19:34:46 2016 +0900)
|
7
|
+
* a7f644f - Update README URLs based on HTTP redirects (ReadmeCritic, Mon Mar 14 07:03:52 2016 -0700)
|
8
|
+
* 9cbf0f0 - Load missing dependent library (Taiki Ono, Mon Mar 14 17:43:13 2016 +0900)
|
9
|
+
* 34e6ef9 - Update Travis CI setting with new Rubies (Taiki Ono, Sun Mar 13 21:11:27 2016 +0900)
|
10
|
+
* 04f80c4 - Update doc about pactfile_write_mode (Taiki Ono, Thu Mar 3 14:25:49 2016 +0900)
|
11
|
+
* a1c8b6d - Add instructions to put pact gem in Gemfile. (Beth Skurrie, Thu Nov 5 11:16:38 2015 +1100)
|
12
|
+
* 5f76726 - Escape markdown characters in description and provider state (Beth, Thu Oct 22 09:07:53 2015 +1100)
|
13
|
+
* 4922ad3 - README.md tiny typo (Leo Gallucci, Tue Sep 8 13:33:58 2015 +0200)
|
14
|
+
* f4f7276 - there is no attr_reader for :name (Jacob Evans, Mon Jul 27 15:05:31 2015 +1000)
|
15
|
+
|
5
16
|
### 1.9.0 (10 July 2015)
|
6
17
|
|
7
18
|
* 3e9f310 - Include Pact helper methods to create Terms, ArrayLikes and SomethingLikes. (Beth Skurrie, Fri Jul 10 13:33:50 2015 +1000)
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'pact/mock_service/version'
|
1
2
|
require 'pact/mock_service/app_manager'
|
2
3
|
require 'pact/consumer/consumer_contract_builder'
|
3
4
|
require 'pact/consumer/consumer_contract_builders'
|
@@ -20,6 +21,7 @@ module Pact
|
|
20
21
|
@standalone = false
|
21
22
|
@verify = true
|
22
23
|
@pact_specification_version = nil
|
24
|
+
@finalized = false
|
23
25
|
end
|
24
26
|
|
25
27
|
dsl do
|
@@ -41,16 +43,20 @@ module Pact
|
|
41
43
|
end
|
42
44
|
|
43
45
|
def finalize
|
44
|
-
|
46
|
+
raise 'Already finalized!' if @finalized
|
45
47
|
register_mock_service
|
46
48
|
configure_consumer_contract_builder
|
49
|
+
@finalized = true
|
47
50
|
end
|
48
51
|
|
49
52
|
private
|
50
53
|
|
51
54
|
def register_mock_service
|
52
55
|
unless standalone
|
53
|
-
|
56
|
+
url = "http://localhost#{port.nil? ? '' : ":#{port}"}"
|
57
|
+
ret = Pact::MockService::AppManager.instance.register_mock_service_for(provider_name, url, mock_service_options)
|
58
|
+
raise "pact-mock_service(v#{Pact::MockService::VERSION}) does not support 'find available port' feature" unless ret
|
59
|
+
@port = ret
|
54
60
|
end
|
55
61
|
end
|
56
62
|
|
@@ -88,14 +94,13 @@ module Pact
|
|
88
94
|
Pact.consumer_world.add_consumer_contract_builder consumer_contract_builder
|
89
95
|
end
|
90
96
|
|
91
|
-
def validate
|
92
|
-
raise "Please provide a port for service #{name}" unless port
|
93
|
-
end
|
94
|
-
|
95
97
|
def mock_service_options
|
96
|
-
{
|
98
|
+
{
|
99
|
+
pact_specification_version: pact_specification_version,
|
100
|
+
find_available_port: port.nil?,
|
101
|
+
}
|
97
102
|
end
|
98
103
|
end
|
99
104
|
end
|
100
105
|
end
|
101
|
-
end
|
106
|
+
end
|
@@ -49,12 +49,12 @@ module Pact
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def provider_state start_of_sentence = false
|
52
|
-
apply_capitals(@interaction.provider_state.strip, start_of_sentence)
|
52
|
+
markdown_escape apply_capitals(@interaction.provider_state.strip, start_of_sentence)
|
53
53
|
end
|
54
54
|
|
55
55
|
def description start_of_sentence = false
|
56
56
|
return '' unless @interaction.description
|
57
|
-
apply_capitals(@interaction.description.strip, start_of_sentence)
|
57
|
+
markdown_escape apply_capitals(@interaction.description.strip, start_of_sentence)
|
58
58
|
end
|
59
59
|
|
60
60
|
def request
|
@@ -116,6 +116,7 @@ module Pact
|
|
116
116
|
end
|
117
117
|
|
118
118
|
def markdown_escape string
|
119
|
+
return nil unless string
|
119
120
|
string.gsub('*','\*').gsub('_','\_')
|
120
121
|
end
|
121
122
|
end
|
data/lib/pact/version.rb
CHANGED
data/pact.gemspec
CHANGED
@@ -20,7 +20,6 @@ Gem::Specification.new do |gem|
|
|
20
20
|
|
21
21
|
gem.add_runtime_dependency 'randexp', '~> 0.1.7'
|
22
22
|
gem.add_runtime_dependency 'rspec', '>=2.14'
|
23
|
-
gem.add_runtime_dependency 'find_a_port', '~> 1.0.1'
|
24
23
|
gem.add_runtime_dependency 'rack-test', '~> 0.6.2'
|
25
24
|
gem.add_runtime_dependency 'awesome_print', '~> 1.1'
|
26
25
|
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.9.
|
4
|
+
version: 1.9.1
|
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:
|
15
|
+
date: 2016-05-03 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: randexp
|
@@ -42,20 +42,6 @@ dependencies:
|
|
42
42
|
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: '2.14'
|
45
|
-
- !ruby/object:Gem::Dependency
|
46
|
-
name: find_a_port
|
47
|
-
requirement: !ruby/object:Gem::Requirement
|
48
|
-
requirements:
|
49
|
-
- - "~>"
|
50
|
-
- !ruby/object:Gem::Version
|
51
|
-
version: 1.0.1
|
52
|
-
type: :runtime
|
53
|
-
prerelease: false
|
54
|
-
version_requirements: !ruby/object:Gem::Requirement
|
55
|
-
requirements:
|
56
|
-
- - "~>"
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
version: 1.0.1
|
59
45
|
- !ruby/object:Gem::Dependency
|
60
46
|
name: rack-test
|
61
47
|
requirement: !ruby/object:Gem::Requirement
|