pact-support 1.6.0 → 1.6.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: 4c584f8dad000c655b33004fe1fc0f2d1a264fe1
|
4
|
+
data.tar.gz: 06ac6740417e58b3d004dd3e837af2921c5d9b21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d01444d16e4310290bada8fd89a93ac87d6d5ac52b882afebaa5a12e6e4f416d76246defcdf9a15e9defdbdd9b3e8d445e2bd1acc0e23df976d2c30658af259
|
7
|
+
data.tar.gz: 3663da705c0bf5faffc385f6ba266b2b299b2b159b826b54358e2f567ca97071ab3c73fba4a189bdf29d256f3fb4ca82a983f42abde59c95c42cbac0ad0147f6
|
data/CHANGELOG.md
CHANGED
@@ -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
|
data/lib/pact/support/version.rb
CHANGED
@@ -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.
|
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-
|
15
|
+
date: 2018-05-21 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: randexp
|