webmock 3.25.0 → 3.26.1

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: a71743bb6d5f304d032ba24c918ac45b07426f28b170068c5fbd5c7c0757fcb6
4
- data.tar.gz: ad25d2f20543df2419e74378c2f072824347d37587a7a8fd00dccca40aaa07e5
3
+ metadata.gz: f6212b8ecba4f6e6456df9e174ac656119cbe8b602a928bcb93e533af153ac10
4
+ data.tar.gz: 46ca0c2ebe868b176b1f2d9b9fef674d40657c19e8e5114849ea6c67cb64fe11
5
5
  SHA512:
6
- metadata.gz: 00f2b6475d6845de134311b47cd545c674b750f6b270579bc3124664f40ce60d7b56b26c531d0e968d72fa53d1c902f105d7e52d274330336c30c504cbcd83e3
7
- data.tar.gz: 163df74a3e2c219ee42c8d591acd9042e605427433129a7c421dc4d25671ca8073757409fb105740601add8284d52b2a464ed59500829dc9a97eeceb99b2545c
6
+ metadata.gz: 230dd002efafa1cc4cfe78c9b353316b14438960c3d20f2172b4f62e01cb97f97c39cbe8bdff0eddb828cb17ef3c348383739a54197d2ba5ab0ab65912c90135
7
+ data.tar.gz: 4689be33d041de6c62ca4ebc80cada85ef1b49f8b52d412083005586a92fc8337d5bbfde3cf68e02becec9cdcee15122bc84ca7b2c9cdecf3922d4bda44484d0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ # 3.26.1
4
+
5
+ Fix compatibility with recent async-http versions
6
+
7
+ Thanks to [Mikhail Doronin](https://github.com/misdoro)
8
+
9
+ # 3.26.0
10
+
11
+ * Support Addressable::URI in request patterns
12
+
13
+ Thanks to [Alexey Zapparov](https://github.com/ixti)
14
+
15
+ # 3.25.2
16
+
17
+ * Return support for `em_http_request`
18
+
19
+ Thanks to [Oleg](https://github.com/Koilanetroc)
20
+
21
+ # 3.25.1
22
+
23
+ * Fix FrozenError in Typhoeus streaming response body
24
+
25
+ Thanks to [Patrick Jaberg](https://github.com/patrickjaberg)
26
+
3
27
  # 3.25.0
4
28
 
5
29
  * Resolve net-http adapter deprecation Ruby 3.4
data/README.md CHANGED
@@ -1207,6 +1207,9 @@ People who submitted patches and new features or suggested improvements. Many th
1207
1207
  * Jacob Frautschi
1208
1208
  * Christian Schmidt
1209
1209
  * Rodrigo Argumedo
1210
+ * Patrick Jaberg
1211
+ * Oleg
1212
+ * Mikhail Doronin
1210
1213
 
1211
1214
  For a full list of contributors you can visit the
1212
1215
  [contributors](https://github.com/bblimke/webmock/contributors) page.
@@ -211,7 +211,7 @@ if defined?(Async::HTTP)
211
211
  def build_response(webmock_response)
212
212
  headers = (webmock_response.headers || {}).each_with_object([]) do |(k, value), o|
213
213
  Array(value).each do |v|
214
- o.push [k, v]
214
+ o.push [k, v] unless k.downcase == 'content-length' # async-http appends the exact content-length automatically
215
215
  end
216
216
  end
217
217
 
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- return if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.4.0')
4
-
5
3
  begin
6
4
  require 'em-http-request'
7
5
  rescue LoadError
@@ -200,9 +200,9 @@ module WebMock
200
200
 
201
201
 
202
202
  def check_right_http_connection
203
- unless @@alredy_checked_for_right_http_connection ||= false
203
+ unless @@already_checked_for_right_http_connection ||= false
204
204
  WebMock::NetHTTPUtility.puts_warning_for_right_http_if_needed
205
- @@alredy_checked_for_right_http_connection = true
205
+ @@already_checked_for_right_http_connection = true
206
206
  end
207
207
  end
208
208
  end
@@ -172,7 +172,7 @@ if defined?(Typhoeus)
172
172
  request.execute_headers_callbacks(response)
173
173
  end
174
174
  if request.respond_to?(:streaming?) && request.streaming?
175
- response.options[:response_body] = ""
175
+ response.options[:response_body] = "".dup
176
176
  request.on_body.each { |callback| callback.call(webmock_response.body, response) }
177
177
  end
178
178
  request.finish(response)
@@ -86,10 +86,10 @@ module WebMock
86
86
  URICallablePattern.new(uri)
87
87
  elsif uri.is_a?(::URI::Generic)
88
88
  URIStringPattern.new(uri.to_s)
89
- elsif uri.is_a?(String)
90
- URIStringPattern.new(uri)
89
+ elsif uri.respond_to?(:to_str)
90
+ URIStringPattern.new(uri.to_str)
91
91
  else
92
- raise ArgumentError.new("URI should be a String, Regexp, Addressable::Template or a callable object. Got: #{uri.class}")
92
+ raise ArgumentError.new("URI should be a String, Regexp, Addressable::Template, a callable object, or respond to #to_str. Got: #{uri.class}")
93
93
  end
94
94
  end
95
95
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WebMock
4
- VERSION = '3.25.0' unless defined?(::WebMock::VERSION)
4
+ VERSION = '3.26.1' unless defined?(::WebMock::VERSION)
5
5
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webmock
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.25.0
4
+ version: 3.26.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bartosz Blimke
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 2025-02-06 00:00:00.000000000 Z
11
+ date: 2025-10-30 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: addressable
@@ -197,20 +198,6 @@ dependencies:
197
198
  - - ">="
198
199
  - !ruby/object:Gem::Version
199
200
  version: 2.2.4
200
- - !ruby/object:Gem::Dependency
201
- name: mutex_m
202
- requirement: !ruby/object:Gem::Requirement
203
- requirements:
204
- - - ">="
205
- - !ruby/object:Gem::Version
206
- version: '0'
207
- type: :development
208
- prerelease: false
209
- version_requirements: !ruby/object:Gem::Requirement
210
- requirements:
211
- - - ">="
212
- - !ruby/object:Gem::Version
213
- version: '0'
214
201
  - !ruby/object:Gem::Dependency
215
202
  name: excon
216
203
  requirement: !ruby/object:Gem::Requirement
@@ -372,10 +359,11 @@ licenses:
372
359
  - MIT
373
360
  metadata:
374
361
  bug_tracker_uri: https://github.com/bblimke/webmock/issues
375
- changelog_uri: https://github.com/bblimke/webmock/blob/v3.25.0/CHANGELOG.md
376
- documentation_uri: https://www.rubydoc.info/gems/webmock/3.25.0
377
- source_code_uri: https://github.com/bblimke/webmock/tree/v3.25.0
362
+ changelog_uri: https://github.com/bblimke/webmock/blob/v3.26.1/CHANGELOG.md
363
+ documentation_uri: https://www.rubydoc.info/gems/webmock/3.26.1
364
+ source_code_uri: https://github.com/bblimke/webmock/tree/v3.26.1
378
365
  wiki_uri: https://github.com/bblimke/webmock/wiki
366
+ post_install_message:
379
367
  rdoc_options: []
380
368
  require_paths:
381
369
  - lib
@@ -383,14 +371,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
383
371
  requirements:
384
372
  - - ">="
385
373
  - !ruby/object:Gem::Version
386
- version: '2.5'
374
+ version: '2.6'
387
375
  required_rubygems_version: !ruby/object:Gem::Requirement
388
376
  requirements:
389
377
  - - ">="
390
378
  - !ruby/object:Gem::Version
391
379
  version: '0'
392
380
  requirements: []
393
- rubygems_version: 3.7.0.dev
381
+ rubygems_version: 3.5.16
382
+ signing_key:
394
383
  specification_version: 4
395
384
  summary: Library for stubbing HTTP requests in Ruby.
396
385
  test_files: []