webmock 3.12.2 → 3.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +2 -1
- data/lib/webmock/http_lib_adapters/http_rb/response.rb +13 -2
- data/lib/webmock/http_lib_adapters/http_rb/webmock.rb +1 -1
- data/lib/webmock/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8469a0c06ac5d0deb2f5c5442083a044ccd57ef57055f3afb915c1db3b818113
|
4
|
+
data.tar.gz: 8fce88c63437fac8eca97a21bc85fd96ca6311c7566b6bbd975c131471b06759
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ba632d82b141c68922e567ded64ebad6a1ffd979ecb9d82487782f9464306fb49e9c4a65024d8501886268a4c40a6af639c4c3967ad56e5426e74a8d8b84516
|
7
|
+
data.tar.gz: a35a08185af128a39344c36517d25fef3b02e8d9bffeba840bfb07846a94701fefdd918291943b2595e13ec634921345ac7eb18744f4d206770877dcfde67c81
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
WebMock
|
2
2
|
=======
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/webmock.svg)](http://badge.fury.io/rb/webmock)
|
4
|
-
[![Build Status](https://
|
4
|
+
[![Build Status](https://github.com/bblimke/webmock/workflows/CI/badge.svg?branch=master)](https://github.com/bblimke/webmock/actions)
|
5
5
|
[![Code Climate](https://codeclimate.com/github/bblimke/webmock/badges/gpa.svg)](https://codeclimate.com/github/bblimke/webmock)
|
6
6
|
[![Mentioned in Awesome Ruby](https://awesome.re/mentioned-badge.svg)](https://github.com/markets/awesome-ruby)
|
7
7
|
[![Inline docs](http://inch-ci.org/github/bblimke/webmock.svg?branch=master)](http://inch-ci.org/github/bblimke/webmock)
|
@@ -1159,6 +1159,7 @@ People who submitted patches and new features or suggested improvements. Many th
|
|
1159
1159
|
* Niklas Hösl
|
1160
1160
|
* Johanna Hartmann
|
1161
1161
|
* Alex Vondrak
|
1162
|
+
* Will Storey
|
1162
1163
|
|
1163
1164
|
For a full list of contributors you can visit the
|
1164
1165
|
[contributors](https://github.com/bblimke/webmock/contributors) page.
|
@@ -11,7 +11,7 @@ module HTTP
|
|
11
11
|
end
|
12
12
|
|
13
13
|
class << self
|
14
|
-
def from_webmock(webmock_response, request_signature = nil)
|
14
|
+
def from_webmock(request, webmock_response, request_signature = nil)
|
15
15
|
status = Status.new(webmock_response.status.first)
|
16
16
|
headers = webmock_response.headers || {}
|
17
17
|
uri = normalize_uri(request_signature && request_signature.uri)
|
@@ -29,12 +29,23 @@ module HTTP
|
|
29
29
|
|
30
30
|
return new(status, "1.1", headers, body, uri) if HTTP::VERSION < "1.0.0"
|
31
31
|
|
32
|
+
# 5.0.0 had a breaking change to require request instead of uri.
|
33
|
+
if HTTP::VERSION < '5.0.0'
|
34
|
+
return new({
|
35
|
+
status: status,
|
36
|
+
version: "1.1",
|
37
|
+
headers: headers,
|
38
|
+
body: body,
|
39
|
+
uri: uri
|
40
|
+
})
|
41
|
+
end
|
42
|
+
|
32
43
|
new({
|
33
44
|
status: status,
|
34
45
|
version: "1.1",
|
35
46
|
headers: headers,
|
36
47
|
body: body,
|
37
|
-
|
48
|
+
request: request,
|
38
49
|
})
|
39
50
|
end
|
40
51
|
|
@@ -38,7 +38,7 @@ module HTTP
|
|
38
38
|
webmock_response.raise_error_if_any
|
39
39
|
|
40
40
|
invoke_callbacks(webmock_response, real_request: false)
|
41
|
-
::HTTP::Response.from_webmock webmock_response, request_signature
|
41
|
+
::HTTP::Response.from_webmock @request, webmock_response, request_signature
|
42
42
|
end
|
43
43
|
|
44
44
|
def raise_timeout_error
|
data/lib/webmock/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webmock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bartosz Blimke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -422,9 +422,9 @@ licenses:
|
|
422
422
|
- MIT
|
423
423
|
metadata:
|
424
424
|
bug_tracker_uri: https://github.com/bblimke/webmock/issues
|
425
|
-
changelog_uri: https://github.com/bblimke/webmock/blob/v3.
|
426
|
-
documentation_uri: https://www.rubydoc.info/gems/webmock/3.
|
427
|
-
source_code_uri: https://github.com/bblimke/webmock/tree/v3.
|
425
|
+
changelog_uri: https://github.com/bblimke/webmock/blob/v3.13.0/CHANGELOG.md
|
426
|
+
documentation_uri: https://www.rubydoc.info/gems/webmock/3.13.0
|
427
|
+
source_code_uri: https://github.com/bblimke/webmock/tree/v3.13.0
|
428
428
|
wiki_uri: https://github.com/bblimke/webmock/wiki
|
429
429
|
post_install_message:
|
430
430
|
rdoc_options: []
|