Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 1180 lines (638 sloc) 43.267 kb
9887d17 @jcf Prepare for 1.6.3 release
jcf authored
1 # Changelog
2
eec6914 @bblimke Version bump to 1.21.0
authored
3 ## 1.21.0
4
5 * Support for http.rb >= 0.8.0
6
7 Thanks to [Zachary Anker](https://github.com/zanker), [Aleksey V. Zapparov](https://github.com/ixti)
8
9 * Support for http.rb 0.7.0
10
11 Thanks to [Mattias Putman](https://github.com/challengee)
12
13 * Added support for RSpec3-like `and_return`, `and_raise`, `and_timeout` sytnax.
14
15 Thanks to [Franky Wahl](https://github.com/frankywahl)
16
17 * Restricted Curb support up to version 0.8.6. WebMock specs fail with Curb 0.8.7.
18
58b3c96 @bblimke Version 1.20.4
authored
19 ## 1.20.4
20
21 * Fixed support for `hash_including` matcher in RSpec 3
22
7e99832 @bblimke Version 1.20.3
authored
23 ## 1.20.3
24
25 * `with` method raises error if provided without options hash and without block
26
27 * `with` and `to_return` raise an error if invoked with invalid keys in options hash.
28
15c9801 @bblimke Version 1.20.2
authored
29 ## 1.20.2
30
31 * WebMock provides a helpful error message if an incompatible object is given as response body.
32
33 Thanks to [Mark Lorenz](https://github.com/dapplebeforedawn)
34
da534f7 @bblimke Version 1.20.1
authored
35 ## 1.20.1
36
37 * `assert_requested` and `assert_not_requested` accept `at_least_times` and `at_most_times` options
38
39 Thanks to [Dan Buettner](https://github.com/Capncavedan)
40
41 * Silenced `instance variable undefined` warnings in Curb adapted.
42
43 Thanks to [Sven Riedel](https://github.com/sriedel)
44
cfe9119 @bblimke Version 1.20.0
authored
45 ## 1.20.0
46
47 * Add support for on_missing callback of Curb::Easy
48
49 Thanks to [Tasos Stathopoulos](https://github.com/astathopoulos)
50
51 * Add at_least_times and at_most_times matchers
52
53 Thanks to [Dan Buettner](https://github.com/Capncavedan)
54
ad4b6e4 @bblimke Version 1.19.0
authored
55 ## 1.19.0
56
57 * Fixed issue with Excon adapter giving warning message when redirects middleware was enabled.
58
59 Thanks to [Theo Hultberg](https://github.com/iconara) for reporting that.
60
61 * Fixed issue with `undefined method 'valid_request_keys' for Excon::Utils:Module`
62
63 Thanks to [Pablo Jairala](https://github.com/davidjairala)
64
65 * Fixed query mapper to encode `'one' => ['1','2']` as `'one[]=1&one[]=2'`.
66
67 Thanks to [Insoo Buzz Jung](https://github.com/insoul)
68
69 * Improved cookies support for em-http-request
70
71 Thanks to [Carlos Alonso Pérez](https://github.com/calonso)
72
73 * Fix HTTP Gem adapter to ensure uri attribute is set on response object.
74
75 Thanks to [Aleksey V. Zapparov](https://github.com/ixti)
76
77 * Fixed HTTPClient adapter. The response header now receives `request_method`, `request_uri`, and `request_query` transferred from request header
78
79 Thanks to [trlorenz](https://github.com/trlorenz)
80
81 * Query mapper supports nested data structures i.e. `{"first" => [{"two" => [{"three" => "four"}, "five"]}]}`
82
83 Thanks to [Alexander Simonov](https://github.com/simonoff)
84
85 * Fixed compatibility with latest versions of Excon which don't define `VALID_REQUEST_KEYS` anymore.
86
87 Thanks to [Pablo Jairala](https://github.com/davidjairala)
88
89 * Request method is always a symbol is request signatures. This fixes the issue of WebMock not matching Typhoeus requests with request method defined as string.
90
91 Thanks to [Thorbjørn Hermanse](https://github.com/thhermansen)
92
93 * Stubbing instructions which are displayed when no matching stub is found, can be disabled with `Config.instance.show_stubbing_instructions = false`
94
95 Thanks to [Mark Lorenz](https://github.com/dapplebeforedawn)
96
97 * Notation used for mapping query strings to data structure can be configured i.e. `WebMock::Config.instance.query_values_notation = :subscript`. This allows setting `:flat_array` notation which supports duplicated parameter names in query string.
98
99 Thanks to [tjsousa](https://github.com/tjsousa)
100
0cd6a12 @bblimke Version 1.18.0
authored
101 ## 1.18.0
102
103 * Updated dependency on Addressable to versions >= 2.3.6
104
105 * Added support for matching uris using RFC 6570 (URI Templates)
106
107 uri_template = Addressable::Template.new "www.example.com/{id}/"
108 stub_request(:any, uri_template)
109
110 Thanks to [Max Lincoln](https://github.com/maxlinc)
111
112 * Fixed content length calculation for Rack responses with UTF8 body
113
114 Thanks to [Oleg Gritsenko](https://github.com/Claster)
115
116 * Add missing Curl::Easy aliases
117
118 Thanks to [Hwan-Joon Choi](https://github.com/hc5duke)
119
120 * HTTP Gem >= 0.6.0 compatibility
121
122 Thanks to [Aleksey V. Zapparov](https://github.com/ixti)
123
124 * Minitest 4 and 5 compatibility.
125
126 Thanks to [SHIBATA Hiroshi](https://github.com/hsbt)
127
adc813f @bblimke Version bump to 1.17.4
authored
128 ## 1.17.4
129
130 * Update matchers for RSpec 3's matcher protocol
131
132 Thanks to [Rob Olson](https://github.com/robolson)
133
90c3bb2 @bblimke Version 1.17.3
authored
134 ## 1.17.3
135
136 * Fixed issue with Rack response removing 'Content-Type' header
137
138 Thanks to [Bo Jeanes](https://github.com/bjeanes) and [Matthew Conway](https://github.com/mattonrails)
139
f6d7d3f @bblimke Version 1.17.2
authored
140 ## 1.17.2
141
142 * Support for chunked responses in Curb
143
144 Thanks to [Zachary Belzer](https://github.com/zbelzer)
145
146 * Fixed handling of request body passed as a hash to `Typhoeus.post`
147
148 Thanks to [Mason Chang](https://github.com/changmason) for reporting.
149
05ed118 @bblimke Version bump to 1.17.1
authored
150 ## 1.17.1
151
152 * Added missing license statements.
153
154 Thanks to [Praveen Arimbrathodiyil](https://github.com/pravi)
155
f075953 @bblimke Version bump to 1.17.0
authored
156 ## 1.17.0
157
158 * HTTP gem support!
159
160 Thanks to [Aleksey V. Zapparov](https://github.com/ixti)
161
162 * Limited Excon gem requirement to version < 0.30 until the compatibility with version > 0.30.0 is fixed.
163
164 Thanks to [Aleksey V. Zapparov](https://github.com/ixti)
165
166 * Fixed issue where empty query key caused a `TypeError`
167
168 Thanks to [Jon Rowe](https://github.com/JonRowe)
169
170 * Handling Typhoeus `on_headers` and `on_body` params.
171
172 Thanks to [Matt Burke](https://github.com/spraints)
173
c3b2d7a @bblimke Version 1.16.1
authored
174 ## 1.16.1
175
176 * Fixed "NameError: uninitialized constant WebMock::Response::Pathname" issue.
177
178 Thanks to [Alex Stupakow and Karen Wang](https://github.com/stupakov) for the fix.
179
1ba1dc4 @bblimke Bump to version 1.16.0
authored
180 ## 1.16.0
181
182 * Allow a Pathname to be passed as a Response body
183
184 stub_request(:get, /example.com/).to_return(
185 body: Rails.root.join('test/fixtures/foo.txt')
186 )
187
188 Thanks to [Ben Pickles](https://github.com/benpickles)
189
190 * `hash_including` matcher can be initialized with empty keys to match any values.
191
192 stub_request(:post, "www.example.com").with(:body => hash_including(:a, :b => {'c'}))
193 RestClient.post('www.example.com', '{"a":"1","b":"c"}', :content_type => 'application/json')
194
195 Thanks to [Stefano Uliari](https://github.com/steookk)
196
56cb45c @bblimke Version 1.15.2
authored
197 ## 1.15.2
b40c4bd @bblimke Version bump to 1.15.1
authored
198
199 * Fixed `hash_including` to accept a splat of solitary keys.
200
201 Thanks to [Tamir Duberstein](https://github.com/tamird) and [https://github.com/strongriley](https://github.com/strongriley)
202
8e07a60 @bblimke Version bump to 1.15.0
authored
203 ## 1.15.0
204
205 * Excon >= 0.27.5 compatibility.
206
207 Thanks to [Brian D. Burns](https://github.com/burns)
208
b29c409 @bblimke Version bump to 1.14.0
authored
209 ## 1.14.0
210
211 * Handling non UTF-8 characters in query params.
212
213 Thanks to [Florian Dütsch](https://github.com/der-flo) for reporting the issue.
214
215 * Added support for `request_block` param in Excon
216
217 Thanks to [Dmitry Gutov](https://github.com/dgutov) for reporting the issue.
218
219 * Fixed compatibility with latest Curb
220
221 Thanks to [Ian Lesperance](https://github.com/elliterate) and [Matthew Horan](https://github.com/mhoran)
222
223 * Triggering errbacks assynchronously in em-http-request adapter.
224
225 Thanks to [Ian Lesperance](https://github.com/elliterate) and [Matthew Horan](https://github.com/mhoran)
226
227 * Handling query params with a hashes nested inside arrays.
228
229 Thanks to [Ian Asaff](https://github.com/montague)
230
231 * Changed NetConnectNotAllowedError to inherit from Exception to allow it to bubble up into a test suite.
232
233 Thanks to [Daniel van Hoesel](https://github.com/s0meone)
234
235 * HTTPClient adapter is thread safe.
236
237 Thanks to [Tom Beauvais](https://github.com/tbeauvais)
238
d1e3ed8 @bblimke Version 1.13.0
authored
239 ## 1.13.0
240
241 * Net::HTTP::Persistent compatibility.
242 WebMock doesn't disconnect previously started connections upon a request anymore.
243
244
9f5dc19 @bblimke Version 1.12.3
authored
245 ## 1.12.3
246
247 * Fixed issue with handling Addressable::URI with query params passed to `Net::HTTP.get_response`
248
249 Thanks to [Leif Bladt](https://github.com/leifbladt)
250
251 * Fixed HTTPClient adapter to not raise an error if a request with multipart body is executed.
252
689eed3 @bblimke Version bump to 1.12.2
authored
253 ## 1.12.2
254
255 * Fixed issue with handling request.path when Addressable::URI is passed to #request instead of URI with Ruby 2.0.
256
257 Thanks to [Leif Bladt](https://github.com/leifbladt)
258
259 * Accept integers as query param values in request stubs
260
261 i.e. `stub_request(:get, /.*/).with(:query => {"a" => 1})`
262
263 Thanks to [Mitsutaka Mimura](https://github.com/takkanm)
0af60fd @bblimke Version update to 1.12.0
authored
264
7662f83 @bblimke Updated version to 1.12.1
authored
265 ## 1.12.1
266
267 * Fixed Minitest < 5.0 compatibility
268
689eed3 @bblimke Version bump to 1.12.2
authored
269 Thanks to [Alex Tomlins](https://github.com/alext) for reporting the issue.
270
0af60fd @bblimke Version update to 1.12.0
authored
271 ## 1.12.0
272
273 * Not using Gem spec anymore to check loaded Curb version.
274
275 * `WebMock.disable_net_connect!` now accepts array of regexps as allow param:
276
277 i.e. `WebMock.disable_net_connect!(:allow => [/google.com/, /yahoo.com/])`
278
279 Thanks to [Bastien Vaucher](https://github.com/bastien)
280
281 * Fixed `on_header` Curb callback behaviour in Curb adapter
282
283 Thanks to [Joel Chippindale](https://github.com/mocoso)
284
285 * Fixed aws-sdk compatibility with Ruby 2.0, by supporting `continue_timeout` accessor on Net::HTTP socket.
286
287 Thanks to [Lin Jen-Shin](https://github.com/godfat)
288
289 * Fixed WebMock::Server to not give "log writing failed. can't be called from trap context" warning with Ruby 2.0
290
291 Thanks to [Murahashi Sanemat Kenichi](https://github.com/sanemat)
292
293 * Added support for EM-HTTP-Request streaming data off disk feature.
294
295 Thanks to [Lin Jen-Shin](https://github.com/godfat)
296
297 * Added compatibility with Minitest 5
298
299 Thanks to [Tim Kurvers](https://github.com/timkurvers)
300
301 * Excon >= 0.22 compatibility.
302
303 * README has nice sytnax hightlighting and fixed code styling!
304
305 Thanks to [Ilya Vassilevsky](https://github.com/vassilevsky)
306
307 * Compatibility with Rails 4 `rack.session.options`
308
309 Thanks to [gotwalt](https://github.com/gotwalt)
310
2c70051 @bblimke Version 1.11.0
authored
311 ## 1.11.0
312
313 * Excon >= 0.17 support.
314
315 Thanks to [Nathan Sutton](https://github.com/nate) for reporting this issue and to [Wesley Beary](https://github.com/geemus) and [Myron Marston](https://github.com/myronmarston) for help.
316
5268fac @bblimke Version 1.10.2
authored
317 ## 1.10.2
318
319 * '+' in request path is treated as plus, but in query params always as a space.
320
8d50465 @bblimke Version 1.10.1
authored
321 ## 1.10.1
322
323 * '+' in request body is still treated as a space. This fixes a bug introduced in previous version.
324
325 Thanks to [Erik Michaels-Ober](https://github.com/sferik) for reporting this problem.
3b9d173 @bblimke Fixed issue with response body declared as Proc not being evaluated agai...
authored
326
327 * Fixed issue: response body declared as Proc was not evaluated again on subsequent requests.
328
329 Thanks to [Rick Fletcher](https://github.com/rfletcher) for reporting this issue.
330
8a64dc2 @bblimke Version 1.10.0
authored
331 ## 1.10.0
332
333 * '+' in query params is not treated as space anymore and is encoded as %2B
334
335 Thanks to [goblin](https://github.com/goblin) for reporting this issue.
6a7804b @bblimke assert_requested and assert_not_requested raise an error if a stub objec...
authored
336
f3abca6 @bblimke Added `remove_request_stub` method to API.
authored
337 * added `remove_request_stub` method to the api to allow removing unused stubs i.e.
338
339 stub_get = stub_request(:get, "www.example.com")
340 remove_request_stub(stub_get)
341
6a7804b @bblimke assert_requested and assert_not_requested raise an error if a stub objec...
authored
342 * `assert_requested` and `assert_not_requested` raise an error if a stub object is provided together with a block.
343
70cd96f @bblimke Version 1.9.3
authored
344 ## 1.9.3
345
346 * Fixed issue with unavailable constant Mutex in Ruby < 1.9
347
348 Thanks to [Lucas Dohmen](https://github.com/moonglum) for reporting this issue.
349
0b80b9a @bblimke Version 1.9.2
authored
350 ## 1.9.2
351
352 * Added support for Excon's :response_block parameter
353
354 Thanks to [Myron Marston](https://github.com/myronmarston) for reporting this issue.
355
6c05e45 @bblimke Version 1.9.1
authored
356 ## 1.9.1
9460638 @bblimke Updated changelog and credits
authored
357
bb447bd @bblimke Updated changelog
authored
358 * Fix 'rack.errors' not being set for Rack apps
359
360 Thanks to [Alex Grant](https://github.com/grantovich)
361
a140843 @bblimke Updated changelog
authored
362 * Added support for minitest assertions count
363
364 Thanks to [Mokevnin Kirill](https://github.com/mokevnin)
365
9460638 @bblimke Updated changelog and credits
authored
366 * Fixed issues with registering http requests in multi-threaded environments
367
65f9fa7 @bblimke Wrong name in credits.
authored
368 Thanks to [Tom Beauvais](https://github.com/tbeauvais)
9460638 @bblimke Updated changelog and credits
authored
369
370 * Bumped Crack version to >=0.3.2
371
372 Thanks to [Jake Benilov](https://github.com/benilovj)
373
6c05e45 @bblimke Version 1.9.1
authored
374 * Fixed issues in Typhoeus 0.6. Defaulted method to GET when no method specified.
9460638 @bblimke Updated changelog and credits
authored
375
376 Thanks to [Hans Hasselberg](https://github.com/i0rek)
377
378 * Add license information to the gemspec
379
380 Thanks to [Jordi Massaguer Pla](https://github.com/jordimassaguerpla) and [Murahashi Sanemat Kenichi](https://github.com/sanemat)
381
382 * Added support for :expects option in Excon adapter
383
384 Thanks to [Evgeniy Dolzhenko](https://github.com/dolzenko)
385
386 * Fixed Faye compatibility by treating StringIO in Net::HTTP adapter properly
387
388 Thanks to [Pavel Forkert](https://github.com/fxposter)
389
390 * Updated VCR link
391
392 Thanks to [Rex Feng](https://github.com/xta)
393
e2c2e27 @bblimke Upgrade to version 1.9.0
authored
394 ## 1.9.0
395
396 * Added support for Typhoeus >= 0.5.0 and removed support for Typhoeus < 0.5.0.
397
398 Thanks to [Hans Hasselberg](https://github.com/i0rek)
399
5662ca4 @bblimke Version 1.8.11
authored
400 ## 1.8.11
401
402 * Fix excon adapter to handle `:body => some_file_object`
403
404 Thanks to [Myron Marston](https://github.com/myronmarston)
405
623cf85 @bblimke Version 1.8.10
authored
406 ## 1.8.10
407
408 * em-http-request fix. After request callbacks are correctly invoked for 3xx responses,
409 when :redirects option is set.
410
411 Thanks to [Myron Marston](https://github.com/myronmarston) for reporting that issue.
412
413 * Fixed compatibility with Net::HTTP::DigestAuth
414
415 Thanks to [Jonathan Hyman](https://github.com/jonhyman) for reporting that issue.
416
417 * Fixed problem in em-http-request 0.x appending the query to the client URI twice.
418
419 Thanks to [Paweł Pierzchała](https://github.com/wrozka)
420
43098e1 @bblimke Version 1.8.9
authored
421 ## 1.8.9
422
423 * Fixed problem with caching nil responses when the same HTTPClient instance is used.
424
425 Thanks to [Myron Marston](https://github.com/myronmarston)
426
427 * Added support for Addressable >= 2.3.0. Addressable 2.3.0 removed support for multiple query value notations and broke backwards compatibility.
428
429 https://github.com/sporkmonger/addressable/commit/f51e290b5f68a98293327a7da84eb9e2d5f21c62
430 https://github.com/sporkmonger/addressable/issues/77
431
432
5fa0c99 @bblimke Bump version to 1.8.8
authored
433 ## 1.8.8
434
435 * Fixed Net::HTTP adapter so that it returns `nil` for an empty body response.
436
437 Thanks to [Myron Marston](https://github.com/myronmarston)
438
439 * Gemspec defines compatibility with Addressable ~> 2.2.8, not >= 2.3.0
440
441 * Specs compatibility with Typhoeus 0.4.0
442
443 Thanks to [Hans Hasselberg](https://github.com/i0rek)
444
445 * Handling content types that specify a charset
446
447 Thanks to [Kevin Glowacz](https://github.com/kjg)
448
449 * Fixed em-http-request adapter to correctly fetch authorization header from a request
450
451 Thanks to [Julien Boyer](https://github.com/chatgris)
452
453 * Fixing travis-ci image to report master's status
454
455 Thanks to [Ryan Schlesinger](https://github.com/ryansch)
456
457 * Fixed problem with em-http-request callback triggering if there were other EM::Deferred callbacks registered
458
459 Thanks to [Jon Leighton](https://github.com/jonleighton)
460
461 * Fixed problem with em-http-request appending the query to the URI a second time, and
462 the parameters are repeated.
463
464 Thanks to [Jon Leighton](https://github.com/jonleighton)
465
d083e68 @bblimke Bump to version 1.8.7
authored
466 ## 1.8.7
467
468 * Compatibility with RSpec >= 2.10
469
470 Thanks to [erwanlr](https://github.com/erwanlr) for reporting this issue.
471
472 * Add missing required rack environment variable SCRIPT_NAME
473
474 Thanks to [Eric Oestrich](https://github.com/oestrich)
475
476 * Fixed warnings due to @query_params not being initialized
477
478 Thanks to [Ben Bleything](https://github.com/bleything)
479
4711a0b @bblimke Bump version to 1.8.6
authored
480 ## 1.8.6
481
482 * Pass through SERVER_PORT when stubbing to rack
483
484 Thanks to [Eric Oestrich](https://github.com/oestrich)
485
486 * Fixed problem with missing parenthesis in `WebMock#net_connect_allowed?` conditions.
487
488 Thanks to [aindustries](https://github.com/aindustries)
489
576c596 @bblimke Bump to version 1.8.5
authored
490 ## 1.8.5
491
492 * WebMock::RackResponse supports basic auth
493
494 Thanks to [jugyo](https://github.com/jugyo)
495
4a0382d @bblimke Bump to version 1.8.4
authored
496 ## 1.8.4
497
498 * Warning message is printed when an unsupported version of a http library is loaded.
499
500 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.
501
3c9b625 @bblimke Bump version to 1.8.3
authored
502 ## 1.8.3
503
504 * Fixed compatibility with latest em-http-request
505
506 Thanks to [Paul Cortens](https://github.com/thoughtless)
507
3876948 @bblimke Update to version 1.8.2
authored
508 ## 1.8.2
509
510 * Prevent Webmock `hash_including` from overriding RSpec version 1 `hash_including` method.
511
512 Thanks to [Joe Karayusuf](https://github.com/karayusuf)
513
514 * Ensured WebMock handles RSpec 1 `hash_including` matcher for matching query params and body.
515
8825a2a @bblimke Update to version 1.8.1
authored
516 ## 1.8.1
517
518 * Ensured WebMock doesn't interfere with `em-synchrony`, when `em-synchrony/em-http` is not included.
519
520 Thanks to [Nick Recobra](https://github.com/oruen)
521
522 * Improved README
523
524 Thanks to [Jordan Elver](https://github.com/jordelver)
525
526
08783a7 @bblimke Update to version 1.8.0
authored
527 ## 1.8.0
68ba906 @bblimke Updated Changelog and Readme with the latest changes in master
authored
528
529 * Matching request body against partial hash.
530
531 stub_http_request(:post, "www.example.com").
532 with(:body => hash_including({:data => {:a => '1', :b => 'five'}}))
533
534 RestClient.post('www.example.com', "data[a]=1&data[b]=five&x=1",
535 :content_type => 'application/x-www-form-urlencoded') # ===> Success
536
537 request(:post, "www.example.com").
538 with(:body => hash_including({:data => {:a => '1', :b => 'five'}}),
539 :headers => 'Content-Type' => 'application/json').should have_been_made # ===> Success
540
541 Thanks to [Marnen Laibow-Koser](https://github.com/marnen) for help with this solution
542
543 * Matching request query params against partial hash.
544
545 stub_http_request(:get, "www.example.com").with(:query => hash_including({"a" => ["b", "c"]}))
546
547 RestClient.get("http://www.example.com/?a[]=b&a[]=c&x=1") # ===> Success
548
549 request(:get, "www.example.com").
550 with(:query => hash_including({"a" => ["b", "c"]})).should have_been_made # ===> Success
551
552 * Added support for Excon.
553
554 Thanks to [Dimitrij Denissenko](https://github.com/dim)
555
556 * Added support for setting expectations on the request stub with `assert_requested`
557
558 stub_get = stub_request(:get, "www.example.com")
559 stub_post = stub_request(:post, "www.example.com")
560
561 Net::HTTP.get('www.example.com', '/')
562
563 assert_requested(stub_get)
564 assert_not_requested(stub_post)
565
566 Thanks to [Nicolas Fouché](https://github.com/nfo)
567
568 * `WebMock.disable_net_connect!` accepts `RegExp` as `:allow` parameter
569
570 Thanks to [Frank Schumacher](https://github.com/thenoseman)
571
44de728 @bblimke Updated changelog with latest changes in master
authored
572 * Ensure multiple values for the same header can be recorded and played back
573
574 Thanks to [Myron Marston](https://github.com/myronmarston)
575
e56d313 @bblimke Updated dependency on Addressable to version >= 2.2.7 to handle nested h...
authored
576 * 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`
577
68ba906 @bblimke Updated Changelog and Readme with the latest changes in master
authored
578 * Fixed compatibility with Curb >= 0.7.16 This breaks compatibility with Curb < 0.7.16
579
580 * Fix #to_rack to handle non-array response bodies.
581
582 Thanks to [Tammer Saleh](https://github.com/tsaleh)
583
584 * Added `read_timeout` accessor to StubSocket which fixes compatibility with aws-sdk
585
586 Thanks to [Lin Jen-Shin](https://github.com/godfat)
587
588 * Fix warning "instance variable @query_params not initialized"
589
590 Thanks to [Joe Van Dyk](https://github.com/joevandyk)
591
592 * Using bytesize of message instead of its length for content-length header in em-http-request adapter.
593 This fixes a problem with messages getting truncated in Ruby >= 1.9
594
595 Thanks to [Mark Abramov](https://github.com/markiz)
596
5cd5aaf @bblimke Fixed problem with body params being matched even if params were differe...
authored
597 * Fixed problem with body params being matched even if params were different.
598
599 Thanks to [Evgeniy Dolzhenko](https://github.com/dolzenko) for reporting this issue.
600
a50c583 @bblimke Upgraded version to 1.7.10
authored
601 ## 1.7.10
602
603 * Yanked 1.7.9 and rebuilt gem on 1.8.7 to deal with syck/psych incompatibilties in gemspec.
604
4ff8cf1 @bblimke Version 1.7.9 changelog
authored
605 ## 1.7.9
606
607 * Fixed support for native Typhoeus timeouts.
608
609 Thanks to [Albert Llop](https://github.com/mrsimo)
610
611 * 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.
612
613 Thanks to [Christopher Pickslay](https://github.com/chrispix) from [Two Bit Labs](https://github.com/twobitlabs)
614
615
18b3e7f @myronmarston 1.7.8 release.
myronmarston authored
616 ## 1.7.8
617
618 * Fix each adapter so that it calls a `stub.with` block only once per
619 request. Previously, the block would be called two or three times per
620 request [Myron Marston](https://github.com/myronmarston).
621
4ff9f1a @bblimke Version 1.7.7 - RuPy 2011 Release
authored
622 ## 1.7.7 - RuPy 2011 release
623
624 * 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)
625
626 Thanks to [Chris McGrath](https://github.com/chrismcg)
627
628 * Cleaned up ruby warnings when running WebMock code with `-w`.
629
630 Thanks to [Stephen Celis](https://github.com/stephencelis)
631
632 * Curb adapter now correctly calls on_failure for 4xx response codes.
633
634 Thanks to [Eugene Pimenov](https://github.com/libc)
635
748ff35 @bblimke Version 1.7.6
authored
636 ## 1.7.6
637
638 * Support for the HTTPClient's request_filter feature
639
640 Thanks to [Roman Shterenzon](https://github.com/romanbsd)
641
4d848df @bblimke Version 1.7.5
authored
642 ## 1.7.5
643
644 * 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.
645
646 Thanks to [Andreas Garnæs](https://github.com/andreas)
647
b6ca337 @bblimke Version 1.7.4
authored
648 ## 1.7.4
649
650 * Added support for matching EM-HTTP-Request requests with body declared as a Hash
651
652 Thanks to [David Yeu](https://github.com/daveyeu)
653
6b422e4 @bblimke Version 1.7.3
authored
654 ## 1.7.3
655
656 * 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.
657
658 Thanks to [Klaus Hartl](https://github.com/carhartl) for reporting this issue.
659
045f28a @bblimke Version 1.7.2
authored
660 ## 1.7.2
661
662 * Redefined `const_get` and `constants` methods on the replaced `Net::HTTP` to return same values as original `Net::HTTP`
663
81a3563 @bblimke Version 1.7.1
authored
664 ## 1.7.1
665
666 * 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`.
667
668 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.
669
8edff05 @bblimke Version 1.7.0
authored
670 ## 1.7.0
3cb39d7 @bblimke Version 1.7.0.pre Changelog
authored
671
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored
672 * 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
673
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored
674 * 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
675
676 * Added support for setting expectations to on a stub itself i.e.
677
678 stub = stub_request(:get, "www.example.com")
679 # ... make requests ...
680 stub.should have_been_requested
681
682 Thanks to [Aidan Feldman](https://github.com/afeld)
683
684 * Minitest support! Thanks to [Peter Higgins](https://github.com/phiggins)
685
21aba84 @bblimke Updated README and Changelog with inf about Typhoeus support
authored
686 * Added support for Typhoeus::Hydra
687
3cb39d7 @bblimke Version 1.7.0.pre Changelog
authored
688 * 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)
689
690 * Rack support. Requests can be stubbed to respond with a Rack app i.e.
691
692 class MyRackApp
693 def self.call(env)
694 [200, {}, ["Hello"]]
695 end
696 end
697
698 stub_request(:get, "www.example.com").to_rack(MyRackApp)
699
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored
700 RestClient.get("www.example.com") # ===> "Hello"
701
702
fa61e9a @bblimke Fixed formatting in changelog
authored
703 Thanks to [Jay Adkisson](https://github.com/jayferd)
3cb39d7 @bblimke Version 1.7.0.pre Changelog
authored
704
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored
705 * Added support for selective disabling and enabling of http lib adapters
17547a5 @bblimke Updated Changelog and README with info about enabling and disabling WebM...
authored
706
707 WebMock.disable! #disable WebMock (all adapters)
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored
708 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 WebM...
authored
709 WebMock.enable! #enable WebMock (all adapters)
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored
710 WebMock.enable!(:except => [:patron]) #enable WebMock for all libs except Patron
711
712 * The error message on an unstubbed request shows a code snippet with body as a hash when it was in url encoded form.
713
714 > RestClient.post('www.example.com', "data[a]=1&data[b]=2", :content_type => 'application/x-www-form-urlencoded')
715
716 WebMock::NetConnectNotAllowedError: Real HTTP connections are disabled....
717
718 You can stub this request with the following snippet:
719
720 stub_request(:post, "http://www.example.com/").
721 with(:body => {"data"=>{"a"=>"1", "b"=>"2"}},
722 :headers => { 'Content-Type'=>'application/x-www-form-urlencoded' }).
723 to_return(:status => 200, :body => "", :headers => {})
17547a5 @bblimke Updated Changelog and README with info about enabling and disabling WebM...
authored
724
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored
725 Thanks to [Alex Rothenberg](https://github.com/alexrothenberg)
3cb39d7 @bblimke Version 1.7.0.pre Changelog
authored
726
fa61e9a @bblimke Fixed formatting in changelog
authored
727 * The error message on an unstubbed request shows currently registered request stubs.
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored
728
729 > stub_request(:get, "www.example.net")
730 > stub_request(:get, "www.example.org")
731 > RestClient.get("www.example.com")
732 WebMock::NetConnectNotAllowedError: Real HTTP connections are disabled....
733
734 You can stub this request with the following snippet:
735
736 stub_request(:get, "http://www.example.com/").
737 to_return(:status => 200, :body => "", :headers => {})
738
739 registered request stubs:
740
741 stub_request(:get, "http://www.example.net/")
742 stub_request(:get, "http://www.example.org/")
743
744 Thanks to [Lin Jen-Shin](https://github.com/godfat) for suggesting this feature.
3cb39d7 @bblimke Version 1.7.0.pre Changelog
authored
745
746 * 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.
747
607e1e8 @bblimke Added more examples to 1.7.0.pre Changelog
authored
748 * 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
749
750 * External requests can be disabled while allowing selected ports on selected hosts
751
752 WebMock.disable_net_connect!(:allow => "www.example.com:8080")
753 RestClient.get("www.example.com:80") # ===> Failure
754 RestClient.get("www.example.com:8080") # ===> Allowed.
755
fa61e9a @bblimke Fixed formatting in changelog
authored
756 Thanks to [Zach Dennis](https://github.com/zdennis)
3cb39d7 @bblimke Version 1.7.0.pre Changelog
authored
757
758 * Fixed syntax error in README examples, showing the ways of setting request expectations. Thanks to [Nikita Fedyashev](https://github.com/nfedyashev)
759
760
ae0286a @bblimke @jcf actually did a great job maintaining WebMock!
authored
761 **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
762
a62080b @jcf Update changelog and version number
jcf authored
763 ## 1.6.4
764
765 This is a quick slip release to regenerate the gemspec. Apparently
766 jeweler inserts dependencies twice if you use the `gemspec` method in
767 your Gemfile and declare gem dependencies in your gemspec.
768
769 https://github.com/technicalpickles/jeweler/issues/154
770
771 josevalim:
772
773 > This just bit me. I just released a gem with the wrong dependencies
774 > because I have updated jeweler. This should have been opt-in,
775 > otherwise a bunch of people using jeweler are going to release gems
776 > with the wrong dependencies because you are automatically importing
777 > from the Gemfile.
778
9887d17 @jcf Prepare for 1.6.3 release
jcf authored
779 ## 1.6.3
780
781 * Update the dependency on addressable to get around an issue in v2.2.5.
782 Thanks to [Peter Higgins](https://github.com/phiggins).
783
784 * Add support for matching parameter values using a regular expression
785 as well as a string. Thanks to [Oleg M Prozorov](https://github.com/oleg).
786
787 * Fix integration with httpclient as the internal API has changed.
788 Thanks to [Frank Prößdorf](https://github.com/endor).
789
790 * Ensure Curl::Easy#content_type is always set. Thanks to [Peter
791 Higgins](https://github.com/phiggins).
792
793 * Fix bug with em-http-request adapter stubbing responses that have a
794 chunked transfer encoding. Thanks to [Myron
795 Marston](https://github.com/myronmarston).
796
797 * Fix a load of spec failures with Patron, httpclient, and specs that
798 depended on the behaviour of example.com. Thanks to [Alex
799 Grigorovich](https://github.com/grig).
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
800
e6af079 @bblimke Updated 1.6.2 changelog and credits
authored
801 ## 1.6.2
802
803 * Em-http-request adapter sets `last_effective_url` property. Thanks to [Sam Stokes](https://github.com/samstokes).
804
805 * 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)
806
f7b9c77 @bblimke Updated version 1.6.1 changelog
authored
807 ## 1.6.1
808
809 * Fixed issue with `webmock/rspec` which didn't load correctly if `rspec/core` was already required but `rspec/expectations` not.
810
7110c60 @bblimke Updated version 1.6.0 changelog
authored
811 ## 1.6.0
473b709 @bblimke Added WebMock.reset! method. WebMock.reset_webmock is now deprecated
authored
812
7110c60 @bblimke Updated version 1.6.0 changelog
authored
813 * 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
814
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
815 require 'webmock/test_unit'
816 require 'webmock/rspec'
817 require 'webmock/cucumber'
acaab83 @bblimke Updated changelog with the latest changes in master.
authored
818
65dd12b @bblimke Updated changelog with latest changes in master branch
authored
819 * 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.
820
e6925a2 @bblimke Updated changelog with the latest changes in master
authored
821 * The expectation failure message now contains a list of made requests. Thanks to Martyn Loughran for suggesting this feature.
822
86f36d2 @bblimke em-http-request adapter is activated by replacing EventMachine::HttpRequ...
authored
823 * Added `WebMock.print_executed_requests` method which can be useful to find out what requests were made until a given point.
824
7110c60 @bblimke Updated version 1.6.0 changelog
authored
825 * 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::HttpRequ...
authored
826
7110c60 @bblimke Updated version 1.6.0 changelog
authored
827 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::HttpRequ...
authored
828
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
829 EventMachine::WebMockHttpRequest.activate!
830 EventMachine::WebMockHttpRequest.deactivate!
86f36d2 @bblimke em-http-request adapter is activated by replacing EventMachine::HttpRequ...
authored
831
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
832 Thanks to Martyn Loughran for suggesting this feature.
833
834 * `WebMock.reset_webmock` is deprecated in favour of new `WebMock.reset!`
7110c60 @bblimke Updated version 1.6.0 changelog
authored
835
836 * 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 find...
authored
837
7110c60 @bblimke Updated version 1.6.0 changelog
authored
838 * 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 hash,...
authored
839
7110c60 @bblimke Updated version 1.6.0 changelog
authored
840 * 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 is ...
authored
841
7110c60 @bblimke Updated version 1.6.0 changelog
authored
842 * 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
843
7bca10a @bblimke Don't use JSON to normalize hash body in request pattern. Removed depend...
authored
844 * Removed dependency on json gem
845
079a719 @bblimke Updated changelog with version 1.5.0 changes
authored
846 ## 1.5.0
f0408f8 @bblimke Added support for dynamically evaluated raw responses recorded with `cur...
authored
847
848 * Support for dynamically evaluated raw responses recorded with `curl -is` <br/>
849 i.e.
850
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
851 `curl -is www.example.com > /tmp/www.example.com.txt`
852 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 `cur...
authored
853
079a719 @bblimke Updated changelog with version 1.5.0 changes
authored
854 * `: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
855
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
856 WebMock.allow_net_connect!(:net_http_connect_on_start => true)
ffbcdb3 @bblimke Updated changelog with the latest changes in master branch
authored
857
079a719 @bblimke Updated changelog with version 1.5.0 changes
authored
858 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
859
079a719 @bblimke Updated changelog with version 1.5.0 changes
authored
860 Thanks to Alastair Brunton for reporting the issue and for fix suggestions.
4e313c2 @bblimke Updated CHANGELOG and README with information about net_http_connect_on_...
authored
861
079a719 @bblimke Updated changelog with version 1.5.0 changes
authored
862 * Fixed an issue where Patron spec tried to remove system temporary directory.
863 Thanks to Hans de Graaff
4e313c2 @bblimke Updated CHANGELOG and README with information about net_http_connect_on_...
authored
864
079a719 @bblimke Updated changelog with version 1.5.0 changes
authored
865 * WebMock specs now use RSpec 2
4e313c2 @bblimke Updated CHANGELOG and README with information about net_http_connect_on_...
authored
866
079a719 @bblimke Updated changelog with version 1.5.0 changes
authored
867 * `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_on_...
authored
868
a53f1a0 @bblimke Updated CHANGELOG with version 1.4.0 changes
authored
869 ## 1.4.0
6eb8bb5 @bblimke WebMock tries to use already loaded version of RSpec (1.x or 2.x) (previ...
authored
870
aaf774b @bblimke Added info to changelog and readme about Curb support, implemented by Pe...
authored
871 * Curb support!!! Thanks to the awesome work of Pete Higgins!
872
2328c00 @bblimke Updated Changelog with the latest changes in master
authored
873 * `include WebMock` is now deprecated to avoid method and constant name conflicts. Please `include WebMock::API` instead.
874
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
875 * `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
876 WebMock.request is still available.
877
a53f1a0 @bblimke Updated CHANGELOG with version 1.4.0 changes
authored
878 * 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
879
a53f1a0 @bblimke Updated CHANGELOG with version 1.4.0 changes
authored
880 * 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
881
c646491 @bblimke :allow_localhost => true' now permits 0.0.0.0 in addition to 127.0.0.1 a...
authored
882 * :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.
883
a53f1a0 @bblimke Updated CHANGELOG with version 1.4.0 changes
authored
884 * 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) (previ...
authored
885
a53f1a0 @bblimke Updated CHANGELOG with version 1.4.0 changes
authored
886 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) (previ...
authored
887
888 Thanks to Hans de Graaff for reporting this.
889
9acf181 @bblimke Updated changelog for version 1.4.0
authored
890 * Changed runtime dependency on Addressable version 2.2.2 which fixes handling of percent-escaped '+'
891
67a0819 @bblimke Version 1.3.5 changelog + updated docs
authored
892 ## 1.3.5
893
894 * External requests can be disabled while allowing selected hosts. Thanks to Charles Li and Ryan Bigg
895
896 This feature was available before only for localhost with `:allow_localhost => true`
897
8118632 @bblimke Fixed indentation in changelog
authored
898 WebMock.disable_net_connect!(:allow => "www.example.org")
67a0819 @bblimke Version 1.3.5 changelog + updated docs
authored
899
8118632 @bblimke Fixed indentation in changelog
authored
900 Net::HTTP.get('www.something.com', '/') # ===> Failure
67a0819 @bblimke Version 1.3.5 changelog + updated docs
authored
901
8118632 @bblimke Fixed indentation in changelog
authored
902 Net::HTTP.get('www.example.org', '/') # ===> Allowed.
67a0819 @bblimke Version 1.3.5 changelog + updated docs
authored
903
904 * Fixed Net::HTTP adapter so that it preserves the original behavior of Net::HTTP.
905
906 When making a request with a block that calls #read_body on the request,
907 Net::HTTP causes the body to be set to a Net::ReadAdapter, but WebMock was causing the body to be set to a string.
908
688e687 Version 1.3.4 changelog
Bartosz Blimke and Oliver Nightingale authored
909 ## 1.3.4
910
911 * Fixed Net::HTTP adapter to handle cases where a block with `read_body` call is passed to `request`.
912 This fixes compatibility with `open-uri`. Thanks to Mark Evans for reporting the issue.
913
db5fcf4 Version 1.3.3 changelog.
Bartosz Blimke and Ben Pickles authored
914 ## 1.3.3
915
916 * Fixed handling of multiple values for the same response header for Net::HTTP. Thanks to Myron Marston for reporting the issue.
917
27c0f65 Version 1.3.2 changelog
Bartosz Blimke and Ben Pickles authored
918 ## 1.3.2
919
920 * Fixed compatibility with EM-HTTP-Request >= 0.2.9. Thanks to Myron Marston for reporting the issue.
921
15f888e @bblimke The less hacky way to get the stream behaviour working for em-http-reque...
authored
922 ## 1.3.1
923
60fa244 @bblimke Updated changelog
authored
924 * The less hacky way to get the stream behaviour working for em-http-request. Thanks to Martyn Loughran
925
926 * 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-reque...
authored
927
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored
928 ## 1.3.0
929
930 * Added support for [em-http-request](http://github.com/igrigorik/em-http-request)
931
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
932 * Matching query params using a hash
933
8118632 @bblimke Fixed indentation in changelog
authored
934 stub_http_request(:get, "www.example.com").with(:query => {"a" => ["b", "c"]})
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
935
8118632 @bblimke Fixed indentation in changelog
authored
936 RestClient.get("http://www.example.com/?a[]=b&a[]=c") # ===> Success
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored
937
8118632 @bblimke Fixed indentation in changelog
authored
938 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
939
940 * 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
941
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored
942 (Thanks to Steve Tooke for the idea and a solution for url-encoded bodies)
943
8118632 @bblimke Fixed indentation in changelog
authored
944 stub_http_request(:post, "www.example.com").
945 with(:body => {:data => {:a => '1', :b => 'five'}})
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
946
8118632 @bblimke Fixed indentation in changelog
authored
947 RestClient.post('www.example.com', "data[a]=1&data[b]=five",
948 :content_type => 'application/x-www-form-urlencoded') # ===> Success
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
949
8118632 @bblimke Fixed indentation in changelog
authored
950 RestClient.post('www.example.com', '{"data":{"a":"1","b":"five"}}',
951 :content_type => 'application/json') # ===> Success
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
952
8118632 @bblimke Fixed indentation in changelog
authored
953 RestClient.post('www.example.com', '<data a="1" b="five" />',
954 :content_type => 'application/xml' ) # ===> Success
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
955
8118632 @bblimke Fixed indentation in changelog
authored
956 request(:post, "www.example.com").
b2f1a0c @bblimke Added part of code in changelog, which was removed by mistake
authored
957 with(:body => {:data => {:a => '1', :b => 'five'}},
958 :headers => 'Content-Type' => 'application/json').should have_been_made # ===> Success
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored
959
960 * Request callbacks (Thanks to Myron Marston for all suggestions)
961
962 WebMock can now invoke callbacks for stubbed or real requests:
963
8118632 @bblimke Fixed indentation in changelog
authored
964 WebMock.after_request do |request_signature, response|
965 puts "Request #{request_signature} was made and #{response} was returned"
966 end
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
967
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored
968 invoke callbacks for real requests only and except requests made with Patron client
969
8118632 @bblimke Fixed indentation in changelog
authored
970 WebMock.after_request(:except => [:patron], :real_requests_only => true) do |request_signature, response|
971 puts "Request #{request_signature} was made and #{response} was returned"
972 end
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored
973
974 * `to_raise()` now accepts an exception instance or a string as argument in addition to an exception class
975
8118632 @bblimke Fixed indentation in changelog
authored
976 stub_request(:any, 'www.example.net').to_raise(StandardError.new("some error"))
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
977
8118632 @bblimke Fixed indentation in changelog
authored
978 stub_request(:any, 'www.example.net').to_raise("some error")
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored
979
26cb92f Small improvements to CHANGELOG for version 1.3.0
Bartosz Blimke authored
980 * Matching requests based on a URI is 30% faster
354af66 Updated CHANGELOG width version 1.3.0 changes
Bartosz Blimke authored
981
982 * Fixed constant namespace issues in HTTPClient adapter. Thanks to Nathaniel Bibler for submitting a patch.
983
fd2472a Version 1.2.2 changelog
Bartosz Blimke authored
984 ## 1.2.2
985
986 * 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
987
5803f31 Version bump to 1.2.1
Bartosz Blimke authored
988 ## 1.2.1
989
990 * Changed license from GPL to MIT
991
992 * Fixed gemspec file. Thanks to Razic
993
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
994 ## 1.2.0
31b3ffb Added version 1.2.0 changelog
Bartosz Blimke authored
995
996 * RSpec 2 compatibility. Thanks to Sam Phillips!
997
998 * :allow_localhost => true' now permits 127.0.0.1 as well as 'localhost'. Thanks to Mack Earnhardt
999
1000 * Request URI matching in now 2x faster!
1001
1002
4a04017 Added 1.1.0 changelog
Bartosz Blimke authored
1003 ## 1.1.0
1004
ee7b3b4 Fixed spelling
Bartosz Blimke authored
1005 * [VCR](http://github.com/myronmarston/vcr/) compatibility. Many thanks to Myron Marston for all suggestions.
4a04017 Added 1.1.0 changelog
Bartosz Blimke authored
1006
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1007 * Support for stubbing requests and returning responses with multiple headers with the same name. i.e multiple Accept headers.
1008
1009 stub_http_request(:get, 'www.example.com').
1010 with(:headers => {'Accept' => ['image/png', 'image/jpeg']}).
1011 to_return(:body => 'abc')
1012 RestClient.get('www.example.com',
1013 {"Accept" => ['image/png', 'image/jpeg']}) # ===> "abc\n"
4a04017 Added 1.1.0 changelog
Bartosz Blimke authored
1014
1015 * When real net connections are disabled and unstubbed request is made, WebMock throws WebMock::NetConnectNotAllowedError instead of assertion error or StandardError.
1016
1017 * Added WebMock.version()
1018
1019
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
1020 ## 1.0.0
1021
1022 * Added support for [Patron](http://toland.github.com/patron/)
1023
1024 * Responses dynamically evaluated from block (idea and implementation by Tom Ward)
1025
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1026 stub_request(:any, 'www.example.net').
1027 to_return { |request| {:body => request.body} }
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
1028
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1029 RestClient.post('www.example.net', 'abc') # ===> "abc\n"
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
1030
1031 * Responses dynamically evaluated from lambda (idea and implementation by Tom Ward)
1032
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1033 stub_request(:any, 'www.example.net').
1034 to_return(lambda { |request| {:body => request.body} })
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
1035
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1036 RestClient.post('www.example.net', 'abc') # ===> "abc\n"
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
1037
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1038 * Response with custom status message
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
1039
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1040 stub_request(:any, "www.example.com").to_return(:status => [500, "Internal Server Error"])
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
1041
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1042 req = Net::HTTP::Get.new("/")
1043 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
1044
c3c92ba Added information about allowing localhost to version 1.0.0 changelog
Bartosz Blimke authored
1045 * 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
1046
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1047 stub_request(:any, 'www.example.net').to_timeout
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
1048
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1049 RestClient.post('www.example.net', 'abc') # ===> RestClient::RequestTimeout
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
1050
c3c92ba Added information about allowing localhost to version 1.0.0 changelog
Bartosz Blimke authored
1051 * External requests can be disabled while allowing localhost (idea and implementation by Mack Earnhardt)
1052
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1053 WebMock.disable_net_connect!(:allow_localhost => true)
c3c92ba Added information about allowing localhost to version 1.0.0 changelog
Bartosz Blimke authored
1054
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1055 Net::HTTP.get('www.something.com', '/') # ===> Failure
c3c92ba Added information about allowing localhost to version 1.0.0 changelog
Bartosz Blimke authored
1056
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1057 Net::HTTP.get('localhost:9887', '/') # ===> Allowed. Perhaps to Selenium?
c3c92ba Added information about allowing localhost to version 1.0.0 changelog
Bartosz Blimke authored
1058
1059
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
1060 ### Bug fixes
1061
1062 * 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
1063 * 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
1064
b6c3b3b Version bump to 0.9.1
Bartosz Blimke authored
1065 ## 0.9.1
1066
1067 * Fixed issue where response status code was not read from raw (curl -is) responses
1068
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
1069 ## 0.9.0
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1070
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
1071 * Matching requests against provided block (by Sergio Gil)
1072
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1073 stub_request(:post, "www.example.com").with { |request| request.body == "abc" }.to_return(:body => "def")
1074 RestClient.post('www.example.com', 'abc') # ===> "def\n"
1075 request(:post, "www.example.com").with { |req| req.body == "abc" }.should have_been_made
1076 #or
1077 assert_requested(:post, "www.example.com") { |req| req.body == "abc" }
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
1078
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
1079 * Matching request body against regular expressions (suggested by Ben Pickles)
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
1080
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1081 stub_request(:post, "www.example.com").with(:body => /^.*world$/).to_return(:body => "abc")
1082 RestClient.post('www.example.com', 'hello world') # ===> "abc\n"
1083
66519c1 Updated changelog with 1.0.0 changes
Bartosz Blimke authored
1084 * Matching request headers against regular expressions (suggested by Ben Pickles)
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
1085
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1086 stub_request(:post, "www.example.com").with(:headers => {"Content-Type" => /image\/.+/}).to_return(:body => "abc")
1087 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
1088
1089 * Replaying raw responses recorded with `curl -is`
1090
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1091 `curl -is www.example.com > /tmp/example_curl_-is_output.txt`
1092 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
1093
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1094 from file
1095
1096 stub_request(:get, "www.example.com").to_return(raw_response_file)
1097
1098 or string
1099
1100 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
1101
1102 * Multiple responses for repeated requests
1103
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1104 stub_request(:get, "www.example.com").to_return({:body => "abc"}, {:body => "def"})
1105 Net::HTTP.get('www.example.com', '/') # ===> "abc\n"
1106 Net::HTTP.get('www.example.com', '/') # ===> "def\n"
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
1107
1108 * Multiple responses using chained `to_return()` or `to_raise()` declarations
1109
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1110 stub_request(:get, "www.example.com").
1111 to_return({:body => "abc"}).then. #then() just is a syntactic sugar
1112 to_return({:body => "def"}).then.
1113 to_raise(MyException)
1114 Net::HTTP.get('www.example.com', '/') # ===> "abc\n"
1115 Net::HTTP.get('www.example.com', '/') # ===> "def\n"
1116 Net::HTTP.get('www.example.com', '/') # ===> MyException raised
1117
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
1118 * Specifying number of times given response should be returned
1119
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1120 stub_request(:get, "www.example.com").
1121 to_return({:body => "abc"}).times(2).then.
1122 to_return({:body => "def"})
1123
1124 Net::HTTP.get('www.example.com', '/') # ===> "abc\n"
1125 Net::HTTP.get('www.example.com', '/') # ===> "abc\n"
1126 Net::HTTP.get('www.example.com', '/') # ===> "def\n"
1127
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
1128 * Added support for `Net::HTTP::Post#body_stream`
1129
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1130 This fixes compatibility with new versions of RestClient
1131
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
1132 * WebMock doesn't suppress default request headers added by http clients anymore.
1133
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1134 i.e. Net::HTTP adds `'Accept'=>'*/*'` to all requests by default
1135
1136
1137
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
1138 ## 0.8.2
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1139
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
1140 * Fixed issue where WebMock was not closing IO object passed as response body after reading it.
1141 * 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
1142
1143
1144 ## 0.8.1
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1145
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
1146 * Fixed HTTPClient adapter compatibility with Ruby 1.8.6 (reported by Piotr Usewicz)
1147 * Net:HTTP adapter now handles request body assigned as Net::HTTP::Post#body attribute (fixed by Mack Earnhardt)
1148 * Fixed issue where requests were not matching stubs with Accept header set.(reported by Piotr Usewicz)
1149 * Fixed compatibility with Ruby 1.9.1, 1.9.2 and JRuby 1.3.1 (reported by Diego E. “Flameeyes” Pettenò)
1150 * Fixed issue with response body declared as IO object and multiple requests (reported by Niels Meersschaert)
1151 * Fixed "undefined method `assertion_failure'" error (reported by Nick Plante)
1152
1153
1154 ## 0.8.0
1155
1156 * Support for HTTPClient (sync and async requests)
a251cb3 @jcf Indent files correctly and remove trailing whitespace
jcf authored
1157 * Support for dynamic responses. Response body and headers can be now declared as lambda.
1158 (Thanks to Ivan Vega ( @ivanyv ) for suggesting this feature)
5313e02 Added version 0.9.0 features to CHANGELOG and README
Bartosz Blimke authored
1159 * Support for stubbing and expecting requests with empty body
1160 * Executing non-stubbed request leads to failed expectation instead of error
1161
1162
1163 ### Bug fixes
1164
1165 * Basic authentication now works correctly
1166 * Fixed problem where WebMock didn't call a block with the response when block was provided
1167 * Fixed problem where uris with single slash were not matching uris without path provided
1168
1169
1170 ## 0.7.3
1171
1172 * Clarified documentation
1173 * Fixed some issues with loading of Webmock classes
1174 * Test::Unit and RSpec adapters have to be required separately
1175
1176
1177 ## 0.7.2
1178
1179 * Added support for matching escaped and non escaped URLs
Something went wrong with that request. Please try again.