* Added support for multiple request configurations.
This allows multiple requests to hit the same verb+path combination.
This was previously impossible, to address it, it's now possible to pass
an array of request settings as the body of a request each request will
be added to the request list individually.
Example:
```
GET /some/path:
- alias: first
headers:
request: first
- alias: second
headers:
request: second
```
* Allows using full urls in the request key
This allows you to break out of the top-level endpoint. If you send a
full url instead of a path it'll be used instead of the top level
endpoint.
Example:
```
endpoint: http://example.com
GET /posts: get-posts
POST http://api.example.com/posts: post-post
```
* I need to stop rewriting builtin methods with reduce.
* Removed redundant fields from the config class.
* Added a warning when module version and beau.yml version differ.
* Moved the spinner initialization to the base class.
* Got rid of the base class, it complicated testing.
Now it lives on as a utils file. Should make it easier to test the CLI.
* Added a spec file for the ListCommand.
* Added tests for all CLI commands.
* Update some old tests.
Added missing cases and tests.
Most of these are kind useless but I hope I won't have to touch them
again.
I normally prefer tabs for everything, it's nice to have the ability to
set to whatever your preferred width is. Since this project uses a lot
of yaml stuff I've had to indent those tests with spaces, for
consistency's sake I've decided to use spaces everywhere.
This results in two important changes:
- Made changes so that we actually use the replacement regex groups.
This was supposed to happen from the start but I guess I didn't notice.
By fixing this the code for finding dependencies and the cache#parse is
now a bit more reliable.
- This also changes how we store variables in the cache (which I've been
meaning to do for a while.) removing the dollar sign that usually
preceeded all cached requests in Beau. It's all more sensible now.
There's more refactoring left to do.
It now uses a plugin registry. Plugins are loaded when the configuration
file is first parsed. When a request is made it is passed over to the
available modifiers before and after it's execution and applies
whichever changes are made. It now passes a copy instead of a reference
to provide a nicer interface.
Dynamic values have been added as a plugin type. These plugins are
javascript functions that can be called from within the beau file and
whose results are used as a replacement.
These are added along with variables to the runtime execution flow. The
current order for their execution is:
Request composition -> Dynamic Values -> Pre-Request Modifiers ->
Post-Request Modifiers.
This introduces a top level key: `hosts`. It's an array where you can
configure multiple hosts with their own requests, they share defaults
and environment with the global scope.
This allows you to have multiple paths being the same with different
endpoints and settings.