nokogiri-html-ext 0.2.2 → 0.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bcf8d54ec9864f58ba4ada5d6c47e191dbc0063249afb256928bf5fc52f5f0e0
4
- data.tar.gz: 9c72dacd89707ad6d320e3ed368860b9f58ee73fadb8427a54012fa1c18282a2
3
+ metadata.gz: 67354c8dbf65774b9c418bc69722ba7f97c9f852913784e9227c0bc9f9a5dff7
4
+ data.tar.gz: f4ba45c896400d9dc5a8e5b84365f8b4238b456b01a4311ef962ff8353db6c8d
5
5
  SHA512:
6
- metadata.gz: e589cf7989b82d9b73d265494c537c098a59236c4314cc758fda219e7b908dd0e9f22cb8ead7834def9ce74d27f223468f5394ee071c8be9df98ea391440623c
7
- data.tar.gz: 3ffd78636127f753fde326de3b20b762a6b678583274425d2d6ad35827c305ab10711a40b1ed927251a4e6040ffa6585b9056161979ffdec0052da26fdbb1963
6
+ metadata.gz: d7b8edd22d5545c56e2564e255d87ac894691541efdb6e15e284b9194ea5078ac5b3a6b0cb477900491562884c56fe6246b371c8ad8def23c6a6bea92365bc32
7
+ data.tar.gz: 6a5a6d1e19c1e1380012152b59a9a0baf68512c36a880b3810713edb98ea6830ef006ca67f03a0e15e98b813b8e23baed72d25c2a5b2b98d0d6c58460ca4e29c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.3.0 / 2023-01-19
4
+
5
+ - Remove escaping/unescaping code in relative URL resolution (2de6c5b)
6
+ - Remove code-scanning-rubocop and rspec-github gems (3b3e625)
7
+ - Update development Ruby to v2.7.7 (bd328f5)
8
+
3
9
  ## v0.2.2 / 2022-08-20
4
10
 
5
11
  - Improve handling of escaped and invalid URLs (b0d6c75)
data/CONTRIBUTING.md CHANGED
@@ -8,9 +8,9 @@ There are a couple ways you can help improve nokogiri-html-ext:
8
8
 
9
9
  ## Getting Started
10
10
 
11
- nokogiri-html-ext is developed using Ruby 2.7.6 and is additionally tested against Ruby 3.0 and 3.1 using [GitHub Actions](https://github.com/jgarber623/nokogiri-html-ext/actions).
11
+ nokogiri-html-ext is developed using Ruby 2.7.7 and is additionally tested against Ruby 3.0, 3.1, and 3.2 using [GitHub Actions](https://github.com/jgarber623/nokogiri-html-ext/actions).
12
12
 
13
- Before making changes to nokogiri-html-ext, you'll want to install Ruby 2.7.6. It's recommended that you use a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm). Once you've installed Ruby 2.7.6 using your method of choice, install the project's gems by running:
13
+ Before making changes to nokogiri-html-ext, you'll want to install Ruby 2.7.7. It's recommended that you use a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm). Once you've installed Ruby 2.7.7 using your method of choice, install the project's gems by running:
14
14
 
15
15
  ```sh
16
16
  bundle install
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  [![Gem](https://img.shields.io/gem/v/nokogiri-html-ext.svg?logo=rubygems&style=for-the-badge)](https://rubygems.org/gems/nokogiri-html-ext)
6
6
  [![Downloads](https://img.shields.io/gem/dt/nokogiri-html-ext.svg?logo=rubygems&style=for-the-badge)](https://rubygems.org/gems/nokogiri-html-ext)
7
- [![Build](https://img.shields.io/github/workflow/status/jgarber623/nokogiri-html-ext/CI?logo=github&style=for-the-badge)](https://github.com/jgarber623/nokogiri-html-ext/actions/workflows/ci.yml)
7
+ [![Build](https://img.shields.io/github/actions/workflow/status/jgarber623/nokogiri-html-ext/ci.yml?branch=main&logo=github&style=for-the-badge)](https://github.com/jgarber623/nokogiri-html-ext/actions/workflows/ci.yml)
8
8
  [![Maintainability](https://img.shields.io/codeclimate/maintainability/jgarber623/nokogiri-html-ext.svg?logo=code-climate&style=for-the-badge)](https://codeclimate.com/github/jgarber623/nokogiri-html-ext)
9
9
  [![Coverage](https://img.shields.io/codeclimate/c/jgarber623/nokogiri-html-ext.svg?logo=code-climate&style=for-the-badge)](https://codeclimate.com/github/jgarber623/nokogiri-html-ext/code)
10
10
 
@@ -18,7 +18,7 @@
18
18
 
19
19
  Before installing and using nokogiri-html-ext, you'll want to have [Ruby](https://www.ruby-lang.org) 2.7 (or newer) installed. It's recommended that you use a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm).
20
20
 
21
- nokogiri-html-ext is developed using Ruby 2.7.6 and is additionally tested against Ruby 3.0 and 3.1 using [GitHub Actions](https://github.com/jgarber623/nokogiri-html-ext/actions).
21
+ nokogiri-html-ext is developed using Ruby 2.7.7 and is additionally tested against Ruby 3.0, 3.1, and 3.2 using [GitHub Actions](https://github.com/jgarber623/nokogiri-html-ext/actions).
22
22
 
23
23
  ## Installation
24
24
 
@@ -69,13 +69,9 @@ module Nokogiri
69
69
  #
70
70
  # @return [String]
71
71
  def resolve_relative_url(url)
72
- url_str = url.to_s
73
-
74
- uri_parser.unescape(
75
- uri_parser.join(*[document.url.strip, base_href, url_str].compact.map { |u| uri_parser.escape(u) })
76
- .normalize
77
- .to_s
78
- )
72
+ URI::DEFAULT_PARSER.join(*[document.url.strip, base_href, url.to_s].compact)
73
+ .normalize
74
+ .to_s
79
75
  rescue URI::InvalidComponentError, URI::InvalidURIError
80
76
  url
81
77
  end
@@ -110,10 +106,6 @@ module Nokogiri
110
106
  end
111
107
  end
112
108
  end
113
-
114
- def uri_parser
115
- @uri_parser ||= URI::DEFAULT_PARSER
116
- end
117
109
  end
118
110
  end
119
111
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nokogiri
4
4
  module HTMLExt
5
- VERSION = '0.2.2'
5
+ VERSION = '0.3.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri-html-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Garber
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-21 00:00:00.000000000 Z
11
+ date: 2023-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -44,7 +44,7 @@ licenses:
44
44
  - MIT
45
45
  metadata:
46
46
  bug_tracker_uri: https://github.com/jgarber623/nokogiri-html-ext/issues
47
- changelog_uri: https://github.com/jgarber623/nokogiri-html-ext/blob/v0.2.2/CHANGELOG.md
47
+ changelog_uri: https://github.com/jgarber623/nokogiri-html-ext/blob/v0.3.0/CHANGELOG.md
48
48
  rubygems_mfa_required: 'true'
49
49
  post_install_message:
50
50
  rdoc_options: []
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  requirements: []
64
- rubygems_version: 3.3.16
64
+ rubygems_version: 3.3.26
65
65
  signing_key:
66
66
  specification_version: 4
67
67
  summary: Extend Nokogiri with several useful HTML-centric features.