rdf-microdata 3.1.3 → 3.1.4

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: 2c364957ee6b1b8981d6aa274346df645609a702ebcba5718cbd4c096344125d
4
- data.tar.gz: edeabdc8a3bcfc2df7c2aa25b0e60485bcaee87a5c15429cf81c0d47386c4fd8
3
+ metadata.gz: 93d6700bb2a521d356eadfd6446baf0bc4945fe46da116aeeb30a1b64a4ae765
4
+ data.tar.gz: 38fe95ccde63204c49e5e65764a864bfc0cabf47d494825f0d8f9f685d3a128c
5
5
  SHA512:
6
- metadata.gz: 23c53c41cbe0203ee765b46095060f1e65374a4af3f14ba3e0e8dbf1ed1a4e465d25dd12ae2419bf5eeb4d896834a3e38a740ba6004698da915e59746541272c
7
- data.tar.gz: 64f6284ce624f9144d202479047d002b8ceeacc8abef2128741970500f44e963eeb3251224de6085414c58d47a8d6c72025ddd38df23a7da75b21f08b48caba4
6
+ metadata.gz: 174f14ef99d0042f7f796dfc9f670a97eacda670e678a2a3d7199bf66367fcd37bdec2c9d5f709183bca52a75a1c89921ee4659350011d2303bae0cb4f1fa084
7
+ data.tar.gz: b7766da37a177477fe18604403cca06a743d6f4081f888b1185a45b9bbbbe0903f906646fae8005b8e9b2e116f7dfc0dcd8929f372d8e2413593ea8b3208a725
data/README.md CHANGED
@@ -15,7 +15,6 @@ RDF::Microdata parses [Microdata][] into statements or triples using the rules d
15
15
 
16
16
  * Microdata parser.
17
17
  * Uses Nokogiri for parsing HTML
18
- * If available, uses [Nokogumbo][] gem for are pure-HTML5 parser with better error detection.
19
18
 
20
19
  Install with 'gem install rdf-microdata'
21
20
 
@@ -52,7 +51,6 @@ If the `RDFa` parser is available, {RDF::Microdata::Format} will not assert cont
52
51
  * [RDF::XSD](https://rubygems.org/gems/rdf-xsd) (~> 3.1)
53
52
  * [HTMLEntities](https://rubygems.org/gems/htmlentities) ('~> 4.3')
54
53
  * [Nokogiri](https://rubygems.org/gems/nokogiri) (~> 1.10)
55
- * Soft dependency on [Nokogumbo](https://github.com/rubys/nokogumbo) (~> 2.0)
56
54
 
57
55
  ## Documentation
58
56
  Full documentation available on [Rubydoc.info][Microdata doc]
@@ -116,4 +114,3 @@ see <https://unlicense.org/> or the accompanying {file:UNLICENSE} file.
116
114
  [Microdata]: https://dev.w3.org/html5/md/Overview.html "HTML Microdata"
117
115
  [Microdata RDF]: https://dvcs.w3.org/hg/htmldata/raw-file/default/microdata-rdf/index.html "Microdata to RDF"
118
116
  [Microdata doc]: https://rubydoc.info/github/ruby-rdf/rdf-microdata/frames
119
- [Nokogumbo]: https://github.com/rubys/nokogumbo/#readme
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.3
1
+ 3.1.4
@@ -1,5 +1,4 @@
1
1
  require 'rdf/rdfa'
2
- require 'nokogumbo'
3
2
 
4
3
  module RDF::Microdata
5
4
  ##
@@ -42,8 +41,12 @@ module RDF::Microdata
42
41
  # Otherwise, default is utf-8
43
42
  options[:encoding] ||= 'utf-8'
44
43
  options[:encoding] = options[:encoding].to_s if options[:encoding]
45
- input = input.read if input.respond_to?(:read)
46
- ::Nokogiri::HTML5(input.force_encoding(options[:encoding]))
44
+ begin
45
+ input = input.read if input.respond_to?(:read)
46
+ ::Nokogiri::HTML5(input.force_encoding(options[:encoding]), max_parse_errors: 1000)
47
+ rescue LoadError, NoMethodError
48
+ ::Nokogiri::HTML.parse(input, base_uri.to_s, options[:encoding])
49
+ end
47
50
  end
48
51
 
49
52
  # For all members having @itemscope
@@ -192,10 +192,9 @@ module RDF::Microdata
192
192
  options[:encoding] = options[:encoding].to_s if options[:encoding]
193
193
 
194
194
  begin
195
- require 'nokogumbo' unless defined?(::Nokogumbo)
196
195
  input = input.read if input.respond_to?(:read)
197
196
  ::Nokogiri::HTML5(input.force_encoding(options[:encoding]), max_parse_errors: 1000)
198
- rescue LoadError
197
+ rescue LoadError, NoMethodError
199
198
  ::Nokogiri::HTML.parse(input, base_uri.to_s, options[:encoding])
200
199
  end
201
200
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-microdata
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.3
4
+ version: 3.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-03-15 00:00:00.000000000 Z
12
+ date: 2021-10-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdf
@@ -85,14 +85,14 @@ dependencies:
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '1.10'
88
+ version: '1.12'
89
89
  type: :runtime
90
90
  prerelease: false
91
91
  version_requirements: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '1.10'
95
+ version: '1.12'
96
96
  - !ruby/object:Gem::Dependency
97
97
  name: equivalent-xml
98
98
  requirement: !ruby/object:Gem::Requirement
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
247
  - !ruby/object:Gem::Version
248
248
  version: '0'
249
249
  requirements: []
250
- rubygems_version: 3.2.3
250
+ rubygems_version: 3.2.22
251
251
  signing_key:
252
252
  specification_version: 4
253
253
  summary: Microdata reader for Ruby.