opt_parse_validator 0.0.16.2 → 0.0.16.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e18ffe080d6a6574aaaa28aeb02908f1a0cb41a
4
- data.tar.gz: 1225f1fb8ae7e3b4ff1e7fc8b5bba32d3f2516d6
3
+ metadata.gz: a36bc45859bac57180decb1ac24e22070c6d42a6
4
+ data.tar.gz: 7220c487c0a8ed6bec72f19d60e634663ea7cdf3
5
5
  SHA512:
6
- metadata.gz: dbf3d0eac33fd03bc08820070340a01139a97c0b7745d6bb5bb7d943aee51ffe1a36db3c0f5aae2141296f56ea92610f5ee77246b6e0203db6a80b2624f8379c
7
- data.tar.gz: 29e7d50e918497eb339db2374f124122e196b3f169cb2a2f245143075a01776c8dfab10cd1c7ce9b0deed68f9a7d17219e5408b1051f7e1f357bd6bb9d50cb3f
6
+ metadata.gz: bf1b6eef1a17529c31d0ebe1c4d2650f52c4f023228398175e703d2844375a33f556786cfd5d47bc996234faf4eb43a3886355665f176efb41475d8adb2f0853
7
+ data.tar.gz: 193a1ecbd35c6a30d1987db27fc060389525cdc7c3b7b1e2bc500f880c62dd26225a60289b8172bbc0cae9caf8c611cc75fbe57146590d43171bfdb48ba71ff4
@@ -1,4 +1,4 @@
1
1
  # Gem Version
2
2
  module OptParseValidator
3
- VERSION = '0.0.16.2'.freeze
3
+ VERSION = '0.0.16.3'.freeze
4
4
  end
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.16.2
4
+ version: 0.0.16.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - WPScanTeam
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-23 00:00:00.000000000 Z
11
+ date: 2018-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.59.1
117
+ version: 0.59.2
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.59.1
124
+ version: 0.59.2
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: simplecov
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -144,9 +144,6 @@ executables: []
144
144
  extensions: []
145
145
  extra_rdoc_files: []
146
146
  files:
147
- - ".simplecov"
148
- - LICENSE
149
- - README.md
150
147
  - lib/opt_parse_validator.rb
151
148
  - lib/opt_parse_validator/errors.rb
152
149
  - lib/opt_parse_validator/hacks.rb
@@ -176,7 +173,6 @@ files:
176
173
  - lib/opt_parse_validator/opts/uri.rb
177
174
  - lib/opt_parse_validator/opts/url.rb
178
175
  - lib/opt_parse_validator/version.rb
179
- - opt_parse_validator.gemspec
180
176
  homepage: https://github.com/wpscanteam/OptParseValidator
181
177
  licenses:
182
178
  - MIT
@@ -189,7 +185,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
189
185
  requirements:
190
186
  - - ">="
191
187
  - !ruby/object:Gem::Version
192
- version: 2.2.2
188
+ version: '2.3'
193
189
  required_rubygems_version: !ruby/object:Gem::Requirement
194
190
  requirements:
195
191
  - - ">="
data/.simplecov DELETED
@@ -1,4 +0,0 @@
1
- SimpleCov.start do
2
- add_filter '/spec/'
3
- add_filter '_helper.rb'
4
- end
data/LICENSE DELETED
@@ -1,19 +0,0 @@
1
- Copyright (C) 2014-2015 - WPScanTeam
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in all
11
- copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- SOFTWARE.
data/README.md DELETED
@@ -1,110 +0,0 @@
1
- OptParseValidator
2
- =================
3
-
4
- [![Gem Version](https://badge.fury.io/rb/opt_parse_validator.svg)](https://badge.fury.io/rb/opt_parse_validator)
5
- [![Build Status](https://img.shields.io/travis/wpscanteam/OptParseValidator.svg)](https://travis-ci.org/wpscanteam/OptParseValidator)
6
- [![Coverage Status](https://img.shields.io/coveralls/wpscanteam/OptParseValidator.svg)](https://coveralls.io/r/wpscanteam/OptParseValidator?branch=master)
7
- [![Code Climate](https://api.codeclimate.com/v1/badges/56f0307bbbda6d41b99a/maintainability)](https://codeclimate.com/github/wpscanteam/OptParseValidator/maintainability)
8
- [![Dependency Status](https://img.shields.io/gemnasium/wpscanteam/OptParseValidator.svg)](https://gemnasium.com/wpscanteam/OptParseValidator)
9
-
10
-
11
- ### Installation
12
-
13
- ```gem install opt_parse_validator```
14
-
15
- ### Usage Example
16
-
17
- ```ruby
18
- # test.rb
19
-
20
- require 'opt_parse_validator'
21
-
22
- begin
23
- # For constructor options, such as setting a banner, the summary width and indent,
24
- # see http://ruby-doc.org/stdlib-2.4.2/libdoc/optparse/rdoc/OptionParser.html#method-c-new
25
- parsed_cli_options = OptParseValidator::OptParser.new.add(
26
- OptParseValidator::OptString.new(['-m', '--mandatory PARAM', 'A Mandatory CLI option'], required: true),
27
- OptParseValidator::OptBoolean.new(['--test', '-t', 'Option Helper Message']),
28
- OptParseValidator::OptFilePath.new(['-o', '--output FILE', 'Output to FILE'], writable: true, exists: false),
29
- OptParseValidator::OptAlias.new(['--alias', '-a'], alias_for: '--test -o file.txt')
30
- ).results
31
-
32
- p parsed_cli_options
33
- rescue OptParseValidator::Error => e
34
- puts 'Parsing Error: ' + e.message
35
- end
36
- ```
37
-
38
- Then have a play with
39
- ```ruby test.rb -h```
40
- ```ruby test.rb -m hh -t```
41
- ```ruby test.rb -t```
42
-
43
- It is worth to note that when aliases are used, it is recommended to provide them first in the CLI. Otherwise, they might override user-suplied cli options. For example, using the options above, ```ruby test.rb -m aa -o override.txt --alias``` won't have the desired effect (to have --output as override.txt), but ```ruby test.rb --alias -m aa -o override.txt``` will.
44
-
45
- For more option examples, see
46
- - https://github.com/wpscanteam/CMSScanner/blob/master/app/controllers/core/cli_options.rb
47
- - https://github.com/wpscanteam/wpscan-v3/blob/master/app/controllers/enumeration/cli_options.rb
48
-
49
- Please feel free to send Pull Requests to improve this Readme
50
-
51
- ### Global Attributes
52
-
53
- Some attributes are available for all Validators:
54
- - :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)).
55
- - :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)
56
- - :default (Default value to use if the option is not supplied, the correct format has to be used as it won't go through the validation and normalization processes)
57
- - :value_if_empty (Value to use if no argument has been supplied for the related option)
58
-
59
- ### Available Validators & Associated Attributes:
60
- - Alias:
61
- - :alias_for (mandatory)
62
- - Array
63
- - :separator (default: ',')
64
- - Boolean
65
- - Choice
66
- - :choices (mandatory)
67
- - :case_sensitive
68
- - Credentials
69
- - Directory Path
70
- - :create
71
- - :exists
72
- - :executable
73
- - :readable
74
- - :writable
75
- - File Path
76
- - :create
77
- - :exists
78
- - :executable
79
- - :readable
80
- - :writable
81
- - Headers
82
- - Integer
83
- - IntegerRange
84
- - separator (default: '-')
85
- - MultiChoices
86
- - choices (mandatory)
87
- - separator (default: ',')
88
- - incompatible
89
- - Positive Integer
90
- - Path
91
- - :create
92
- - :file
93
- - :directory
94
- - :exists
95
- - :executable
96
- - :readable
97
- - :writable
98
- - Proxy
99
- - :protocols
100
- - :default_protocol
101
- - Regexp:
102
- - :options (See http://ruby-doc.org/core-2.2.1/Regexp.html#method-c-new)
103
- - SmartList
104
- - separator (default: ',')
105
- - String
106
- - URI
107
- - :protocols
108
- - :default_protocol
109
- - URL
110
- - :default_protocol
@@ -1,46 +0,0 @@
1
- # coding: utf-8
2
-
3
- lib = File.expand_path('../lib', __FILE__)
4
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
-
6
- require 'opt_parse_validator/version'
7
-
8
- Gem::Specification.new do |s|
9
- s.name = 'opt_parse_validator'
10
- s.version = OptParseValidator::VERSION
11
- s.platform = Gem::Platform::RUBY
12
- s.required_ruby_version = '>= 2.2.2'
13
- s.authors = ['WPScanTeam']
14
- s.email = ['team@wpscan.org']
15
- s.summary = 'Ruby OptionParser Validators'
16
- s.description = 'Implementation of validators for the ruby OptionParser lib. ' \
17
- 'Mainly used in the CMSScanner gem to define the cli options available'
18
- s.homepage = 'https://github.com/wpscanteam/OptParseValidator'
19
- s.license = 'MIT'
20
-
21
- s.files = `git ls-files -z`.split("\x0").reject do |file|
22
- file =~ %r{^(?:
23
- spec\/.*
24
- |Gemfile
25
- |Rakefile
26
- |\.rspec
27
- |\.gitignore
28
- |\.rubocop.yml
29
- |\.travis.yml
30
- )$}x
31
- end
32
- s.test_files = []
33
- s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
34
- s.require_paths = ['lib']
35
-
36
- s.add_dependency 'activesupport', '~> 5.2.1'
37
- s.add_dependency 'addressable', '~> 2.5.0'
38
-
39
- s.add_development_dependency 'bundler', '~> 1.6'
40
- s.add_development_dependency 'coveralls', '~> 0.8.0'
41
- s.add_development_dependency 'rake', '~> 12.3'
42
- s.add_development_dependency 'rspec', '~> 3.8.0'
43
- s.add_development_dependency 'rspec-its', '~> 1.2.0'
44
- s.add_development_dependency 'rubocop', '~> 0.59.1'
45
- s.add_development_dependency 'simplecov', '~> 0.16.1'
46
- end