pact-mock_service 3.12.4 → 4.0.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/consumer_contract/consumer_contract_decorator.rb +2 -2
- data/lib/pact/consumer_contract/consumer_contract_writer.rb +2 -2
- data/lib/pact/mock_service/app_manager.rb +3 -3
- data/lib/pact/mock_service/interactions/interaction_mismatch.rb +1 -1
- data/lib/pact/mock_service/request_handlers/interaction_replay.rb +1 -1
- data/lib/pact/mock_service/version.rb +1 -1
- data/lib/pact/support/metrics.rb +2 -2
- metadata +24 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 67dbe04dd1b8d3a85cdd74f776bdad09f4628c63fedb108a86994595946d5b66
|
|
4
|
+
data.tar.gz: 9784e4495cb661096154b576dad4508d27707ecb06a4960cd062003d7fa4b52d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e50f82f5d3728519536a5f7bee2a4586c145664a49df370838913f38de30483fdeee90f856afbaaff756e6977cddcf759abf34a62627e158b27ea252ec50a380
|
|
7
|
+
data.tar.gz: 5cb6cc0293ae95609842a052a0df29f73d12ff2d0a27dda2720fefa65ce4cbce289039caf0dff1d658cd78489572c6468c41b48ffc17ed53d15ff1ef6e2496d5
|
data/CHANGELOG.md
CHANGED
|
@@ -32,9 +32,9 @@ module Pact
|
|
|
32
32
|
|
|
33
33
|
def sorted_interactions
|
|
34
34
|
# Default order: chronological
|
|
35
|
-
return consumer_contract.writable_interactions if Pact.configuration.pactfile_write_order == :chronological
|
|
35
|
+
return consumer_contract.writable_interactions if Pact::Support.configuration.pactfile_write_order == :chronological
|
|
36
36
|
# We are supporting only chronological or alphabetical order
|
|
37
|
-
raise NotImplementedError if Pact.configuration.pactfile_write_order != :alphabetical
|
|
37
|
+
raise NotImplementedError if Pact::Support.configuration.pactfile_write_order != :alphabetical
|
|
38
38
|
|
|
39
39
|
consumer_contract.writable_interactions.sort{|a, b| sortable_id(a) <=> sortable_id(b)}
|
|
40
40
|
end
|
|
@@ -25,8 +25,8 @@ module Pact
|
|
|
25
25
|
@interactions = consumer_contract_details.fetch(:interactions)
|
|
26
26
|
@pact_specification_version = (consumer_contract_details[:pact_specification_version] || DEFAULT_PACT_SPECIFICATION_VERSION).to_s
|
|
27
27
|
@consumer_contract_decorator_class = consumer_contract_details[:consumer_contract_decorator_class] || Pact::ConsumerContractDecorator
|
|
28
|
-
@error_stream = consumer_contract_details[:error_stream] || Pact.configuration.error_stream
|
|
29
|
-
@output_stream = consumer_contract_details[:output_stream] || Pact.configuration.output_stream
|
|
28
|
+
@error_stream = consumer_contract_details[:error_stream] || Pact::Support.configuration.error_stream
|
|
29
|
+
@output_stream = consumer_contract_details[:output_stream] || Pact::Support.configuration.output_stream
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
def consumer_contract
|
|
@@ -80,18 +80,18 @@ module Pact
|
|
|
80
80
|
end
|
|
81
81
|
|
|
82
82
|
def pact_dir
|
|
83
|
-
Pact.configuration.pact_dir
|
|
83
|
+
Pact::Support.configuration.pact_dir
|
|
84
84
|
end
|
|
85
85
|
|
|
86
86
|
def create_log_file(service_name)
|
|
87
|
-
FileUtils::mkdir_p(Pact.configuration.log_dir)
|
|
87
|
+
FileUtils::mkdir_p(Pact::Support.configuration.log_dir)
|
|
88
88
|
log = File.open(log_file_path(service_name), 'w')
|
|
89
89
|
log.sync = true
|
|
90
90
|
log
|
|
91
91
|
end
|
|
92
92
|
|
|
93
93
|
def log_file_path(service_name)
|
|
94
|
-
File.join(Pact.configuration.log_dir, "#{log_file_name(service_name)}.log")
|
|
94
|
+
File.join(Pact::Support.configuration.log_dir, "#{log_file_name(service_name)}.log")
|
|
95
95
|
end
|
|
96
96
|
|
|
97
97
|
def log_file_name(service_name)
|
|
@@ -61,7 +61,7 @@ module Pact
|
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
def diff_formatter
|
|
64
|
-
Pact.configuration.diff_formatter_for_content_type(candidate_interaction.request.content_type)
|
|
64
|
+
Pact::Support.configuration.diff_formatter_for_content_type(candidate_interaction.request.content_type)
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
def diff
|
data/lib/pact/support/metrics.rb
CHANGED
|
@@ -11,7 +11,7 @@ module Pact
|
|
|
11
11
|
def self.report_metric(event, category, action, value = 1)
|
|
12
12
|
do_once_per_thread(:pact_metrics_message_shown) do
|
|
13
13
|
if track_events?
|
|
14
|
-
Pact.configuration.output_stream.puts "mock WARN: Please note: we are tracking events anonymously to gather important usage statistics like Pact-Ruby version and operating system. To disable tracking, set the 'PACT_DO_NOT_TRACK' environment variable to 'true'."
|
|
14
|
+
Pact::Support.configuration.output_stream.puts "mock WARN: Please note: we are tracking events anonymously to gather important usage statistics like Pact-Ruby version and operating system. To disable tracking, set the 'PACT_DO_NOT_TRACK' environment variable to 'true'."
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -36,7 +36,7 @@ module Pact
|
|
|
36
36
|
|
|
37
37
|
def self.handle_error e
|
|
38
38
|
if ENV['PACT_METRICS_DEBUG'] == 'true'
|
|
39
|
-
Pact.configuration.output_stream.puts("DEBUG: #{e.inspect}\n" + e.backtrace.join("\n"))
|
|
39
|
+
Pact::Support.configuration.output_stream.puts("DEBUG: #{e.inspect}\n" + e.backtrace.join("\n"))
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
42
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pact-mock_service
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 4.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Fraser
|
|
@@ -127,22 +127,22 @@ dependencies:
|
|
|
127
127
|
name: pact-support
|
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
|
129
129
|
requirements:
|
|
130
|
-
- - "~>"
|
|
131
|
-
- !ruby/object:Gem::Version
|
|
132
|
-
version: '1.16'
|
|
133
130
|
- - ">="
|
|
134
131
|
- !ruby/object:Gem::Version
|
|
135
|
-
version:
|
|
132
|
+
version: '2.0'
|
|
133
|
+
- - "<"
|
|
134
|
+
- !ruby/object:Gem::Version
|
|
135
|
+
version: '3'
|
|
136
136
|
type: :runtime
|
|
137
137
|
prerelease: false
|
|
138
138
|
version_requirements: !ruby/object:Gem::Requirement
|
|
139
139
|
requirements:
|
|
140
|
-
- - "~>"
|
|
141
|
-
- !ruby/object:Gem::Version
|
|
142
|
-
version: '1.16'
|
|
143
140
|
- - ">="
|
|
144
141
|
- !ruby/object:Gem::Version
|
|
145
|
-
version:
|
|
142
|
+
version: '2.0'
|
|
143
|
+
- - "<"
|
|
144
|
+
- !ruby/object:Gem::Version
|
|
145
|
+
version: '3'
|
|
146
146
|
- !ruby/object:Gem::Dependency
|
|
147
147
|
name: logger
|
|
148
148
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -157,6 +157,20 @@ dependencies:
|
|
|
157
157
|
- - "<"
|
|
158
158
|
- !ruby/object:Gem::Version
|
|
159
159
|
version: '2.0'
|
|
160
|
+
- !ruby/object:Gem::Dependency
|
|
161
|
+
name: cgi
|
|
162
|
+
requirement: !ruby/object:Gem::Requirement
|
|
163
|
+
requirements:
|
|
164
|
+
- - ">="
|
|
165
|
+
- !ruby/object:Gem::Version
|
|
166
|
+
version: '0'
|
|
167
|
+
type: :runtime
|
|
168
|
+
prerelease: false
|
|
169
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
170
|
+
requirements:
|
|
171
|
+
- - ">="
|
|
172
|
+
- !ruby/object:Gem::Version
|
|
173
|
+
version: '0'
|
|
160
174
|
- !ruby/object:Gem::Dependency
|
|
161
175
|
name: rack-test
|
|
162
176
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -450,7 +464,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
450
464
|
- !ruby/object:Gem::Version
|
|
451
465
|
version: '0'
|
|
452
466
|
requirements: []
|
|
453
|
-
rubygems_version: 4.0.
|
|
467
|
+
rubygems_version: 4.0.21
|
|
454
468
|
specification_version: 4
|
|
455
469
|
summary: Provides a mock service for use with Pact
|
|
456
470
|
test_files: []
|