pact-mock_service 3.5.0 → 3.6.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
  SHA256:
3
- metadata.gz: '07408e9dcc7fd09a8e3e9f99b818e9bf7c49a7b8dbc72b3a3e73b2c0d17086ef'
4
- data.tar.gz: 9724d49997cce5add29605eae25ec3ed81f7ca3fea3c1eebb6e7a682e481d119
3
+ metadata.gz: a8f93c8415cfbb4387f99d2bca078a717089006e40747472e3b2f152d395cf3d
4
+ data.tar.gz: '03985b4c0592411f8d038e70833b1b15c02a7f78aae042cf753f9f941de5fc4d'
5
5
  SHA512:
6
- metadata.gz: 930ed339b550585517905bec02d6bee7c2f2f32892303934ceab41612f6c499d86730588d48b3c90fb5fd248baa1ad612c48d9a8d49e6ea5c8228f08a010cd0a
7
- data.tar.gz: 8615335a96895ac305a554632c5ddf28aca9c73b8ddd9a6c9bcaf23888d6b832e43034993abc40dbf27c93e2a7c868746c54db8e61d153accc4a83d06141ddfe
6
+ metadata.gz: d665d6f1079fc9fd59489cc9eca345e32be04c4f14063f5ba37d7ba2ceda896edd34409c943c482868f158d1f3db4c2bdb11ce99098eeab6d1b4de4316e3bf22
7
+ data.tar.gz: 4a046a003816226d4e23214e2fe2969c277d8bddc66e5cf7c534f774a21b530a34f1e77c97d8acc063c855a60cde1049a037e98edfbf1beaf1f45e37dbc2daf7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ <a name="v3.6.0"></a>
2
+ ### v3.6.0 (2020-03-14)
3
+
4
+
5
+ #### Features
6
+
7
+ * add 'Access-Control-Allow-Headers' = true to cors response headers (#121) ([61bd9d1](/../../commit/61bd9d1))
8
+
9
+
1
10
  <a name="v3.5.0"></a>
2
11
  ### v3.5.0 (2020-01-17)
3
12
 
@@ -23,7 +23,8 @@ module Pact
23
23
  private
24
24
 
25
25
  def add_cors_header env, response
26
- [response[0], response[1].merge('Access-Control-Allow-Origin' => env.fetch('HTTP_ORIGIN','*')), response[2]]
26
+ cors_headers = { 'Access-Control-Allow-Origin' => env.fetch('HTTP_ORIGIN','*'), 'Access-Control-Allow-Credentials' => 'true'}
27
+ [response[0], response[1].merge(cors_headers), response[2]]
27
28
  end
28
29
  end
29
30
  end
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module MockService
3
- VERSION = "3.5.0"
3
+ VERSION = "3.6.0"
4
4
  end
5
5
  end
@@ -29,7 +29,7 @@ module Pact
29
29
  method_option :log, aliases: "-l", desc: "File to which to log output"
30
30
  method_option :broker_username, aliases: "-n", desc: "Pact Broker basic auth username", :required => false
31
31
  method_option :broker_password, aliases: "-p", desc: "Pact Broker basic auth password", :required => false
32
- method_option :broker_token, aliases: "-k", desc: "Pact Broker bearer token", :required => false
32
+ method_option :broker_token, aliases: "-k", desc: "Pact Broker bearer token (can also be set using the PACT_BROKER_TOKEN environment variable)", :required => false
33
33
  method_option :log_level, desc: "Log level. Options are DEBUG INFO WARN ERROR", default: "DEBUG"
34
34
  method_option :cors, aliases: "-o", desc: "Support browser security in tests by responding to OPTIONS requests and adding CORS headers to mocked responses"
35
35
  method_option :ssl, desc: "Use a self-signed SSL cert to run the service over HTTPS", type: :boolean, default: false
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: 3.5.0
4
+ version: 3.6.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: 2020-01-17 00:00:00.000000000 Z
15
+ date: 2020-03-14 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rack