opt_parse_validator 1.9.3 → 1.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/opt_parse_validator.rb +3 -2
- data/lib/opt_parse_validator/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9286b871685cbc3d1053587dc31ccf2d01d35cc6efc138607be2fbf04416de8
|
4
|
+
data.tar.gz: b562e1c8e5faadf362f2d14997ebb7237604afd5dc53d6584a83697139c7b696
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33eed0e8bdd867b45e2b7276cf7d47061f47b1bbcce72cc29abfc61530713a413d2bd10663d9bc9130f5666a386b3718c4e1a0ada33eb366a744eb84952bb346
|
7
|
+
data.tar.gz: 83511499d313425a027a6c444e347a6342040419420076ff0d6b5523c039e21841d135ecda353c727a59ff67f25a8ea8c8f6c73ae633384325116905f98e30c0
|
data/lib/opt_parse_validator.rb
CHANGED
@@ -145,11 +145,12 @@ module OptParseValidator
|
|
145
145
|
# @return [ Void ]
|
146
146
|
def post_processing
|
147
147
|
@opts.each do |opt|
|
148
|
-
raise NoRequiredOption, "The option
|
148
|
+
raise NoRequiredOption, "The option #{opt.to_long} is required" if opt.required? && !@results.key?(opt.to_sym)
|
149
149
|
|
150
150
|
next if opt.required_unless.empty? || @results.key?(opt.to_sym)
|
151
151
|
|
152
|
-
fail_msg =
|
152
|
+
fail_msg = 'One of the following options is required: ' \
|
153
|
+
"#{opt.to_long}, --#{opt.required_unless.join(', --').tr('_', '-')}"
|
153
154
|
|
154
155
|
raise NoRequiredOption, fail_msg unless opt.required_unless.any? do |sym|
|
155
156
|
@results.key?(sym)
|
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: 1.9.
|
4
|
+
version: 1.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- WPScanTeam
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -112,28 +112,28 @@ dependencies:
|
|
112
112
|
requirements:
|
113
113
|
- - "~>"
|
114
114
|
- !ruby/object:Gem::Version
|
115
|
-
version: 1.
|
115
|
+
version: 1.11.0
|
116
116
|
type: :development
|
117
117
|
prerelease: false
|
118
118
|
version_requirements: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
120
|
- - "~>"
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version: 1.
|
122
|
+
version: 1.11.0
|
123
123
|
- !ruby/object:Gem::Dependency
|
124
124
|
name: rubocop-performance
|
125
125
|
requirement: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
127
|
- - "~>"
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version: 1.
|
129
|
+
version: 1.10.0
|
130
130
|
type: :development
|
131
131
|
prerelease: false
|
132
132
|
version_requirements: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
134
|
- - "~>"
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version: 1.
|
136
|
+
version: 1.10.0
|
137
137
|
- !ruby/object:Gem::Dependency
|
138
138
|
name: simplecov
|
139
139
|
requirement: !ruby/object:Gem::Requirement
|
@@ -165,7 +165,7 @@ dependencies:
|
|
165
165
|
description: Implementation of validators for the ruby OptionParser lib. Mainly used
|
166
166
|
in the CMSScanner gem to define the cli options available
|
167
167
|
email:
|
168
|
-
-
|
168
|
+
- contact@wpscan.com
|
169
169
|
executables: []
|
170
170
|
extensions: []
|
171
171
|
extra_rdoc_files: []
|