pact-mock_service 0.7.2 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab3f999ac97b085e40e24b9e8f649acfd91cfba1
|
4
|
+
data.tar.gz: 3b3fca9643f62634713372a82e2600bc3fb335bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e520bf93094dbcfcb2543e34698d7fdd37fc7345e6153e89a0229e610bce1f1dc8ea8387508002681f6bbbae81c6f72ee7a8c1176e66c5b67b0084ee17547506
|
7
|
+
data.tar.gz: dc0a6d179bbf1299d209ce03dae12564f3b2cc12dfbbde39b95e8216a6429ca32c0abd9751f11fe784f304f1b934a8d00f7108f8861a8adc51bb4fbf37d422bf
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@ 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
|
+
### 0.8.0 (30 November 2015)
|
6
|
+
|
7
|
+
* 96dc58b - Adds DELETE session endpoint (George Papas & Matt Fielding, Fri Nov 27 16:45:13 2015 +1100)
|
8
|
+
|
5
9
|
### 0.7.2 (7 October 2015)
|
6
10
|
|
7
11
|
* 24a092d - Updated pact-support gem (Beth Skurrie, Wed Oct 7 20:39:08 2015 +1100)
|
@@ -7,6 +7,7 @@ require 'pact/mock_service/request_handlers/log_get'
|
|
7
7
|
require 'pact/mock_service/request_handlers/options'
|
8
8
|
require 'pact/mock_service/request_handlers/missing_interactions_get'
|
9
9
|
require 'pact/mock_service/request_handlers/pact_post'
|
10
|
+
require 'pact/mock_service/request_handlers/session_delete'
|
10
11
|
require 'pact/mock_service/request_handlers/verification_get'
|
11
12
|
require 'pact/consumer/request'
|
12
13
|
require 'pact/support'
|
@@ -23,6 +24,7 @@ module Pact
|
|
23
24
|
def initialize name, logger, session, options
|
24
25
|
super [
|
25
26
|
Options.new(name, logger, options[:cors_enabled]),
|
27
|
+
SessionDelete.new(name, logger, session),
|
26
28
|
MissingInteractionsGet.new(name, logger, session),
|
27
29
|
VerificationGet.new(name, logger, session),
|
28
30
|
InteractionPost.new(name, logger, session),
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'pact/mock_service/request_handlers/base_administration_request_handler'
|
2
|
+
|
3
|
+
module Pact
|
4
|
+
module MockService
|
5
|
+
module RequestHandlers
|
6
|
+
|
7
|
+
class SessionDelete < BaseAdministrationRequestHandler
|
8
|
+
|
9
|
+
attr_accessor :session
|
10
|
+
|
11
|
+
def initialize name, logger, session
|
12
|
+
super name, logger
|
13
|
+
@session = session
|
14
|
+
end
|
15
|
+
|
16
|
+
def request_path
|
17
|
+
'/session'
|
18
|
+
end
|
19
|
+
|
20
|
+
def request_method
|
21
|
+
'DELETE'
|
22
|
+
end
|
23
|
+
|
24
|
+
def respond env
|
25
|
+
session.clear_all
|
26
|
+
logger.info "Cleared session"
|
27
|
+
[200, {}, ['Cleared session']]
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -39,6 +39,12 @@ module Pact
|
|
39
39
|
actual_interactions.clear
|
40
40
|
end
|
41
41
|
|
42
|
+
def clear_all
|
43
|
+
expected_interactions.clear
|
44
|
+
actual_interactions.clear
|
45
|
+
verified_interactions.clear
|
46
|
+
end
|
47
|
+
|
42
48
|
def add_expected_interaction interaction
|
43
49
|
if (previous_interaction = interaction_already_verified_with_same_description_and_provider_state_but_not_equal(interaction))
|
44
50
|
handle_almost_duplicate_interaction previous_interaction, interaction
|
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: 0.
|
4
|
+
version: 0.8.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: 2015-
|
15
|
+
date: 2015-11-30 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rack
|
@@ -301,6 +301,7 @@ files:
|
|
301
301
|
- lib/pact/mock_service/request_handlers/missing_interactions_get.rb
|
302
302
|
- lib/pact/mock_service/request_handlers/options.rb
|
303
303
|
- lib/pact/mock_service/request_handlers/pact_post.rb
|
304
|
+
- lib/pact/mock_service/request_handlers/session_delete.rb
|
304
305
|
- lib/pact/mock_service/request_handlers/verification_get.rb
|
305
306
|
- lib/pact/mock_service/response_decorator.rb
|
306
307
|
- lib/pact/mock_service/run.rb
|
@@ -330,7 +331,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
330
331
|
version: '0'
|
331
332
|
requirements: []
|
332
333
|
rubyforge_project:
|
333
|
-
rubygems_version: 2.
|
334
|
+
rubygems_version: 2.4.5
|
334
335
|
signing_key:
|
335
336
|
specification_version: 4
|
336
337
|
summary: Provides a mock service for use with Pact
|