alinta-cucumber-rest-bdd 0.5.12 → 0.5.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cucumber-rest-bdd/steps/resource.rb +4 -0
- data/lib/cucumber-rest-bdd/url.rb +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 610695a318a73bf3a5d27dbdbce1c54ae55cba3b
|
4
|
+
data.tar.gz: 7c31d375827a30d491ef759de922e15536c07ef5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b5112996012f6f391b374d30d6045456839a8b4ad8c64588ba7262002e133af2e03227ad27e3f16d9f6a72dc98ef51d5f6e009b11cb73dc8430b80981a20b22
|
7
|
+
data.tar.gz: ed2d4ae5a8063f31283506be1b1b2eb2546e9747a693aa3ebc4bd5fbafd360c319a3449f4a3c030d2cef202777be117cbbf1e22ec80709ce6d371f6e2795873d
|
@@ -13,6 +13,10 @@ Given(/^I am a client$/) do
|
|
13
13
|
}
|
14
14
|
end
|
15
15
|
|
16
|
+
Given(/^I am issuing requests for (.+?)$/) do |resource|
|
17
|
+
@urlbasepath = get_resource(resource)
|
18
|
+
end
|
19
|
+
|
16
20
|
# GET
|
17
21
|
|
18
22
|
When(/^I request (?:an?(?! list)|the) ([^"]+?)(?: with (?:key|id))? "([^"]*)"(#{LEVELS})?$/) do |resource, id, levels|
|
@@ -1,4 +1,7 @@
|
|
1
1
|
def get_url(path)
|
2
2
|
raise %/Please set an 'endpoint' environment variable provided with the url of the api/ if !ENV.has_key?('endpoint')
|
3
|
-
url =
|
3
|
+
url = ENV['endpoint']
|
4
|
+
url = "#{url}/" unless url.end_with?("/")
|
5
|
+
url = "#{url}#{@urlbasepath}/" unless @urlbasepath.to_s.empty?
|
6
|
+
url = "#{url}#{path}" unless path.empty?
|
4
7
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alinta-cucumber-rest-bdd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Harry Bragg
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-02-
|
12
|
+
date: 2018-02-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: alinta-cucumber-api
|