mechanize 2.8.1 → 2.8.2
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.
Potentially problematic release.
This version of mechanize might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +11 -0
- data/.github/workflows/ci-test.yml +19 -11
- data/CHANGELOG.md +7 -0
- data/lib/mechanize/version.rb +1 -1
- data/mechanize.gemspec +11 -4
- data/test/test_mechanize_page_encoding.rb +10 -5
- metadata +15 -8
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 98e75d76ae1e421fbdb7f7ff435759e0799612f41d55918cf82bd77e689399bb
         | 
| 4 | 
            +
              data.tar.gz: 439d3bf9e35c76a8f8e80daff1e76ad89c8fe3a1b9fd436f6274d1f7f4d1c2f4
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: da510c4185aea0860d0b48b37c78d69db0b399374d1b79a4d54c8eb6748f8b9d9b4a946e050b673467ee5b808ecb298d13fb8e4dc0f41d4c62afdea8a8da4acc
         | 
| 7 | 
            +
              data.tar.gz: 571af8b0552b726c32dbf4c9818fba409011c633cf0eed3e355ab6f63b605d7a8d1313ab638ee474933115e9415d046ac95595cb1ac37dfa4a49aeb69698149a
         | 
| @@ -0,0 +1,11 @@ | |
| 1 | 
            +
            # To get started with Dependabot version updates, you'll need to specify which
         | 
| 2 | 
            +
            # package ecosystems to update and where the package manifests are located.
         | 
| 3 | 
            +
            # Please see the documentation for all configuration options:
         | 
| 4 | 
            +
            # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            version: 2
         | 
| 7 | 
            +
            updates:
         | 
| 8 | 
            +
              - package-ecosystem: "bundler"
         | 
| 9 | 
            +
                directory: "/"
         | 
| 10 | 
            +
                schedule:
         | 
| 11 | 
            +
                  interval: "weekly"
         | 
| @@ -10,7 +10,18 @@ on: | |
| 10 10 | 
             
                  - main
         | 
| 11 11 |  | 
| 12 12 | 
             
            jobs:
         | 
| 13 | 
            +
              rubocop:
         | 
| 14 | 
            +
                runs-on: ubuntu-latest
         | 
| 15 | 
            +
                steps:
         | 
| 16 | 
            +
                - uses: actions/checkout@v2
         | 
| 17 | 
            +
                - uses: ruby/setup-ruby@v1
         | 
| 18 | 
            +
                  with:
         | 
| 19 | 
            +
                    ruby-version: "3.0"
         | 
| 20 | 
            +
                    bundler-cache: true
         | 
| 21 | 
            +
                - run: bundle exec rake rubocop
         | 
| 22 | 
            +
             | 
| 13 23 | 
             
              test:
         | 
| 24 | 
            +
                needs: ["rubocop"]
         | 
| 14 25 | 
             
                strategy:
         | 
| 15 26 | 
             
                  fail-fast: false
         | 
| 16 27 | 
             
                  matrix:
         | 
| @@ -19,27 +30,24 @@ jobs: | |
| 19 30 | 
             
                runs-on: ubuntu-latest
         | 
| 20 31 | 
             
                steps:
         | 
| 21 32 | 
             
                - uses: actions/checkout@v2
         | 
| 22 | 
            -
                -  | 
| 23 | 
            -
                  uses: ruby/setup-ruby@v1
         | 
| 33 | 
            +
                - uses: ruby/setup-ruby@v1
         | 
| 24 34 | 
             
                  with:
         | 
| 25 | 
            -
                    ruby-version: ${{ | 
| 35 | 
            +
                    ruby-version: ${{matrix.ruby-version}}
         | 
| 26 36 | 
             
                    bundler-cache: true
         | 
| 27 | 
            -
                -  | 
| 28 | 
            -
                  run: bundle exec rake
         | 
| 37 | 
            +
                - run: bundle exec rake test
         | 
| 29 38 |  | 
| 30 39 | 
             
              test-platform:
         | 
| 40 | 
            +
                needs: ["rubocop"]
         | 
| 31 41 | 
             
                strategy:
         | 
| 32 42 | 
             
                  fail-fast: false
         | 
| 33 43 | 
             
                  matrix:
         | 
| 34 44 | 
             
                    platform: ["windows-latest", "macos-latest"]
         | 
| 35 45 |  | 
| 36 | 
            -
                runs-on: ${{ | 
| 46 | 
            +
                runs-on: ${{matrix.platform}}
         | 
| 37 47 | 
             
                steps:
         | 
| 38 48 | 
             
                - uses: actions/checkout@v2
         | 
| 39 | 
            -
                -  | 
| 40 | 
            -
                  uses: ruby/setup-ruby@v1
         | 
| 49 | 
            +
                - uses: ruby/setup-ruby@v1
         | 
| 41 50 | 
             
                  with:
         | 
| 42 | 
            -
                    ruby-version: 3.0
         | 
| 51 | 
            +
                    ruby-version: "3.0"
         | 
| 43 52 | 
             
                    bundler-cache: true
         | 
| 44 | 
            -
                -  | 
| 45 | 
            -
                  run: bundle exec rake
         | 
| 53 | 
            +
                - run: bundle exec rake test
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/lib/mechanize/version.rb
    CHANGED
    
    
    
        data/mechanize.gemspec
    CHANGED
    
    | @@ -1,8 +1,6 @@ | |
| 1 1 | 
             
            # coding: utf-8
         | 
| 2 2 | 
             
            # frozen_string_literal: true
         | 
| 3 | 
            -
             | 
| 4 | 
            -
            $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
         | 
| 5 | 
            -
            require 'mechanize/version'
         | 
| 3 | 
            +
            require_relative 'lib/mechanize/version'
         | 
| 6 4 |  | 
| 7 5 | 
             
            Gem::Specification.new do |spec|
         | 
| 8 6 | 
             
              spec.name = "mechanize"
         | 
| @@ -35,6 +33,15 @@ Gem::Specification.new do |spec| | |
| 35 33 | 
             
                  'ljjarvis@gmail.com',
         | 
| 36 34 | 
             
                ]
         | 
| 37 35 |  | 
| 36 | 
            +
              spec.metadata = {
         | 
| 37 | 
            +
                'yard.run'          => 'yard',
         | 
| 38 | 
            +
                'bug_tracker_uri'   => 'https://github.com/sparklemotion/mechanize/issues',
         | 
| 39 | 
            +
                'changelog_uri'     => 'https://github.com/sparklemotion/mechanize/blob/main/CHANGELOG.md',
         | 
| 40 | 
            +
                'documentation_uri' => 'https://www.rubydoc.info/gems/mechanize',
         | 
| 41 | 
            +
                'homepage_uri'      => 'https://github.com/sparklemotion/mechanize',
         | 
| 42 | 
            +
                'source_code_uri'   => 'https://github.com/sparklemotion/mechanize'
         | 
| 43 | 
            +
              }
         | 
| 44 | 
            +
             | 
| 38 45 | 
             
              spec.license = "MIT"
         | 
| 39 46 |  | 
| 40 47 | 
             
              spec.require_paths = ["lib"]
         | 
| @@ -46,7 +53,7 @@ Gem::Specification.new do |spec| | |
| 46 53 |  | 
| 47 54 | 
             
              spec.required_ruby_version = ">= 2.5.0"
         | 
| 48 55 |  | 
| 49 | 
            -
              spec.add_runtime_dependency("addressable", "~> 2. | 
| 56 | 
            +
              spec.add_runtime_dependency("addressable", "~> 2.8")
         | 
| 50 57 | 
             
              spec.add_runtime_dependency("domain_name", ">= 0.5.20190701", "~> 0.5")
         | 
| 51 58 | 
             
              spec.add_runtime_dependency("http-cookie", ">= 1.0.3", "~> 1.0")
         | 
| 52 59 | 
             
              spec.add_runtime_dependency("mime-types", "~> 3.0")
         | 
| @@ -184,6 +184,8 @@ class TestMechanizePageEncoding < Mechanize::TestCase | |
| 184 184 | 
             
              end
         | 
| 185 185 |  | 
| 186 186 | 
             
              def test_parser_error_message_containing_encoding_errors
         | 
| 187 | 
            +
                skip if RUBY_ENGINE == 'jruby' # this is a libxml2-specific condition
         | 
| 188 | 
            +
             | 
| 187 189 | 
             
                # https://github.com/sparklemotion/mechanize/issues/553
         | 
| 188 190 | 
             
                body = <<~EOF
         | 
| 189 191 | 
             
                  <html>
         | 
| @@ -200,10 +202,13 @@ class TestMechanizePageEncoding < Mechanize::TestCase | |
| 200 202 | 
             
                page.search("body")
         | 
| 201 203 |  | 
| 202 204 | 
             
                # let's assert on the setup: a libxml2-returned parsing error itself contains an invalid character
         | 
| 203 | 
            -
                 | 
| 204 | 
            -
                 | 
| 205 | 
            -
             | 
| 205 | 
            +
                # note that this problem only appears in libxml <= 2.9.10
         | 
| 206 | 
            +
                error = page.parser.errors.find { |e| e.message.include?("Comment not terminated") }
         | 
| 207 | 
            +
                if error
         | 
| 208 | 
            +
                  exception = assert_raises(ArgumentError) do
         | 
| 209 | 
            +
                    error.message =~ /any regex just to trigger encoding error/
         | 
| 210 | 
            +
                  end
         | 
| 211 | 
            +
                  assert_includes(exception.message, "invalid byte sequence in UTF-8")
         | 
| 206 212 | 
             
                end
         | 
| 207 | 
            -
             | 
| 208 | 
            -
              end unless RUBY_ENGINE == 'jruby' # this is a libxml2-specific condition
         | 
| 213 | 
            +
              end
         | 
| 209 214 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: mechanize
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.8. | 
| 4 | 
            +
              version: 2.8.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Eric Hodel
         | 
| @@ -12,7 +12,7 @@ authors: | |
| 12 12 | 
             
            autorequire: 
         | 
| 13 13 | 
             
            bindir: bin
         | 
| 14 14 | 
             
            cert_chain: []
         | 
| 15 | 
            -
            date: 2021- | 
| 15 | 
            +
            date: 2021-08-06 00:00:00.000000000 Z
         | 
| 16 16 | 
             
            dependencies:
         | 
| 17 17 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 18 18 | 
             
              name: addressable
         | 
| @@ -20,14 +20,14 @@ dependencies: | |
| 20 20 | 
             
                requirements:
         | 
| 21 21 | 
             
                - - "~>"
         | 
| 22 22 | 
             
                  - !ruby/object:Gem::Version
         | 
| 23 | 
            -
                    version: '2. | 
| 23 | 
            +
                    version: '2.8'
         | 
| 24 24 | 
             
              type: :runtime
         | 
| 25 25 | 
             
              prerelease: false
         | 
| 26 26 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 27 27 | 
             
                requirements:
         | 
| 28 28 | 
             
                - - "~>"
         | 
| 29 29 | 
             
                  - !ruby/object:Gem::Version
         | 
| 30 | 
            -
                    version: '2. | 
| 30 | 
            +
                    version: '2.8'
         | 
| 31 31 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 32 32 | 
             
              name: domain_name
         | 
| 33 33 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -261,12 +261,13 @@ email: | |
| 261 261 | 
             
            executables: []
         | 
| 262 262 | 
             
            extensions: []
         | 
| 263 263 | 
             
            extra_rdoc_files:
         | 
| 264 | 
            -
            - GUIDE.rdoc
         | 
| 265 264 | 
             
            - EXAMPLES.rdoc
         | 
| 266 | 
            -
            -  | 
| 265 | 
            +
            - GUIDE.rdoc
         | 
| 267 266 | 
             
            - CHANGELOG.md
         | 
| 267 | 
            +
            - README.md
         | 
| 268 268 | 
             
            files:
         | 
| 269 269 | 
             
            - ".autotest"
         | 
| 270 | 
            +
            - ".github/dependabot.yml"
         | 
| 270 271 | 
             
            - ".github/workflows/ci-test.yml"
         | 
| 271 272 | 
             
            - ".gitignore"
         | 
| 272 273 | 
             
            - ".yardopts"
         | 
| @@ -477,7 +478,13 @@ files: | |
| 477 478 | 
             
            homepage: https://github.com/sparklemotion/mechanize
         | 
| 478 479 | 
             
            licenses:
         | 
| 479 480 | 
             
            - MIT
         | 
| 480 | 
            -
            metadata: | 
| 481 | 
            +
            metadata:
         | 
| 482 | 
            +
              yard.run: yard
         | 
| 483 | 
            +
              bug_tracker_uri: https://github.com/sparklemotion/mechanize/issues
         | 
| 484 | 
            +
              changelog_uri: https://github.com/sparklemotion/mechanize/blob/main/CHANGELOG.md
         | 
| 485 | 
            +
              documentation_uri: https://www.rubydoc.info/gems/mechanize
         | 
| 486 | 
            +
              homepage_uri: https://github.com/sparklemotion/mechanize
         | 
| 487 | 
            +
              source_code_uri: https://github.com/sparklemotion/mechanize
         | 
| 481 488 | 
             
            post_install_message: 
         | 
| 482 489 | 
             
            rdoc_options:
         | 
| 483 490 | 
             
            - "--main"
         | 
| @@ -495,7 +502,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 495 502 | 
             
                - !ruby/object:Gem::Version
         | 
| 496 503 | 
             
                  version: '0'
         | 
| 497 504 | 
             
            requirements: []
         | 
| 498 | 
            -
            rubygems_version: 3. | 
| 505 | 
            +
            rubygems_version: 3.2.15
         | 
| 499 506 | 
             
            signing_key: 
         | 
| 500 507 | 
             
            specification_version: 4
         | 
| 501 508 | 
             
            summary: The Mechanize library is used for automating interaction with websites
         |