Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 420 lines (242 sloc) 17.743 kb
9887d17 James Conroy-Finn Prepare for 1.6.3 release
jcf authored
1 # Changelog
2
a62080b James Conroy-Finn Update changelog and version number
jcf authored
3 ## 1.6.4
4
5 This is a quick slip release to regenerate the gemspec. Apparently
6 jeweler inserts dependencies twice if you use the `gemspec` method in
7 your Gemfile and declare gem dependencies in your gemspec.
8
9 https://github.com/technicalpickles/jeweler/issues/154
10
11 josevalim:
12
13 > This just bit me. I just released a gem with the wrong dependencies
14 > because I have updated jeweler. This should have been opt-in,
15 > otherwise a bunch of people using jeweler are going to release gems
16 > with the wrong dependencies because you are automatically importing
17 > from the Gemfile.
18
9887d17 James Conroy-Finn Prepare for 1.6.3 release
jcf authored
19 ## 1.6.3
20
21 * Update the dependency on addressable to get around an issue in v2.2.5.
22 Thanks to [Peter Higgins](https://github.com/phiggins).
23
24 * Add support for matching parameter values using a regular expression
25 as well as a string. Thanks to [Oleg M Prozorov](https://github.com/oleg).
26
27 * Fix integration with httpclient as the internal API has changed.
28 Thanks to [Frank Prößdorf](https://github.com/endor).
29
30 * Ensure Curl::Easy#content_type is always set. Thanks to [Peter
31 Higgins](https://github.com/phiggins).
32
33 * Fix bug with em-http-request adapter stubbing responses that have a
34 chunked transfer encoding. Thanks to [Myron
35 Marston](https://github.com/myronmarston).
36
37 * Fix a load of spec failures with Patron, httpclient, and specs that
38 depended on the behaviour of example.com. Thanks to [Alex
39 Grigorovich](https://github.com/grig).
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
40
e6af079 Bartosz Blimke Updated 1.6.2 changelog and credits
authored
41 ## 1.6.2
42
43 * Em-http-request adapter sets `last_effective_url` property. Thanks to [Sam Stokes](https://github.com/samstokes).
44
45 * Curb adapter supports `Curb::Easy#http_post` and `Curb::Easy#http_put` without arguments (by setting `post_body` or `put_data` beforehand). Thanks to [Eugene Bolshakov](https://github.com/eugenebolshakov)
46
f7b9c77 Bartosz Blimke Updated version 1.6.1 changelog
authored
47 ## 1.6.1
48
49 * Fixed issue with `webmock/rspec` which didn't load correctly if `rspec/core` was already required but `rspec/expectations` not.
50
7110c60 Bartosz Blimke Updated version 1.6.0 changelog
authored
51 ## 1.6.0
473b709 Bartosz Blimke Added WebMock.reset! method. WebMock.reset_webmock is now deprecated
authored
52
7110c60 Bartosz Blimke Updated version 1.6.0 changelog
authored
53 * Simplified integration with Test::Unit, RSpec and Cucumber. Now only a single file has to be required i.e.
acaab83 Bartosz Blimke Updated changelog with the latest changes in master.
authored
54
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
55 require 'webmock/test_unit'
56 require 'webmock/rspec'
57 require 'webmock/cucumber'
acaab83 Bartosz Blimke Updated changelog with the latest changes in master.
authored
58
65dd12b Bartosz Blimke Updated changelog with latest changes in master branch
authored
59 * The error message on unstubbed request now contains code snippet which can be used to stub this request. Thanks to Martyn Loughran for suggesting this feature.
60
e6925a2 Bartosz Blimke Updated changelog with the latest changes in master
authored
61 * The expectation failure message now contains a list of made requests. Thanks to Martyn Loughran for suggesting this feature.
62
86f36d2 Bartosz Blimke em-http-request adapter is activated by replacing EventMachine::HttpRequ...
authored
63 * Added `WebMock.print_executed_requests` method which can be useful to find out what requests were made until a given point.
64
7110c60 Bartosz Blimke Updated version 1.6.0 changelog
authored
65 * em-http-request adapter is now activated by replacing EventMachine::HttpRequest constant, instead of monkeypatching the original class.
86f36d2 Bartosz Blimke em-http-request adapter is activated by replacing EventMachine::HttpRequ...
authored
66
7110c60 Bartosz Blimke Updated version 1.6.0 changelog
authored
67 This technique is borrowed from em-http-request native mocking module. It allows switching WebMock adapter on an off, and using it interchangeably with em-http-request native mocking i.e:
86f36d2 Bartosz Blimke em-http-request adapter is activated by replacing EventMachine::HttpRequ...
authored
68
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
69 EventMachine::WebMockHttpRequest.activate!
70 EventMachine::WebMockHttpRequest.deactivate!
86f36d2 Bartosz Blimke em-http-request adapter is activated by replacing EventMachine::HttpRequ...
authored
71
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
72 Thanks to Martyn Loughran for suggesting this feature.
73
74 * `WebMock.reset_webmock` is deprecated in favour of new `WebMock.reset!`
7110c60 Bartosz Blimke Updated version 1.6.0 changelog
authored
75
76 * Fixed integration with Cucumber. Previously documented example didn't work with new versions of Cucumber.
72cd989 Bartosz Blimke Added WebMock.print_executed_requests method which can be useful to find...
authored
77
7110c60 Bartosz Blimke Updated version 1.6.0 changelog
authored
78 * Fixed stubbing requests with body declared as a hash. Thanks to Erik Michaels-Ober for reporting the issue.
a7cb4fa Bartosz Blimke Fixed issue with stubbing requests with request body declared as a hash,...
authored
79
7110c60 Bartosz Blimke Updated version 1.6.0 changelog
authored
80 * Fixed issue with em-http-request adapter which didn't work when :query option value was passed as a string, not a hash. Thanks to Chee Yeo for reporting the issue.
178bfd1 Bartosz Blimke em-http-request adapter now works correctly when :query option value is ...
authored
81
7110c60 Bartosz Blimke Updated version 1.6.0 changelog
authored
82 * Fixed problem with assert_requested which didn't work if used outside rspec or test/unit
473b709 Bartosz Blimke Added WebMock.reset! method. WebMock.reset_webmock is now deprecated
authored
83
7bca10a Bartosz Blimke Don't use JSON to normalize hash body in request pattern. Removed depend...
authored
84 * Removed dependency on json gem
85
079a719 Bartosz Blimke Updated changelog with version 1.5.0 changes
authored
86 ## 1.5.0
f0408f8 Bartosz Blimke Added support for dynamically evaluated raw responses recorded with `cur...
authored
87
88 * Support for dynamically evaluated raw responses recorded with `curl -is` <br/>
89 i.e.
90
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
91 `curl -is www.example.com > /tmp/www.example.com.txt`
92 stub_request(:get, "www.example.com").to_return(lambda { |request| File.new("/tmp/#{request.uri.host.to_s}.txt" }))
f0408f8 Bartosz Blimke Added support for dynamically evaluated raw responses recorded with `cur...
authored
93
079a719 Bartosz Blimke Updated changelog with version 1.5.0 changes
authored
94 * `:net_http_connect_on_start` option can be passed to `WebMock.allow_net_connect!` and `WebMock.disable_net_connect!` methods, i.e.
ffbcdb3 Bartosz Blimke Updated changelog with the latest changes in master branch
authored
95
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
96 WebMock.allow_net_connect!(:net_http_connect_on_start => true)
ffbcdb3 Bartosz Blimke Updated changelog with the latest changes in master branch
authored
97
079a719 Bartosz Blimke Updated changelog with version 1.5.0 changes
authored
98 This forces WebMock Net::HTTP adapter to always connect on `Net::HTTP.start`. Check 'Connecting on Net::HTTP.start' in README for more information.
ffbcdb3 Bartosz Blimke Updated changelog with the latest changes in master branch
authored
99
079a719 Bartosz Blimke Updated changelog with version 1.5.0 changes
authored
100 Thanks to Alastair Brunton for reporting the issue and for fix suggestions.
4e313c2 Bartosz Blimke Updated CHANGELOG and README with information about net_http_connect_on_...
authored
101
079a719 Bartosz Blimke Updated changelog with version 1.5.0 changes
authored
102 * Fixed an issue where Patron spec tried to remove system temporary directory.
103 Thanks to Hans de Graaff
4e313c2 Bartosz Blimke Updated CHANGELOG and README with information about net_http_connect_on_...
authored
104
079a719 Bartosz Blimke Updated changelog with version 1.5.0 changes
authored
105 * WebMock specs now use RSpec 2
4e313c2 Bartosz Blimke Updated CHANGELOG and README with information about net_http_connect_on_...
authored
106
079a719 Bartosz Blimke Updated changelog with version 1.5.0 changes
authored
107 * `rake spec NO_CONNECTION=true` can now be used to only run WebMock specs which do not make real network connections
4e313c2 Bartosz Blimke Updated CHANGELOG and README with information about net_http_connect_on_...
authored
108
a53f1a0 Bartosz Blimke Updated CHANGELOG with version 1.4.0 changes
authored
109 ## 1.4.0
6eb8bb5 Bartosz Blimke WebMock tries to use already loaded version of RSpec (1.x or 2.x) (previ...
authored
110
aaf774b Bartosz Blimke Added info to changelog and readme about Curb support, implemented by Pe...
authored
111 * Curb support!!! Thanks to the awesome work of Pete Higgins!
112
2328c00 Bartosz Blimke Updated Changelog with the latest changes in master
authored
113 * `include WebMock` is now deprecated to avoid method and constant name conflicts. Please `include WebMock::API` instead.
114
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
115 * `WebMock::API#request` is renamed to `WebMock::API#a_request` to prevent method name conflicts with i.e. Rails controller specs.
2328c00 Bartosz Blimke Updated Changelog with the latest changes in master
authored
116 WebMock.request is still available.
117
a53f1a0 Bartosz Blimke Updated CHANGELOG with version 1.4.0 changes
authored
118 * Deprecated `WebMock#request`, `WebMock#allow_net_connect!`, `WebMock#net_connect_allowed?`, `WebMock#registered_request?`, `WebMock#reset_callbacks`, `WebMock#after_request` instance methods. These methods are still available, but only as WebMock class methods.
9fded75 Bartosz Blimke Updated CHANGELOG with more detailed information on changes in master
authored
119
a53f1a0 Bartosz Blimke Updated CHANGELOG with version 1.4.0 changes
authored
120 * Removed `WebMock.response_for_request` and `WebMock.assertion_failure` which were only used internally and were not documented.
9fded75 Bartosz Blimke Updated CHANGELOG with more detailed information on changes in master
authored
121
c646491 Bartosz Blimke :allow_localhost => true' now permits 0.0.0.0 in addition to 127.0.0.1 a...
authored
122 * :allow_localhost => true' now permits 0.0.0.0 in addition to 127.0.0.1 and 'localhost'. Thanks to Myron Marston and Mike Gehard for suggesting this.
123
a53f1a0 Bartosz Blimke Updated CHANGELOG with version 1.4.0 changes
authored
124 * Fixed issue with both RSpec 1.x and 2.x being available.
6eb8bb5 Bartosz Blimke WebMock tries to use already loaded version of RSpec (1.x or 2.x) (previ...
authored
125
a53f1a0 Bartosz Blimke Updated CHANGELOG with version 1.4.0 changes
authored
126 WebMock now tries to use already loaded version of RSpec (1.x or 2.x). Previously it was loading RSpec 2.0 if available, even if RSpec 1.3 was already loaded.
6eb8bb5 Bartosz Blimke WebMock tries to use already loaded version of RSpec (1.x or 2.x) (previ...
authored
127
128 Thanks to Hans de Graaff for reporting this.
129
9acf181 Bartosz Blimke Updated changelog for version 1.4.0
authored
130 * Changed runtime dependency on Addressable version 2.2.2 which fixes handling of percent-escaped '+'
131
67a0819 Bartosz Blimke Version 1.3.5 changelog + updated docs
authored
132 ## 1.3.5
133
134 * External requests can be disabled while allowing selected hosts. Thanks to Charles Li and Ryan Bigg
135
136 This feature was available before only for localhost with `:allow_localhost => true`
137
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
138 WebMock.disable_net_connect!(:allow => "www.example.org")
67a0819 Bartosz Blimke Version 1.3.5 changelog + updated docs
authored
139
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
140 Net::HTTP.get('www.something.com', '/') # ===> Failure
67a0819 Bartosz Blimke Version 1.3.5 changelog + updated docs
authored
141
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
142 Net::HTTP.get('www.example.org', '/') # ===> Allowed.
67a0819 Bartosz Blimke Version 1.3.5 changelog + updated docs
authored
143
144 * Fixed Net::HTTP adapter so that it preserves the original behavior of Net::HTTP.
145
146 When making a request with a block that calls #read_body on the request,
147 Net::HTTP causes the body to be set to a Net::ReadAdapter, but WebMock was causing the body to be set to a string.
148
688e687 Version 1.3.4 changelog
Bartosz Blimke and Oliver Nightingale authored
149 ## 1.3.4
150
151 * Fixed Net::HTTP adapter to handle cases where a block with `read_body` call is passed to `request`.
152 This fixes compatibility with `open-uri`. Thanks to Mark Evans for reporting the issue.
153
db5fcf4 Version 1.3.3 changelog.
Bartosz Blimke and Ben Pickles authored
154 ## 1.3.3
155
156 * Fixed handling of multiple values for the same response header for Net::HTTP. Thanks to Myron Marston for reporting the issue.
157
27c0f65 Version 1.3.2 changelog
Bartosz Blimke and Ben Pickles authored
158 ## 1.3.2
159
160 * Fixed compatibility with EM-HTTP-Request >= 0.2.9. Thanks to Myron Marston for reporting the issue.
161
15f888e Bartosz Blimke The less hacky way to get the stream behaviour working for em-http-reque...
authored
162 ## 1.3.1
163
60fa244 Bartosz Blimke Updated changelog
authored
164 * The less hacky way to get the stream behaviour working for em-http-request. Thanks to Martyn Loughran
165
166 * Fixed issues where Net::HTTP was not accepting valid nil response body. Thanks to Muness Alrubaie
15f888e Bartosz Blimke The less hacky way to get the stream behaviour working for em-http-reque...
authored
167
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored
168 ## 1.3.0
169
170 * Added support for [em-http-request](http://github.com/igrigorik/em-http-request)
171
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
172 * Matching query params using a hash
173
174 stub_http_request(:get, "www.example.com").with(:query => {"a" => ["b", "c"]})
175
176 RestClient.get("http://www.example.com/?a[]=b&a[]=c") # ===> Success
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored
177
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
178 request(:get, "www.example.com").with(:query => {"a" => ["b", "c"]}).should have_been_made # ===> Success
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored
179
180 * Matching request body against a hash. Body can be URL-Encoded, JSON or XML.
26cb92f Small improvements to CHANGELOG for version 1.3.0
Bartosz Blimke authored
181
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored
182 (Thanks to Steve Tooke for the idea and a solution for url-encoded bodies)
183
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
184 stub_http_request(:post, "www.example.com").
185 with(:body => {:data => {:a => '1', :b => 'five'}})
186
187 RestClient.post('www.example.com', "data[a]=1&data[b]=five",
188 :content_type => 'application/x-www-form-urlencoded') # ===> Success
189
190 RestClient.post('www.example.com', '{"data":{"a":"1","b":"five"}}',
191 :content_type => 'application/json') # ===> Success
192
193 RestClient.post('www.example.com', '<data a="1" b="five" />',
194 :content_type => 'application/xml' ) # ===> Success
195
196 request(:post, "www.example.com").
197 with(:body => {:data => {:a => '1', :b => 'five'}},
198 :headers => 'Content-Type' => 'application/json').should have_been_made # ===> Success
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored
199
200 * Request callbacks (Thanks to Myron Marston for all suggestions)
201
202 WebMock can now invoke callbacks for stubbed or real requests:
203
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
204 WebMock.after_request do |request_signature, response|
205 puts "Request #{request_signature} was made and #{response} was returned"
206 end
207
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored
208 invoke callbacks for real requests only and except requests made with Patron client
209
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
210 WebMock.after_request(:except => [:patron], :real_requests_only => true) do |request_signature, response|
211 puts "Request #{request_signature} was made and #{response} was returned"
212 end
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored
213
214 * `to_raise()` now accepts an exception instance or a string as argument in addition to an exception class
215
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
216 stub_request(:any, 'www.example.net').to_raise(StandardError.new("some error"))
217
218 stub_request(:any, 'www.example.net').to_raise("some error")
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored
219
26cb92f Small improvements to CHANGELOG for version 1.3.0
Bartosz Blimke authored
220 * Matching requests based on a URI is 30% faster
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored
221
222 * Fixed constant namespace issues in HTTPClient adapter. Thanks to Nathaniel Bibler for submitting a patch.
223
fd2472a Version 1.2.2 changelog
Bartosz Blimke authored
224 ## 1.2.2
225
226 * Fixed problem where ArgumentError was raised if query params were made up of an array e.g. data[]=a&data[]=b. Thanks to Steve Tooke
227
5803f31 Version bump to 1.2.1
Bartosz Blimke authored
228 ## 1.2.1
229
230 * Changed license from GPL to MIT
231
232 * Fixed gemspec file. Thanks to Razic
233
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
234 ## 1.2.0
31b3ffb Added version 1.2.0 changelog
Bartosz Blimke authored
235
236 * RSpec 2 compatibility. Thanks to Sam Phillips!
237
238 * :allow_localhost => true' now permits 127.0.0.1 as well as 'localhost'. Thanks to Mack Earnhardt
239
240 * Request URI matching in now 2x faster!
241
242
4a04017 Added 1.1.0 changelog
Bartosz Blimke authored
243 ## 1.1.0
244
ee7b3b4 Fixed spelling
Bartosz Blimke authored
245 * [VCR](http://github.com/myronmarston/vcr/) compatibility. Many thanks to Myron Marston for all suggestions.
4a04017 Added 1.1.0 changelog
Bartosz Blimke authored
246
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
247 * Support for stubbing requests and returning responses with multiple headers with the same name. i.e multiple Accept headers.
248
249 stub_http_request(:get, 'www.example.com').
250 with(:headers => {'Accept' => ['image/png', 'image/jpeg']}).
251 to_return(:body => 'abc')
252 RestClient.get('www.example.com',
253 {"Accept" => ['image/png', 'image/jpeg']}) # ===> "abc\n"
4a04017 Added 1.1.0 changelog
Bartosz Blimke authored
254
255 * When real net connections are disabled and unstubbed request is made, WebMock throws WebMock::NetConnectNotAllowedError instead of assertion error or StandardError.
256
257 * Added WebMock.version()
258
259
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
260 ## 1.0.0
261
262 * Added support for [Patron](http://toland.github.com/patron/)
263
264 * Responses dynamically evaluated from block (idea and implementation by Tom Ward)
265
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
266 stub_request(:any, 'www.example.net').
267 to_return { |request| {:body => request.body} }
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
268
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
269 RestClient.post('www.example.net', 'abc') # ===> "abc\n"
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
270
271 * Responses dynamically evaluated from lambda (idea and implementation by Tom Ward)
272
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
273 stub_request(:any, 'www.example.net').
274 to_return(lambda { |request| {:body => request.body} })
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
275
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
276 RestClient.post('www.example.net', 'abc') # ===> "abc\n"
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
277
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
278 * Response with custom status message
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
279
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
280 stub_request(:any, "www.example.com").to_return(:status => [500, "Internal Server Error"])
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
281
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
282 req = Net::HTTP::Get.new("/")
283 Net::HTTP.start("www.example.com") { |http| http.request(req) }.message # ===> "Internal Server Error"
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
284
c3c92ba Added information about allowing localhost to version 1.0.0 changelog
Bartosz Blimke authored
285 * Raising timeout errors (suggested by Jeffrey Jones) (compatibility with Ruby 1.8.6 by Mack Earnhardt)
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
286
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
287 stub_request(:any, 'www.example.net').to_timeout
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
288
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
289 RestClient.post('www.example.net', 'abc') # ===> RestClient::RequestTimeout
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
290
c3c92ba Added information about allowing localhost to version 1.0.0 changelog
Bartosz Blimke authored
291 * External requests can be disabled while allowing localhost (idea and implementation by Mack Earnhardt)
292
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
293 WebMock.disable_net_connect!(:allow_localhost => true)
c3c92ba Added information about allowing localhost to version 1.0.0 changelog
Bartosz Blimke authored
294
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
295 Net::HTTP.get('www.something.com', '/') # ===> Failure
c3c92ba Added information about allowing localhost to version 1.0.0 changelog
Bartosz Blimke authored
296
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
297 Net::HTTP.get('localhost:9887', '/') # ===> Allowed. Perhaps to Selenium?
c3c92ba Added information about allowing localhost to version 1.0.0 changelog
Bartosz Blimke authored
298
299
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
300 ### Bug fixes
301
302 * Fixed issue where Net::HTTP adapter didn't work for requests with body responding to read (reported by Tekin Suleyman)
c3c92ba Added information about allowing localhost to version 1.0.0 changelog
Bartosz Blimke authored
303 * Fixed issue where request stub with headers declared as nil was matching requests with non empty headers
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
304
b6c3b3b Version bump to 0.9.1
Bartosz Blimke authored
305 ## 0.9.1
306
307 * Fixed issue where response status code was not read from raw (curl -is) responses
308
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
309 ## 0.9.0
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
310
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
311 * Matching requests against provided block (by Sergio Gil)
312
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
313 stub_request(:post, "www.example.com").with { |request| request.body == "abc" }.to_return(:body => "def")
314 RestClient.post('www.example.com', 'abc') # ===> "def\n"
315 request(:post, "www.example.com").with { |req| req.body == "abc" }.should have_been_made
316 #or
317 assert_requested(:post, "www.example.com") { |req| req.body == "abc" }
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
318
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
319 * Matching request body against regular expressions (suggested by Ben Pickles)
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
320
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
321 stub_request(:post, "www.example.com").with(:body => /^.*world$/).to_return(:body => "abc")
322 RestClient.post('www.example.com', 'hello world') # ===> "abc\n"
323
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
324 * Matching request headers against regular expressions (suggested by Ben Pickles)
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
325
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
326 stub_request(:post, "www.example.com").with(:headers => {"Content-Type" => /image\/.+/}).to_return(:body => "abc")
327 RestClient.post('www.example.com', '', {'Content-Type' => 'image/png'}) # ===> "abc\n"
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
328
329 * Replaying raw responses recorded with `curl -is`
330
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
331 `curl -is www.example.com > /tmp/example_curl_-is_output.txt`
332 raw_response_file = File.new("/tmp/example_curl_-is_output.txt")
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
333
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
334 from file
335
336 stub_request(:get, "www.example.com").to_return(raw_response_file)
337
338 or string
339
340 stub_request(:get, "www.example.com").to_return(raw_response_file.read)
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
341
342 * Multiple responses for repeated requests
343
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
344 stub_request(:get, "www.example.com").to_return({:body => "abc"}, {:body => "def"})
345 Net::HTTP.get('www.example.com', '/') # ===> "abc\n"
346 Net::HTTP.get('www.example.com', '/') # ===> "def\n"
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
347
348 * Multiple responses using chained `to_return()` or `to_raise()` declarations
349
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
350 stub_request(:get, "www.example.com").
351 to_return({:body => "abc"}).then. #then() just is a syntactic sugar
352 to_return({:body => "def"}).then.
353 to_raise(MyException)
354 Net::HTTP.get('www.example.com', '/') # ===> "abc\n"
355 Net::HTTP.get('www.example.com', '/') # ===> "def\n"
356 Net::HTTP.get('www.example.com', '/') # ===> MyException raised
357
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
358 * Specifying number of times given response should be returned
359
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
360 stub_request(:get, "www.example.com").
361 to_return({:body => "abc"}).times(2).then.
362 to_return({:body => "def"})
363
364 Net::HTTP.get('www.example.com', '/') # ===> "abc\n"
365 Net::HTTP.get('www.example.com', '/') # ===> "abc\n"
366 Net::HTTP.get('www.example.com', '/') # ===> "def\n"
367
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
368 * Added support for `Net::HTTP::Post#body_stream`
369
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
370 This fixes compatibility with new versions of RestClient
371
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
372 * WebMock doesn't suppress default request headers added by http clients anymore.
373
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
374 i.e. Net::HTTP adds `'Accept'=>'*/*'` to all requests by default
375
376
377
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
378 ## 0.8.2
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
379
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
380 * Fixed issue where WebMock was not closing IO object passed as response body after reading it.
381 * Ruby 1.9.2 compat: Use `File#expand_path` for require path because "." is not be included in LOAD_PATH since Ruby 1.9.2
382
383
384 ## 0.8.1
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
385
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
386 * Fixed HTTPClient adapter compatibility with Ruby 1.8.6 (reported by Piotr Usewicz)
387 * Net:HTTP adapter now handles request body assigned as Net::HTTP::Post#body attribute (fixed by Mack Earnhardt)
388 * Fixed issue where requests were not matching stubs with Accept header set.(reported by Piotr Usewicz)
389 * Fixed compatibility with Ruby 1.9.1, 1.9.2 and JRuby 1.3.1 (reported by Diego E. “Flameeyes” Pettenò)
390 * Fixed issue with response body declared as IO object and multiple requests (reported by Niels Meersschaert)
391 * Fixed "undefined method `assertion_failure'" error (reported by Nick Plante)
392
393
394 ## 0.8.0
395
396 * Support for HTTPClient (sync and async requests)
a251cb3 James Conroy-Finn Indent files correctly and remove trailing whitespace
jcf authored
397 * Support for dynamic responses. Response body and headers can be now declared as lambda.
398 (Thanks to Ivan Vega ( @ivanyv ) for suggesting this feature)
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
399 * Support for stubbing and expecting requests with empty body
400 * Executing non-stubbed request leads to failed expectation instead of error
401
402
403 ### Bug fixes
404
405 * Basic authentication now works correctly
406 * Fixed problem where WebMock didn't call a block with the response when block was provided
407 * Fixed problem where uris with single slash were not matching uris without path provided
408
409
410 ## 0.7.3
411
412 * Clarified documentation
413 * Fixed some issues with loading of Webmock classes
414 * Test::Unit and RSpec adapters have to be required separately
415
416
417 ## 0.7.2
418
419 * Added support for matching escaped and non escaped URLs
Something went wrong with that request. Please try again.