rdf-microdata 3.1.1 → 3.2.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: 5cf57a5354b695916b671d885b9a9b024ef084b0c3ec2ae34bcf7668264f2c27
4
- data.tar.gz: 8e3e2c9c8a212e77bd652b76998246bbf9ef019e85be8c18001fa4d9db887b79
3
+ metadata.gz: c40058dfbaf168c8469eec752aabb848c20b7a2741588e92e54a758ef067f700
4
+ data.tar.gz: 2d72ad155b19196055839c53e762ad697b82797a854a31bc7068d6c4652c56d5
5
5
  SHA512:
6
- metadata.gz: e1ad276f98f0ef1b83fabb7b37b8d96ec7df2f4c139fedd1681be98e9eccc62e65e7c363aecb46a0208c979ab99fc7d882343b408624d19396801d5cd2894ffb
7
- data.tar.gz: 6343a17bca689225145a1f6bcd6364ab284b47ba1c8dac0c4bf64578df14955f08bf003500a7938127cdcc3b40b2460c865f49a3ed0f4eb6fcec6cb02692ac2c
6
+ metadata.gz: 6c93b3a0781394c2cf72b81c1d642e31f28336e65434e61e1ec98b53c84287fb2ceaeb85489ab29c714d64fb490b9cfad78098ec47db8e5222ba353e3ef7f79d
7
+ data.tar.gz: efd38042dbf48993cbb02f5e14fac1a683dd24250dfd9517ee00d4fbdab1fd6edbd5d5cbe60c40f89d273566c9c9a74d179dd46bacc41338f70cf77a1a555983
data/README.md CHANGED
@@ -3,7 +3,9 @@
3
3
  [Microdata][] parser for RDF.rb.
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/rdf-microdata.png)](https://badge.fury.io/rb/rdf-microdata)
6
- [![Build Status](https://secure.travis-ci.org/ruby-rdf/rdf-microdata.png?branch=master)](https://travis-ci.org/ruby-rdf/rdf-microdata)
6
+ [![Build Status](https://github.com/ruby-rdf/rdf-microdata/workflows/CI/badge.svg?branch=develop)](https://github.com/ruby-rdf/rdf-microdata/actions?query=workflow%3ACI)
7
+ [![Coverage Status](https://coveralls.io/repos/ruby-rdf/rdf-microdata/badge.svg?branch=develop)](https://coveralls.io/github/ruby-rdf/rdf-microdata?branch=develop)
8
+ [![Gitter chat](https://badges.gitter.im/ruby-rdf/rdf.png)](https://gitter.im/ruby-rdf/rdf)
7
9
 
8
10
  ## DESCRIPTION
9
11
  RDF::Microdata is a Microdata reader for Ruby using the [RDF.rb][RDF.rb] library suite.
@@ -13,7 +15,6 @@ RDF::Microdata parses [Microdata][] into statements or triples using the rules d
13
15
 
14
16
  * Microdata parser.
15
17
  * Uses Nokogiri for parsing HTML
16
- * If available, uses [Nokogumbo][] gem for are pure-HTML5 parser with better error detection.
17
18
 
18
19
  Install with 'gem install rdf-microdata'
19
20
 
@@ -21,7 +22,7 @@ Install with 'gem install rdf-microdata'
21
22
  Microdata to RDF transformation is undergoing active development. This implementation attempts to be up-to-date
22
23
  as of the time of release, and is being used in developing the [Microdata RDF][] specification.
23
24
 
24
- This implementation includes support for the proposed [@itemprop-reverse](https://www.w3.org/wiki/WebSchemas/InverseProperties#Proposed_Action:_New_attribute_.40itemprop-reverse) attribute.
25
+ This implementation includes support for the proposed [``@itemprop-reverse``](https://www.w3.org/wiki/WebSchemas/InverseProperties#Proposed_Action:_New_attribute_.40itemprop-reverse) attribute.
25
26
 
26
27
  ### Microdata Registry
27
28
  The parser uses a build-in version of the [Microdata RDF][] registry.
@@ -45,11 +46,11 @@ GRDDL-type triple generation, such as for html>head>title anchor tags.
45
46
  If the `RDFa` parser is available, {RDF::Microdata::Format} will not assert content type `text/html` or file extension `.html`, as this is also asserted by RDFa. Instead, the RDFa reader will invoke the microdata reader if an `@itemscope` attribute is detected.
46
47
 
47
48
  ## Dependencies
48
- * [RDF.rb](https://rubygems.org/gems/rdf) (>= 3.1)
49
- * [RDF::XSD](https://rubygems.org/gems/rdf-xsd) (>= 3.1)
50
- * [HTMLEntities](https://rubygems.org/gems/htmlentities) ('>= 4.3.0')
51
- * [Nokogiri](https://rubygems.org/gems/nokogiri) (>= 1.10)
52
- * Soft dependency on [Nokogumbo](https://github.com/rubys/nokogumbo) (~> 2.0)
49
+ * [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.2)
50
+ * [RDF::RDFa](https://rubygems.org/gems/rdf-xsd) (~> 3.2)
51
+ * [RDF::XSD](https://rubygems.org/gems/rdf-xsd) (~> 3.2)
52
+ * [HTMLEntities](https://rubygems.org/gems/htmlentities) ('~> 4.3')
53
+ * [Nokogiri](https://rubygems.org/gems/nokogiri) (~> 1.12)
53
54
 
54
55
  ## Documentation
55
56
  Full documentation available on [Rubydoc.info][Microdata doc]
@@ -90,7 +91,9 @@ The reader exposes a `#rdfa` method, which can be used to retrieve the transform
90
91
  list in the the `README`. Alphabetical order applies.
91
92
  * Do note that in order for us to merge any non-trivial changes (as a rule
92
93
  of thumb, additions larger than about 15 lines of code), we need an
93
- explicit [public domain dedication][PDD] on record from you.
94
+ explicit [public domain dedication][PDD] on record from you,
95
+ which you will be asked to agree to on the first commit to a repo within the organization.
96
+ Note that the agreement applies to all repos in the [Ruby RDF](https://github.com/ruby-rdf/) organization.
94
97
 
95
98
  ## License
96
99
 
@@ -107,8 +110,7 @@ see <https://unlicense.org/> or the accompanying {file:UNLICENSE} file.
107
110
  [RDF.rb]: https://github.com/ruby-rdf/rdf
108
111
  [YARD]: https://yardoc.org/
109
112
  [YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md
110
- [PDD]: https://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
113
+ [PDD]: https://unlicense.org/#unlicensing-contributions
111
114
  [Microdata]: https://dev.w3.org/html5/md/Overview.html "HTML Microdata"
112
115
  [Microdata RDF]: https://dvcs.w3.org/hg/htmldata/raw-file/default/microdata-rdf/index.html "Microdata to RDF"
113
116
  [Microdata doc]: https://rubydoc.info/github/ruby-rdf/rdf-microdata/frames
114
- [Nokogumbo]: https://github.com/rubys/nokogumbo/#readme
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.1
1
+ 3.2.0
data/etc/doap.ttl CHANGED
@@ -6,14 +6,14 @@
6
6
  @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
7
7
 
8
8
  <> a doap:Project;
9
+ doap:name "RDF::Microdata";
10
+ doap:shortdesc "Microdata reader for Ruby RDF.rb."@en;
11
+ doap:description "RDF::Microdata is an Microdata reader for Ruby using the RDF.rb library suite."@en;
9
12
  dc:creator <https://greggkellogg.net/foaf#me>;
10
13
  doap:blog <https://greggkellogg.net/>;
11
14
  doap:bug-database <https://github.com/ruby-rdf/rdf-microdata/issues>;
12
15
  doap:category <http://dbpedia.org/resource/Resource_Description_Framework>;
13
16
  doap:created "2011-08-29"^^xsd:date;
14
- doap:description """
15
- RDF::Microdata is an Microdata reader for Ruby using the RDF.rb library suite.
16
- """@en;
17
17
  doap:developer <https://greggkellogg.net/foaf#me>;
18
18
  doap:documenter <https://greggkellogg.net/foaf#me>;
19
19
  doap:download-page <>;
@@ -22,7 +22,5 @@
22
22
  doap:license <https://unlicense.org/1.0/>;
23
23
  doap:mailing-list <https://lists.w3.org/Archives/Public/public-rdf-ruby/>;
24
24
  doap:maintainer <https://greggkellogg.net/foaf#me>;
25
- doap:name "RDF::Microdata";
26
25
  doap:programming-language "Ruby";
27
- doap:shortdesc "Microdata reader for Ruby."@en;
28
26
  foaf:creator <https://greggkellogg.net/foaf#me> .
data/etc/registry.json CHANGED
@@ -4,5 +4,10 @@
4
4
  "additionalType": {"subPropertyOf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}
5
5
  }
6
6
  },
7
+ "https://schema.org/": {
8
+ "properties": {
9
+ "additionalType": {"subPropertyOf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}
10
+ }
11
+ },
7
12
  "http://microformats.org/profile/hcard": {}
8
13
  }
@@ -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,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-microdata
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg
8
8
  - Kellogg
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-07-08 00:00:00.000000000 Z
12
+ date: 2021-12-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdf
@@ -17,28 +17,42 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '3.1'
20
+ version: '3.2'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '3.1'
27
+ version: '3.2'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rdf-rdfa
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '3.2'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '3.2'
28
42
  - !ruby/object:Gem::Dependency
29
43
  name: rdf-xsd
30
44
  requirement: !ruby/object:Gem::Requirement
31
45
  requirements:
32
46
  - - "~>"
33
47
  - !ruby/object:Gem::Version
34
- version: '3.1'
48
+ version: '3.2'
35
49
  type: :runtime
36
50
  prerelease: false
37
51
  version_requirements: !ruby/object:Gem::Requirement
38
52
  requirements:
39
53
  - - "~>"
40
54
  - !ruby/object:Gem::Version
41
- version: '3.1'
55
+ version: '3.2'
42
56
  - !ruby/object:Gem::Dependency
43
57
  name: htmlentities
44
58
  requirement: !ruby/object:Gem::Requirement
@@ -59,14 +73,14 @@ dependencies:
59
73
  requirements:
60
74
  - - "~>"
61
75
  - !ruby/object:Gem::Version
62
- version: '1.10'
76
+ version: '1.12'
63
77
  type: :runtime
64
78
  prerelease: false
65
79
  version_requirements: !ruby/object:Gem::Requirement
66
80
  requirements:
67
81
  - - "~>"
68
82
  - !ruby/object:Gem::Version
69
- version: '1.10'
83
+ version: '1.12'
70
84
  - !ruby/object:Gem::Dependency
71
85
  name: equivalent-xml
72
86
  requirement: !ruby/object:Gem::Requirement
@@ -87,28 +101,28 @@ dependencies:
87
101
  requirements:
88
102
  - - "~>"
89
103
  - !ruby/object:Gem::Version
90
- version: 0.9.20
104
+ version: '0.9'
91
105
  type: :development
92
106
  prerelease: false
93
107
  version_requirements: !ruby/object:Gem::Requirement
94
108
  requirements:
95
109
  - - "~>"
96
110
  - !ruby/object:Gem::Version
97
- version: 0.9.20
111
+ version: '0.9'
98
112
  - !ruby/object:Gem::Dependency
99
113
  name: rspec
100
114
  requirement: !ruby/object:Gem::Requirement
101
115
  requirements:
102
116
  - - "~>"
103
117
  - !ruby/object:Gem::Version
104
- version: '3.9'
118
+ version: '3.10'
105
119
  type: :development
106
120
  prerelease: false
107
121
  version_requirements: !ruby/object:Gem::Requirement
108
122
  requirements:
109
123
  - - "~>"
110
124
  - !ruby/object:Gem::Version
111
- version: '3.9'
125
+ version: '3.10'
112
126
  - !ruby/object:Gem::Dependency
113
127
  name: rspec-its
114
128
  requirement: !ruby/object:Gem::Requirement
@@ -129,70 +143,56 @@ dependencies:
129
143
  requirements:
130
144
  - - "~>"
131
145
  - !ruby/object:Gem::Version
132
- version: '3.1'
146
+ version: '3.2'
133
147
  type: :development
134
148
  prerelease: false
135
149
  version_requirements: !ruby/object:Gem::Requirement
136
150
  requirements:
137
151
  - - "~>"
138
152
  - !ruby/object:Gem::Version
139
- version: '3.1'
153
+ version: '3.2'
140
154
  - !ruby/object:Gem::Dependency
141
155
  name: rdf-turtle
142
- requirement: !ruby/object:Gem::Requirement
143
- requirements:
144
- - - ">="
145
- - !ruby/object:Gem::Version
146
- version: '3.1'
147
- type: :development
148
- prerelease: false
149
- version_requirements: !ruby/object:Gem::Requirement
150
- requirements:
151
- - - ">="
152
- - !ruby/object:Gem::Version
153
- version: '3.1'
154
- - !ruby/object:Gem::Dependency
155
- name: rdf-isomorphic
156
156
  requirement: !ruby/object:Gem::Requirement
157
157
  requirements:
158
158
  - - "~>"
159
159
  - !ruby/object:Gem::Version
160
- version: '3.1'
160
+ version: '3.2'
161
161
  type: :development
162
162
  prerelease: false
163
163
  version_requirements: !ruby/object:Gem::Requirement
164
164
  requirements:
165
165
  - - "~>"
166
166
  - !ruby/object:Gem::Version
167
- version: '3.1'
167
+ version: '3.2'
168
168
  - !ruby/object:Gem::Dependency
169
- name: json-ld
169
+ name: rdf-isomorphic
170
170
  requirement: !ruby/object:Gem::Requirement
171
171
  requirements:
172
172
  - - "~>"
173
173
  - !ruby/object:Gem::Version
174
- version: '3.1'
174
+ version: '3.2'
175
175
  type: :development
176
176
  prerelease: false
177
177
  version_requirements: !ruby/object:Gem::Requirement
178
178
  requirements:
179
179
  - - "~>"
180
180
  - !ruby/object:Gem::Version
181
- version: '3.1'
181
+ version: '3.2'
182
182
  - !ruby/object:Gem::Dependency
183
- name: rdf-rdfa
183
+ name: json-ld
184
184
  requirement: !ruby/object:Gem::Requirement
185
185
  requirements:
186
186
  - - "~>"
187
187
  - !ruby/object:Gem::Version
188
- version: '3.1'
188
+ version: '3.2'
189
189
  type: :development
190
190
  prerelease: false
191
191
  version_requirements: !ruby/object:Gem::Requirement
192
192
  requirements:
193
193
  - - "~>"
194
194
  - !ruby/object:Gem::Version
195
- version: '3.1'
195
+ version: '3.2'
196
196
  description: Reads HTML Microdata as RDF.
197
197
  email: public-rdf-ruby@w3.org
198
198
  executables: []
@@ -220,7 +220,7 @@ homepage: https://ruby-rdf.github.com/rdf-microdata
220
220
  licenses:
221
221
  - Unlicense
222
222
  metadata: {}
223
- post_install_message:
223
+ post_install_message:
224
224
  rdoc_options: []
225
225
  require_paths:
226
226
  - lib
@@ -228,15 +228,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
228
228
  requirements:
229
229
  - - ">="
230
230
  - !ruby/object:Gem::Version
231
- version: '2.4'
231
+ version: '2.6'
232
232
  required_rubygems_version: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - ">="
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0'
237
237
  requirements: []
238
- rubygems_version: 3.1.3
239
- signing_key:
238
+ rubygems_version: 3.3.3
239
+ signing_key:
240
240
  specification_version: 4
241
241
  summary: Microdata reader for Ruby.
242
242
  test_files: []