request.headers.authorization
can now take values such asusername:password
which will automatically be converted toBasic dXNlcm5hbWU6cGFzc3dvcmQ=
.- parameterized flags can now be combined with non-parameterized flags. Example:
-dw data.yaml
is equivalent to--watch --data data.yaml
. - switched from handlebars to underscore for client-side templating
- added
PATCH
to acceptable HTTP verbs. - bugfix where
--watch
flag was always active. - added
man
page support
- bugfixes related to command line parsing
- fixed bug where query params were not being saved
- added
status
endpoint on admin portal.
- main
stubby
module now correctly accepts all options availabel via the command line in it's first argument. - added
-w, --watch
flag. Monitors the supplied-d, --data
file for changes and reloads the file if necessary. - for the
require('stubby')
module, a filename is passed asoptions.watch
for thestart(options, callback)
function.
- made method definitions (
PUT
,POST
, etc.) case insensitive. You could usepost
,get
, etc. instead. - made
response
object completely optional. Defaults to200
status with an emptybody
. - you can now specify an array of acceptible
method
s in your YAML:
- request:
url: /anything
method: [get, head]
- added /ping endpoint to admin portal
- running stubs portal at both http and https by default
- addition of
-t, --tls
option to specifying https port for stubs portal
- added
file
parameter torequest
object. When matching a request, if it hasfile
specified it will load it's contents from the filesystem as thepost
value. If thefile
cannot be found, it falls back topost
.
- added
query
parameter forrequest
objects to allow comparison by variable instead of static querystring
- fixed severe issue where request headers were not being matched by the stubs portal
- renamed "stub" option to "stubs"
- NEW:
request.file
can be used to specify a file whose contents will be used as the response body. If the file cannot be found, it falls back to whatever was specified inresponse.body
- stubby can now be muted
- removed coffee-script as a dependency
- errors and warnings for missing or unparsable data files have been improved
- re-write of code operating the command-line interface
- admin portal console logging for responses
- reworked API contract failures for admin portal. Upon BAD REQUEST server returns an array of errors describing the endpoint validations that were violated.
- logging messages fixes for stub portal
- fixed callback parameters for stubby interface
- you can now make as many instances of stubby as you want by: require("stubby").Stubby and var stubby = new Stubby()
- callbacks now give copies of endoints instead of refernces. This prevents unexpected changes to endpoints outside of stubby
- bug fixes. optional dependency js-yaml is now really optional
- serval bugs fixed that were found while experimenting with a main module
- fixed but with endpoints with undefined headers not being accepted
- added -k, --key and -c, --cert and -p, -pfx options for stating stubby as an https server
- retired -f, --file option in lieu of -d, --data to prevent confusion between suppling files for data files versus ssl key/certificate files
- added -l flag for starting stubby at a particular address
- added -v --version command line option
- gracefully exits on error when starting stubby
- removed node-inspector as a dependency
- removed jasmine-node as a dependency
- default stub portal is now 8882 (from 80)
- default admin portal is now 8889 (from 81)
- initial release