Skip to content

Commit 68f260c

Browse files
committed
Finish 3.3.0
2 parents 82b915d + e3ef098 commit 68f260c

File tree

10 files changed

+34
-31
lines changed

10 files changed

+34
-31
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,10 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
ruby:
23-
- 2.6
24-
- 2.7
25-
- "3.0"
26-
- 3.1
27-
- ruby-head
28-
- jruby
22+
ruby: ['3.0', 3.1, 3.2, ruby-head, jruby]
2923
steps:
3024
- name: Clone repository
31-
uses: actions/checkout@v2
25+
uses: actions/checkout@v3
3226
- name: Set up Ruby
3327
uses: ruby/setup-ruby@v1
3428
with:
@@ -38,7 +32,7 @@ jobs:
3832
- name: Run tests
3933
run: ruby --version; bundle exec rspec spec || $ALLOW_FAILURES
4034
- name: Coveralls GitHub Action
41-
uses: coverallsapp/github-action@v1.1.2
42-
if: "matrix.ruby == '3.0'"
35+
uses: coverallsapp/github-action@v2
36+
if: "matrix.ruby == '3.2'"
4337
with:
4438
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/generate-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: Update gh-pages with docs
1111
steps:
1212
- name: Clone repository
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v3
1414
- name: Set up Ruby
1515
uses: ruby/setup-ruby@v1
1616
with:

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ group :debug do
2222
end
2323

2424
group :test do
25-
gem 'simplecov', '~> 0.21', platforms: :mri
25+
gem 'simplecov', '~> 0.22', platforms: :mri
2626
gem 'simplecov-lcov', '~> 0.8', platforms: :mri
2727
end

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[Microdata][] parser for RDF.rb.
44

5-
[![Gem Version](https://badge.fury.io/rb/rdf-microdata.png)](https://badge.fury.io/rb/rdf-microdata)
5+
[![Gem Version](https://badge.fury.io/rb/rdf-microdata.svg)](https://badge.fury.io/rb/rdf-microdata)
66
[![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)
77
[![Coverage Status](https://coveralls.io/repos/ruby-rdf/rdf-microdata/badge.svg?branch=develop)](https://coveralls.io/github/ruby-rdf/rdf-microdata?branch=develop)
88
[![Gitter chat](https://badges.gitter.im/ruby-rdf/rdf.png)](https://gitter.im/ruby-rdf/rdf)
@@ -46,11 +46,11 @@ GRDDL-type triple generation, such as for html>head>title anchor tags.
4646
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.
4747

4848
## Dependencies
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)
49+
* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.3)
50+
* [RDF::RDFa](https://rubygems.org/gems/rdf-xsd) (~> 3.3)
51+
* [RDF::XSD](https://rubygems.org/gems/rdf-xsd) (~> 3.3)
5252
* [HTMLEntities](https://rubygems.org/gems/htmlentities) ('~> 4.3')
53-
* [Nokogiri](https://rubygems.org/gems/nokogiri) (~> 1.12)
53+
* [Nokogiri](https://rubygems.org/gems/nokogiri) (~> 1.15)
5454

5555
## Documentation
5656
Full documentation available on [Rubydoc.info][Microdata doc]

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.1
1+
3.3.0

lib/rdf/microdata/format.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ class Format < RDF::Format
2626
# Only define content type if RDFa is not available.
2727
# The Microdata processor will be launched from there
2828
# otherwise.
29-
content_type 'text/html;q=0.5', extension: :html unless RDF::Format.for(:rdfa)
29+
unless RDF::Format.for(:rdfa)
30+
content_type 'text/html;q=0.5',
31+
extension: :html,
32+
uri: 'http://www.w3.org/ns/formats/microdata'
33+
end
3034
reader { RDF::Microdata::Reader }
3135

3236
##

lib/rdf/microdata/rdfa_reader.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ def initialize(input = $stdin, **options, &block)
9797
# Add @vocab to referenced using the closest ansestor having @vocab of item.
9898
# If the element with id reference has no resource attribute, add a resource attribute whose value is a NUMBER SIGN U+0023 followed by reference to the element.
9999
# If the element with id reference has no typeof attribute, add a typeof="rdfa:Pattern" attribute to the element.
100-
# FIXME: This broke in Nokogiri 13.0
101100
referenced.wrap(%(<div vocab="#{item_vocab}" resource="##{ref}" typeof="rdfa:Pattern" />))
102101

103102
# Add a link child element to the element that represents the item, with a rel="rdfa:copy" attribute and an href attribute whose value is a NUMBER SIGN U+0023 followed by reference

rdf-microdata.gemspec

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,23 @@ Gem::Specification.new do |gem|
2525
gem.files = %w(AUTHORS README.md UNLICENSE VERSION) + Dir.glob('lib/**/*.rb') + Dir.glob('etc/*')
2626
gem.require_paths = %w(lib)
2727

28-
gem.required_ruby_version = '>= 2.6'
28+
gem.required_ruby_version = '>= 3.0'
2929
gem.requirements = []
30-
gem.add_runtime_dependency 'rdf', '~> 3.2'
31-
gem.add_runtime_dependency 'rdf-rdfa', '~> 3.2'
32-
gem.add_runtime_dependency 'rdf-xsd', '~> 3.2'
30+
gem.add_runtime_dependency 'rdf', '~> 3.3'
31+
gem.add_runtime_dependency 'rdf-rdfa', '~> 3.3'
32+
gem.add_runtime_dependency 'rdf-xsd', '~> 3.3'
3333
gem.add_runtime_dependency 'htmlentities', '~> 4.3'
34-
gem.add_runtime_dependency 'nokogiri' , '~> 1.13'
34+
gem.add_runtime_dependency 'nokogiri' , '~> 1.15', '>= 1.15.4'
3535

3636
gem.add_development_dependency 'equivalent-xml' , '~> 0.6'
3737
gem.add_development_dependency 'yard' , '~> 0.9'
38-
gem.add_development_dependency 'rspec', '~> 3.10'
38+
gem.add_development_dependency 'rspec', '~> 3.12'
3939
gem.add_development_dependency 'rspec-its', '~> 1.3'
4040

41-
gem.add_development_dependency 'rdf-spec', '~> 3.2'
42-
gem.add_development_dependency 'rdf-turtle', '~> 3.2'
43-
gem.add_development_dependency 'rdf-isomorphic', '~> 3.2'
44-
gem.add_development_dependency 'json-ld', '~> 3.2'
41+
gem.add_development_dependency 'rdf-spec', '~> 3.3'
42+
gem.add_development_dependency 'rdf-turtle', '~> 3.3'
43+
gem.add_development_dependency 'rdf-isomorphic', '~> 3.3'
44+
gem.add_development_dependency 'json-ld', '~> 3.3'
4545

4646
gem.post_install_message = nil
4747
end

spec/format_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
specify {expect(described_class.to_sym).to eq :microdata}
3535
end
3636

37+
# This interferes with RDFa.
38+
describe "#to_uri", skip: true do
39+
specify {expect(described_class.to_uri).to eq RDF::URI('http://www.w3.org/ns/formats/microdata')}
40+
end
41+
3742
describe ".detect" do
3843
{
3944
itemprop: '<div itemprop="bar"></div>',

spec/rdfa_reader_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,8 @@
629629

630630
],
631631
}.each do |name, (md, nt)|
632-
it "parses #{name}", pending: "Broke in Nokogiri 13.0" do
632+
it "parses #{name}" do
633+
pending "Broke in Nokogiri 13.0" if RUBY_VERSION < "2.7"
633634
expect(parse(md)).to be_equivalent_graph(nt, logger: @logger)
634635
end
635636
end

0 commit comments

Comments
 (0)