Skip to content
Newer
Older
100644 783 lines (437 sloc) 30.3 KB
9887d17 @jcf Prepare for 1.6.3 release
jcf authored May 18, 2011
1 # Changelog
2
5662ca4 @bblimke Version 1.8.11
authored Sep 29, 2012
3 ## 1.8.11
4
5 * Fix excon adapter to handle `:body => some_file_object`
6
7 Thanks to [Myron Marston](https://github.com/myronmarston)
8
623cf85 @bblimke Version 1.8.10
authored Sep 9, 2012
9 ## 1.8.10
10
11 * em-http-request fix. After request callbacks are correctly invoked for 3xx responses,
12 when :redirects option is set.
13
14 Thanks to [Myron Marston](https://github.com/myronmarston) for reporting that issue.
15
16 * Fixed compatibility with Net::HTTP::DigestAuth
17
18 Thanks to [Jonathan Hyman](https://github.com/jonhyman) for reporting that issue.
19
20 * Fixed problem in em-http-request 0.x appending the query to the client URI twice.
21
22 Thanks to [Paweł Pierzchała](https://github.com/wrozka)
23
43098e1 @bblimke Version 1.8.9
authored Aug 15, 2012
24 ## 1.8.9
25
26 * Fixed problem with caching nil responses when the same HTTPClient instance is used.
27
28 Thanks to [Myron Marston](https://github.com/myronmarston)
29
30 * Added support for Addressable >= 2.3.0. Addressable 2.3.0 removed support for multiple query value notations and broke backwards compatibility.
31
32 https://github.com/sporkmonger/addressable/commit/f51e290b5f68a98293327a7da84eb9e2d5f21c62
33 https://github.com/sporkmonger/addressable/issues/77
34
35
5fa0c99 @bblimke Bump version to 1.8.8
authored Jul 24, 2012
36 ## 1.8.8
37
38 * Fixed Net::HTTP adapter so that it returns `nil` for an empty body response.
39
40 Thanks to [Myron Marston](https://github.com/myronmarston)
41
42 * Gemspec defines compatibility with Addressable ~> 2.2.8, not >= 2.3.0
43
44 * Specs compatibility with Typhoeus 0.4.0
45
46 Thanks to [Hans Hasselberg](https://github.com/i0rek)
47
48 * Handling content types that specify a charset
49
50 Thanks to [Kevin Glowacz](https://github.com/kjg)
51
52 * Fixed em-http-request adapter to correctly fetch authorization header from a request
53
54 Thanks to [Julien Boyer](https://github.com/chatgris)
55
56 * Fixing travis-ci image to report master's status
57
58 Thanks to [Ryan Schlesinger](https://github.com/ryansch)
59
60 * Fixed problem with em-http-request callback triggering if there were other EM::Deferred callbacks registered
61
62 Thanks to [Jon Leighton](https://github.com/jonleighton)
63
64 * Fixed problem with em-http-request appending the query to the URI a second time, and
65 the parameters are repeated.
66
67 Thanks to [Jon Leighton](https://github.com/jonleighton)
68
d083e68 @bblimke Bump to version 1.8.7
authored May 12, 2012
69 ## 1.8.7
70
71 * Compatibility with RSpec >= 2.10
72
73 Thanks to [erwanlr](https://github.com/erwanlr) for reporting this issue.
74
75 * Add missing required rack environment variable SCRIPT_NAME
76
77 Thanks to [Eric Oestrich](https://github.com/oestrich)
78
79 * Fixed warnings due to @query_params not being initialized
80
81 Thanks to [Ben Bleything](https://github.com/bleything)
82
4711a0b @bblimke Bump version to 1.8.6
authored Apr 4, 2012
83 ## 1.8.6
84
85 * Pass through SERVER_PORT when stubbing to rack
86
87 Thanks to [Eric Oestrich](https://github.com/oestrich)
88
89 * Fixed problem with missing parenthesis in `WebMock#net_connect_allowed?` conditions.
90
91 Thanks to [aindustries](https://github.com/aindustries)
92
576c596 @bblimke Bump to version 1.8.5
authored Mar 30, 2012
93 ## 1.8.5
94
95 * WebMock::RackResponse supports basic auth
96
97 Thanks to [jugyo](https://github.com/jugyo)
98
4a0382d @bblimke Bump to version 1.8.4
authored Mar 20, 2012
99 ## 1.8.4
100
101 * Warning message is printed when an unsupported version of a http library is loaded.
102
103 Thanks to [Alexander Staubo](https://github.com/alexstaubo) for reporting the problem and to [Myron Marston](https://github.com/myronmarston) for a help with solution.
104
3c9b625 @bblimke Bump version to 1.8.3
authored Mar 15, 2012
105 ## 1.8.3
106
107 * Fixed compatibility with latest em-http-request
108
109 Thanks to [Paul Cortens](https://github.com/thoughtless)
110
3876948 @bblimke Update to version 1.8.2
authored Mar 7, 2012
111 ## 1.8.2
112
113 * Prevent Webmock `hash_including` from overriding RSpec version 1 `hash_including` method.
114
115 Thanks to [Joe Karayusuf](https://github.com/karayusuf)
116
117 * Ensured WebMock handles RSpec 1 `hash_including` matcher for matching query params and body.
118
8825a2a @bblimke Update to version 1.8.1
authored Mar 5, 2012
119 ## 1.8.1
120
121 * Ensured WebMock doesn't interfere with `em-synchrony`, when `em-synchrony/em-http` is not included.
122
123 Thanks to [Nick Recobra](https://github.com/oruen)
124
125 * Improved README
126
127 Thanks to [Jordan Elver](https://github.com/jordelver)
128
129
08783a7 @bblimke Update to version 1.8.0
authored Feb 21, 2012
130 ## 1.8.0
68ba906 @bblimke Updated Changelog and Readme with the latest changes in master
authored Feb 5, 2012
131
132 * Matching request body against partial hash.
133
134 stub_http_request(:post, "www.example.com").
135 with(:body => hash_including({:data => {:a => '1', :b => 'five'}}))
136
137 RestClient.post('www.example.com', "data[a]=1&data[b]=five&x=1",
138 :content_type => 'application/x-www-form-urlencoded') # ===> Success
139
140 request(:post, "www.example.com").
141 with(:body => hash_including({:data => {:a => '1', :b => 'five'}}),
142 :headers => 'Content-Type' => 'application/json').should have_been_made # ===> Success
143
144 Thanks to [Marnen Laibow-Koser](https://github.com/marnen) for help with this solution
145
146 * Matching request query params against partial hash.
147
148 stub_http_request(:get, "www.example.com").with(:query => hash_including({"a" => ["b", "c"]}))
149
150 RestClient.get("http://www.example.com/?a[]=b&a[]=c&x=1") # ===> Success
151
152 request(:get, "www.example.com").
153 with(:query => hash_including({"a" => ["b", "c"]})).should have_been_made # ===> Success
154
155 * Added support for Excon.
156
157 Thanks to [Dimitrij Denissenko](https://github.com/dim)
158
159 * Added support for setting expectations on the request stub with `assert_requested`
160
161 stub_get = stub_request(:get, "www.example.com")
162 stub_post = stub_request(:post, "www.example.com")
163
164 Net::HTTP.get('www.example.com', '/')
165
166 assert_requested(stub_get)
167 assert_not_requested(stub_post)
168
169 Thanks to [Nicolas Fouché](https://github.com/nfo)
170
171 * `WebMock.disable_net_connect!` accepts `RegExp` as `:allow` parameter
172
173 Thanks to [Frank Schumacher](https://github.com/thenoseman)
174
44de728 @bblimke Updated changelog with latest changes in master
authored Feb 19, 2012
175 * Ensure multiple values for the same header can be recorded and played back
176
177 Thanks to [Myron Marston](https://github.com/myronmarston)
178
e56d313 @bblimke Updated dependency on Addressable to version >= 2.2.7 to handle neste…
authored Feb 19, 2012
179 * Updated dependency on Addressable to version >= 2.2.7 to handle nested hash query values. I.e. `?one[two][three][]=four&one[two][three][]=five`
180
68ba906 @bblimke Updated Changelog and Readme with the latest changes in master
authored Feb 5, 2012
181 * Fixed compatibility with Curb >= 0.7.16 This breaks compatibility with Curb < 0.7.16
182
183 * Fix #to_rack to handle non-array response bodies.
184
185 Thanks to [Tammer Saleh](https://github.com/tsaleh)
186
187 * Added `read_timeout` accessor to StubSocket which fixes compatibility with aws-sdk
188
189 Thanks to [Lin Jen-Shin](https://github.com/godfat)
190
191 * Fix warning "instance variable @query_params not initialized"
192
193 Thanks to [Joe Van Dyk](https://github.com/joevandyk)
194
195 * Using bytesize of message instead of its length for content-length header in em-http-request adapter.
196 This fixes a problem with messages getting truncated in Ruby >= 1.9
197
198 Thanks to [Mark Abramov](https://github.com/markiz)
199
5cd5aaf @bblimke Fixed problem with body params being matched even if params were diff…
authored Feb 11, 2012
200 * Fixed problem with body params being matched even if params were different.
201
202 Thanks to [Evgeniy Dolzhenko](https://github.com/dolzenko) for reporting this issue.
203
a50c583 @bblimke Upgraded version to 1.7.10
authored Jan 4, 2012
204 ## 1.7.10
205
206 * Yanked 1.7.9 and rebuilt gem on 1.8.7 to deal with syck/psych incompatibilties in gemspec.
207
4ff8cf1 @bblimke Version 1.7.9 changelog
authored Jan 4, 2012
208 ## 1.7.9
209
210 * Fixed support for native Typhoeus timeouts.
211
212 Thanks to [Albert Llop](https://github.com/mrsimo)
213
214 * Fixed problem with WebMock and RSpec compatibility on TeamCity servers. See [this article](http://www.coding4streetcred.com/blog/post/Issue-RubyMine-31-Webmock-162-and-%E2%80%9CSpecconfigure%E2%80%9D-curse.aspx) for more details.
215
216 Thanks to [Christopher Pickslay](https://github.com/chrispix) from [Two Bit Labs](https://github.com/twobitlabs)
217
218
18b3e7f @myronmarston 1.7.8 release.
myronmarston authored Nov 19, 2011
219 ## 1.7.8
220
221 * Fix each adapter so that it calls a `stub.with` block only once per
222 request. Previously, the block would be called two or three times per
223 request [Myron Marston](https://github.com/myronmarston).
224
4ff9f1a @bblimke Version 1.7.7 - RuPy 2011 Release
authored Oct 15, 2011
225 ## 1.7.7 - RuPy 2011 release
226
227 * Passing response object to a block passed to `HTTPClient#do_get_block`. This fixes `HTTPClient.get_content` failures. [issue 130](https://github.com/bblimke/webmock/pull/130)
228
229 Thanks to [Chris McGrath](https://github.com/chrismcg)
230
231 * Cleaned up ruby warnings when running WebMock code with `-w`.
232
233 Thanks to [Stephen Celis](https://github.com/stephencelis)
234
235 * Curb adapter now correctly calls on_failure for 4xx response codes.
236
237 Thanks to [Eugene Pimenov](https://github.com/libc)
238
748ff35 @bblimke Version 1.7.6
authored Sep 4, 2011
239 ## 1.7.6
240
241 * Support for the HTTPClient's request_filter feature
242
243 Thanks to [Roman Shterenzon](https://github.com/romanbsd)
244
4d848df @bblimke Version 1.7.5
authored Aug 27, 2011
245 ## 1.7.5
246
247 * Added support for Patron 0.4.15. This change is not backward compatible so please upgrade Patron to version >= 0.4.15 if you want to use it with WebMock.
248
249 Thanks to [Andreas Garnæs](https://github.com/andreas)
250
b6ca337 @bblimke Version 1.7.4
authored Aug 18, 2011
251 ## 1.7.4
252
253 * Added support for matching EM-HTTP-Request requests with body declared as a Hash
254
255 Thanks to [David Yeu](https://github.com/daveyeu)
256
6b422e4 @bblimke Version 1.7.3
authored Aug 17, 2011
257 ## 1.7.3
258
259 * Added `Get`, `Post`, `Delete`, `Put`, `Head`, `Option` constants to replaced `Net::HTTP` to make it possible to marshal objects with these constants assigned to properties. This fixed problem with `tvdb_party` gem which serializes HTTParty responses.
260
261 Thanks to [Klaus Hartl](https://github.com/carhartl) for reporting this issue.
262
045f28a @bblimke Version 1.7.2
authored Aug 16, 2011
263 ## 1.7.2
264
265 * Redefined `const_get` and `constants` methods on the replaced `Net::HTTP` to return same values as original `Net::HTTP`
266
81a3563 @bblimke Version 1.7.1
authored Aug 15, 2011
267 ## 1.7.1
268
269 * Redefined `const_defined?` on the replaced `Net::HTTP` so that it returns true if constant is defined on the original `Net::HTTP`. This fixes problems with `"Net::HTTP::Get".constantize`.
270
271 Thanks to [Cássio Marques](https://github.com/cassiomarques) for reporting the issue and to [Myron Marston](https://github.com/myronmarston) for help with the solution.
272
8edff05 @bblimke Version 1.7.0
authored Aug 15, 2011
273 ## 1.7.0
3cb39d7 @bblimke Version 1.7.0.pre Changelog
authored Aug 9, 2011
274
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored Aug 14, 2011
275 * Fixed Net::HTTP adapter to not break normal Net::HTTP behaviour when network connections are allowed. This fixes **selenium-webdriver compatibility**!!!
3cb39d7 @bblimke Version 1.7.0.pre Changelog
authored Aug 9, 2011
276
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored Aug 14, 2011
277 * Added support for EM-HTTP-Request 1.0.x and EM-Synchrony. Thanks to [Steve Hull](https://github.com/sdhull)
3cb39d7 @bblimke Version 1.7.0.pre Changelog
authored Aug 9, 2011
278
279 * Added support for setting expectations to on a stub itself i.e.
280
281 stub = stub_request(:get, "www.example.com")
282 # ... make requests ...
283 stub.should have_been_requested
284
285 Thanks to [Aidan Feldman](https://github.com/afeld)
286
287 * Minitest support! Thanks to [Peter Higgins](https://github.com/phiggins)
288
21aba84 @bblimke Updated README and Changelog with inf about Typhoeus support
authored Aug 9, 2011
289 * Added support for Typhoeus::Hydra
290
3cb39d7 @bblimke Version 1.7.0.pre Changelog
authored Aug 9, 2011
291 * Added support for `Curb::Easy#http_post` and `Curb::Easy#http_post` with multiple arguments. Thanks to [Salvador Fuentes Jr](https://github.com/fuentesjr) and [Alex Rothenberg](https://github.com/alexrothenberg)
292
293 * Rack support. Requests can be stubbed to respond with a Rack app i.e.
294
295 class MyRackApp
296 def self.call(env)
297 [200, {}, ["Hello"]]
298 end
299 end
300
301 stub_request(:get, "www.example.com").to_rack(MyRackApp)
302
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored Aug 14, 2011
303 RestClient.get("www.example.com") # ===> "Hello"
304
305
fa61e9a @bblimke Fixed formatting in changelog
authored Aug 9, 2011
306 Thanks to [Jay Adkisson](https://github.com/jayferd)
3cb39d7 @bblimke Version 1.7.0.pre Changelog
authored Aug 9, 2011
307
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored Aug 14, 2011
308 * Added support for selective disabling and enabling of http lib adapters
17547a5 @bblimke Updated Changelog and README with info about enabling and disabling W…
authored Aug 14, 2011
309
310 WebMock.disable! #disable WebMock (all adapters)
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored Aug 14, 2011
311 WebMock.disable!(:except => [:net_http]) #disable WebMock for all libs except Net::HTTP
17547a5 @bblimke Updated Changelog and README with info about enabling and disabling W…
authored Aug 13, 2011
312 WebMock.enable! #enable WebMock (all adapters)
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored Aug 14, 2011
313 WebMock.enable!(:except => [:patron]) #enable WebMock for all libs except Patron
314
315 * The error message on an unstubbed request shows a code snippet with body as a hash when it was in url encoded form.
316
317 > RestClient.post('www.example.com', "data[a]=1&data[b]=2", :content_type => 'application/x-www-form-urlencoded')
318
319 WebMock::NetConnectNotAllowedError: Real HTTP connections are disabled....
320
321 You can stub this request with the following snippet:
322
323 stub_request(:post, "http://www.example.com/").
324 with(:body => {"data"=>{"a"=>"1", "b"=>"2"}},
325 :headers => { 'Content-Type'=>'application/x-www-form-urlencoded' }).
326 to_return(:status => 200, :body => "", :headers => {})
17547a5 @bblimke Updated Changelog and README with info about enabling and disabling W…
authored Aug 13, 2011
327
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored Aug 14, 2011
328 Thanks to [Alex Rothenberg](https://github.com/alexrothenberg)
3cb39d7 @bblimke Version 1.7.0.pre Changelog
authored Aug 9, 2011
329
fa61e9a @bblimke Fixed formatting in changelog
authored Aug 9, 2011
330 * The error message on an unstubbed request shows currently registered request stubs.
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored Aug 14, 2011
331
332 > stub_request(:get, "www.example.net")
333 > stub_request(:get, "www.example.org")
334 > RestClient.get("www.example.com")
335 WebMock::NetConnectNotAllowedError: Real HTTP connections are disabled....
336
337 You can stub this request with the following snippet:
338
339 stub_request(:get, "http://www.example.com/").
340 to_return(:status => 200, :body => "", :headers => {})
341
342 registered request stubs:
343
344 stub_request(:get, "http://www.example.net/")
345 stub_request(:get, "http://www.example.org/")
346
347 Thanks to [Lin Jen-Shin](https://github.com/godfat) for suggesting this feature.
3cb39d7 @bblimke Version 1.7.0.pre Changelog
authored Aug 9, 2011
348
349 * Fixed problem with matching requests with json body, when json strings have date format. Thanks to [Joakim Ekberg](https://github.com/kalasjocke) for reporting this issue.
350
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored Aug 14, 2011
351 * WebMock now attempts to require each http library before monkey patching it. This is to avoid problem when http library is required after WebMock is required. Thanks to [Myron Marston](https://github.com/myronmarston) for suggesting this change.
3cb39d7 @bblimke Version 1.7.0.pre Changelog
authored Aug 9, 2011
352
353 * External requests can be disabled while allowing selected ports on selected hosts
354
355 WebMock.disable_net_connect!(:allow => "www.example.com:8080")
356 RestClient.get("www.example.com:80") # ===> Failure
357 RestClient.get("www.example.com:8080") # ===> Allowed.
358
fa61e9a @bblimke Fixed formatting in changelog
authored Aug 9, 2011
359 Thanks to [Zach Dennis](https://github.com/zdennis)
3cb39d7 @bblimke Version 1.7.0.pre Changelog
authored Aug 9, 2011
360
361 * Fixed syntax error in README examples, showing the ways of setting request expectations. Thanks to [Nikita Fedyashev](https://github.com/nfedyashev)
362
363
ae0286a @bblimke @jcf actually did a great job maintaining WebMock!
authored Aug 9, 2011
364 **Many thanks to WebMock co-maintainer [James Conroy-Finn](https://github.com/jcf) who did a great job maintaining WebMock on his own for the last couple of months.**
3cb39d7 @bblimke Version 1.7.0.pre Changelog
authored Aug 9, 2011
365
a62080b @jcf Update changelog and version number
jcf authored May 18, 2011
366 ## 1.6.4
367
368 This is a quick slip release to regenerate the gemspec. Apparently
369 jeweler inserts dependencies twice if you use the `gemspec` method in
370 your Gemfile and declare gem dependencies in your gemspec.
371
372 https://github.com/technicalpickles/jeweler/issues/154
373
374 josevalim:
375
376 > This just bit me. I just released a gem with the wrong dependencies
377 > because I have updated jeweler. This should have been opt-in,
378 > otherwise a bunch of people using jeweler are going to release gems
379 > with the wrong dependencies because you are automatically importing
380 > from the Gemfile.
381
9887d17 @jcf Prepare for 1.6.3 release
jcf authored May 18, 2011
382 ## 1.6.3
383
384 * Update the dependency on addressable to get around an issue in v2.2.5.
385 Thanks to [Peter Higgins](https://github.com/phiggins).
386
387 * Add support for matching parameter values using a regular expression
388 as well as a string. Thanks to [Oleg M Prozorov](https://github.com/oleg).
389
390 * Fix integration with httpclient as the internal API has changed.
391 Thanks to [Frank Prößdorf](https://github.com/endor).
392
393 * Ensure Curl::Easy#content_type is always set. Thanks to [Peter
394 Higgins](https://github.com/phiggins).
395
396 * Fix bug with em-http-request adapter stubbing responses that have a
397 chunked transfer encoding. Thanks to [Myron
398 Marston](https://github.com/myronmarston).
399
400 * Fix a load of spec failures with Patron, httpclient, and specs that
401 depended on the behaviour of example.com. Thanks to [Alex
402 Grigorovich](https://github.com/grig).
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored Jan 31, 2010
403
e6af079 @bblimke Updated 1.6.2 changelog and credits
authored Jan 12, 2011
404 ## 1.6.2
405
406 * Em-http-request adapter sets `last_effective_url` property. Thanks to [Sam Stokes](https://github.com/samstokes).
407
408 * 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)
409
f7b9c77 @bblimke Updated version 1.6.1 changelog
authored Nov 13, 2010
410 ## 1.6.1
411
412 * Fixed issue with `webmock/rspec` which didn't load correctly if `rspec/core` was already required but `rspec/expectations` not.
413
7110c60 @bblimke Updated version 1.6.0 changelog
authored Nov 12, 2010
414 ## 1.6.0
473b709 @bblimke Added WebMock.reset! method. WebMock.reset_webmock is now deprecated
authored Nov 3, 2010
415
7110c60 @bblimke Updated version 1.6.0 changelog
authored Nov 12, 2010
416 * Simplified integration with Test::Unit, RSpec and Cucumber. Now only a single file has to be required i.e.
acaab83 @bblimke Updated changelog with the latest changes in master.
authored Nov 3, 2010
417
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
418 require 'webmock/test_unit'
419 require 'webmock/rspec'
420 require 'webmock/cucumber'
acaab83 @bblimke Updated changelog with the latest changes in master.
authored Nov 3, 2010
421
65dd12b @bblimke Updated changelog with latest changes in master branch
authored Nov 10, 2010
422 * 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.
423
e6925a2 @bblimke Updated changelog with the latest changes in master
authored Nov 11, 2010
424 * The expectation failure message now contains a list of made requests. Thanks to Martyn Loughran for suggesting this feature.
425
86f36d2 @bblimke em-http-request adapter is activated by replacing EventMachine::HttpR…
authored Nov 11, 2010
426 * Added `WebMock.print_executed_requests` method which can be useful to find out what requests were made until a given point.
427
7110c60 @bblimke Updated version 1.6.0 changelog
authored Nov 12, 2010
428 * em-http-request adapter is now activated by replacing EventMachine::HttpRequest constant, instead of monkeypatching the original class.
86f36d2 @bblimke em-http-request adapter is activated by replacing EventMachine::HttpR…
authored Nov 11, 2010
429
7110c60 @bblimke Updated version 1.6.0 changelog
authored Nov 12, 2010
430 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 @bblimke em-http-request adapter is activated by replacing EventMachine::HttpR…
authored Nov 11, 2010
431
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
432 EventMachine::WebMockHttpRequest.activate!
433 EventMachine::WebMockHttpRequest.deactivate!
86f36d2 @bblimke em-http-request adapter is activated by replacing EventMachine::HttpR…
authored Nov 11, 2010
434
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
435 Thanks to Martyn Loughran for suggesting this feature.
436
437 * `WebMock.reset_webmock` is deprecated in favour of new `WebMock.reset!`
7110c60 @bblimke Updated version 1.6.0 changelog
authored Nov 12, 2010
438
439 * Fixed integration with Cucumber. Previously documented example didn't work with new versions of Cucumber.
72cd989 @bblimke Added WebMock.print_executed_requests method which can be useful to f…
authored Nov 11, 2010
440
7110c60 @bblimke Updated version 1.6.0 changelog
authored Nov 12, 2010
441 * Fixed stubbing requests with body declared as a hash. Thanks to Erik Michaels-Ober for reporting the issue.
a7cb4fa @bblimke Fixed issue with stubbing requests with request body declared as a ha…
authored Nov 5, 2010
442
7110c60 @bblimke Updated version 1.6.0 changelog
authored Nov 12, 2010
443 * 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 @bblimke em-http-request adapter now works correctly when :query option value …
authored Nov 7, 2010
444
7110c60 @bblimke Updated version 1.6.0 changelog
authored Nov 12, 2010
445 * Fixed problem with assert_requested which didn't work if used outside rspec or test/unit
473b709 @bblimke Added WebMock.reset! method. WebMock.reset_webmock is now deprecated
authored Nov 3, 2010
446
7bca10a @bblimke Don't use JSON to normalize hash body in request pattern. Removed dep…
authored Nov 8, 2010
447 * Removed dependency on json gem
448
079a719 @bblimke Updated changelog with version 1.5.0 changes
authored Nov 2, 2010
449 ## 1.5.0
f0408f8 @bblimke Added support for dynamically evaluated raw responses recorded with `…
authored Oct 25, 2010
450
451 * Support for dynamically evaluated raw responses recorded with `curl -is` <br/>
452 i.e.
453
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
454 `curl -is www.example.com > /tmp/www.example.com.txt`
455 stub_request(:get, "www.example.com").to_return(lambda { |request| File.new("/tmp/#{request.uri.host.to_s}.txt" }))
f0408f8 @bblimke Added support for dynamically evaluated raw responses recorded with `…
authored Oct 25, 2010
456
079a719 @bblimke Updated changelog with version 1.5.0 changes
authored Nov 2, 2010
457 * `:net_http_connect_on_start` option can be passed to `WebMock.allow_net_connect!` and `WebMock.disable_net_connect!` methods, i.e.
ffbcdb3 @bblimke Updated changelog with the latest changes in master branch
authored Oct 30, 2010
458
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
459 WebMock.allow_net_connect!(:net_http_connect_on_start => true)
ffbcdb3 @bblimke Updated changelog with the latest changes in master branch
authored Oct 30, 2010
460
079a719 @bblimke Updated changelog with version 1.5.0 changes
authored Nov 2, 2010
461 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 @bblimke Updated changelog with the latest changes in master branch
authored Oct 30, 2010
462
079a719 @bblimke Updated changelog with version 1.5.0 changes
authored Nov 2, 2010
463 Thanks to Alastair Brunton for reporting the issue and for fix suggestions.
4e313c2 @bblimke Updated CHANGELOG and README with information about net_http_connect_…
authored Nov 2, 2010
464
079a719 @bblimke Updated changelog with version 1.5.0 changes
authored Nov 2, 2010
465 * Fixed an issue where Patron spec tried to remove system temporary directory.
466 Thanks to Hans de Graaff
4e313c2 @bblimke Updated CHANGELOG and README with information about net_http_connect_…
authored Nov 2, 2010
467
079a719 @bblimke Updated changelog with version 1.5.0 changes
authored Nov 2, 2010
468 * WebMock specs now use RSpec 2
4e313c2 @bblimke Updated CHANGELOG and README with information about net_http_connect_…
authored Nov 2, 2010
469
079a719 @bblimke Updated changelog with version 1.5.0 changes
authored Nov 2, 2010
470 * `rake spec NO_CONNECTION=true` can now be used to only run WebMock specs which do not make real network connections
4e313c2 @bblimke Updated CHANGELOG and README with information about net_http_connect_…
authored Nov 2, 2010
471
a53f1a0 @bblimke Updated CHANGELOG with version 1.4.0 changes
authored Oct 11, 2010
472 ## 1.4.0
6eb8bb5 @bblimke WebMock tries to use already loaded version of RSpec (1.x or 2.x) (pr…
authored Oct 3, 2010
473
aaf774b @bblimke Added info to changelog and readme about Curb support, implemented by…
authored Oct 4, 2010
474 * Curb support!!! Thanks to the awesome work of Pete Higgins!
475
2328c00 @bblimke Updated Changelog with the latest changes in master
authored Oct 10, 2010
476 * `include WebMock` is now deprecated to avoid method and constant name conflicts. Please `include WebMock::API` instead.
477
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
478 * `WebMock::API#request` is renamed to `WebMock::API#a_request` to prevent method name conflicts with i.e. Rails controller specs.
2328c00 @bblimke Updated Changelog with the latest changes in master
authored Oct 10, 2010
479 WebMock.request is still available.
480
a53f1a0 @bblimke Updated CHANGELOG with version 1.4.0 changes
authored Oct 11, 2010
481 * 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 @bblimke Updated CHANGELOG with more detailed information on changes in master
authored Oct 10, 2010
482
a53f1a0 @bblimke Updated CHANGELOG with version 1.4.0 changes
authored Oct 11, 2010
483 * Removed `WebMock.response_for_request` and `WebMock.assertion_failure` which were only used internally and were not documented.
9fded75 @bblimke Updated CHANGELOG with more detailed information on changes in master
authored Oct 10, 2010
484
c646491 @bblimke :allow_localhost => true' now permits 0.0.0.0 in addition to 127.0.0.…
authored Oct 3, 2010
485 * :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.
486
a53f1a0 @bblimke Updated CHANGELOG with version 1.4.0 changes
authored Oct 11, 2010
487 * Fixed issue with both RSpec 1.x and 2.x being available.
6eb8bb5 @bblimke WebMock tries to use already loaded version of RSpec (1.x or 2.x) (pr…
authored Oct 3, 2010
488
a53f1a0 @bblimke Updated CHANGELOG with version 1.4.0 changes
authored Oct 11, 2010
489 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 @bblimke WebMock tries to use already loaded version of RSpec (1.x or 2.x) (pr…
authored Oct 3, 2010
490
491 Thanks to Hans de Graaff for reporting this.
492
9acf181 @bblimke Updated changelog for version 1.4.0
authored Oct 13, 2010
493 * Changed runtime dependency on Addressable version 2.2.2 which fixes handling of percent-escaped '+'
494
67a0819 @bblimke Version 1.3.5 changelog + updated docs
authored Sep 6, 2010
495 ## 1.3.5
496
497 * External requests can be disabled while allowing selected hosts. Thanks to Charles Li and Ryan Bigg
498
499 This feature was available before only for localhost with `:allow_localhost => true`
500
8118632 @bblimke Fixed indentation in changelog
authored Feb 4, 2012
501 WebMock.disable_net_connect!(:allow => "www.example.org")
67a0819 @bblimke Version 1.3.5 changelog + updated docs
authored Sep 6, 2010
502
8118632 @bblimke Fixed indentation in changelog
authored Feb 4, 2012
503 Net::HTTP.get('www.something.com', '/') # ===> Failure
67a0819 @bblimke Version 1.3.5 changelog + updated docs
authored Sep 6, 2010
504
8118632 @bblimke Fixed indentation in changelog
authored Feb 4, 2012
505 Net::HTTP.get('www.example.org', '/') # ===> Allowed.
67a0819 @bblimke Version 1.3.5 changelog + updated docs
authored Sep 6, 2010
506
507 * Fixed Net::HTTP adapter so that it preserves the original behavior of Net::HTTP.
508
509 When making a request with a block that calls #read_body on the request,
510 Net::HTTP causes the body to be set to a Net::ReadAdapter, but WebMock was causing the body to be set to a string.
511
688e687 Version 1.3.4 changelog
Bartosz Blimke and Oliver Nightingale authored Aug 10, 2010
512 ## 1.3.4
513
514 * Fixed Net::HTTP adapter to handle cases where a block with `read_body` call is passed to `request`.
515 This fixes compatibility with `open-uri`. Thanks to Mark Evans for reporting the issue.
516
db5fcf4 Version 1.3.3 changelog.
Bartosz Blimke and Ben Pickles authored Aug 3, 2010
517 ## 1.3.3
518
519 * Fixed handling of multiple values for the same response header for Net::HTTP. Thanks to Myron Marston for reporting the issue.
520
27c0f65 Version 1.3.2 changelog
Bartosz Blimke and Ben Pickles authored Jul 23, 2010
521 ## 1.3.2
522
523 * Fixed compatibility with EM-HTTP-Request >= 0.2.9. Thanks to Myron Marston for reporting the issue.
524
15f888e @bblimke The less hacky way to get the stream behaviour working for em-http-re…
authored Jul 9, 2010
525 ## 1.3.1
526
60fa244 @bblimke Updated changelog
authored Jul 9, 2010
527 * The less hacky way to get the stream behaviour working for em-http-request. Thanks to Martyn Loughran
528
529 * Fixed issues where Net::HTTP was not accepting valid nil response body. Thanks to Muness Alrubaie
15f888e @bblimke The less hacky way to get the stream behaviour working for em-http-re…
authored Jul 9, 2010
530
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored Jun 21, 2010
531 ## 1.3.0
532
533 * Added support for [em-http-request](http://github.com/igrigorik/em-http-request)
534
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
535 * Matching query params using a hash
536
8118632 @bblimke Fixed indentation in changelog
authored Feb 4, 2012
537 stub_http_request(:get, "www.example.com").with(:query => {"a" => ["b", "c"]})
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
538
8118632 @bblimke Fixed indentation in changelog
authored Feb 4, 2012
539 RestClient.get("http://www.example.com/?a[]=b&a[]=c") # ===> Success
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored Jun 20, 2010
540
8118632 @bblimke Fixed indentation in changelog
authored Feb 4, 2012
541 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 Jun 20, 2010
542
543 * 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 Jun 21, 2010
544
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored Jun 20, 2010
545 (Thanks to Steve Tooke for the idea and a solution for url-encoded bodies)
546
8118632 @bblimke Fixed indentation in changelog
authored Feb 4, 2012
547 stub_http_request(:post, "www.example.com").
548 with(:body => {:data => {:a => '1', :b => 'five'}})
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
549
8118632 @bblimke Fixed indentation in changelog
authored Feb 4, 2012
550 RestClient.post('www.example.com', "data[a]=1&data[b]=five",
551 :content_type => 'application/x-www-form-urlencoded') # ===> Success
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
552
8118632 @bblimke Fixed indentation in changelog
authored Feb 4, 2012
553 RestClient.post('www.example.com', '{"data":{"a":"1","b":"five"}}',
554 :content_type => 'application/json') # ===> Success
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
555
8118632 @bblimke Fixed indentation in changelog
authored Feb 4, 2012
556 RestClient.post('www.example.com', '<data a="1" b="five" />',
557 :content_type => 'application/xml' ) # ===> Success
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
558
8118632 @bblimke Fixed indentation in changelog
authored Feb 4, 2012
559 request(:post, "www.example.com").
b2f1a0c @bblimke Added part of code in changelog, which was removed by mistake
authored Feb 5, 2012
560 with(:body => {:data => {:a => '1', :b => 'five'}},
561 :headers => 'Content-Type' => 'application/json').should have_been_made # ===> Success
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored Jun 20, 2010
562
563 * Request callbacks (Thanks to Myron Marston for all suggestions)
564
565 WebMock can now invoke callbacks for stubbed or real requests:
566
8118632 @bblimke Fixed indentation in changelog
authored Feb 4, 2012
567 WebMock.after_request do |request_signature, response|
568 puts "Request #{request_signature} was made and #{response} was returned"
569 end
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
570
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored Jun 20, 2010
571 invoke callbacks for real requests only and except requests made with Patron client
572
8118632 @bblimke Fixed indentation in changelog
authored Feb 4, 2012
573 WebMock.after_request(:except => [:patron], :real_requests_only => true) do |request_signature, response|
574 puts "Request #{request_signature} was made and #{response} was returned"
575 end
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored Jun 20, 2010
576
577 * `to_raise()` now accepts an exception instance or a string as argument in addition to an exception class
578
8118632 @bblimke Fixed indentation in changelog
authored Feb 4, 2012
579 stub_request(:any, 'www.example.net').to_raise(StandardError.new("some error"))
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
580
8118632 @bblimke Fixed indentation in changelog
authored Feb 4, 2012
581 stub_request(:any, 'www.example.net').to_raise("some error")
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored Jun 20, 2010
582
26cb92f Small improvements to CHANGELOG for version 1.3.0
Bartosz Blimke authored Jun 20, 2010
583 * Matching requests based on a URI is 30% faster
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored Jun 20, 2010
584
585 * Fixed constant namespace issues in HTTPClient adapter. Thanks to Nathaniel Bibler for submitting a patch.
586
fd2472a Version 1.2.2 changelog
Bartosz Blimke authored May 26, 2010
587 ## 1.2.2
588
589 * 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
590
5803f31 Version bump to 1.2.1
Bartosz Blimke authored May 24, 2010
591 ## 1.2.1
592
593 * Changed license from GPL to MIT
594
595 * Fixed gemspec file. Thanks to Razic
596
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
597 ## 1.2.0
31b3ffb Added version 1.2.0 changelog
Bartosz Blimke authored May 14, 2010
598
599 * RSpec 2 compatibility. Thanks to Sam Phillips!
600
601 * :allow_localhost => true' now permits 127.0.0.1 as well as 'localhost'. Thanks to Mack Earnhardt
602
603 * Request URI matching in now 2x faster!
604
605
4a04017 Added 1.1.0 changelog
Bartosz Blimke authored Apr 28, 2010
606 ## 1.1.0
607
ee7b3b4 Fixed spelling
Bartosz Blimke authored Apr 29, 2010
608 * [VCR](http://github.com/myronmarston/vcr/) compatibility. Many thanks to Myron Marston for all suggestions.
4a04017 Added 1.1.0 changelog
Bartosz Blimke authored Apr 28, 2010
609
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
610 * Support for stubbing requests and returning responses with multiple headers with the same name. i.e multiple Accept headers.
611
612 stub_http_request(:get, 'www.example.com').
613 with(:headers => {'Accept' => ['image/png', 'image/jpeg']}).
614 to_return(:body => 'abc')
615 RestClient.get('www.example.com',
616 {"Accept" => ['image/png', 'image/jpeg']}) # ===> "abc\n"
4a04017 Added 1.1.0 changelog
Bartosz Blimke authored Apr 28, 2010
617
618 * When real net connections are disabled and unstubbed request is made, WebMock throws WebMock::NetConnectNotAllowedError instead of assertion error or StandardError.
619
620 * Added WebMock.version()
621
622
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored Mar 26, 2010
623 ## 1.0.0
624
625 * Added support for [Patron](http://toland.github.com/patron/)
626
627 * Responses dynamically evaluated from block (idea and implementation by Tom Ward)
628
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
629 stub_request(:any, 'www.example.net').
630 to_return { |request| {:body => request.body} }
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored Mar 26, 2010
631
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
632 RestClient.post('www.example.net', 'abc') # ===> "abc\n"
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored Mar 26, 2010
633
634 * Responses dynamically evaluated from lambda (idea and implementation by Tom Ward)
635
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
636 stub_request(:any, 'www.example.net').
637 to_return(lambda { |request| {:body => request.body} })
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored Mar 26, 2010
638
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
639 RestClient.post('www.example.net', 'abc') # ===> "abc\n"
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored Mar 26, 2010
640
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
641 * Response with custom status message
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored Mar 26, 2010
642
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
643 stub_request(:any, "www.example.com").to_return(:status => [500, "Internal Server Error"])
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored Mar 26, 2010
644
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
645 req = Net::HTTP::Get.new("/")
646 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 Mar 26, 2010
647
c3c92ba Added information about allowing localhost to version 1.0.0 changelog
Bartosz Blimke authored Apr 10, 2010
648 * 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 Mar 26, 2010
649
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
650 stub_request(:any, 'www.example.net').to_timeout
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored Mar 26, 2010
651
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
652 RestClient.post('www.example.net', 'abc') # ===> RestClient::RequestTimeout
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored Mar 26, 2010
653
c3c92ba Added information about allowing localhost to version 1.0.0 changelog
Bartosz Blimke authored Apr 10, 2010
654 * External requests can be disabled while allowing localhost (idea and implementation by Mack Earnhardt)
655
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
656 WebMock.disable_net_connect!(:allow_localhost => true)
c3c92ba Added information about allowing localhost to version 1.0.0 changelog
Bartosz Blimke authored Apr 10, 2010
657
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
658 Net::HTTP.get('www.something.com', '/') # ===> Failure
c3c92ba Added information about allowing localhost to version 1.0.0 changelog
Bartosz Blimke authored Apr 10, 2010
659
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
660 Net::HTTP.get('localhost:9887', '/') # ===> Allowed. Perhaps to Selenium?
c3c92ba Added information about allowing localhost to version 1.0.0 changelog
Bartosz Blimke authored Apr 10, 2010
661
662
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored Mar 26, 2010
663 ### Bug fixes
664
665 * 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 Apr 10, 2010
666 * 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 Mar 26, 2010
667
b6c3b3b Version bump to 0.9.1
Bartosz Blimke authored Feb 2, 2010
668 ## 0.9.1
669
670 * Fixed issue where response status code was not read from raw (curl -is) responses
671
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored Jan 31, 2010
672 ## 0.9.0
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
673
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored Jan 31, 2010
674 * Matching requests against provided block (by Sergio Gil)
675
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
676 stub_request(:post, "www.example.com").with { |request| request.body == "abc" }.to_return(:body => "def")
677 RestClient.post('www.example.com', 'abc') # ===> "def\n"
678 request(:post, "www.example.com").with { |req| req.body == "abc" }.should have_been_made
679 #or
680 assert_requested(:post, "www.example.com") { |req| req.body == "abc" }
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored Jan 31, 2010
681
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored Mar 26, 2010
682 * Matching request body against regular expressions (suggested by Ben Pickles)
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored Jan 31, 2010
683
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
684 stub_request(:post, "www.example.com").with(:body => /^.*world$/).to_return(:body => "abc")
685 RestClient.post('www.example.com', 'hello world') # ===> "abc\n"
686
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored Mar 26, 2010
687 * Matching request headers against regular expressions (suggested by Ben Pickles)
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored Jan 31, 2010
688
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
689 stub_request(:post, "www.example.com").with(:headers => {"Content-Type" => /image\/.+/}).to_return(:body => "abc")
690 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 Jan 31, 2010
691
692 * Replaying raw responses recorded with `curl -is`
693
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
694 `curl -is www.example.com > /tmp/example_curl_-is_output.txt`
695 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 Jan 31, 2010
696
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
697 from file
698
699 stub_request(:get, "www.example.com").to_return(raw_response_file)
700
701 or string
702
703 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 Jan 31, 2010
704
705 * Multiple responses for repeated requests
706
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
707 stub_request(:get, "www.example.com").to_return({:body => "abc"}, {:body => "def"})
708 Net::HTTP.get('www.example.com', '/') # ===> "abc\n"
709 Net::HTTP.get('www.example.com', '/') # ===> "def\n"
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored Jan 31, 2010
710
711 * Multiple responses using chained `to_return()` or `to_raise()` declarations
712
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
713 stub_request(:get, "www.example.com").
714 to_return({:body => "abc"}).then. #then() just is a syntactic sugar
715 to_return({:body => "def"}).then.
716 to_raise(MyException)
717 Net::HTTP.get('www.example.com', '/') # ===> "abc\n"
718 Net::HTTP.get('www.example.com', '/') # ===> "def\n"
719 Net::HTTP.get('www.example.com', '/') # ===> MyException raised
720
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored Jan 31, 2010
721 * Specifying number of times given response should be returned
722
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
723 stub_request(:get, "www.example.com").
724 to_return({:body => "abc"}).times(2).then.
725 to_return({:body => "def"})
726
727 Net::HTTP.get('www.example.com', '/') # ===> "abc\n"
728 Net::HTTP.get('www.example.com', '/') # ===> "abc\n"
729 Net::HTTP.get('www.example.com', '/') # ===> "def\n"
730
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored Jan 31, 2010
731 * Added support for `Net::HTTP::Post#body_stream`
732
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
733 This fixes compatibility with new versions of RestClient
734
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored Jan 31, 2010
735 * WebMock doesn't suppress default request headers added by http clients anymore.
736
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
737 i.e. Net::HTTP adds `'Accept'=>'*/*'` to all requests by default
738
739
740
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored Jan 31, 2010
741 ## 0.8.2
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
742
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored Jan 31, 2010
743 * Fixed issue where WebMock was not closing IO object passed as response body after reading it.
744 * 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
745
746
747 ## 0.8.1
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
748
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored Jan 31, 2010
749 * Fixed HTTPClient adapter compatibility with Ruby 1.8.6 (reported by Piotr Usewicz)
750 * Net:HTTP adapter now handles request body assigned as Net::HTTP::Post#body attribute (fixed by Mack Earnhardt)
751 * Fixed issue where requests were not matching stubs with Accept header set.(reported by Piotr Usewicz)
752 * Fixed compatibility with Ruby 1.9.1, 1.9.2 and JRuby 1.3.1 (reported by Diego E. “Flameeyes” Pettenò)
753 * Fixed issue with response body declared as IO object and multiple requests (reported by Niels Meersschaert)
754 * Fixed "undefined method `assertion_failure'" error (reported by Nick Plante)
755
756
757 ## 0.8.0
758
759 * Support for HTTPClient (sync and async requests)
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored May 28, 2011
760 * Support for dynamic responses. Response body and headers can be now declared as lambda.
761 (Thanks to Ivan Vega ( @ivanyv ) for suggesting this feature)
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored Jan 31, 2010
762 * Support for stubbing and expecting requests with empty body
763 * Executing non-stubbed request leads to failed expectation instead of error
764
765
766 ### Bug fixes
767
768 * Basic authentication now works correctly
769 * Fixed problem where WebMock didn't call a block with the response when block was provided
770 * Fixed problem where uris with single slash were not matching uris without path provided
771
772
773 ## 0.7.3
774
775 * Clarified documentation
776 * Fixed some issues with loading of Webmock classes
777 * Test::Unit and RSpec adapters have to be required separately
778
779
780 ## 0.7.2
781
782 * Added support for matching escaped and non escaped URLs
Something went wrong with that request. Please try again.