mechanize 2.12.2 → 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: a0f6963774d1167e4fd1a9a48252dc9aa30333b46bdaba1319b9bc8dac2e0796
4
- data.tar.gz: fbbb2f82727a36f58313dfca7ffe4d5f1a5b33024663cd501cebdb5515831e56
3
+ metadata.gz: 12d88ac70e331d532616fe001079f594f3c9f7dcb9cf353eda173d533cef32f5
4
+ data.tar.gz: ddb2a310ff25e779d87ff0670c911a80a34cf27ac2d90daf0571384b87d7c029
5
5
  SHA512:
6
- metadata.gz: 339bd5bb87e66aad70541bd0a1a9031f349f6fbe62d991c45b28ebae43d9d4db7d4ba31c15de8578ca86e5c0efa0593730075e3695fc3e412f87ba07e6529447
7
- data.tar.gz: 7e629b20b4760f9e7b701e9cbad275f21cd6bba5114f8538ea9607f1a2335e9f1e121d1c0f36cba1027889f8486afe0aa5e10edff9d0b371fb0c0adf24277059
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,11 @@
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
+
3
9
  ## 2.12.2 / 2023-10-02
4
10
 
5
11
  * Quash warnings from `Mime::Type.new` in `mime-types` v3.6.0. (#655) @avk
@@ -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?
@@ -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.2"
3
+ VERSION = "2.13.0"
4
4
  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.12.2
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-10-02 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
@@ -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: