Permalink
Browse files

Version 1.3.5 changelog + updated docs

  • Loading branch information...
1 parent bd1b211 commit 67a0819125dc19759a0cd558b92951cff7f9f79f @bblimke committed Sep 6, 2010
Showing with 27 additions and 0 deletions.
  1. +17 −0 CHANGELOG.md
  2. +10 −0 README.md
View
@@ -1,5 +1,22 @@
#Changelog
+## 1.3.5
+
+* External requests can be disabled while allowing selected hosts. Thanks to Charles Li and Ryan Bigg
+
+ This feature was available before only for localhost with `:allow_localhost => true`
+
+ WebMock.disable_net_connect!(:allow => "www.example.org")
+
+ Net::HTTP.get('www.something.com', '/') # ===> Failure
+
+ Net::HTTP.get('www.example.org', '/') # ===> Allowed.
+
+* Fixed Net::HTTP adapter so that it preserves the original behavior of Net::HTTP.
+
+ When making a request with a block that calls #read_body on the request,
+ Net::HTTP causes the body to be set to a Net::ReadAdapter, but WebMock was causing the body to be set to a string.
+
## 1.3.4
* Fixed Net::HTTP adapter to handle cases where a block with `read_body` call is passed to `request`.
View
@@ -301,6 +301,14 @@ You can also use WebMock outside a test framework:
Net::HTTP.get('localhost:9887', '/') # ===> Allowed. Perhaps to Selenium?
+### External requests can be disabled while allowing any hostname
+
+ WebMock.disable_net_connect!(:allow => "www.example.org")
+
+ Net::HTTP.get('www.something.com', '/') # ===> Failure
+
+ Net::HTTP.get('www.example.org', '/') # ===> Allowed.
+
## Setting Expectations
### Setting expectations in Test::Unit
@@ -525,6 +533,8 @@ People who submitted patches and new features or suggested improvements. Many th
* Nathaniel Bibler
* Martyn Loughran
* Muness Alrubaie
+* Charles Li
+* Ryan Bigg
## Background

0 comments on commit 67a0819

Please sign in to comment.