Skip to content

Commit

Permalink
Finish 0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Nov 27, 2022
2 parents a27835a + b1775c9 commit 9d86844
Show file tree
Hide file tree
Showing 20 changed files with 580 additions and 485 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
ruby:
- 2.6
- 2.7
- 3.0
- "3.0"
- 3.1
- ruby-head
- jruby
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
@@ -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@v2
- 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
11 changes: 11 additions & 0 deletions .yardopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--title "RDF:Normalize: RDF Dataset Normalization"
--output-dir doc/yard
--protected
--no-private
--hide-void-return
--markup markdown
--readme README.md
-
AUTHORS
LICENSE
VERSION
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RDF Graph normalizer for [RDF.rb][RDF.rb].
[![Gitter chat](https://badges.gitter.im/ruby-rdf/rdf.png)](https://gitter.im/ruby-rdf/rdf)

## Description
This is a [Ruby][] implementation of a [RDF Normalize][] for [RDF.rb][].
This is a [Ruby][] implementation of a [RDF Dataset Canonicalization][] for [RDF.rb][].

## Features
RDF::Normalize generates normalized [N-Quads][] output for an RDF Dataset using the algorithm
Expand All @@ -16,8 +16,8 @@ to serialize normalized statements.

Algorithms implemented:

* [URGNA2012](https://json-ld.github.io/normalization/spec/index.html#dfn-urgna2012)
* [URDNA2015](https://json-ld.github.io/normalization/spec/index.html#dfn-urdna2015)
* [URGNA2012](https://www.w3.org/TR/rdf-canon/#dfn-urgna2012)
* [URDNA2015](https://www.w3.org/TR/rdf-canon/#dfn-urdna2015)

Install with `gem install rdf-normalize`

Expand All @@ -27,7 +27,17 @@ Install with `gem install rdf-normalize`
## Usage

## Documentation
Full documentation available on [Rubydoc.info][Normalize doc]

Full documentation available on [GitHub][Normalize doc]

## Examples

### Returning normalized N-Quads

require 'rdf/normalize'
require 'rdf/turtle'
g = RDF::Graph.load("etc/doap.ttl")
puts g.dump(:normalize)

### Principle Classes
* {RDF::Normalize}
Expand All @@ -37,7 +47,6 @@ Full documentation available on [Rubydoc.info][Normalize doc]
* {RDF::Normalize::URGNA2012}
* {RDF::Normalize::URDNA2015}


## Dependencies

* [Ruby](https://ruby-lang.org/) (>= 2.6)
Expand Down Expand Up @@ -80,7 +89,7 @@ see <https://unlicense.org/> or the accompanying {file:LICENSE} file.
[YARD]: https://yardoc.org/
[YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md
[PDD]: https://unlicense.org/#unlicensing-contributions
[RDF.rb]: https://rubydoc.info/github/ruby-rdf/rdf-normalize
[RDF.rb]: https://ruby-rdf.github.io/rdf-normalize
[N-Triples]: https://www.w3.org/TR/rdf-testcases/#ntriples
[RDF Normalize]:https://json-ld.github.io/normalization/spec/
[Normalize doc]:https://rubydoc.info/github/ruby-rdf/rdf-normalize/master
[RDF Dataset Canonicalization]: https://www.w3.org/TR/rdf-canon/
[Normalize doc]: https://ruby-rdf.github.io/rdf-normalize/
29 changes: 0 additions & 29 deletions Rakefile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/usr/bin/env ruby
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), 'lib')))
require 'rubygems'

namespace :gem do
desc "Build the rdf-normalize-#{File.read('VERSION').chomp}.gem file"
task :build do
Expand All @@ -13,29 +10,3 @@ namespace :gem do
sh "gem push pkg/rdf-normalize-#{File.read('VERSION').chomp}.gem"
end
end

desc 'Default: run specs.'
task :default => :spec
task :specs => :spec

require 'rspec/core/rake_task'
desc 'Run specifications'
RSpec::Core::RakeTask.new do |spec|
spec.rspec_opts = %w(--options spec/spec.opts) if File.exists?('spec/spec.opts')
end

desc "Run specs through RCov"
RSpec::Core::RakeTask.new("spec:rcov") do |spec|
spec.rcov = true
spec.rcov_opts = %q[--exclude "spec"]
end

desc "Generate HTML report specs"
RSpec::Core::RakeTask.new("doc:spec") do |spec|
spec.rspec_opts = ["--format", "html", "-o", "doc/spec.html"]
end

require 'yard'
namespace :doc do
YARD::Rake::YardocTask.new
end
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.0
0.5.1
9 changes: 4 additions & 5 deletions etc/doap.ttl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@base <https://rubygems.org/gems/rdf-normalize> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix dc: <http://purl.org/dc/terms/> .
Expand All @@ -7,18 +6,18 @@
@prefix ex: <http://example.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<> a doap:Project ;
<https://rubygems.org/gems/rdf-normalize> a doap:Project ;
doap:name "RDF::Normalize" ;
doap:homepage <https://github.com/ruby-rdf/rdf-normalize> ;
doap:license <https://unlicense.org/1.0/> ;
doap:shortdesc "RDF Dataset Normalization for RDF.rb."@en ;
doap:description "RDF::Normalize is a Dataset normalizer for the RDF.rb library suite."@en ;
doap:description "RDF::Normalize performs Dataset Canonicalization for RDF.rb."@en ;
doap:created "2015-05-20"^^xsd:date;
doap:programming-language "Ruby" ;
doap:implements <https://json-ld.github.io/normalization/spec/> ;
doap:implements <https://www.w3.org/TR/rdf-canon/> ;
doap:category <http://dbpedia.org/resource/Resource_Description_Framework>,
<http://dbpedia.org/resource/Ruby_(programming_language)> ;
doap:download-page <> ;
doap:download-page <https://rubygems.org/gems/rdf-normalize> ;
doap:mailing-list <https://lists.w3.org/Archives/Public/public-rdf-ruby/> ;
doap:bug-database <https://github.com/ruby-rdf/rdf-normalize/issues> ;
doap:blog <https://greggkellogg.net/> ;
Expand Down

0 comments on commit 9d86844

Please sign in to comment.