opt_parse_validator 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +2 -0
- data/.travis.yml +4 -0
- data/Gemfile +1 -1
- data/LICENSE +16 -11
- data/lib/opt_parse_validator/opts/base.rb +1 -1
- data/lib/opt_parse_validator/version.rb +1 -1
- data/opt_parse_validator.gemspec +4 -4
- data/spec/lib/opt_parse_validator/options_file_spec.rb +0 -2
- data/spec/lib/opt_parse_validator/opts/base_spec.rb +0 -1
- data/spec/lib/opt_parse_validator/opts/boolean_spec.rb +0 -2
- data/spec/lib/opt_parse_validator/opts/credentials_spec.rb +0 -2
- data/spec/lib/opt_parse_validator/opts/direcyory_path_spec.rb +0 -2
- data/spec/lib/opt_parse_validator/opts/file_path_spec.rb +0 -2
- data/spec/lib/opt_parse_validator/opts/integer_spec.rb +0 -2
- data/spec/lib/opt_parse_validator/opts/path_spec.rb +0 -2
- data/spec/lib/opt_parse_validator/opts/positive_integer_spec.rb +0 -2
- data/spec/lib/opt_parse_validator/opts/proxy_spec.rb +0 -2
- data/spec/lib/opt_parse_validator/opts/uri_spec.rb +0 -2
- data/spec/lib/opt_parse_validator/opts/url_spec.rb +0 -2
- data/spec/lib/opt_parse_validator_spec.rb +0 -1
- metadata +14 -14
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: e4e1a583bd0dd3f0277825ac7f87a82c3bd7d937
         | 
| 4 | 
            +
              data.tar.gz: d8af127e4a81cdc8995d55581b80f0958a87021b
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 3673cb2bb2ed1bd2209e7c57d8fddc79ab5d67b70563453049061400c307a1e90421abcf2583dc15697b75611601835291e2b8894dad66b2857466c6f4a29fcb
         | 
| 7 | 
            +
              data.tar.gz: 695a17c09b549f96df4bd9cd7e16a993a690e6fc2072d9441d128892a473f71d4148c01a18bc4f4e918024f47ba969feec1e82c05ab7b7855025a1df17cc20dd
         | 
    
        data/.gitignore
    CHANGED
    
    
    
        data/.rubocop.yml
    CHANGED
    
    
    
        data/.travis.yml
    CHANGED
    
    
    
        data/Gemfile
    CHANGED
    
    
    
        data/LICENSE
    CHANGED
    
    | @@ -1,14 +1,19 @@ | |
| 1 | 
            -
            Copyright (C) 2014 - WPScanTeam
         | 
| 1 | 
            +
            Copyright (C) 2014-2015 - WPScanTeam
         | 
| 2 2 |  | 
| 3 | 
            -
             | 
| 4 | 
            -
             | 
| 5 | 
            -
            the  | 
| 6 | 
            -
             | 
| 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:
         | 
| 7 9 |  | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
            MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
         | 
| 11 | 
            -
            GNU General Public License for more details.
         | 
| 10 | 
            +
            The above copyright notice and this permission notice shall be included in all
         | 
| 11 | 
            +
            copies or substantial portions of the Software.
         | 
| 12 12 |  | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 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/opt_parse_validator.gemspec
    CHANGED
    
    | @@ -14,7 +14,7 @@ Gem::Specification.new do |s| | |
| 14 14 | 
             
              s.summary               = 'Testing Gem'
         | 
| 15 15 | 
             
              s.description           = 'Testing Gem ...'
         | 
| 16 16 | 
             
              s.homepage              = 'https://github.com/wpscanteam/OptParseValidator'
         | 
| 17 | 
            -
              s.license               = ' | 
| 17 | 
            +
              s.license               = 'MIT'
         | 
| 18 18 |  | 
| 19 19 | 
             
              s.files                 = `git ls-files -z`.split("\x0")
         | 
| 20 20 | 
             
              s.executables           = s.files.grep(/^bin\//) { |f| File.basename(f) }
         | 
| @@ -23,10 +23,10 @@ Gem::Specification.new do |s| | |
| 23 23 |  | 
| 24 24 | 
             
              s.add_dependency 'addressable', '~> 2.3'
         | 
| 25 25 |  | 
| 26 | 
            -
              s.add_development_dependency 'rake'
         | 
| 26 | 
            +
              s.add_development_dependency 'rake', '~> 10.4'
         | 
| 27 27 | 
             
              s.add_development_dependency 'rspec',     '~> 3.1'
         | 
| 28 | 
            -
              s.add_development_dependency 'rspec-its'
         | 
| 28 | 
            +
              s.add_development_dependency 'rspec-its', '~> 1.1'
         | 
| 29 29 | 
             
              s.add_development_dependency 'bundler',   '~> 1.6'
         | 
| 30 | 
            -
              s.add_development_dependency 'rubocop',   '~> 0. | 
| 30 | 
            +
              s.add_development_dependency 'rubocop',   '~> 0.27'
         | 
| 31 31 | 
             
              s.add_development_dependency 'simplecov', '~> 0.9'
         | 
| 32 32 | 
             
            end
         | 
| @@ -1,14 +1,12 @@ | |
| 1 1 | 
             
            require 'spec_helper'
         | 
| 2 2 |  | 
| 3 3 | 
             
            describe OptParseValidator::OptParser do
         | 
| 4 | 
            -
             | 
| 5 4 | 
             
              subject(:parser)     { described_class.new }
         | 
| 6 5 | 
             
              let(:fixtures)       { File.join(FIXTURES, 'options_file') }
         | 
| 7 6 | 
             
              let(:default_file)   { File.join(fixtures, 'default.json') }
         | 
| 8 7 | 
             
              let(:override_file)  { File.join(fixtures, 'override.yml') }
         | 
| 9 8 |  | 
| 10 9 | 
             
              describe '#load_options_files' do
         | 
| 11 | 
            -
             | 
| 12 10 | 
             
                context 'when error' do
         | 
| 13 11 | 
             
                  before { parser.options_files << config_file }
         | 
| 14 12 |  | 
| @@ -1,7 +1,6 @@ | |
| 1 1 | 
             
            require 'spec_helper'
         | 
| 2 2 |  | 
| 3 3 | 
             
            describe OptParseValidator::OptCredentials do
         | 
| 4 | 
            -
             | 
| 5 4 | 
             
              subject(:opt) { described_class.new(['-l', '--login USERNAME:PASSWORD']) }
         | 
| 6 5 |  | 
| 7 6 | 
             
              describe '#validate' do
         | 
| @@ -19,5 +18,4 @@ describe OptParseValidator::OptCredentials do | |
| 19 18 | 
             
                  end
         | 
| 20 19 | 
             
                end
         | 
| 21 20 | 
             
              end
         | 
| 22 | 
            -
             | 
| 23 21 | 
             
            end
         | 
| @@ -1,7 +1,6 @@ | |
| 1 1 | 
             
            require 'spec_helper'
         | 
| 2 2 |  | 
| 3 3 | 
             
            describe OptParseValidator::OptDirectoryPath do
         | 
| 4 | 
            -
             | 
| 5 4 | 
             
              subject(:opt) { described_class.new(['-d', '--dir DIR'], attrs) }
         | 
| 6 5 | 
             
              let(:attrs)   { {} }
         | 
| 7 6 | 
             
              let(:dir)     { File.join(FIXTURES, 'options_file') }
         | 
| @@ -21,5 +20,4 @@ describe OptParseValidator::OptDirectoryPath do | |
| 21 20 | 
             
                  end
         | 
| 22 21 | 
             
                end
         | 
| 23 22 | 
             
              end
         | 
| 24 | 
            -
             | 
| 25 23 | 
             
            end
         | 
| @@ -1,7 +1,6 @@ | |
| 1 1 | 
             
            require 'spec_helper'
         | 
| 2 2 |  | 
| 3 3 | 
             
            describe OptParseValidator::OptFilePath do
         | 
| 4 | 
            -
             | 
| 5 4 | 
             
              subject(:opt)  { described_class.new(['-f', '--file FILE_PATH'], attrs) }
         | 
| 6 5 | 
             
              let(:attrs)    { {} }
         | 
| 7 6 | 
             
              let(:rwx_file) { File.join(FIXTURES, 'rwx.txt') }
         | 
| @@ -89,5 +88,4 @@ describe OptParseValidator::OptFilePath do | |
| 89 88 | 
             
                  end
         | 
| 90 89 | 
             
                end
         | 
| 91 90 | 
             
              end
         | 
| 92 | 
            -
             | 
| 93 91 | 
             
            end
         | 
| @@ -1,7 +1,6 @@ | |
| 1 1 | 
             
            require 'spec_helper'
         | 
| 2 2 |  | 
| 3 3 | 
             
            describe OptParseValidator::OptInteger do
         | 
| 4 | 
            -
             | 
| 5 4 | 
             
              subject(:opt) { described_class.new(['-i', '--int INT']) }
         | 
| 6 5 |  | 
| 7 6 | 
             
              describe '#validate' do
         | 
| @@ -15,5 +14,4 @@ describe OptParseValidator::OptInteger do | |
| 15 14 | 
             
                  expect(opt.validate('12')).to eq 12
         | 
| 16 15 | 
             
                end
         | 
| 17 16 | 
             
              end
         | 
| 18 | 
            -
             | 
| 19 17 | 
             
            end
         | 
| @@ -1,7 +1,6 @@ | |
| 1 1 | 
             
            require 'spec_helper'
         | 
| 2 2 |  | 
| 3 3 | 
             
            describe OptParseValidator::OptPositiveInteger do
         | 
| 4 | 
            -
             | 
| 5 4 | 
             
              subject(:opt) { described_class.new(['-i', '--int INT']) }
         | 
| 6 5 |  | 
| 7 6 | 
             
              describe '#validate' do
         | 
| @@ -15,5 +14,4 @@ describe OptParseValidator::OptPositiveInteger do | |
| 15 14 | 
             
                  expect(opt.validate('20')).to eq 20
         | 
| 16 15 | 
             
                end
         | 
| 17 16 | 
             
              end
         | 
| 18 | 
            -
             | 
| 19 17 | 
             
            end
         | 
| @@ -1,12 +1,10 @@ | |
| 1 1 | 
             
            require 'spec_helper'
         | 
| 2 2 |  | 
| 3 3 | 
             
            describe OptParseValidator::OptProxy do
         | 
| 4 | 
            -
             | 
| 5 4 | 
             
              subject(:opt) { described_class.new(['--proxy PROXY'], attrs) }
         | 
| 6 5 | 
             
              let(:attrs)   { { protocols: %w(http https socks socks5 socks4) } }
         | 
| 7 6 |  | 
| 8 7 | 
             
              describe '#validate' do
         | 
| 9 8 | 
             
                # Handled by OptURI
         | 
| 10 9 | 
             
              end
         | 
| 11 | 
            -
             | 
| 12 10 | 
             
            end
         | 
| @@ -1,7 +1,6 @@ | |
| 1 1 | 
             
            require 'spec_helper'
         | 
| 2 2 |  | 
| 3 3 | 
             
            describe OptParseValidator::OptURL do
         | 
| 4 | 
            -
             | 
| 5 4 | 
             
              subject(:opt) { described_class.new(['-u', '--url URL']) }
         | 
| 6 5 |  | 
| 7 6 | 
             
              describe '#validate' do
         | 
| @@ -24,5 +23,4 @@ describe OptParseValidator::OptURL do | |
| 24 23 | 
             
                  expect(opt.validate(url)).to eq url
         | 
| 25 24 | 
             
                end
         | 
| 26 25 | 
             
              end
         | 
| 27 | 
            -
             | 
| 28 26 | 
             
            end
         | 
| @@ -1,7 +1,6 @@ | |
| 1 1 | 
             
            require 'spec_helper'
         | 
| 2 2 |  | 
| 3 3 | 
             
            describe OptParseValidator::OptParser do
         | 
| 4 | 
            -
             | 
| 5 4 | 
             
              subject(:parser)  { described_class.new }
         | 
| 6 5 | 
             
              let(:verbose_opt) { OptParseValidator::OptBase.new(%w(-v --verbose)) }
         | 
| 7 6 | 
             
              let(:url_opt)     { OptParseValidator::OptURL.new(['-u', '--url URL'], required: true) }
         | 
    
        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. | 
| 4 | 
            +
              version: 0.0.5
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - WPScanTeam - Erwan le Rousseau
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2015-01-26 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: addressable
         | 
| @@ -28,16 +28,16 @@ dependencies: | |
| 28 28 | 
             
              name: rake
         | 
| 29 29 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 30 30 | 
             
                requirements:
         | 
| 31 | 
            -
                - - " | 
| 31 | 
            +
                - - "~>"
         | 
| 32 32 | 
             
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            -
                    version: ' | 
| 33 | 
            +
                    version: '10.4'
         | 
| 34 34 | 
             
              type: :development
         | 
| 35 35 | 
             
              prerelease: false
         | 
| 36 36 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 37 37 | 
             
                requirements:
         | 
| 38 | 
            -
                - - " | 
| 38 | 
            +
                - - "~>"
         | 
| 39 39 | 
             
                  - !ruby/object:Gem::Version
         | 
| 40 | 
            -
                    version: ' | 
| 40 | 
            +
                    version: '10.4'
         | 
| 41 41 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 42 42 | 
             
              name: rspec
         | 
| 43 43 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -56,16 +56,16 @@ dependencies: | |
| 56 56 | 
             
              name: rspec-its
         | 
| 57 57 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 58 58 | 
             
                requirements:
         | 
| 59 | 
            -
                - - " | 
| 59 | 
            +
                - - "~>"
         | 
| 60 60 | 
             
                  - !ruby/object:Gem::Version
         | 
| 61 | 
            -
                    version: ' | 
| 61 | 
            +
                    version: '1.1'
         | 
| 62 62 | 
             
              type: :development
         | 
| 63 63 | 
             
              prerelease: false
         | 
| 64 64 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 65 65 | 
             
                requirements:
         | 
| 66 | 
            -
                - - " | 
| 66 | 
            +
                - - "~>"
         | 
| 67 67 | 
             
                  - !ruby/object:Gem::Version
         | 
| 68 | 
            -
                    version: ' | 
| 68 | 
            +
                    version: '1.1'
         | 
| 69 69 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 70 70 | 
             
              name: bundler
         | 
| 71 71 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -86,14 +86,14 @@ dependencies: | |
| 86 86 | 
             
                requirements:
         | 
| 87 87 | 
             
                - - "~>"
         | 
| 88 88 | 
             
                  - !ruby/object:Gem::Version
         | 
| 89 | 
            -
                    version: '0. | 
| 89 | 
            +
                    version: '0.27'
         | 
| 90 90 | 
             
              type: :development
         | 
| 91 91 | 
             
              prerelease: false
         | 
| 92 92 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 93 93 | 
             
                requirements:
         | 
| 94 94 | 
             
                - - "~>"
         | 
| 95 95 | 
             
                  - !ruby/object:Gem::Version
         | 
| 96 | 
            -
                    version: '0. | 
| 96 | 
            +
                    version: '0.27'
         | 
| 97 97 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 98 98 | 
             
              name: simplecov
         | 
| 99 99 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -167,7 +167,7 @@ files: | |
| 167 167 | 
             
            - spec/spec_helper.rb
         | 
| 168 168 | 
             
            homepage: https://github.com/wpscanteam/OptParseValidator
         | 
| 169 169 | 
             
            licenses:
         | 
| 170 | 
            -
            -  | 
| 170 | 
            +
            - MIT
         | 
| 171 171 | 
             
            metadata: {}
         | 
| 172 172 | 
             
            post_install_message: 
         | 
| 173 173 | 
             
            rdoc_options: []
         | 
| @@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 185 185 | 
             
                  version: '0'
         | 
| 186 186 | 
             
            requirements: []
         | 
| 187 187 | 
             
            rubyforge_project: 
         | 
| 188 | 
            -
            rubygems_version: 2. | 
| 188 | 
            +
            rubygems_version: 2.4.5
         | 
| 189 189 | 
             
            signing_key: 
         | 
| 190 190 | 
             
            specification_version: 4
         | 
| 191 191 | 
             
            summary: Testing Gem
         |