pact-support 1.2.0 → 1.2.1
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: 0ca7c80e800c3532f03fb388b4565c9a229f947c
|
4
|
+
data.tar.gz: 817f38e17854ef3d3a63965fc3ff99160d0fa372
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a67527868f5147796f40bd2d8beaf220e1310f9921df45fec730098cde73ed37a1c2dae87971df5342203f16617770632f7dac3d08cbcc325398c88d27189bc3
|
7
|
+
data.tar.gz: 29ed75975627e19dab65f5f0e8ed59260fa639a399fa9e0fa31532ed0d237d240b46bf1639ded5376cf29a9b4b5a30f2c0697decf6f8124a2ea7514c18fbb308
|
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)'
|
4
4
|
|
5
|
+
### 1.2.1 (2017-10-03)
|
6
|
+
* c3b3f22 - fix: ignore invalid params in response constructor hash (Beth Skurrie, Tue Oct 3 15:40:22 2017 +1100)
|
7
|
+
|
5
8
|
### 1.2.0 (2017-09-28)
|
6
9
|
* 4489d96 - feat(pact file name): allow unique pact file names to be generated (Beth Skurrie, Thu Sep 28 11:05:33 2017 +1000)
|
7
10
|
|
@@ -7,8 +7,11 @@ module Pact
|
|
7
7
|
|
8
8
|
include SymbolizeKeys
|
9
9
|
|
10
|
+
ALLOWED_KEYS = [:status, :headers, :body, 'status', 'headers', 'body'].freeze
|
11
|
+
private_constant :ALLOWED_KEYS
|
12
|
+
|
10
13
|
def initialize attributes
|
11
|
-
merge!(attributes)
|
14
|
+
merge!(attributes.reject{|key, value| !ALLOWED_KEYS.include?(key)})
|
12
15
|
end
|
13
16
|
|
14
17
|
def status
|
data/lib/pact/support/version.rb
CHANGED
@@ -7,6 +7,15 @@ module Pact
|
|
7
7
|
|
8
8
|
subject { Response.from_hash(status: 200, headers: {'Content-Type' => 'application/json'}, body: {some: 'body'}) }
|
9
9
|
|
10
|
+
describe "initialize" do
|
11
|
+
context "with invalid params" do
|
12
|
+
it "ignores the invalid params" do
|
13
|
+
response = Response.new(foo: 'bar')
|
14
|
+
expect(response).to_not have_key(:foo)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
10
19
|
describe "#status" do
|
11
20
|
it "returns the status" do
|
12
21
|
expect(subject.status).to eq 200
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pact-support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.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: 2017-
|
15
|
+
date: 2017-10-03 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: randexp
|
@@ -397,7 +397,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
397
397
|
version: '0'
|
398
398
|
requirements: []
|
399
399
|
rubyforge_project:
|
400
|
-
rubygems_version: 2.
|
400
|
+
rubygems_version: 2.4.5.2
|
401
401
|
signing_key:
|
402
402
|
specification_version: 4
|
403
403
|
summary: Shared code for Pact gems
|