mechanize 2.12.1 → 2.13.0

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
  SHA256:
3
- metadata.gz: 7183879e98b1195380219464368f7761a6ee2b9adb3eb18f47b216e740d840d5
4
- data.tar.gz: 9eaf999bb67a5f7f7625b1a77a4466b88a005d947003b67e155398f3af2b0bf5
3
+ metadata.gz: 12d88ac70e331d532616fe001079f594f3c9f7dcb9cf353eda173d533cef32f5
4
+ data.tar.gz: ddb2a310ff25e779d87ff0670c911a80a34cf27ac2d90daf0571384b87d7c029
5
5
  SHA512:
6
- metadata.gz: 3ba304c3a37d0eb98ccbbba83f425a68cb6ad2fb0da5d768a93cc8fd802f691da8fb86d7b6670888a597ca5f3f96ff755d6155197cbd1eef7c8db2442177bd72
7
- data.tar.gz: db944be6db0079e9740c8e3aaade533baf990efbd87b6ebdbca034eb81a0adef82838fa50fd301f72d23c463109660a3256d0fae7f0154c8393a97b24ab214a1
6
+ metadata.gz: d63a1bef5b68c4d56219eeb0f75675ca4e59a168f1e6d7ade0aa5d6db327261530d25222fd2746c2e49e60f6e42defbce70a566c01902974394af118b6f241a4
7
+ data.tar.gz: d96c536864252c3bb2c6e0121e594ec5d779f6cb85873846978f6808f000e1ba11a305fdcfc635c1120c00b4fe444e9e8c5275e95c223eab31b0f86459486c69
@@ -32,7 +32,7 @@ jobs:
32
32
  strategy:
33
33
  fail-fast: false
34
34
  matrix:
35
- ruby-version: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "jruby-9.4", "truffleruby"]
35
+ ruby-version: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "head"]
36
36
  runs-on: ubuntu-latest
37
37
  steps:
38
38
  - uses: actions/checkout@v4
@@ -23,7 +23,7 @@ jobs:
23
23
  strategy:
24
24
  fail-fast: false
25
25
  matrix:
26
- ruby-version: ["head", "jruby-head", "truffleruby-head"]
26
+ ruby-version: ["head"]
27
27
  runs-on: ubuntu-latest
28
28
  steps:
29
29
  - uses: actions/checkout@v4
@@ -44,7 +44,7 @@ jobs:
44
44
  steps:
45
45
  - uses: actions/checkout@v4
46
46
  - uses: ruby/setup-ruby@v1
47
- with: { ruby-version: "3.3" }
47
+ with: { ruby-version: "3.4" }
48
48
  - run: |
49
49
  bundle add ${{matrix.name}} --git="${{matrix.git}}"
50
50
  bundle show
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Mechanize CHANGELOG
2
2
 
3
+ ## 2.13.0 / 2025-01-02
4
+
5
+ * Quash frozen string warnings in Ruby 3.4. (#661) @simpl1g
6
+ * Quash URI::Parser warnings in Ruby 3.4. (#662) @flavorjones
7
+
8
+
9
+ ## 2.12.2 / 2023-10-02
10
+
11
+ * Quash warnings from `Mime::Type.new` in `mime-types` v3.6.0. (#655) @avk
12
+
13
+
3
14
  ## 2.12.1 / 2024-08-21
4
15
 
5
16
  * Introduce experimental support for handling Zstd-compressed responses (CRuby only). (#652) @adrianodennanni
@@ -256,7 +256,7 @@ class Mechanize::Form
256
256
 
257
257
  # Treat form fields like accessors.
258
258
  def method_missing(meth, *args)
259
- (method = meth.to_s).chomp!('=')
259
+ method = meth.to_s.chomp('=')
260
260
 
261
261
  if field(method)
262
262
  return field(method).value if args.empty?
@@ -104,7 +104,7 @@ class Mechanize::PluggableParser
104
104
 
105
105
  return parser if parser
106
106
 
107
- mime_type = MIME::Type.new content_type
107
+ mime_type = MIME::Type.new "content-type" => content_type
108
108
 
109
109
  parser = @parsers[mime_type.to_s] ||
110
110
  @parsers[mime_type.simplified] ||
@@ -134,29 +134,27 @@ class Mechanize::Util
134
134
  end
135
135
 
136
136
  def self.uri_escape str, unsafe = nil
137
- @parser ||= begin
138
- URI::Parser.new
139
- rescue NameError
140
- URI
141
- end
142
-
143
- if URI == @parser then
137
+ if URI == parser then
144
138
  unsafe ||= URI::UNSAFE
145
139
  else
146
- unsafe ||= @parser.regexp[:UNSAFE]
140
+ unsafe ||= parser.regexp[:UNSAFE]
147
141
  end
148
142
 
149
- @parser.escape str, unsafe
143
+ parser.escape str, unsafe
150
144
  end
151
145
 
152
146
  def self.uri_unescape str
153
- @parser ||= begin
154
- URI::Parser.new
155
- rescue NameError
156
- URI
157
- end
158
-
159
- @parser.unescape str
147
+ parser.unescape str
160
148
  end
161
149
 
150
+ def self.parser
151
+ @parser ||=
152
+ if defined?(URI::RFC2396_PARSER)
153
+ URI::RFC2396_PARSER
154
+ elsif defined?(URI::Parser)
155
+ URI::Parser.new
156
+ else
157
+ URI
158
+ end
159
+ end
162
160
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  class Mechanize
3
- VERSION = "2.12.1"
3
+ VERSION = "2.13.0"
4
4
  end
data/mechanize.gemspec CHANGED
@@ -56,7 +56,7 @@ Gem::Specification.new do |spec|
56
56
  spec.add_runtime_dependency("addressable", "~> 2.8")
57
57
  spec.add_runtime_dependency("domain_name", ">= 0.5.20190701", "~> 0.5")
58
58
  spec.add_runtime_dependency("http-cookie", ">= 1.0.3", "~> 1.0")
59
- spec.add_runtime_dependency("mime-types", "~> 3.0")
59
+ spec.add_runtime_dependency("mime-types", "~> 3.3")
60
60
  spec.add_runtime_dependency("net-http-digest_auth", ">= 1.4.1", "~> 1.4")
61
61
 
62
62
  # careful! some folks are relying on older versions of net-http-persistent
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.12.1
4
+ version: 2.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Hodel
@@ -9,10 +9,9 @@ authors:
9
9
  - Mike Dalessio
10
10
  - Akinori MUSHA
11
11
  - Lee Jarvis
12
- autorequire:
13
12
  bindir: bin
14
13
  cert_chain: []
15
- date: 2024-08-21 00:00:00.000000000 Z
14
+ date: 2025-01-02 00:00:00.000000000 Z
16
15
  dependencies:
17
16
  - !ruby/object:Gem::Dependency
18
17
  name: addressable
@@ -74,14 +73,14 @@ dependencies:
74
73
  requirements:
75
74
  - - "~>"
76
75
  - !ruby/object:Gem::Version
77
- version: '3.0'
76
+ version: '3.3'
78
77
  type: :runtime
79
78
  prerelease: false
80
79
  version_requirements: !ruby/object:Gem::Requirement
81
80
  requirements:
82
81
  - - "~>"
83
82
  - !ruby/object:Gem::Version
84
- version: '3.0'
83
+ version: '3.3'
85
84
  - !ruby/object:Gem::Dependency
86
85
  name: net-http-digest_auth
87
86
  requirement: !ruby/object:Gem::Requirement
@@ -459,7 +458,6 @@ metadata:
459
458
  documentation_uri: https://www.rubydoc.info/gems/mechanize
460
459
  homepage_uri: https://github.com/sparklemotion/mechanize
461
460
  source_code_uri: https://github.com/sparklemotion/mechanize
462
- post_install_message:
463
461
  rdoc_options:
464
462
  - "--main"
465
463
  - README.md
@@ -476,8 +474,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
476
474
  - !ruby/object:Gem::Version
477
475
  version: '0'
478
476
  requirements: []
479
- rubygems_version: 3.5.11
480
- signing_key:
477
+ rubygems_version: 3.6.2
481
478
  specification_version: 4
482
479
  summary: The Mechanize library is used for automating interaction with websites
483
480
  test_files: