alinta-testing 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/alinta-testing/overrides/get_url.rb +12 -15
- data/lib/alinta-testing/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: d40c0c14d7f19784a46fe5cb43e8171680d03c70053f655575916656c0a99b6b
|
4
|
+
data.tar.gz: cde48ca46dfa89419b1490546bc45b5e1864b5da4d479f239a6e95f76d83c23c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12922eb76b533bfae54a8bdb9d8aebc3ecb1cb300b5f8e985f6a5295ac2560d7f4699e8983032d8832d319c502c3fbfe23a14c7a5a117d4881c3579ae78f16c4
|
7
|
+
data.tar.gz: a8e14a9c01ab7b1c9bc0a22badbc14469f73567b9e1348e1453a24e7d4d66465a4fb35481b0a83fb81087fd481e3a072e2860723f8060721f5df521b9968f5cd
|
@@ -7,31 +7,28 @@ end
|
|
7
7
|
|
8
8
|
def get_url_internal(path, endpoint, urlbasepath, apiversion)
|
9
9
|
# remove leading and trailing slashes
|
10
|
-
|
10
|
+
endpoint = endpoint.gsub(/^(.*?)\/?$/, '\1')
|
11
|
+
path = path.gsub(/^\/?(.*?)\/?$/, '\1') unless path.to_s.empty?
|
12
|
+
urlbasepath = urlbasepath.gsub(/^\/?(.*?)\/?$/, '\1') unless urlbasepath.to_s.empty?
|
13
|
+
apiversion = apiversion.gsub(/^\/?(.*?)\/?$/, '\1') unless apiversion.to_s.empty?
|
11
14
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
basepath = urlbasepath
|
18
|
-
end
|
15
|
+
path = "#{urlbasepath}/#{path}" unless urlbasepath.to_s.empty?
|
16
|
+
|
17
|
+
splitpath = path.split('/')
|
18
|
+
basepath = splitpath.first()
|
19
|
+
path = splitpath.drop(1).join('/')
|
19
20
|
|
20
21
|
# base end point for all calls
|
21
22
|
url = endpoint
|
22
|
-
url = "#{url}/" unless url.end_with?('/')
|
23
23
|
|
24
24
|
# common sub-path for this feature
|
25
|
-
url = "#{url}
|
26
|
-
url = "#{url}/" unless url.end_with?('/')
|
25
|
+
url = "#{url}/#{basepath}" unless basepath.to_s.empty?
|
27
26
|
|
28
27
|
# versioned route for UAT environments
|
29
|
-
|
30
|
-
url = "#{url}#{version}" unless version.to_s.empty?
|
31
|
-
url = "#{url}/" unless url.end_with?('/')
|
28
|
+
url = "#{url}/#{apiversion}" unless apiversion.to_s.empty?
|
32
29
|
|
33
30
|
# final path for this request
|
34
|
-
url = "#{url}
|
31
|
+
url = "#{url}/#{path}" unless path.to_s.empty?
|
35
32
|
|
36
33
|
url
|
37
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alinta-testing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Hosking
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber-rest-bdd
|