webmock 2.0.0 → 2.0.1

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
  SHA1:
3
- metadata.gz: 07a138a8c64902f36eca871bd732a1f16c1a775a
4
- data.tar.gz: 34f5d60511d7fc5b2dd8a91ea840b455fdc01eaf
3
+ metadata.gz: c62cee53bf447bb19145917ce3ce566167e2c73c
4
+ data.tar.gz: a88c14886f10f7951ce3683bdd92c7420cad1d5a
5
5
  SHA512:
6
- metadata.gz: 4704d249edaed69a8c672a4f8b14c2d925cae989baaae04868e6e369b3d55fe8e119ccfc1ad8dfc588fbb3b34076ed3ac6f40c32cc77821f1cad93c7ae3fb0e7
7
- data.tar.gz: fa6e166b79d79018f3f86abd3f97fdf7ef045d7b4145b2e5e206ec5c744fcf504693a7d401118191f24bb7e4e461125f97cd7b5c3093f8b6fb25b5b0d7b368bb
6
+ metadata.gz: e23e4392312fbfbac76d8f29e44eb6711753a8c3a6010d5553587f583ec9fd6da45f06f37f58cdfbd1e48d7adb63034a0a68de52cfe4c1c77bff718a46966b38
7
+ data.tar.gz: 850b7aa2808bfb7ebccb8875cfc9f05a35d110bcf754a519c37ae59c0675a390f4294f6b97b17c49555271df8b8f1c67287bd7319cf01f84ac32114c72da63d1
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.1
4
+
5
+ * Added code responsible for loading em-http-request if available, which has been removed by mistake.
6
+
7
+ Thanks to [Vasiliy](https://github.com/304)
8
+
9
+ * WebMock loads "base64" if it's not yet loaded.
10
+
11
+ Thanks to [Taiki Ono](https://github.com/taiki45).
12
+
3
13
  ## 2.0.0
4
14
 
5
15
  * `require 'webmock'` does not enable WebMock anymore. `gem 'webmock'` can now be safely added to a Gemfile and no http client libs will be modified when it's loaded. Call `WebMock.enable!` to enable WebMock.
data/README.md CHANGED
@@ -1016,6 +1016,7 @@ People who submitted patches and new features or suggested improvements. Many th
1016
1016
  * Tim Diggins
1017
1017
  * Gabriel Chaney
1018
1018
  * Chris Griego
1019
+ * Taiki Ono
1019
1020
 
1020
1021
  For a full list of contributors you can visit the
1021
1022
  [contributors](https://github.com/bblimke/webmock/contributors) page.
@@ -1,3 +1,9 @@
1
+ begin
2
+ require 'em-http-request'
3
+ rescue LoadError
4
+ # em-http-request not found
5
+ end
6
+
1
7
  if defined?(EventMachine::HttpClient)
2
8
  module WebMock
3
9
  module HttpLibAdapters
@@ -1,3 +1,5 @@
1
+ require 'base64'
2
+
1
3
  module WebMock
2
4
 
3
5
  module Util
@@ -1,3 +1,3 @@
1
1
  module WebMock
2
- VERSION = '2.0.0' unless defined?(::WebMock::VERSION)
2
+ VERSION = '2.0.1' unless defined?(::WebMock::VERSION)
3
3
  end
@@ -137,9 +137,10 @@ describe "Net:HTTP" do
137
137
  http.request(request)
138
138
  end.to raise_error ArgumentError, "Net:HTTP does not accept headers as symbols"
139
139
  else
140
+ stub_http_request(:get, "google.com").with(headers: { InvalidHeaderSinceItsASymbol: "this will not be valid" })
140
141
  expect do
141
142
  http.request(request)
142
- end.to_not raise_error ArgumentError, "Net:HTTP does not accept headers as symbols"
143
+ end.not_to raise_error
143
144
  end
144
145
  end
145
146
 
@@ -3,7 +3,7 @@ require 'socket'
3
3
 
4
4
  module NetworkConnection
5
5
  def self.connect_to(host, port, timeout=10)
6
- timeout(timeout) do
6
+ Timeout.timeout(timeout) do
7
7
  TCPSocket.new(host, port)
8
8
  end
9
9
  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: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bartosz Blimke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-25 00:00:00.000000000 Z
11
+ date: 2016-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable