mutations icon indicating copy to clipboard operation
mutations copied to clipboard

add UriFilter to additional filters

Open estraph opened this issue 7 years ago • 0 comments

This PR adds a filter for URI objects as inputs to commands. Ensures the URI is not empty and that it parses.

Usage example, taken from a command I wrote to wrap a HTTP API:

required do
  uri :endpoint, scheme: :https
  string :api_key, default: nil
end

Tests pass locally:

Raphs-MacBook-Pro:mutations raph$ git status
On branch raph/uri-filter
nothing to commit, working directory clean
Raphs-MacBook-Pro:mutations raph$ rake
Run options: --seed 36168

# Running tests:

...........................................................................................................................................................................................................................................

Finished tests in 0.069457s, 3383.3883 tests/s, 7285.0829 assertions/s.

235 tests, 506 assertions, 0 failures, 0 errors, 0 skips

estraph avatar Oct 22 '17 14:10 estraph