pact 1.55.4 → 1.55.5
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 +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/pact/provider/pact_uri.rb +13 -2
- data/lib/pact/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b10e91c9004cfc9ac062f5a7f8af29366d1cfa38e7f763f649a78bb098355b5f
|
|
4
|
+
data.tar.gz: 272b6a356bdeabc2250a4190ee33c37dd38f814b07a4db3d041cdba18ab4e387
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fbaae4a4c078612e0441f8143f60cdbed8708da63eaaeff20e5f6677f10e499ff21a24b814459b0da60f534df6c3b95ce34827e3d9cc183f7d1676ae9615d614
|
|
7
|
+
data.tar.gz: f862fdfee39090335099e2584a4431441b2c564a198fb4516622d71502730ca35fd315181a720d4b7b7838ba8ba03f93096815f923deca41c17e1ef9b66c199f
|
data/CHANGELOG.md
CHANGED
|
@@ -17,7 +17,7 @@ module Pact
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
def basic_auth?
|
|
20
|
-
!!username
|
|
20
|
+
!!username && !!password
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def username
|
|
@@ -29,12 +29,23 @@ module Pact
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def to_s
|
|
32
|
-
if basic_auth? &&
|
|
32
|
+
if basic_auth? && http_or_https_uri?
|
|
33
33
|
URI(@uri).tap { |x| x.userinfo="#{username}:*****"}.to_s
|
|
34
|
+
elsif personal_access_token? && http_or_https_uri?
|
|
35
|
+
URI(@uri).tap { |x| x.userinfo="*****"}.to_s
|
|
34
36
|
else
|
|
35
37
|
uri
|
|
36
38
|
end
|
|
37
39
|
end
|
|
40
|
+
|
|
41
|
+
private def personal_access_token?
|
|
42
|
+
!!username && !password
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
private def http_or_https_uri?
|
|
46
|
+
uri.start_with?('http://', 'https://')
|
|
47
|
+
end
|
|
48
|
+
|
|
38
49
|
end
|
|
39
50
|
end
|
|
40
51
|
end
|
data/lib/pact/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pact
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.55.
|
|
4
|
+
version: 1.55.5
|
|
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-10-
|
|
15
|
+
date: 2020-10-11 00:00:00.000000000 Z
|
|
16
16
|
dependencies:
|
|
17
17
|
- !ruby/object:Gem::Dependency
|
|
18
18
|
name: rspec
|