webspicy 0.20.18 → 0.20.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 91e515bc7abf0feb3e3aa3eba50edba87a50e4242240aaffb67aee547038d537
4
- data.tar.gz: 2535c3943955ee893484c49bad9cad525c7a90f29f27fb7f891ca7c0e8cd4d33
3
+ metadata.gz: bb926aeeae60b8f3568595dfef40404aa9242b3bc1b44194d73b6716b662a315
4
+ data.tar.gz: ae5969698e0dfee763d25a9918881c77b18b15f0642b2773813fe58a31ca63aa
5
5
  SHA512:
6
- metadata.gz: 992437acb1f193a70e47132cdb00951d0e8dcf40d761cd93194924a2849e8c92391591995ea1d07935c1f0bebb952e5bec177e6782c2b66898c5f16d7e4e843a
7
- data.tar.gz: be6fadddc53304cf9ee2111a064f81b126f9fe1560d4a89b5bb6d60623aed88770c4fa13505d9403e811ee5e784c752ad771e401988bc85fecb411be96a2e92a
6
+ metadata.gz: 680f7ffeea26ec3fec0884883a3dbd46989ea14cf76d7daf29457032cbb5ba68f0fe8391f3e6edcd244689bc8f5e791b82a68b703e64eeb802190ebcfff5c001
7
+ data.tar.gz: 7ac2a6f5988916d62745312ef1f3bc16fab09a424204d0643d0dcddce5b5e916afe9f879847fc9256f77db6dd6330ee555d355b76461ed59667d4c450e1b615f
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build Status](https://travis-ci.com/enspirit/webspicy.svg?branch=master)](https://travis-ci.com/enspirit/webspicy)
1
+ [![Test](https://github.com/enspirit/webspicy/actions/workflows/integration.yml/badge.svg?branch=master)](https://github.com/enspirit/webspicy/actions/workflows/integration.yml)
2
2
  # Webspicy
3
3
 
4
4
  A specification and test framework for web services seen as black-box software
@@ -32,10 +32,10 @@ module Webspicy
32
32
  end
33
33
 
34
34
  def subject
35
- @subject ||= data["headerLines"]
36
- .select{|h| h["key"] == "subject" }
37
- .map{|h| h["line"][/Subject:\s*(.*)$/, 1] }
38
- .first
35
+ @subject ||= data["subject"] || data["headerLines"]
36
+ .select{|h| h["key"] == "subject" }
37
+ .map{|h| h["line"][/Subject:\s*(.*)$/, 1] }
38
+ .first
39
39
  end
40
40
 
41
41
  def headers
@@ -86,8 +86,10 @@ module Webspicy
86
86
  end
87
87
 
88
88
  def service_done
89
- io.puts
90
- io.flush
89
+ unless @spec_file_line_printed
90
+ io.puts
91
+ io.flush
92
+ end
91
93
  end
92
94
 
93
95
  end # class Documentation
@@ -2,7 +2,7 @@ module Webspicy
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 20
5
- TINY = 18
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.18
4
+ version: 0.20.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernard Lambeau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-27 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
@@ -84,16 +84,22 @@ dependencies:
84
84
  name: finitio
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: 0.10.0
90
+ - - "<"
91
+ - !ruby/object:Gem::Version
92
+ version: 0.12.0
90
93
  type: :runtime
91
94
  prerelease: false
92
95
  version_requirements: !ruby/object:Gem::Requirement
93
96
  requirements:
94
- - - "~>"
97
+ - - ">="
95
98
  - !ruby/object:Gem::Version
96
99
  version: 0.10.0
100
+ - - "<"
101
+ - !ruby/object:Gem::Version
102
+ version: 0.12.0
97
103
  - !ruby/object:Gem::Dependency
98
104
  name: http
99
105
  requirement: !ruby/object:Gem::Requirement
@@ -386,7 +392,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
386
392
  - !ruby/object:Gem::Version
387
393
  version: '0'
388
394
  requirements: []
389
- rubygems_version: 3.2.22
395
+ rubygems_version: 3.1.4
390
396
  signing_key:
391
397
  specification_version: 4
392
398
  summary: Webspicy helps testing web services as software operation black boxes!