nokogiri-html-ext 0.4.1 → 1.0.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: d7967d8d98d8778c9a5690637757071c8357b3c55e14d100d508f6ce12469887
4
- data.tar.gz: b8f5601a2c40f4edaf77c60afda07a6adf848052d2bf0810cef1c497691c22f2
3
+ metadata.gz: 744c67413c65b1f835b276036444f1bf4c5dc6ea8ff7ca19c57d8b2baa6042bb
4
+ data.tar.gz: b4bb62e1473f4fe7849dc156a6bae69fa10d3983215e457088c918af408c92de
5
5
  SHA512:
6
- metadata.gz: f9d396e7c18ecce3e9d19f97e90c3ea6753861ce8f5b330e7db1f7d5e9e0ae888b65e388cd6b745fc250b559ab6ed519b79151e2d802f94086c278cb6b756968
7
- data.tar.gz: 56dcade1b0b103b7174fa567082007f9d9bd24bc01af8f8bb1a3babaf56844eedd839be9a213861c0c655f204704145fd1c758c9943285e2489a1259b420157a
6
+ metadata.gz: a38ca6fd55d4856faffa48d63ad52a79418e22c9a028136ad9bfadd8bec898c6ea93dedf4b33f195262295933abdd4e2a1f8de501debc1585994115c96a18a8d
7
+ data.tar.gz: 03ac51a3afd842ff3d1ac108d96c47338f473b0a060cf155618aaa1c71a0b82a336909c1a4d377cd8021353ece06429bc93cf60f0016fbdbc19f0a2d01d30c34
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ > [!NOTE]
4
+ > From v1.0.0, changes are documented using [Codeberg Releases](https://codeberg.org/jgarber/nokogiri-html-ext/releases). For a given release, metadata on RubyGems.org will link to that version's Release page.
5
+
6
+ ## 0.4.2 / 2023-12-30
7
+
8
+ - Add `source_code_uri` to metadata (fd29f7c)
9
+
3
10
  ## 0.4.1 / 2023-12-07
4
11
 
5
12
  - Add publish workflow (039abd0)
data/README.md CHANGED
@@ -4,7 +4,6 @@
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/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
7
 
9
8
  ## Key features
10
9
 
@@ -16,7 +15,7 @@
16
15
 
17
16
  Before installing and using nokogiri-html-ext, you'll want to have [Ruby](https://www.ruby-lang.org) 2.7 (or newer) installed. Using 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) is recommended.
18
17
 
19
- nokogiri-html-ext is developed using Ruby 2.7.8 and is tested against additional Ruby versions using [GitHub Actions](https://github.com/indieweb/nokogiri-html-ext/actions).
18
+ nokogiri-html-ext is developed using Ruby 2.7.8 and is tested against additional Ruby versions using [Forgejo Actions](https://codeberg.org/jgarber/nokogiri-html-ext/actions).
20
19
 
21
20
  ## Installation
22
21
 
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "html_ext/version"
3
+ require "nokogiri"
4
+ require "uri"
4
5
 
5
6
  require_relative "html_ext/document"
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "nokogiri"
4
-
5
3
  module Nokogiri
6
4
  module HTML4
7
5
  class Document < Nokogiri::XML::Document
@@ -10,8 +8,8 @@ module Nokogiri
10
8
  # @see https://html.spec.whatwg.org/#srcset-attributes
11
9
  # @see https://html.spec.whatwg.org/#attributes-3
12
10
  IMAGE_CANDIDATE_STRINGS_ATTRIBUTES_MAP = {
13
- "imagesrcset" => %w[link],
14
- "srcset" => %w[img source]
11
+ "imagesrcset" => ["link"],
12
+ "srcset" => ["img", "source"],
15
13
  }.freeze
16
14
 
17
15
  private_constant :IMAGE_CANDIDATE_STRINGS_ATTRIBUTES_MAP
@@ -20,14 +18,14 @@ module Nokogiri
20
18
  #
21
19
  # @see https://html.spec.whatwg.org/#attributes-3
22
20
  URL_ATTRIBUTES_MAP = {
23
- "action" => %w[form],
24
- "cite" => %w[blockquote del ins q],
25
- "data" => %w[object],
26
- "formaction" => %w[button input],
27
- "href" => %w[a area base link],
28
- "ping" => %w[a area],
29
- "poster" => %w[video],
30
- "src" => %w[audio embed iframe img input script source track video]
21
+ "action" => ["form"],
22
+ "cite" => ["blockquote", "del", "ins", "q"],
23
+ "data" => ["object"],
24
+ "formaction" => ["button", "input"],
25
+ "href" => ["a", "area", "base", "link"],
26
+ "ping" => ["a", "area"],
27
+ "poster" => ["video"],
28
+ "src" => ["audio", "embed", "iframe", "img", "input", "script", "source", "track", "video"],
31
29
  }.freeze
32
30
 
33
31
  private_constant :URL_ATTRIBUTES_MAP
@@ -122,7 +120,7 @@ module Nokogiri
122
120
  end
123
121
 
124
122
  def uri_parser
125
- @uri_parser ||= URI::DEFAULT_PARSER
123
+ @uri_parser ||= URI::RFC2396_PARSER
126
124
  end
127
125
  end
128
126
  end
@@ -1,31 +1,30 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "lib/nokogiri/html_ext/version"
4
-
5
3
  Gem::Specification.new do |spec|
6
- spec.required_ruby_version = ">= 2.7"
4
+ spec.required_ruby_version = ">= 3.1"
7
5
 
8
6
  spec.name = "nokogiri-html-ext"
9
- spec.version = Nokogiri::HTMLExt::VERSION
7
+ spec.version = "1.0.0"
10
8
  spec.authors = ["Jason Garber"]
11
9
  spec.email = ["jason@sixtwothree.org"]
12
10
 
13
11
  spec.summary = "Extend Nokogiri with several useful HTML-centric features."
14
12
  spec.description = spec.summary
15
- spec.homepage = "https://github.com/jgarber623/nokogiri-html-ext"
13
+ spec.homepage = "https://codeberg.org/jgarber/nokogiri-html-ext"
16
14
  spec.license = "MIT"
17
15
 
18
16
  spec.files = Dir["lib/**/*"].reject { |f| File.directory?(f) }
19
- spec.files += %w[LICENSE CHANGELOG.md README.md]
20
- spec.files += %w[nokogiri-html-ext.gemspec]
17
+ spec.files += ["LICENSE", "CHANGELOG.md", "README.md"]
18
+ spec.files += ["nokogiri-html-ext.gemspec"]
21
19
 
22
20
  spec.require_paths = ["lib"]
23
21
 
24
22
  spec.metadata = {
25
23
  "bug_tracker_uri" => "#{spec.homepage}/issues",
26
- "changelog_uri" => "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md",
27
- "rubygems_mfa_required" => "true"
24
+ "changelog_uri" => "#{spec.homepage}/releases/tag/v#{spec.version}",
25
+ "rubygems_mfa_required" => "true",
26
+ "source_code_uri" => "#{spec.homepage}/src/tag/v#{spec.version}",
28
27
  }
29
28
 
30
- spec.add_runtime_dependency "nokogiri", ">= 1.14"
29
+ spec.add_dependency "nokogiri", "~> 1.18"
31
30
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokogiri-html-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Garber
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-07 00:00:00.000000000 Z
11
+ date: 2025-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.14'
19
+ version: '1.18'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.14'
26
+ version: '1.18'
27
27
  description: Extend Nokogiri with several useful HTML-centric features.
28
28
  email:
29
29
  - jason@sixtwothree.org
@@ -36,16 +36,16 @@ files:
36
36
  - README.md
37
37
  - lib/nokogiri/html-ext.rb
38
38
  - lib/nokogiri/html_ext/document.rb
39
- - lib/nokogiri/html_ext/version.rb
40
39
  - nokogiri-html-ext.gemspec
41
- homepage: https://github.com/jgarber623/nokogiri-html-ext
40
+ homepage: https://codeberg.org/jgarber/nokogiri-html-ext
42
41
  licenses:
43
42
  - MIT
44
43
  metadata:
45
- bug_tracker_uri: https://github.com/jgarber623/nokogiri-html-ext/issues
46
- changelog_uri: https://github.com/jgarber623/nokogiri-html-ext/blob/v0.4.1/CHANGELOG.md
44
+ bug_tracker_uri: https://codeberg.org/jgarber/nokogiri-html-ext/issues
45
+ changelog_uri: https://codeberg.org/jgarber/nokogiri-html-ext/releases/tag/v1.0.0
47
46
  rubygems_mfa_required: 'true'
48
- post_install_message:
47
+ source_code_uri: https://codeberg.org/jgarber/nokogiri-html-ext/src/tag/v1.0.0
48
+ post_install_message:
49
49
  rdoc_options: []
50
50
  require_paths:
51
51
  - lib
@@ -53,15 +53,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - ">="
55
55
  - !ruby/object:Gem::Version
56
- version: '2.7'
56
+ version: '3.1'
57
57
  required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  requirements: []
63
- rubygems_version: 3.1.6
64
- signing_key:
63
+ rubygems_version: 3.3.27
64
+ signing_key:
65
65
  specification_version: 4
66
66
  summary: Extend Nokogiri with several useful HTML-centric features.
67
67
  test_files: []
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Nokogiri
4
- module HTMLExt
5
- VERSION = "0.4.1"
6
- end
7
- end