opt_parse_validator 0.0.13.9 → 0.0.13.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/opt_parse_validator/version.rb +1 -1
- data/lib/opt_parse_validator.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eabff19a148cc02589422cf69471913c9a6a9cf4
|
4
|
+
data.tar.gz: 3a85f042127a44563b192e3694f5768b0fcafd5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9709ed1f23736346e3d4dab86032a61fc07cd73e8ae593c04bec00721df16e52ed77e81d41a910df45ec96a4362ea61f2a70247e0f381562c0c036d5625cbac0
|
7
|
+
data.tar.gz: 5a9537267567f9e8c536885fc22cda5346b6dc3dbd9107b29ff2f7f0d69907004b34328ef4a2e8a518c7c6a951039d7675c6c929136256fb58752e464ad2c7b3
|
data/README.md
CHANGED
@@ -52,7 +52,7 @@ Please Feel free to send Pull Requests to improve this Readme
|
|
52
52
|
Some attributes are available for all Validators:
|
53
53
|
- :required (whether or not the associated cli option is required/mandatory - [example](https://github.com/wpscanteam/CMSScanner/blob/master/app/controllers/core/cli_options.rb#L9)).
|
54
54
|
- :required_unless (like the above, except if the option/s given in this parameter are called in the CLI - [example](https://github.com/wpscanteam/wpscan-v3/blob/master/app/controllers/core.rb#L7), can be a single symbol or array of symbols)
|
55
|
-
- :default (Default value to use if the option is not supplied)
|
55
|
+
- :default (Default value to use if the option is not supplied, which will go through the validation and normalization processes as if it was supplied by the user)
|
56
56
|
- :value_if_empty (Value to use if no argument has been supplied for the related option)
|
57
57
|
|
58
58
|
### Available Validators & Associated Attributes:
|
data/lib/opt_parse_validator.rb
CHANGED
@@ -41,7 +41,7 @@ module OptParseValidator
|
|
41
41
|
@opts << opt
|
42
42
|
@symbols_used << opt.to_sym
|
43
43
|
# Set the default option value if it exists
|
44
|
-
@results[opt.to_sym] = opt.default unless opt.default.nil?
|
44
|
+
@results[opt.to_sym] = opt.normalize(opt.validate(opt.default)) unless opt.default.nil?
|
45
45
|
|
46
46
|
on(*opt.option) do |arg|
|
47
47
|
begin
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opt_parse_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.13.
|
4
|
+
version: 0.0.13.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- WPScanTeam
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|