Commit Graph

34 Commits

Author SHA1 Message Date
Sergio Díaz cc7245b501
Cleaning up tests. (#34) 2018-06-02 23:47:03 -06:00
Sergio Díaz 8e961211a5
Updated dependencies. (#32) 2018-05-29 15:34:37 -06:00
Sergio Díaz c8ff4945d6
Updated tests. (#30)
With the introduction of data-driven tests in Jest 23 CLI tests could be made significantly smaller and easier to keep updated.
2018-05-29 15:23:58 -06:00
Sergio Díaz 26b33fbf00
Added tests to all CLI commands. (#28)
* 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.
2018-05-22 21:42:52 -06:00
David Diaz 293dde59c4 0.9.3 2018-05-17 10:54:15 -06:00
David Diaz c0923dcce5 0.9.2 2018-05-17 10:02:16 -06:00
David Diaz d2eabfb19e 0.9.1 2018-05-16 23:13:42 -06:00
David Diaz 0e5b427d24 0.9.0 2018-05-06 19:05:58 -06:00
Sergio Díaz 56d536a509
Re-indented some files I was missing. (#19)
I think that's it.
2018-05-04 22:00:54 -06:00
Sergio Díaz 90761acaa4
Added a schema validator. (#13)
* Added a schema validator.

This allows you to check if the given beau config is valid. Will be used
to improve the CLI and remove schema validation-type errors from the
actual code.

* Added a validate command to the CLI.

This command is a way to test the config file. Eventually it'll probably
be removed and the schema validation will run on every other command. I
have to determine how useful this is and how performance might be
affected.
2018-05-01 22:20:14 -06:00
Sergio Díaz 4fba235bad
Migrating Beau's CLI from commander to OCLIF. (#14)
* Migrating Beau's CLI from commander to OCLIF.

* Cleaning up flags.
2018-04-30 20:27:51 -06:00
David Diaz 185333cb20 Copy objects instead of properties on modifiers. 2018-04-30 14:21:20 -06:00
David Diaz 9d10db3243 Added support for forms.
You can now pass a form key to the request and it'll set the header and
payload automatically.
2018-04-26 14:52:06 -06:00
David Diaz 3df90600ac Updated dependencies. 2018-04-26 10:56:42 -06:00
David Diaz e9c07cbbf9 0.8.0 2018-04-08 13:56:11 -06:00
David Diaz 1fb45da5de Refactored Beau's Plugin System
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.
2018-04-08 13:33:43 -06:00
David Diaz 293c3883e9 0.7.3 2018-03-01 16:03:45 -06:00
David Diaz 7e25f9fd29 Added update-notifier.
I like being notified of updates so I figured everyone else does. /s
2018-03-01 16:02:54 -06:00
David Diaz 070ffc3106 0.7.2 2018-03-01 11:44:15 -06:00
David Diaz 2f33442072 Added support for dotenv.
If a .env file is present it's values will be added to beau's
environment variables.
2018-03-01 11:42:41 -06:00
David Diaz 228d2de7f3 0.7.1 2018-03-01 11:02:51 -06:00
David Diaz e140778393 0.7.0 2018-01-21 15:40:20 -06:00
David Diaz fe401c1391 Added support for multiple hosts.
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.
2018-01-19 18:10:00 -06:00
David Diaz 5f0f1821e4 0.6.1 2018-01-17 01:58:13 -06:00
David Diaz 2dbeb0d230 0.6.0 2018-01-11 17:30:22 -06:00
David Diaz 40abf85a78 Added a new top-level setting: defaults.
Defaults allow you to set default settings for all requests. You can
pass any configuration value and it'll be merged with any values the
request already has allowing you to write even less repetitive code.
2017-12-27 16:43:47 -06:00
David Diaz 24a0fdf788 0.5.0 2017-12-23 01:59:55 -06:00
David Diaz 930a957bf3 Cleaning up the code.
Mostly trying to get test coverage up by refactoring and cleaning
methods.
2017-12-23 00:34:36 -06:00
David Diaz 35983addf7 Refactored the cli.
Started making use of commander's commands and actions. This changes how
beau is invoked but I feel like it's a lot easier to work with now.
2017-12-07 21:55:36 -06:00
David Diaz 6a3e0e136b 0.4.0 2017-12-04 00:00:42 -06:00
David Diaz 32b9f0f523 Cleaning the CLI tool. Small refactorings all around.
If a string is passed to a request configuration its now considered
that request's alias.
2017-12-03 23:56:09 -06:00
David Diaz a8a71caad8 0.3.1 2017-10-23 10:13:25 -06:00
David Diaz 17e3394f9c 0.3.0 2017-10-21 14:39:28 -06:00
David Diaz 7ecd5428c6 Replaced unirest with request-promise. Tried using the built it http
stuff but it's just silly.
2017-10-20 18:59:37 -06:00