airborne 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/airborne.gemspec +1 -1
- data/lib/airborne/rest_client_requester.rb +2 -2
- data/spec/airborne/put_spec.rb +19 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76027591f241db7b9efd84d1b7218ed94b75aaa6fdc048ae9b19b65ce4d75eee
|
4
|
+
data.tar.gz: 680096ee8bfcfbfe892e0500a7f53723666ea69f953d70dc5556b58f27e80bbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f33893ad03e5187642bdd2afbb33d00541018a6d659dce1445d77d041f9da21699b1306a4541e886d29b6013415bbf6de42415a8b43281a1abf66342a634a74
|
7
|
+
data.tar.gz: f2a98178ac9c3b96e9008155450bc63b3ee4e97d77fd0e0b494b3b080fa6a2b67569a6f8ef8a31e927dc88e8dcffa9a1c4561956480a8f7bb125d536e9f601a4
|
data/airborne.gemspec
CHANGED
@@ -7,8 +7,8 @@ module Airborne
|
|
7
7
|
verify_ssl = options.fetch(:verify_ssl, true)
|
8
8
|
res = if method == :post || method == :patch || method == :put || method == :delete
|
9
9
|
begin
|
10
|
-
request_body = options[:body].nil? ? '' : options[:body]
|
11
|
-
request_body = request_body.to_json if is_json_request(headers)
|
10
|
+
request_body = options[:body].nil? || options[:body].empty? ? '' : options[:body]
|
11
|
+
request_body = request_body.to_json if is_json_request(headers) && !request_body.empty?
|
12
12
|
RestClient::Request.execute(
|
13
13
|
method: method,
|
14
14
|
url: get_url(url),
|
data/spec/airborne/put_spec.rb
CHANGED
@@ -1,9 +1,27 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe 'put' do
|
4
|
-
it 'should allow testing on put requests' do
|
4
|
+
it 'should allow testing on put requests w/no body' do
|
5
|
+
mock_put('simple_put')
|
6
|
+
put '/simple_put'
|
7
|
+
expect_json_types(status: :string, someNumber: :int)
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should allow testing on put requests w/empty body' do
|
5
11
|
mock_put('simple_put')
|
6
12
|
put '/simple_put', {}
|
7
13
|
expect_json_types(status: :string, someNumber: :int)
|
8
14
|
end
|
15
|
+
|
16
|
+
it 'should allow testing on put requests w/body' do
|
17
|
+
mock_put('simple_put')
|
18
|
+
put '/simple_put', {:key=>:value}
|
19
|
+
expect_json_types(status: :string, someNumber: :int)
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'should allow testing on put requests w/body, empty string' do
|
23
|
+
mock_put('simple_put')
|
24
|
+
put '/simple_put', ''
|
25
|
+
expect_json_types(status: :string, someNumber: :int)
|
26
|
+
end
|
9
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airborne
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Friedman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-07-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -230,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
230
230
|
- !ruby/object:Gem::Version
|
231
231
|
version: '0'
|
232
232
|
requirements: []
|
233
|
-
rubygems_version: 3.0.
|
233
|
+
rubygems_version: 3.0.3
|
234
234
|
signing_key:
|
235
235
|
specification_version: 4
|
236
236
|
summary: RSpec driven API testing framework
|