webspicy 0.20.21 → 0.20.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f1289dbf7c32ea75eafcfb9f05b2ec558ce795aff8bf2d6df8bd7c232c06cbf
4
- data.tar.gz: 4dad3bc01c7af7b5991d3df9aaec042c4fc014fcc4e51c8f119a9317cda71509
3
+ metadata.gz: bb926aeeae60b8f3568595dfef40404aa9242b3bc1b44194d73b6716b662a315
4
+ data.tar.gz: ae5969698e0dfee763d25a9918881c77b18b15f0642b2773813fe58a31ca63aa
5
5
  SHA512:
6
- metadata.gz: 5d5c72a6bab4824f756e9bf9d8a75932d51c554b274ffd19b86c261aaa18b8a22532abe0306a1e06fa42dc9431827074909e7a6b3578db8d38eccbe41826b41e
7
- data.tar.gz: ed4fa5d051ebdf8b4418e1dd161e3ad39345591499e4230eb04a4fddf1d44b013a9c16e927b8ba7f803bc19ca349c31dbbf0ca3aacb3ad6acdea5c0460b23747
6
+ metadata.gz: 680f7ffeea26ec3fec0884883a3dbd46989ea14cf76d7daf29457032cbb5ba68f0fe8391f3e6edcd244689bc8f5e791b82a68b703e64eeb802190ebcfff5c001
7
+ data.tar.gz: 7ac2a6f5988916d62745312ef1f3bc16fab09a424204d0643d0dcddce5b5e916afe9f879847fc9256f77db6dd6330ee555d355b76461ed59667d4c450e1b615f
@@ -2,7 +2,7 @@ module Webspicy
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 20
5
- TINY = 21
5
+ TINY = 22
6
6
  end
7
7
  VERSION = "#{Version::MAJOR}.#{Version::MINOR}.#{Version::TINY}"
8
8
  end
@@ -96,14 +96,16 @@ module Webspicy
96
96
  end
97
97
 
98
98
  def post(url, params = {}, headers = nil, body = nil)
99
- handler = get_handler(headers)
100
-
101
99
  url = url + "?" + Rack::Utils.build_query(params) if body && !params.empty?
100
+ headers = {
101
+ "Content-Type" => "application/json"
102
+ }.merge(headers || {}) if body.nil?
103
+ handler = get_handler(headers)
102
104
 
103
105
  case body
104
106
  when NilClass
105
107
  info_request("POST", url, params, headers, body)
106
- handler.post(url, params.to_json, {"CONTENT_TYPE" => "application/json"})
108
+ handler.post(url, params.to_json, headers)
107
109
  when FileUpload
108
110
  file = Rack::Test::UploadedFile.new(body.path, body.content_type)
109
111
  info_request("POST", url, params, headers, body)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webspicy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.21
4
+ version: 0.20.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernard Lambeau
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-09 00:00:00.000000000 Z
11
+ date: 2021-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -377,7 +377,7 @@ homepage: http://github.com/enspirit/webspicy
377
377
  licenses:
378
378
  - MIT
379
379
  metadata: {}
380
- post_install_message:
380
+ post_install_message:
381
381
  rdoc_options: []
382
382
  require_paths:
383
383
  - lib
@@ -392,8 +392,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
392
392
  - !ruby/object:Gem::Version
393
393
  version: '0'
394
394
  requirements: []
395
- rubygems_version: 3.1.6
396
- signing_key:
395
+ rubygems_version: 3.1.4
396
+ signing_key:
397
397
  specification_version: 4
398
398
  summary: Webspicy helps testing web services as software operation black boxes!
399
399
  test_files: []