pact-support 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f9bc0e7a4c308bb14cf0e1eb4c86fa4aedc1092
4
- data.tar.gz: d95f4eaf140fadf63bcd3fa8aeda797720b2cfb9
3
+ metadata.gz: 4c584f8dad000c655b33004fe1fc0f2d1a264fe1
4
+ data.tar.gz: 06ac6740417e58b3d004dd3e837af2921c5d9b21
5
5
  SHA512:
6
- metadata.gz: b6bb681918c1f7967c58f44467e69f871307d54c16e318f79f6c6f615593fdeec240b75b379887a3e193c9f6c78616b52b2eeae01e6cd74e172ec82ad4322363
7
- data.tar.gz: ec0c51ec2b5c13a453d6cca32d5784fc88421e1e65bc517e3822f000852e3bf153a4c38bfa81007852e80a82e7047e5112162441afa0519fa8741e6db5370f1a
6
+ metadata.gz: 1d01444d16e4310290bada8fd89a93ac87d6d5ac52b882afebaa5a12e6e4f416d76246defcdf9a15e9defdbdd9b3e8d445e2bd1acc0e23df976d2c30658af259
7
+ data.tar.gz: 3663da705c0bf5faffc385f6ba266b2b299b2b159b826b54358e2f567ca97071ab3c73fba4a189bdf29d256f3fb4ca82a983f42abde59c95c42cbac0ad0147f6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ <a name="v1.6.1"></a>
2
+ ### v1.6.1 (2018-05-21)
3
+
4
+
5
+ #### Bug Fixes
6
+
7
+ * correctly read local windows pact file paths with backslashes ([e27bd38](/../../commit/e27bd38))
8
+
9
+
1
10
  <a name="v1.6.0"></a>
2
11
  ### v1.6.0 (2018-04-03)
3
12
 
@@ -36,7 +36,7 @@ module Pact
36
36
  end
37
37
 
38
38
  def render_pact(uri_string, options)
39
- uri_obj = URI(uri_string)
39
+ uri_obj = URI(windows_safe(uri_string))
40
40
  if uri_obj.userinfo
41
41
  options[:username] = uri_obj.user unless options[:username]
42
42
  options[:password] = uri_obj.password unless options[:password]
@@ -104,5 +104,9 @@ module Pact
104
104
  def delay_retry(count)
105
105
  Kernel.sleep(2 ** count * 0.3)
106
106
  end
107
+
108
+ def windows_safe(uri)
109
+ uri.start_with?("http") ? uri : uri.gsub("\\", File::SEPARATOR)
110
+ end
107
111
  end
108
112
  end
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module Support
3
- VERSION = "1.6.0"
3
+ VERSION = "1.6.1"
4
4
  end
5
5
  end
@@ -25,6 +25,15 @@ module Pact
25
25
  end
26
26
  end
27
27
 
28
+ describe 'with backslashes to a local path' do
29
+ let(:windows_path) { 'spec\support\a_consumer-a_provider.json' }
30
+ let(:unix_path) { 'spec/support/a_consumer-a_provider.json' }
31
+
32
+ it 'transforms them to forward slashes' do
33
+ expect(PactFile.read(windows_path)).to eq PactFile.read(unix_path)
34
+ end
35
+ end
36
+
28
37
  context 'without basic authentication' do
29
38
  before do
30
39
  stub_request(:get, uri_without_userinfo).to_return(body: pact_content)
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.6.0
4
+ version: 1.6.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: 2018-04-03 00:00:00.000000000 Z
15
+ date: 2018-05-21 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: randexp