Skip to content

Commit

Permalink
Finish 3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Sep 1, 2023
2 parents 82b915d + e3ef098 commit 68f260c
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 31 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/ci.yml
Expand Up @@ -19,16 +19,10 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby:
- 2.6
- 2.7
- "3.0"
- 3.1
- ruby-head
- jruby
ruby: ['3.0', 3.1, 3.2, ruby-head, jruby]
steps:
- name: Clone repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand All @@ -38,7 +32,7 @@ jobs:
- name: Run tests
run: ruby --version; bundle exec rspec spec || $ALLOW_FAILURES
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v1.1.2
if: "matrix.ruby == '3.0'"
uses: coverallsapp/github-action@v2
if: "matrix.ruby == '3.2'"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/generate-docs.yml
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Update gh-pages with docs
steps:
- name: Clone repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -22,6 +22,6 @@ group :debug do
end

group :test do
gem 'simplecov', '~> 0.21', platforms: :mri
gem 'simplecov', '~> 0.22', platforms: :mri
gem 'simplecov-lcov', '~> 0.8', platforms: :mri
end
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -2,7 +2,7 @@

[Microdata][] parser for RDF.rb.

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

## Dependencies
* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.2)
* [RDF::RDFa](https://rubygems.org/gems/rdf-xsd) (~> 3.2)
* [RDF::XSD](https://rubygems.org/gems/rdf-xsd) (~> 3.2)
* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.3)
* [RDF::RDFa](https://rubygems.org/gems/rdf-xsd) (~> 3.3)
* [RDF::XSD](https://rubygems.org/gems/rdf-xsd) (~> 3.3)
* [HTMLEntities](https://rubygems.org/gems/htmlentities) ('~> 4.3')
* [Nokogiri](https://rubygems.org/gems/nokogiri) (~> 1.12)
* [Nokogiri](https://rubygems.org/gems/nokogiri) (~> 1.15)

## Documentation
Full documentation available on [Rubydoc.info][Microdata doc]
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
3.2.1
3.3.0
6 changes: 5 additions & 1 deletion lib/rdf/microdata/format.rb
Expand Up @@ -26,7 +26,11 @@ class Format < RDF::Format
# Only define content type if RDFa is not available.
# The Microdata processor will be launched from there
# otherwise.
content_type 'text/html;q=0.5', extension: :html unless RDF::Format.for(:rdfa)
unless RDF::Format.for(:rdfa)
content_type 'text/html;q=0.5',
extension: :html,
uri: 'http://www.w3.org/ns/formats/microdata'
end
reader { RDF::Microdata::Reader }

##
Expand Down
1 change: 0 additions & 1 deletion lib/rdf/microdata/rdfa_reader.rb
Expand Up @@ -97,7 +97,6 @@ def initialize(input = $stdin, **options, &block)
# Add @vocab to referenced using the closest ansestor having @vocab of item.
# 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.
# If the element with id reference has no typeof attribute, add a typeof="rdfa:Pattern" attribute to the element.
# FIXME: This broke in Nokogiri 13.0
referenced.wrap(%(<div vocab="#{item_vocab}" resource="##{ref}" typeof="rdfa:Pattern" />))

# 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
Expand Down
20 changes: 10 additions & 10 deletions rdf-microdata.gemspec
Expand Up @@ -25,23 +25,23 @@ Gem::Specification.new do |gem|
gem.files = %w(AUTHORS README.md UNLICENSE VERSION) + Dir.glob('lib/**/*.rb') + Dir.glob('etc/*')
gem.require_paths = %w(lib)

gem.required_ruby_version = '>= 2.6'
gem.required_ruby_version = '>= 3.0'
gem.requirements = []
gem.add_runtime_dependency 'rdf', '~> 3.2'
gem.add_runtime_dependency 'rdf-rdfa', '~> 3.2'
gem.add_runtime_dependency 'rdf-xsd', '~> 3.2'
gem.add_runtime_dependency 'rdf', '~> 3.3'
gem.add_runtime_dependency 'rdf-rdfa', '~> 3.3'
gem.add_runtime_dependency 'rdf-xsd', '~> 3.3'
gem.add_runtime_dependency 'htmlentities', '~> 4.3'
gem.add_runtime_dependency 'nokogiri' , '~> 1.13'
gem.add_runtime_dependency 'nokogiri' , '~> 1.15', '>= 1.15.4'

gem.add_development_dependency 'equivalent-xml' , '~> 0.6'
gem.add_development_dependency 'yard' , '~> 0.9'
gem.add_development_dependency 'rspec', '~> 3.10'
gem.add_development_dependency 'rspec', '~> 3.12'
gem.add_development_dependency 'rspec-its', '~> 1.3'

gem.add_development_dependency 'rdf-spec', '~> 3.2'
gem.add_development_dependency 'rdf-turtle', '~> 3.2'
gem.add_development_dependency 'rdf-isomorphic', '~> 3.2'
gem.add_development_dependency 'json-ld', '~> 3.2'
gem.add_development_dependency 'rdf-spec', '~> 3.3'
gem.add_development_dependency 'rdf-turtle', '~> 3.3'
gem.add_development_dependency 'rdf-isomorphic', '~> 3.3'
gem.add_development_dependency 'json-ld', '~> 3.3'

gem.post_install_message = nil
end
5 changes: 5 additions & 0 deletions spec/format_spec.rb
Expand Up @@ -34,6 +34,11 @@
specify {expect(described_class.to_sym).to eq :microdata}
end

# This interferes with RDFa.
describe "#to_uri", skip: true do
specify {expect(described_class.to_uri).to eq RDF::URI('http://www.w3.org/ns/formats/microdata')}
end

describe ".detect" do
{
itemprop: '<div itemprop="bar"></div>',
Expand Down
3 changes: 2 additions & 1 deletion spec/rdfa_reader_spec.rb
Expand Up @@ -629,7 +629,8 @@

],
}.each do |name, (md, nt)|
it "parses #{name}", pending: "Broke in Nokogiri 13.0" do
it "parses #{name}" do
pending "Broke in Nokogiri 13.0" if RUBY_VERSION < "2.7"
expect(parse(md)).to be_equivalent_graph(nt, logger: @logger)
end
end
Expand Down

0 comments on commit 68f260c

Please sign in to comment.