Releases: ropensci/webmockr
Releases · ropensci/webmockr
webmockr v0.3.4
DEFUNCT
NEW FEATURES
MINOR IMPROVEMENTS
- typo fixes (#62) thanks @Bisaloo !
- improved the print method for stubs, found in
StubbedRequest
, to have better behavior for very long strings such as in headers and bodies (#63)
BUG FIXES
- fix date in mocked
httr
response object to match the date format thathttr
uses in real HTTP requests (#58) (#61) via ropensci/vcr#91 - fix response headers in mocked
httr
response objects.httr
makes the list of headers insensitive to case, so we now use that function from the package (#59) (#61) to_return()
andwi_th()
drop use of thelazyeval
package and fall back to using the simplelist(...)
- fixes problem where creating stubs was failing withintest_that()
blocks due to some weird lazy eval conflicts (i think) (#60) (#64) thanks @karawoo !
webmockr v0.3.0
MINOR IMPROVEMENTS
- returned mocked response headers were retaining case that the user gave - whereas they should be all lowercased to match the output in
crul
andhttr
. now fixed. (#49) thanks @hlapp - returned mocked response headers were not all of character class, but depended on what class was given by the user on creating the stub. this is now fixed, returning all character class values for response headers (#48) thanks @hlapp
- skip tests that require
vcr
ifvcr
is not available (#53) - internal change to crul adapter to produce the same http response as a new version of crul returns - adds a
response_headers_all
slot (#51) (#54)
webmockr v0.2.9
MINOR IMPROVEMENTS
- make
request_registry()
andstub_registry()
print methods more similar to avoid confusion for users (#35) - update docs for
enable
/disable
to indicate thatcrul
andhttr
supported (#46) (related to #45) - wrap httr adapter examples in
requireNamespace
so only run when httr available - clean up
.onLoad
call, removing commented out code, and add note about creating adapter objects does not load crul and httr packages
BUG FIXES
- fix to
enable()
anddisable()
methods. even thoughhttr
is in Suggests, we were loading all adapters (crul, httr) withstop
when the package was not found. We now give a message and skip when a package not installed. In addition, weenable()
anddisable()
gain anadapter
parameter to indicate which package you want to enable or disable. Ifadapter
not given we attempt all adapters. Note that this bug shouldn't have affectedvcr
users ashttr
is in Imports in that package, so you'd have to havehttr
installed (#45) thanks to @maelle for uncovering the problem
webmockr v0.2.8
NEW FEATURES
- Added support for integration with package
httr
; seeHttrAdapter
for the details;webmockr
now integrates with two HTTP R packages:crul
andhttr
(#43) (#44) - Along with
httr
integration is a new methodhttr_mock()
to turn on mocking forhttr
; and two methodsbuild_httr_response
andbuild_httr_request
meant for internal use
webmockr v0.2.6
NEW FEATURES
- Added support for integration with package
vcr
(now on CRAN) for doing HTTP request caching
webmockr v0.2.4
NEW FEATURES
- New function
enabled()
to ask ifwebmockr
is enabled, gives a
boolean wi_th()
gains new parameter.list
as an escape hatch to avoid
NSE. examples added in thewi_th
man file to clarify its use
MINOR IMPROVEMENTS
- matching by request body was not supported, it now is; added examples
of matching on request body, see?stub_request
(#36) - make sure that the adapter for
crul
handles all types of matches (#29) - removed all internal usage of pipes in the package. still exporting
pipe for users (#30) - fixed internals to give vcr error when vcr loaded - for future release
with vcr support (#34) - require newest
crul
version
BUG FIXES
- Error messages with the suggest stub were not giving bodies. They
now give bodies if needed along with method, uri, headers, query (#37) - Fixed
Response
class that was not dealing with capitalization
correctly
webmockr v0.2.0
NEW FEATURES
- New function
to_raise()
to say that a matched response should return a certain exception, currentlyto_raise
accepts error classes from thefauxpas
package (#9) - New function
to_timeout()
to say that a matched response should return a timeout. This is a special case ofto_raise
to easily do a timeout expectation (#11) - New function
request_registry()
to list requests in the request registry (#23) - package
crul
moved to Imports from Suggests as it's the only http client supported for now. will move back to Suggests once we support at least one other http client webmockr_configure()
changes:turn_on
has been removed;allow_net_connect
andallow_localhost
were ignored before, but are now used and are now set toFALSE
by default; fixed usage ofallow
which now accepts character vector of URLs instead of a boolean; the following correctly marked as being ignored for now until fixednet_http_connect_on_start
,show_stubbing_instructions
,query_values_notation
,show_body_diff
(#19) (#21)webmockr_disable_net_connect()
now accepts anallow
parameter to disable all other connections except those URLs given inallow
webmockr_net_connect_allowed()
now accepts auri
parameter to test if a URI/URL is allowed
MINOR IMPROVEMENTS
- Fixed printed stub statement when printed to the console - we weren't including headers accurately (#18)
- Added examples to the
stub_registry()
andstub_registry_clea()
manual files (#24) - internal methods
build_crul_request
andbuild_crul_response
moved outside of theCrulAdapter
class so that they can be accesed likewebmockr::
in other packages enable()
anddisable()
now return booleans invisibly- General improvements to documentation throughout
- Added linting of user inputs to the
to_return()
method, and docs details on what to input to the method - Added linting of user inputs to the
wi_th()
method, and docs details on what to input to the method
BUG FIXES
- Fixed option
allow_localhost
, which wasn't actually workin before (#25)
DEPRECATED AND DEFUNCT
webmockr_enable()
andwebmockr_disable
are now defunct. Usewebmockr::enable()
andwebmockr::disable()
instead
webmockr v0.1.0
NEW FEATURES
- Released to CRAN.