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: a0063a9727fd3e913fe4aab45e7574f4ded7eb1b
4
- data.tar.gz: 9913bc0345264724e39f62d15cb146f9cde98a6a
3
+ metadata.gz: 0ca7c80e800c3532f03fb388b4565c9a229f947c
4
+ data.tar.gz: 817f38e17854ef3d3a63965fc3ff99160d0fa372
5
5
  SHA512:
6
- metadata.gz: 15e54d2e99e2918cc6eec3104217d18af9652ad1fbc75bceb63f169cb6a0d842cbae5da866a220d5bbbca01c13191ffb521e4efb7b359547ef368faa54c7d9ab
7
- data.tar.gz: 658fc9a19522eb0283ec0e4c42190bf75904c5bbf302a729c75e41f0cfafa627d3daeb616c3e1ab446db3d3836fc44a1fabf6051fc0cb7e148847ba3eeb5dcd6
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
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module Support
3
- VERSION = "1.2.0"
3
+ VERSION = "1.2.1"
4
4
  end
5
5
  end
@@ -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.0
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-09-28 00:00:00.000000000 Z
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.6.12
400
+ rubygems_version: 2.4.5.2
401
401
  signing_key:
402
402
  specification_version: 4
403
403
  summary: Shared code for Pact gems