screenplay 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/screenplay/actors/api.rb +6 -2
- 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: 63bce83d0f98bb3b47361fe3e9fb1e3faf2f41c3
|
4
|
+
data.tar.gz: 119bf21f6e38ff112ba28e9a27be71508f933def
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a887b644db3c1db7424c5e53f836688f0a4216273b2be93ccc782d3d0267adff931f67ba8fab5c6e5ef6d2d64826bcf95d3b5324032f1946e0243f5f7e52941
|
7
|
+
data.tar.gz: 85c1a1a3a264aa50eb481e3213d0eac55ca88df8120e4adc88e2fbb45bf6a7ad53a0792ceff56824a58b19edd073ae0999b833ff00abc484742d9516d1b91c01
|
data/Gemfile
CHANGED
@@ -16,7 +16,7 @@ module Screenplay
|
|
16
16
|
def configure(config)
|
17
17
|
@url = config[:url].to_s
|
18
18
|
@url += '/' unless @url.end_with?('/')
|
19
|
-
@
|
19
|
+
@headers = config[:headers] || {}
|
20
20
|
@cookies = nil
|
21
21
|
end
|
22
22
|
|
@@ -28,7 +28,7 @@ module Screenplay
|
|
28
28
|
data = params[:data] || {} rescue {}
|
29
29
|
data = input if (data.is_a?(String)) && (data == '$input')
|
30
30
|
data.stringify_keys!
|
31
|
-
headers = @
|
31
|
+
headers = @headers
|
32
32
|
headers[:cookie] = @cookies unless @cookies.nil?
|
33
33
|
url = @url + path.to_s.replace_vars(input)
|
34
34
|
if ([:get, :head, :delete].include?(method))
|
@@ -36,6 +36,10 @@ module Screenplay
|
|
36
36
|
data = {}
|
37
37
|
end
|
38
38
|
|
39
|
+
if (headers['Content-Type'.to_sym] == 'application/json')
|
40
|
+
data = JSON.generate(data)
|
41
|
+
end
|
42
|
+
|
39
43
|
begin
|
40
44
|
response = RestClient::Request.execute({
|
41
45
|
url: url,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: screenplay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taco Jan Osinga
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|