mechanize 2.8.1 → 2.8.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of mechanize might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53105ca453eb763c9cb80bea61508bbc08e500f96aceae911191490e4bb03af5
4
- data.tar.gz: f5e0f84257bc299060775ce26d52b80d89153db95d3bfa98d8bfbdc1c3cb5fce
3
+ metadata.gz: 98e75d76ae1e421fbdb7f7ff435759e0799612f41d55918cf82bd77e689399bb
4
+ data.tar.gz: 439d3bf9e35c76a8f8e80daff1e76ad89c8fe3a1b9fd436f6274d1f7f4d1c2f4
5
5
  SHA512:
6
- metadata.gz: 4a55d7aedbc2e81ed13d073c6ff63b60fb4ad060c771589c0024abb3b02c55ee5be54fa5c44b60c78dc3d201e31358c1f9a4922befff223c5f68befb462a4a6a
7
- data.tar.gz: cf5967ce52c29e352dc820d5fd943434d37fe279a2ae957531f88f96a23ce7b7c206066c236e5308b912c6757ca8e130e354d26f7dd90ed529522aa7cc8be24a
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
- - name: Set up Ruby
23
- uses: ruby/setup-ruby@v1
33
+ - uses: ruby/setup-ruby@v1
24
34
  with:
25
- ruby-version: ${{ matrix.ruby-version }}
35
+ ruby-version: ${{matrix.ruby-version}}
26
36
  bundler-cache: true
27
- - name: Run tests
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: ${{ matrix.platform }}
46
+ runs-on: ${{matrix.platform}}
37
47
  steps:
38
48
  - uses: actions/checkout@v2
39
- - name: Set up Ruby
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
- - name: Run tests
45
- run: bundle exec rake
53
+ - run: bundle exec rake test
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Mechanize CHANGELOG
2
2
 
3
+ ## 2.8.2 / 2021-08-06
4
+
5
+ ### Dependencies
6
+
7
+ * Update dependency on Addressable from `~>2.7` to `~>2.8`. (#584) @yidingww
8
+
9
+
3
10
  ## 2.8.1 / 2021-05-09
4
11
 
5
12
  ### Fix
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  class Mechanize
3
- VERSION = "2.8.1"
3
+ VERSION = "2.8.2"
4
4
  end
data/mechanize.gemspec CHANGED
@@ -1,8 +1,6 @@
1
1
  # coding: utf-8
2
2
  # frozen_string_literal: true
3
- lib = File.expand_path('../lib', __FILE__)
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.7")
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
- assert(error = page.parser.errors.find { |e| e.message.include?("Comment not terminated") })
204
- exception = assert_raises(ArgumentError) do
205
- error.message =~ /any regex just to trigger encoding error/
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
- assert_includes(exception.message, "invalid byte sequence in UTF-8")
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.1
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-05-09 00:00:00.000000000 Z
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.7'
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.7'
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
- - README.md
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.1.4
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