mock_server 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/mock_server/playback.rb +3 -4
  2. metadata +5 -5
@@ -67,11 +67,10 @@ module MockServer
67
67
  # Match the request with a record by validating against the matcher if any.
68
68
  @data.detect { |entry|
69
69
  recorded_request = Hashie::Mash.new entry[:request]
70
+ recorded_response = entry[:response].dup
70
71
 
71
- body = JSON.parse(entry[:response][:body]) rescue nil
72
- entry[:response][:body] if body
73
-
74
- recorded_response = Hashie::Mash.new entry[:response]
72
+ recorded_response[:body] = JSON.parse(recorded_response[:body]) rescue recorded_response[:body]
73
+ recorded_response = Hashie::Mash.new recorded_response
75
74
 
76
75
  matchers.detect { |matcher|
77
76
  if matcher[:matcher]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mock_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ date: 2011-11-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack
17
- requirement: &70272738877320 !ruby/object:Gem::Requirement
17
+ requirement: &70337703392860 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70272738877320
25
+ version_requirements: *70337703392860
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: hashie
28
- requirement: &70272738876860 !ruby/object:Gem::Requirement
28
+ requirement: &70337703391880 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70272738876860
36
+ version_requirements: *70337703391880
37
37
  description:
38
38
  email: unixcharles@gmail.com
39
39
  executables: []