webmock 3.7.3 → 3.7.4

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: 6023ac450eb0fc7d307ffd764f811e9d409e28fdfabdb215bec15d4e4ea7a363
4
- data.tar.gz: 2417fb3aecf50a9b48dc84ee1eb55da9493cff52c68c8a292e0d9215f1c52379
3
+ metadata.gz: a1686147ccfab8544a31edc2663ec653fd612ec24956b10efa792936017b8c93
4
+ data.tar.gz: 3cbd58ba37e68fde487a868dcc04a1587ef4b3bad15890d14840aedf259e9035
5
5
  SHA512:
6
- metadata.gz: a83cdbc53a9c75e6d4db3f01e727cc2cb27fb8097dfbad2cd36b39e263bfdc570f60b1c2b924845f81bff2c89dbd91758061c830293c86d0f3a2ba2bb01d619a
7
- data.tar.gz: 07cc56e80c126f76ecd53a00b218e80c0a07760d478b1d8354d85f7057828256f4dcc2e857312c83a2bfadbdbcfda0bb20c82510949cabdb24fd3f50657fffbb
6
+ metadata.gz: 9ad2b810e3a37bbc275ec55b609497c8c291fb8d8443f4592d0b9c064493aaefcbdee4f2ed63e1cce943d74691185026b1845c99b4da40248293b4d5def34f44
7
+ data.tar.gz: fe611e11baff4dcb0b6abdc15c363a49e3f63041e505a09e602a3c014064e7b5105ad3ca3f5dd0273fd5d9e22c103cc0e294282d61193456acc890ba8aac7495
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.7.4
4
+
5
+ * Resetting memoized response fields in Curb adapter.
6
+
7
+ Thanks to [Andrei Sidorov](https://github.com/heretge)
8
+
3
9
  ## 3.7.3
4
10
 
5
11
  * Fix for http.rb. Allow passing an output buffer to HTTP::Response::Body#readpartial
data/README.md CHANGED
@@ -1112,7 +1112,7 @@ People who submitted patches and new features or suggested improvements. Many th
1112
1112
  * George Claghorn
1113
1113
  * Alex Junger
1114
1114
  * Orien Madgwick
1115
-
1115
+ * Andrei Sidorov
1116
1116
 
1117
1117
 
1118
1118
  For a full list of contributors you can visit the
@@ -340,6 +340,10 @@ if defined?(Curl)
340
340
 
341
341
  def reset
342
342
  instance_variable_set(:@body_str, nil)
343
+ instance_variable_set(:@content_type, nil)
344
+ instance_variable_set(:@header_str, nil)
345
+ instance_variable_set(:@last_effective_url, nil)
346
+ instance_variable_set(:@response_code, nil)
343
347
  super
344
348
  end
345
349
  end
@@ -1,3 +1,3 @@
1
1
  module WebMock
2
- VERSION = '3.7.3' unless defined?(::WebMock::VERSION)
2
+ VERSION = '3.7.4' unless defined?(::WebMock::VERSION)
3
3
  end
@@ -474,18 +474,25 @@ unless RUBY_PLATFORM =~ /java/
474
474
  include CurbSpecHelper::ClassPerform
475
475
  end
476
476
 
477
- describe "using .reset" do
477
+ describe "using #reset" do
478
478
  before do
479
479
  @curl = Curl::Easy.new
480
480
  @curl.url = "http://example.com"
481
- body = "on_success fired"
482
- stub_request(:any, "example.com").to_return(body: body)
481
+ stub_request(:any, "example.com").
482
+ to_return(body: "abc",
483
+ headers: { "Content-Type" => "application/json" })
483
484
  @curl.http_get
484
485
  end
485
486
 
486
- it "should clear the body_str" do
487
+ it "should clear all memoized response fields" do
487
488
  @curl.reset
488
- expect(@curl.body_str).to eq(nil)
489
+ expect(@curl).to have_attributes(
490
+ body_str: nil,
491
+ content_type: nil,
492
+ header_str: nil,
493
+ last_effective_url: nil,
494
+ response_code: 0,
495
+ )
489
496
  end
490
497
  end
491
498
  end
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.7.3
4
+ version: 3.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bartosz Blimke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-13 00:00:00.000000000 Z
11
+ date: 2019-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -407,9 +407,9 @@ licenses:
407
407
  - MIT
408
408
  metadata:
409
409
  bug_tracker_uri: https://github.com/bblimke/webmock/issues
410
- changelog_uri: https://github.com/bblimke/webmock/blob/v3.7.3/CHANGELOG.md
411
- documentation_uri: https://www.rubydoc.info/gems/webmock/3.7.3
412
- source_code_uri: https://github.com/bblimke/webmock/tree/v3.7.3
410
+ changelog_uri: https://github.com/bblimke/webmock/blob/v3.7.4/CHANGELOG.md
411
+ documentation_uri: https://www.rubydoc.info/gems/webmock/3.7.4
412
+ source_code_uri: https://github.com/bblimke/webmock/tree/v3.7.4
413
413
  wiki_uri: https://github.com/bblimke/webmock/wiki
414
414
  post_install_message:
415
415
  rdoc_options: []