Skip to content

Commit

Permalink
Finish 3.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Apr 5, 2023
2 parents 1b0e261 + 76a9d34 commit 6fbb58c
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 14 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/ci.yml
Expand Up @@ -20,19 +20,13 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby:
- 2.6
- 2.7
- 3.0
- 3.1
- ruby-head
- jruby
ruby: [2.6, 2.7, '3.0', 3.1, 3.2, ruby-head, jruby]
gemfile:
- Gemfile
- Gemfile-pure
steps:
- name: Clone repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/generate-docs.yml
@@ -0,0 +1,27 @@
name: Build & deploy documentation
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: Update gh-pages with docs
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
- name: Install required gem dependencies
run: gem install yard --no-document
- name: Build YARD Ruby Documentation
run: yardoc
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/yard
publish_branch: gh-pages
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -4,7 +4,7 @@ gemspec

gem 'rdf', github: "ruby-rdf/rdf", branch: "develop"
gem 'rdf-rdfa', github: "ruby-rdf/rdf-rdfa", branch: "develop"
gem "nokogiri", '~> 1.12', platforms: [:mri, :jruby]
gem "nokogiri", '~> 1.13', '>= 1.13.4', platforms: [:mri, :jruby]

group :development do
gem 'ebnf', github: "dryruby/ebnf", branch: "develop"
Expand Down
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -43,6 +43,7 @@ Write a graph to a file:

## Dependencies
* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.2)
* [Haml](https://rubygems.org/gems/haml) (~>- 5.2)
* Soft dependency on [Nokogiri](https://rubygems.org/gems/nokogiri) (>= 1.12)

## Documentation
Expand Down Expand Up @@ -103,5 +104,5 @@ see <https://unlicense.org/> or the accompanying {file:UNLICENSE} file.
[YARD]: https://yardoc.org/
[YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md
[PDD]: https://unlicense.org/#unlicensing-contributions
[RDF/XML doc]: https://rubydoc.info/github/ruby-rdf/rdf-rdfxml/master/frames
[RDF/XML doc]: https://ruby-rdf.github.io/rdf-rdfxml/master/frames
[RDF-star]: https://w3c.github.io/rdf-star/rdf-star-cg-spec.html
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
3.2.0
3.2.1
4 changes: 3 additions & 1 deletion lib/rdf/rdfxml/format.rb
Expand Up @@ -20,7 +20,9 @@ module RDF::RDFXML
#
# @see http://www.w3.org/TR/rdf-testcases/#ntriples
class Format < RDF::Format
content_type 'application/rdf+xml', extensions: [:rdf, :owl]
content_type 'application/rdf+xml',
extensions: [:rdf, :owl],
uri: 'http://www.w3.org/ns/formats/RDF_XML'
content_encoding 'utf-8'

reader { RDF::RDFXML::Reader }
Expand Down
2 changes: 1 addition & 1 deletion lib/rdf/rdfxml/reader/nokogiri.rb
Expand Up @@ -25,7 +25,7 @@ def initialize(node, parent = nil)

# Create a new element child of an existing node
def create_node(name, children)
native = ::Nokogiri::XML::Element.new(name, @node)
native = ::Nokogiri::XML::Element.new(name, @node.document)
children.each do |c|
native.add_child(c.node)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/rdf/rdfxml/writer.rb
Expand Up @@ -55,7 +55,7 @@ class Writer < RDF::RDFa::Writer

##
# RDF/XML Writer options
# @see http://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Writer#options-class_method
# @see https://ruby-rdf.github.io/rdf/RDF/Writer#options-class_method
def self.options
super + [
RDF::CLI::Option.new(
Expand Down
8 changes: 8 additions & 0 deletions rdf-rdfxml.gemspec
Expand Up @@ -10,6 +10,13 @@ Gem::Specification.new do |gem|
gem.license = 'Unlicense'
gem.summary = %q{RDF/XML reader/writer for RDF.rb.}
gem.description = %q{RDF::RDFXML is an RDF/XML reader and writer for the RDF.rb library suite.}
gem.metadata = {
"documentation_uri" => "https://ruby-rdf.github.io/rdf-rdfxml",
"bug_tracker_uri" => "https://github.com/ruby-rdf/rdf-rdfxml/issues",
"homepage_uri" => "https://github.com/ruby-rdf/rdf-rdfxml",
"mailing_list_uri" => "https://lists.w3.org/Archives/Public/public-rdf-ruby/",
"source_code_uri" => "https://github.com/ruby-rdf/rdf-rdfxml",
}

gem.authors = %w(Gregg Kellogg)
gem.email = 'public-rdf-ruby@w3.org'
Expand All @@ -25,6 +32,7 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency 'rdf-xsd', '~> 3.2'
gem.add_runtime_dependency 'rdf-rdfa', '~> 3.2'
gem.add_runtime_dependency 'htmlentities', '~> 4.3'
gem.add_runtime_dependency 'haml', '~> 5.2' # Until workaround for haml_tag is found.

gem.add_development_dependency 'json-ld', '>= 3.2'
gem.add_development_dependency 'rspec', '~> 3.10'
Expand Down
4 changes: 4 additions & 0 deletions spec/format_spec.rb
Expand Up @@ -37,6 +37,10 @@
specify {expect(described_class.to_sym).to eq :rdfxml}
end

describe "#to_uri" do
specify {expect(described_class.to_uri).to eq RDF::URI('http://www.w3.org/ns/formats/RDF_XML')}
end

describe ".detect" do
{
rdfxml: '<rdf:RDF about="foo"></rdf:RDF>',
Expand Down

0 comments on commit 6fbb58c

Please sign in to comment.