diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4ae2fe7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +# This workflow runs continuous CI across different versions of ruby on all branches and pull requests to develop. + +name: CI +on: + push: + branches: [ '**' ] + pull_request: + branches: [ develop ] + workflow_dispatch: + +jobs: + tests: + name: Ruby ${{ matrix.ruby }} + if: "contains(github.event.commits[0].message, '[ci skip]') == false" + runs-on: ubuntu-latest + env: + CI: true + ALLOW_FAILURES: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'jruby' }} + strategy: + fail-fast: false + matrix: + ruby: + - 2.6 + - 2.7 + - 3.0 + - 3.1 + - ruby-head + - jruby + steps: + - name: Clone repository + uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + - name: Install dependencies + run: bundle install --jobs 4 --retry 3 + - name: Install Raptor2 + run: sudo apt-get install raptor2-utils + - 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'" + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 40fd9a3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: ruby -script: "bundle exec rspec spec" -env: - - CI=true -rvm: - - 2.4 - - 2.5 - - 2.6 - - 2.7 - - jruby -matrix: - allow_failures: - - rvm: jruby -addons: - apt: - packages: - - raptor2-utils -cache: bundler -sudo: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 27543b2..3d08a2c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ Community contributions are essential for keeping Ruby RDF great. We want to kee This repository uses [Git Flow](https://github.com/nvie/gitflow) to manage development and release activity. All submissions _must_ be on a feature branch based on the _develop_ branch to ease staging and integration. -* create or respond to an issue on the [Github Repository](http://github.com/ruby-rdf/rdf-raptor/issues) +* create or respond to an issue on the [Github Repository](https://github.com/ruby-rdf/rdf-raptor/issues) * Fork and clone the repo: `git clone git@github.com:your-username/rdf-raptor.git` * Install bundle: @@ -28,9 +28,11 @@ This repository uses [Git Flow](https://github.com/nvie/gitflow) to manage devel enough, be assured we will eventually add you in there. * Do note that in order for us to merge any non-trivial changes (as a rule of thumb, additions larger than about 15 lines of code), we need an - explicit [public domain dedication][PDD] on record from you. + explicit [public domain dedication][PDD] on record from you, + which you will be asked to agree to on the first commit to a repo within the organization. + Note that the agreement applies to all repos in the [Ruby RDF](https://github.com/ruby-rdf/) organization. -[YARD]: http://yardoc.org/ -[YARD-GS]: http://rubydoc.info/docs/yard/file/docs/GettingStarted.md -[PDD]: http://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html -[pr]: https://github.com/ruby-rdf/rdf-raptor/compare/ +[YARD]: https://yardoc.org/ +[YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md +[PDD]: https://unlicense.org/#unlicensing-contributions +[pr]: https://github.com/ruby-rdf/rdf/compare/ diff --git a/Gemfile b/Gemfile index e995223..b963771 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -source "http://rubygems.org" +source "https://rubygems.org" gemspec @@ -6,8 +6,9 @@ gem 'rdf', github: 'ruby-rdf/rdf', branch: "develop" gem 'rdf-spec', github: 'ruby-rdf/rdf-spec', branch: "develop" gem "rdf-isomorphic", github: "ruby-rdf/rdf-isomorphic", branch: "develop" -group :development do - gem 'simplecov', platforms: [:mri, :jruby] +group :test do + gem 'simplecov', '~> 0.21', platforms: :mri + gem 'simplecov-lcov', '~> 0.8', platforms: :mri end group :debug do diff --git a/README.md b/README.md index 1d66361..f39b40f 100755 --- a/README.md +++ b/README.md @@ -5,11 +5,9 @@ This is an [RDF.rb][] extension that adds support for parsing/serializing [NTrip [RDF/XML][], [Turtle][], [RDFa][], and [Graphviz][] data using the [Raptor RDF Parser][Raptor] library. -* -* - -[![Gem Version](https://badge.fury.io/rb/rdf-raptor.png)](http://badge.fury.io/rb/rdf-raptor) -[![Build Status](https://travis-ci.org/ruby-rdf/rdf-raptor.png?branch=master)](http://travis-ci.org/ruby-rdf/rdf-raptor) +[![Gem Version](https://badge.fury.io/rb/rdf-raptor.png)](https://badge.fury.io/rb/rdf-raptor) +[![Build Status](https://github.com/ruby-rdf/rdf-raptor/workflows/CI/badge.svg?branch=develop)](https://github.com/ruby-rdf/rdf-raptor/actions?query=workflow%3ACI) +[![Gitter chat](https://badges.gitter.im/ruby-rdf/rdf.png)](https://gitter.im/ruby-rdf/rdf) Features -------- @@ -18,9 +16,9 @@ Features * Parses and serializes RDF data from/into the NTriples, RDF/XML, and Turtle formats. * Extracts RDF statements from XHTML+RDFa documents. * Serializes RDF statements into Graphviz format. -* Provides serialization format autodetection for RDF/XML, Turtle and RDFa. +* Provides serialization format auto-detection for RDF/XML, Turtle and RDFa. * Compatible with any operating system supported by Raptor and Ruby. -* Compatible with MRI >= 2.4, JRuby and Rubinius. +* Compatible with MRI >= 2.6, JRuby and Rubinius. Examples -------- @@ -30,7 +28,7 @@ Examples ### Ensuring Raptor is installed and obtaining the version number RDF::Raptor.available? #=> true - RDF::Raptor.version #=> "2.0.8" + RDF::Raptor.version #=> "3.2.0" ### Parsing RDF statements from an NTriples file @@ -127,7 +125,7 @@ Examples Documentation ------------- - + * {RDF::Raptor} * {RDF::Raptor::NTriples} @@ -139,14 +137,14 @@ Documentation Dependencies ------------ -* [RDF.rb](http://rubygems.org/gems/rdf) (~> 3.1) -* [FFI](http://rubygems.org/gems/ffi) (~> 1.11) +* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.2) +* [FFI](https://rubygems.org/gems/ffi) (~> 1.15) * [Raptor][] (>= 2.0), the `libraptor` library or the `rapper` binary Installation ------------ -The recommended installation method is via [RubyGems](http://rubygems.org/). +The recommended installation method is via [RubyGems](https://rubygems.org/). To install the latest official release of the `RDF::Raptor` gem, do: % [sudo] gem install rdf-raptor @@ -190,33 +188,33 @@ follows: Mailing List ------------ -* +* Authors ------- -* [Arto Bendiken](https://github.com/bendiken) - -* [John Fieber](https://github.com/jfieber) - +* [Arto Bendiken](https://github.com/artob) - +* [John Fieber](https://github.com/jfieber) - Contributors ------------ -* [Ben Lavender](https://github.com/bhuga) - -* [David Butler](https://github.com/dwbutler) - -* [Gregg Kellogg](https://github.com/gkellogg) - +* [Ben Lavender](https://github.com/bhuga) - +* [David Butler](https://github.com/dwbutler) - +* [Gregg Kellogg](https://github.com/gkellogg) - License ------- This is free and unencumbered public domain software. For more information, -see or the accompanying [UNLICENSE][] file. +see or the accompanying [UNLICENSE][] file. [RDF.rb]: https://ruby-rdf.github.io/rdf [NTriples]: https://en.wikipedia.org/wiki/N-Triples -[RDF/XML]: http://www.w3.org/TR/REC-rdf-syntax/ +[RDF/XML]: https://www.w3.org/TR/REC-rdf-syntax/ [Turtle]: https://en.wikipedia.org/wiki/Turtle_(syntax) -[RDFa]: http://rdfa.info/ -[Graphviz]: http://www.graphviz.org/ -[Raptor]: http://librdf.org/raptor/ -[rapper]: http://librdf.org/raptor/rapper.html +[RDFa]: https://rdfa.info/ +[Graphviz]: https://www.graphviz.org/ +[Raptor]: https://librdf.org/raptor/ +[rapper]: https://librdf.org/raptor/rapper.html [UNLICENSE]:https://github.com/ruby-rdf/rdf-raptor/blob/master/UNLICENSE diff --git a/UNLICENSE b/UNLICENSE index 68a49da..efb9808 100644 --- a/UNLICENSE +++ b/UNLICENSE @@ -21,4 +21,4 @@ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -For more information, please refer to +For more information, please refer to diff --git a/VERSION b/VERSION index fd2a018..944880f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.0 +3.2.0 diff --git a/etc/doap.html b/etc/doap.html index ebfd732..05d73b3 100644 --- a/etc/doap.html +++ b/etc/doap.html @@ -8,27 +8,27 @@ vocab="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/"> - RDFa reader/writer for Ruby. - + Raptor RDF Parser plugin for RDF.rb. +

Project description for RDF::RDFa.

- RDF::RDFa is an RDFa reader/writer for Ruby using the RDF.rb library suite. + RDF.rb plugin for parsing/serializing RDF/XML, Turtle and RDFa data using the Raptor RDF Parser library.

Implemented Specifications
Creator
- Gregg Kellogg @@ -39,10 +39,10 @@
Created
2011-08-29
-
Blog
http://greggkellogg.net/
+
Blog
https://greggkellogg.net/
Bug DB
- - http://github.com/ruby-rdf/rdf-rdfa/issues + + https://github.com/ruby-rdf/rdf-rdfa/issues
Programming Language
Ruby
@@ -51,17 +51,17 @@ for Ruby -
Download
- http://rubygems.org/gems/rdf-rdfa +
Download
+ https://rubygems.org/gems/rdf-raptor
-
Home Page
- http://github.com/ruby-rdf/rdf-rdfa +
Home Page
+ https://github.com/ruby-rdf/rdf-raptor
License
- Public Domain + Public Domain
-
Mailing List
- http://lists.w3.org/Archives/Public/public-rdf-ruby/ +
Mailing List
+ https://lists.w3.org/Archives/Public/public-rdf-ruby/
diff --git a/etc/doap.nt b/etc/doap.nt index 71a970e..5373974 100644 --- a/etc/doap.nt +++ b/etc/doap.nt @@ -1,85 +1,41 @@ - . - "RDF.rb" . - . - . - "A Ruby library for working with Resource Description Framework (RDF) data."@en . - "RDF.rb is a pure-Ruby library for working with Resource Description Framework (RDF) data."@en . - "2007-10-23" . - "Ruby" . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . -_:g2171308140 . -_:g2171308140 "CD\u0003lin Ardelean" . -_:g2171308140 "274bd18402fc773ffc0606996aa1fb90b603aa29" . - _:g2171308140 . -_:g2171257040 . -_:g2171257040 "Danny Gagne" . -_:g2171257040 "6de43e9cf7de53427fea9765706703e4d957c17b" . - _:g2171257040 . -_:g2171208180 . -_:g2171208180 "Joey Geiger" . -_:g2171208180 "f412d743150d7b27b8468d56e69ca147917ea6fc" . - _:g2171208180 . -_:g2171159320 . -_:g2171159320 "Fumihiro Kato" . -_:g2171159320 "d31fdd6af7a279a89bf09fdc9f7c44d9d08bb930" . - _:g2171159320 . -_:g2171110460 . -_:g2171110460 "Naoki Kawamukai" . -_:g2171110460 "5bdcd8e2af4f5952aaeeffbdd371c41525ec761d" . - _:g2171110460 . -_:g2171061600 . -_:g2171061600 "Hellekin O. Wolf" . -_:g2171061600 "c69f3255ff0639543cc5edfd8116eac8df16fab8" . - _:g2171061600 . -_:g2171012740 . -_:g2171012740 "John Fieber" . -_:g2171012740 "f7653fc1ac0e82ebb32f092389bd5fc728eaae12" . - _:g2171012740 . -_:g2170963880 . -_:g2170963880 "Keita Urashima" . -_:g2170963880 "2b4247b6fd5bb4a1383378f325784318680d5ff9" . - _:g2170963880 . -_:g2173836940 . -_:g2173836940 "Pius Uzamere" . -_:g2173836940 "bedbbf2451e5beb38d59687c0460032aff92cd3c" . - _:g2173836940 . - . - . - . - "Arto Bendiken" . - . - "d0737cceb55eb7d740578d2db1bc0727e3ed49ce" . - "a033f652c84a4d73b8c26d318c2395699dd2bdfb" . - . - . - . - . - "Ben Lavender" . - . - "dbf45f4ffbd27b67aa84f02a6a31c144727d10af" . - . - . - . - "Gregg Kellogg" . - . - "35bc44e6d0070e5ad50ccbe0d24403c96af2b9bd" . - . - . + . + "Arto Bendiken" . + . + "a033f652c84a4d73b8c26d318c2395699dd2bdfb" . + "d0737cceb55eb7d740578d2db1bc0727e3ed49ce" . + . + . + "Raptor RDF Parser plugin for RDF.rb."@en . + . + . + . + _:jfieber . + . + . + "RDF.rb plugin for parsing/serializing RDF/XML, Turtle and RDFa data using the Raptor RDF Parser library."@en . + "RDF::Raptor" . + . + . + . + . + "Ruby" . + . + . + . + "2010-03-23" . + . +_:jfieber "John Fieber" . +_:jfieber . +_:jfieber "f7653fc1ac0e82ebb32f092389bd5fc728eaae12" . +_:jfieber . + . + "Ben Lavender" . + . + "dbf45f4ffbd27b67aa84f02a6a31c144727d10af" . + . + . + . + "Gregg Kellogg" . + . + "35bc44e6d0070e5ad50ccbe0d24403c96af2b9bd" . + . diff --git a/etc/doap.ttl b/etc/doap.ttl index 3d7c0db..4f2c555 100644 --- a/etc/doap.ttl +++ b/etc/doap.ttl @@ -1,4 +1,4 @@ -@base . +@base . @prefix rdf: . @prefix rdfs: . @prefix dc: . @@ -7,49 +7,54 @@ <> a doap:Project ; doap:name "RDF::Raptor" ; - doap:homepage ; - doap:license ; + doap:homepage ; + doap:license ; doap:shortdesc "Raptor RDF Parser plugin for RDF.rb."@en ; doap:description "RDF.rb plugin for parsing/serializing RDF/XML, Turtle and RDFa data using the Raptor RDF Parser library."@en ; doap:created "2010-03-23" ; - doap:platform "Ruby" ; - doap:download-page ; - doap:bug-database ; - doap:blog , ; - doap:developer , + doap:programming-language "Ruby" ; + doap:download-page <> ; + doap:bug-database ; + doap:blog ; + doap:developer , _:jfieber, - ; - doap:maintainer ; - doap:documenter ; - doap:helper , - ; - foaf:maker ; - dc:creator . + _:dwbutler, + ; + doap:maintainer _:dwbutler, ; + doap:documenter ; + doap:helper , + ; + foaf:maker ; + dc:creator . - a foaf:Person ; + a foaf:Person ; foaf:name "Arto Bendiken" ; foaf:mbox ; foaf:mbox_sha1sum "d0737cceb55eb7d740578d2db1bc0727e3ed49ce", "a033f652c84a4d73b8c26d318c2395699dd2bdfb" ; - foaf:homepage ; - rdfs:isDefinedBy . + foaf:homepage . - a foaf:Person ; + a foaf:Person ; foaf:name "Ben Lavender" ; foaf:mbox ; foaf:mbox_sha1sum "dbf45f4ffbd27b67aa84f02a6a31c144727d10af" ; - foaf:homepage ; - rdfs:isDefinedBy . + foaf:homepage . + +_:dwbutler a foaf:Person ; + foaf:name "David Butler" ; + #foaf:mbox ; + foaf:mbox_sha1sum "8125fe100c2ed5f6ced2a88bd09a244e1c91682b" ; + foaf:homepage . _:jfieber a foaf:Person ; foaf:name "John Fieber" ; - foaf:mbox ; + #foaf:mbox ; foaf:mbox_sha1sum "f7653fc1ac0e82ebb32f092389bd5fc728eaae12" ; foaf:homepage . - a foaf:Person ; + a foaf:Person ; foaf:name "Gregg Kellogg" ; foaf:mbox ; foaf:mbox_sha1sum "35bc44e6d0070e5ad50ccbe0d24403c96af2b9bd" ; - foaf:homepage ; - rdfs:isDefinedBy . \ No newline at end of file + foaf:homepage ; + rdfs:isDefinedBy . \ No newline at end of file diff --git a/etc/doap.xml b/etc/doap.xml index 8f6bc91..2b2d7d6 100644 --- a/etc/doap.xml +++ b/etc/doap.xml @@ -1,29 +1,89 @@ - - - - - - - - - - Ruby - - - 2010-06-03 - - RDF::RDFXML is an RDF/XML reader/writer for Ruby using the RDF.rb library suite. - - - - - - - - - RDF::RDFXML - RDF/XML reader/writer for Ruby. - - - + + + + + + + +dbf45f4ffbd27b67aa84f02a6a31c144727d10af + +Ben Lavender + + + + + + + + + + +a033f652c84a4d73b8c26d318c2395699dd2bdfb + d0737cceb55eb7d740578d2db1bc0727e3ed49ce + +Arto Bendiken + + + + + + + + + +2010-03-23 + +RDF.rb plugin for parsing/serializing RDF/XML, Turtle and RDFa data using the Raptor RDF Parser library. + + + + + + + + + +35bc44e6d0070e5ad50ccbe0d24403c96af2b9bd + +Gregg Kellogg + + + + + + + + + +f7653fc1ac0e82ebb32f092389bd5fc728eaae12 + +John Fieber + + + + + + + + + + + + + + + + + + +RDF::Raptor + +Ruby + +Raptor RDF Parser plugin for RDF.rb. + + + + + diff --git a/lib/rdf/raptor.rb b/lib/rdf/raptor.rb index 686d32f..1e6d52c 100644 --- a/lib/rdf/raptor.rb +++ b/lib/rdf/raptor.rb @@ -1,4 +1,4 @@ -require 'rdf' # @see http://rubygems.org/gems/rdf +require 'rdf' # @see https://rubygems.org/gems/rdf require 'rdf/raptor/format' module RDF @@ -72,12 +72,12 @@ module RDF # `RDF_RAPTOR_BINPATH` environment variables appropriately before # requiring `rdf/raptor`. # - # @see http://www.rubydoc.info/github/ruby-rdf/rdf/ - # @see http://librdf.org/raptor/ - # @see http://wiki.github.com/ffi/ffi/ + # @see https://www.rubydoc.info/github/ruby-rdf/rdf/ + # @see https://librdf.org/raptor/ + # @see https://wiki.github.com/ffi/ffi/ # - # @author [Arto Bendiken](http://github.com/bendiken) - # @author [John Fieber](http://github.com/jfieber) + # @author [Arto Bendiken](https://github.com/artob) + # @author [John Fieber](https://github.com/jfieber) module Raptor LIBRAPTOR = ENV['RDF_RAPTOR_LIBPATH'] || ['libraptor2', 'libraptor2.so.0'] unless const_defined?(:LIBRAPTOR) RAPPER = ENV['RDF_RAPTOR_BINPATH'] || 'rapper' unless const_defined?(:RAPPER) diff --git a/lib/rdf/raptor/cli.rb b/lib/rdf/raptor/cli.rb index 0a60a39..96716bd 100644 --- a/lib/rdf/raptor/cli.rb +++ b/lib/rdf/raptor/cli.rb @@ -27,7 +27,7 @@ class Reader < RDF::Reader # Initializes the CLI reader instance. # # @param [IO, File, RDF::URI, String] input - # @param [String, #to_s] :base_uri ("file:///dev/stdin") + # @param [String, #to_s] base_uri ("file:///dev/stdin") # @param [Hash{Symbol => Object}] options # any additional options (see `RDF::Reader#initialize`) # @yield [reader] `self` @@ -113,7 +113,7 @@ module Extensions # # @private # @see RDF::NTriples::Reader#read_node - # @see https://github.com/bendiken/rdf-raptor/issues/#issue/9 + # @see https://github.com/ruby-rdf/rdf-raptor/issues/#issue/9 def read_node if node_id = match(NODEID) @nodes ||= {} diff --git a/lib/rdf/raptor/ffi.rb b/lib/rdf/raptor/ffi.rb index 3fe5ca3..b27f0c7 100644 --- a/lib/rdf/raptor/ffi.rb +++ b/lib/rdf/raptor/ffi.rb @@ -1,5 +1,5 @@ require 'tempfile' -require 'ffi' # @see http://rubygems.org/gems/ffi +require 'ffi' # @see https://rubygems.org/gems/ffi module RDF::Raptor ## diff --git a/lib/rdf/raptor/ffi/v1.rb b/lib/rdf/raptor/ffi/v1.rb index 2b8ddb0..7c762ba 100644 --- a/lib/rdf/raptor/ffi/v1.rb +++ b/lib/rdf/raptor/ffi/v1.rb @@ -2,7 +2,7 @@ module RDF::Raptor::FFI ## # A foreign-function interface (FFI) to `libraptor` 1.4.x. # - # @see http://librdf.org/raptor/libraptor.html + # @see https://librdf.org/raptor/libraptor.html module V1 autoload :IOStream, 'rdf/raptor/ffi/v1/iostream' autoload :IOStreamHandler, 'rdf/raptor/ffi/v1/iostream_handler' @@ -22,27 +22,27 @@ module V1 RAPTOR_IDENTIFIER_TYPE_ANONYMOUS = 2 RAPTOR_IDENTIFIER_TYPE_LITERAL = 5 - # @see http://librdf.org/raptor/api-1.4/tutorial-initialising-finishing.html + # @see https://librdf.org/raptor/api-1.4/tutorial-initialising-finishing.html attach_function :raptor_init, [], :void attach_function :raptor_finish, [], :void attach_function :raptor_alloc_memory, [:size_t], :pointer attach_function :raptor_calloc_memory, [:size_t, :size_t], :pointer attach_function :raptor_free_memory, [:pointer], :void - # @see http://librdf.org/raptor/api-1.4/raptor-section-locator.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-locator.html typedef :pointer, :raptor_locator attach_function :raptor_locator_line, [:raptor_locator], :int attach_function :raptor_locator_column, [:raptor_locator], :int attach_function :raptor_locator_byte, [:raptor_locator], :int - # @see http://librdf.org/raptor/api-1.4/raptor-section-general.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-general.html attach_variable :raptor_version_major, :int attach_variable :raptor_version_minor, :int attach_variable :raptor_version_release, :int attach_variable :raptor_version_decimal, :int callback :raptor_message_handler, [:pointer, :raptor_locator, :string], :void - # @see http://librdf.org/raptor/api-1.4/raptor-section-uri.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-uri.html typedef :pointer, :raptor_uri attach_function :raptor_new_uri, [:string], :raptor_uri attach_function :raptor_uri_copy, [:raptor_uri], :raptor_uri @@ -52,7 +52,7 @@ module V1 attach_function :raptor_uri_print, [:raptor_uri, :pointer], :void attach_function :raptor_free_uri, [:raptor_uri], :void - # @see http://librdf.org/raptor/api-1.4/raptor-section-triples.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-triples.html typedef :int, :raptor_identifier_type typedef :pointer, :raptor_identifier typedef :pointer, :raptor_statement @@ -61,7 +61,7 @@ module V1 attach_function :raptor_print_statement_as_ntriples, [:pointer, :pointer], :void attach_function :raptor_statement_part_as_string, [:pointer, :raptor_identifier_type, :raptor_uri, :pointer], :string - # @see http://librdf.org/raptor/api-1.4/raptor-section-parser.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-parser.html callback :raptor_statement_handler, [:pointer, :raptor_statement], :void typedef :pointer, :raptor_parser typedef :string, :mime_type @@ -81,7 +81,7 @@ module V1 attach_function :raptor_get_need_base_uri, [:raptor_parser], :int attach_function :raptor_free_parser, [:raptor_parser], :void - # @see http://librdf.org/raptor/api-1.4/raptor-section-iostream.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-iostream.html typedef :pointer, :raptor_iostream attach_function :raptor_new_iostream_from_handler2, [:pointer, :pointer], :raptor_iostream attach_function :raptor_free_iostream, [:raptor_iostream], :void @@ -93,10 +93,10 @@ module V1 callback :raptor_iostream_read_bytes_func, [:pointer, :pointer, :size_t, :size_t], :int callback :raptor_iostream_read_eof_func, [:pointer], :int - # @see http://librdf.org/raptor/api-1.4/raptor-section-xml-namespace.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-xml-namespace.html typedef :pointer, :raptor_namespace - # @see http://librdf.org/raptor/api-1.4/raptor-section-serializer.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-serializer.html typedef :pointer, :raptor_serializer attach_function :raptor_new_serializer, [:string], :raptor_serializer attach_function :raptor_free_serializer, [:raptor_serializer], :void diff --git a/lib/rdf/raptor/ffi/v1/iostream.rb b/lib/rdf/raptor/ffi/v1/iostream.rb index a42a5e1..104a673 100644 --- a/lib/rdf/raptor/ffi/v1/iostream.rb +++ b/lib/rdf/raptor/ffi/v1/iostream.rb @@ -3,7 +3,7 @@ module RDF::Raptor::FFI::V1 # This class provides an I/O stream that can write to filenames, `FILE*`, # strings and user-defined output via callbacks. # - # @see http://librdf.org/raptor/api-1.4/raptor-section-iostream.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-iostream.html class IOStream < ::FFI::ManagedStruct include RDF::Raptor::FFI layout :user_data, :pointer # the actual layout is private diff --git a/lib/rdf/raptor/ffi/v1/iostream_handler.rb b/lib/rdf/raptor/ffi/v1/iostream_handler.rb index 64b7745..46e9fb5 100644 --- a/lib/rdf/raptor/ffi/v1/iostream_handler.rb +++ b/lib/rdf/raptor/ffi/v1/iostream_handler.rb @@ -1,6 +1,6 @@ module RDF::Raptor::FFI::V1 ## - # @see http://librdf.org/raptor/api-1.4/raptor-section-iostream.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-iostream.html class IOStreamHandler < ::FFI::Struct include RDF::Raptor::FFI layout :version, :int, diff --git a/lib/rdf/raptor/ffi/v1/parser.rb b/lib/rdf/raptor/ffi/v1/parser.rb index 5032906..99a0324 100644 --- a/lib/rdf/raptor/ffi/v1/parser.rb +++ b/lib/rdf/raptor/ffi/v1/parser.rb @@ -3,7 +3,7 @@ module RDF::Raptor::FFI::V1 # This class provides the functionality of turning syntaxes into RDF # triples - RDF parsing. # - # @see http://librdf.org/raptor/api-1.4/raptor-section-parser.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-parser.html class Parser < ::FFI::ManagedStruct include RDF::Raptor::FFI layout :world, :pointer # the actual layout is private diff --git a/lib/rdf/raptor/ffi/v1/serializer.rb b/lib/rdf/raptor/ffi/v1/serializer.rb index 34f7cd9..f46b459 100644 --- a/lib/rdf/raptor/ffi/v1/serializer.rb +++ b/lib/rdf/raptor/ffi/v1/serializer.rb @@ -3,7 +3,7 @@ module RDF::Raptor::FFI::V1 # This class provides the functionality of turning RDF triples into # syntaxes - RDF serializing. # - # @see http://librdf.org/raptor/api-1.4/raptor-section-serializer.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-serializer.html class Serializer < ::FFI::ManagedStruct include RDF::Raptor::FFI layout :world, :pointer # the actual layout is private diff --git a/lib/rdf/raptor/ffi/v1/statement.rb b/lib/rdf/raptor/ffi/v1/statement.rb index 603ed0b..0c11b11 100644 --- a/lib/rdf/raptor/ffi/v1/statement.rb +++ b/lib/rdf/raptor/ffi/v1/statement.rb @@ -1,6 +1,6 @@ module RDF::Raptor::FFI::V1 ## - # @see http://librdf.org/raptor/api-1.4/raptor-section-triples.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-triples.html class Statement < ::FFI::Struct include RDF::Raptor::FFI layout :subject, :pointer, diff --git a/lib/rdf/raptor/ffi/v1/uri.rb b/lib/rdf/raptor/ffi/v1/uri.rb index d157f71..6e96d22 100644 --- a/lib/rdf/raptor/ffi/v1/uri.rb +++ b/lib/rdf/raptor/ffi/v1/uri.rb @@ -4,7 +4,7 @@ module RDF::Raptor::FFI::V1 # passing URI references. The default internal implementation uses `char*` # strings for URIs, manipulating them and constructing them. # - # @see http://librdf.org/raptor/api-1.4/raptor-section-uri.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-uri.html class URI < ::FFI::ManagedStruct include RDF::Raptor::FFI include RDF::Resource diff --git a/lib/rdf/raptor/ffi/v2.rb b/lib/rdf/raptor/ffi/v2.rb index 1a7dc00..3348b31 100644 --- a/lib/rdf/raptor/ffi/v2.rb +++ b/lib/rdf/raptor/ffi/v2.rb @@ -2,7 +2,7 @@ module RDF::Raptor::FFI ## # A foreign-function interface (FFI) to `libraptor` 2.x. # - # @see http://librdf.org/raptor/libraptor.html + # @see https://librdf.org/raptor/libraptor.html module V2 autoload :IOStream, 'rdf/raptor/ffi/v2/iostream' autoload :IOStreamHandler, 'rdf/raptor/ffi/v2/iostream_handler' @@ -25,7 +25,7 @@ module V2 RAPTOR_TERM_TYPE_LITERAL = 2 RAPTOR_TERM_TYPE_BLANK = 4 - # @see http://librdf.org/raptor/api/tutorial-initialising-finishing.html + # @see https://librdf.org/raptor/api/tutorial-initialising-finishing.html typedef :pointer, :raptor_world typedef :int, :raptor_version typedef :pointer, :raptor_iostream @@ -35,13 +35,13 @@ module V2 attach_function :raptor_calloc_memory, [:size_t, :size_t], :pointer attach_function :raptor_free_memory, [:pointer], :void - # @see http://librdf.org/raptor/api-1.4/raptor-section-locator.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-locator.html typedef :pointer, :raptor_locator attach_function :raptor_locator_line, [:raptor_locator], :int attach_function :raptor_locator_column, [:raptor_locator], :int attach_function :raptor_locator_byte, [:raptor_locator], :int - # @see http://librdf.org/raptor/api/raptor2-section-general.html + # @see https://librdf.org/raptor/api/raptor2-section-general.html attach_variable :raptor_version_string, :string attach_variable :raptor_version_major, :int attach_variable :raptor_version_minor, :int @@ -49,7 +49,7 @@ module V2 attach_variable :raptor_version_decimal, :int callback :raptor_message_handler, [:pointer, :raptor_locator, :string], :void - # @see http://librdf.org/raptor/api-1.4/raptor-section-uri.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-uri.html typedef :pointer, :raptor_uri attach_function :raptor_new_uri, [:raptor_world, :string], :raptor_uri attach_function :raptor_uri_copy, [:raptor_uri], :raptor_uri @@ -59,7 +59,7 @@ module V2 attach_function :raptor_uri_print, [:raptor_uri, :pointer], :void attach_function :raptor_free_uri, [:raptor_uri], :void - # @see http://librdf.org/raptor/api/raptor2-section-triples.html + # @see https://librdf.org/raptor/api/raptor2-section-triples.html typedef :int, :raptor_identifier_type typedef :pointer, :raptor_identifier typedef :pointer, :raptor_statement @@ -80,11 +80,11 @@ module V2 attach_function :raptor_free_term, [:raptor_term], :void attach_function :raptor_term_ntriples_write, [:raptor_term, :raptor_iostream], :int - # @see http://librdf.org/raptor/api/raptor2-section-xml-namespace.html + # @see https://librdf.org/raptor/api/raptor2-section-xml-namespace.html typedef :pointer, :raptor_namespace attach_function :raptor_free_namespace, [:raptor_namespace], :void - # @see http://librdf.org/raptor/api/raptor2-section-parser.html + # @see https://librdf.org/raptor/api/raptor2-section-parser.html callback :raptor_statement_handler, [:pointer, :raptor_statement], :void callback :raptor_namespace_handler, [:pointer, :raptor_namespace], :void typedef :pointer, :raptor_parser @@ -107,7 +107,7 @@ module V2 attach_function :raptor_parser_parse_abort, [], :void attach_function :raptor_free_parser, [:raptor_parser], :void - # @see http://librdf.org/raptor/api/raptor2-section-iostream.html + # @see https://librdf.org/raptor/api/raptor2-section-iostream.html attach_function :raptor_new_iostream_from_handler, [:raptor_world, :pointer, :pointer], :raptor_iostream attach_function :raptor_new_iostream_to_filename, [:raptor_world, :string], :raptor_iostream attach_function :raptor_new_iostream_to_sink, [:raptor_world], :raptor_iostream @@ -120,7 +120,7 @@ module V2 callback :raptor_iostream_read_bytes_func, [:pointer, :pointer, :size_t, :size_t], :int callback :raptor_iostream_read_eof_func, [:pointer], :int - # @see http://librdf.org/raptor/api/raptor2-section-serializer.html + # @see https://librdf.org/raptor/api/raptor2-section-serializer.html typedef :pointer, :raptor_serializer typedef :string, :prefix attach_function :raptor_new_serializer, [:raptor_world, :string], :raptor_serializer diff --git a/lib/rdf/raptor/ffi/v2/iostream.rb b/lib/rdf/raptor/ffi/v2/iostream.rb index 56555af..a136a26 100644 --- a/lib/rdf/raptor/ffi/v2/iostream.rb +++ b/lib/rdf/raptor/ffi/v2/iostream.rb @@ -3,7 +3,7 @@ module RDF::Raptor::FFI::V2 # This class provides an I/O stream that can write to filenames, `FILE*`, # strings and user-defined output via callbacks. # - # @see http://librdf.org/raptor/api-1.4/raptor-section-iostream.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-iostream.html class IOStream < ::FFI::ManagedStruct include RDF::Raptor::FFI layout :world, :pointer, diff --git a/lib/rdf/raptor/ffi/v2/iostream_handler.rb b/lib/rdf/raptor/ffi/v2/iostream_handler.rb index cb821ca..b10541b 100644 --- a/lib/rdf/raptor/ffi/v2/iostream_handler.rb +++ b/lib/rdf/raptor/ffi/v2/iostream_handler.rb @@ -1,6 +1,6 @@ module RDF::Raptor::FFI::V2 ## - # @see http://librdf.org/raptor/api-1.4/raptor-section-iostream.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-iostream.html class IOStreamHandler < ::FFI::Struct include RDF::Raptor::FFI layout :version, :int, diff --git a/lib/rdf/raptor/ffi/v2/namespace.rb b/lib/rdf/raptor/ffi/v2/namespace.rb index 93f391e..9ff8e16 100644 --- a/lib/rdf/raptor/ffi/v2/namespace.rb +++ b/lib/rdf/raptor/ffi/v2/namespace.rb @@ -1,6 +1,6 @@ module RDF::Raptor::FFI::V2 ## - # @see http://librdf.org/raptor/api/raptor2-section-xml-namespace.html + # @see https://librdf.org/raptor/api/raptor2-section-xml-namespace.html class Namespace < ::FFI::Struct include RDF::Raptor::FFI # @see https://github.com/dajobe/raptor/blob/f4b2597d4279dcb283bf5c32e5435696fd28a8ec/src/raptor_internal.h#L428 diff --git a/lib/rdf/raptor/ffi/v2/parser.rb b/lib/rdf/raptor/ffi/v2/parser.rb index f92e14c..70f8482 100644 --- a/lib/rdf/raptor/ffi/v2/parser.rb +++ b/lib/rdf/raptor/ffi/v2/parser.rb @@ -3,7 +3,7 @@ module RDF::Raptor::FFI::V2 # This class provides the functionality of turning syntaxes into RDF # triples - RDF parsing. # - # @see http://librdf.org/raptor/api/raptor2-section-parser.html + # @see https://librdf.org/raptor/api/raptor2-section-parser.html class Parser < ::FFI::ManagedStruct include RDF::Raptor::FFI layout :world, :pointer # the actual layout is private diff --git a/lib/rdf/raptor/ffi/v2/serializer.rb b/lib/rdf/raptor/ffi/v2/serializer.rb index c153d03..d09727f 100644 --- a/lib/rdf/raptor/ffi/v2/serializer.rb +++ b/lib/rdf/raptor/ffi/v2/serializer.rb @@ -3,7 +3,7 @@ module RDF::Raptor::FFI::V2 # This class provides the functionality of turning RDF triples into # syntaxes - RDF serializing. # - # @see http://librdf.org/raptor/api-1.4/raptor-section-serializer.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-serializer.html class Serializer < ::FFI::ManagedStruct include RDF::Raptor::FFI diff --git a/lib/rdf/raptor/ffi/v2/statement.rb b/lib/rdf/raptor/ffi/v2/statement.rb index aab32a5..fdd1d48 100644 --- a/lib/rdf/raptor/ffi/v2/statement.rb +++ b/lib/rdf/raptor/ffi/v2/statement.rb @@ -1,6 +1,6 @@ module RDF::Raptor::FFI::V2 ## - # @see http://librdf.org/raptor/api-1.4/raptor-section-triples.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-triples.html class Statement < ::FFI::Struct include RDF::Raptor::FFI layout :world, :pointer, diff --git a/lib/rdf/raptor/ffi/v2/term.rb b/lib/rdf/raptor/ffi/v2/term.rb index d45c41d..560811c 100644 --- a/lib/rdf/raptor/ffi/v2/term.rb +++ b/lib/rdf/raptor/ffi/v2/term.rb @@ -1,6 +1,6 @@ module RDF::Raptor::FFI::V2 ## - # @see http://librdf.org/raptor/api-1.4/raptor-section-triples.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-triples.html class Term < ::FFI::Struct include RDF::Raptor::FFI diff --git a/lib/rdf/raptor/ffi/v2/uri.rb b/lib/rdf/raptor/ffi/v2/uri.rb index c8cd443..637c405 100644 --- a/lib/rdf/raptor/ffi/v2/uri.rb +++ b/lib/rdf/raptor/ffi/v2/uri.rb @@ -4,7 +4,7 @@ module RDF::Raptor::FFI::V2 # passing URI references. The default internal implementation uses `char*` # strings for URIs, manipulating them and constructing them. # - # @see http://librdf.org/raptor/api-1.4/raptor-section-uri.html + # @see https://librdf.org/raptor/api-1.4/raptor-section-uri.html class URI < ::FFI::ManagedStruct include RDF::Raptor::FFI include RDF::Resource diff --git a/lib/rdf/raptor/graphviz.rb b/lib/rdf/raptor/graphviz.rb index 4139cd3..893de80 100644 --- a/lib/rdf/raptor/graphviz.rb +++ b/lib/rdf/raptor/graphviz.rb @@ -23,7 +23,7 @@ module Graphviz # RDF::Format.for(file_extension: "dot") # RDF::Format.for(content_type: "text/vnd.graphviz") # - # @see http://www.iana.org/assignments/media-types/text/vnd.graphviz + # @see https://www.iana.org/assignments/media-types/text/vnd.graphviz class Format < RDF::Format extend RDF::Raptor::Format diff --git a/lib/rdf/raptor/ntriples.rb b/lib/rdf/raptor/ntriples.rb index 28669f0..ea2edc9 100644 --- a/lib/rdf/raptor/ntriples.rb +++ b/lib/rdf/raptor/ntriples.rb @@ -19,7 +19,7 @@ module RDF::Raptor # end # end # - # @see http://www.w3.org/TR/rdf-testcases/#ntriples + # @see https://www.w3.org/TR/rdf-testcases/#ntriples module NTriples ## # N-Triples format specification. diff --git a/lib/rdf/raptor/rdfa.rb b/lib/rdf/raptor/rdfa.rb index 784192f..2d86f27 100644 --- a/lib/rdf/raptor/rdfa.rb +++ b/lib/rdf/raptor/rdfa.rb @@ -12,7 +12,7 @@ module RDF::Raptor # end # end # - # @see http://rdfa.info/ + # @see https://rdfa.info/ module RDFa ## # RDFa format specification. diff --git a/lib/rdf/raptor/rdfxml.rb b/lib/rdf/raptor/rdfxml.rb index 44ca8b9..b4df207 100644 --- a/lib/rdf/raptor/rdfxml.rb +++ b/lib/rdf/raptor/rdfxml.rb @@ -19,7 +19,7 @@ module RDF::Raptor # end # end # - # @see http://www.w3.org/TR/REC-rdf-syntax/ + # @see https://www.w3.org/TR/REC-rdf-syntax/ module RDFXML ## # RDF/XML format specification. diff --git a/lib/rdf/raptor/turtle.rb b/lib/rdf/raptor/turtle.rb index 554cdac..df02506 100644 --- a/lib/rdf/raptor/turtle.rb +++ b/lib/rdf/raptor/turtle.rb @@ -19,7 +19,7 @@ module RDF::Raptor # end # end # - # @see http://www.w3.org/TeamSubmission/turtle/ + # @see https://www.w3.org/TeamSubmission/turtle/ module Turtle ## # Turtle format specification. diff --git a/rdf-raptor.gemspec b/rdf-raptor.gemspec index fdda644..b991d90 100755 --- a/rdf-raptor.gemspec +++ b/rdf-raptor.gemspec @@ -6,8 +6,8 @@ Gem::Specification.new do |gem| gem.date = File.mtime('VERSION').strftime('%Y-%m-%d') gem.name = 'rdf-raptor' - gem.homepage = 'http://ruby-rdf.github.com/rdf-raptor' - gem.license = 'Public Domain' if gem.respond_to?(:license=) + gem.homepage = 'https://github.com/ruby-rdf/rdf-raptor' + gem.license = 'Unlicense' gem.summary = 'Raptor RDF Parser plugin for RDF.rb.' gem.description = 'RDF.rb plugin for parsing/serializing NTriples, RDF/XML, Turtle and RDFa data using the Raptor RDF Parser library.' @@ -18,14 +18,14 @@ Gem::Specification.new do |gem| gem.files = %w(AUTHORS CONTRIBUTING.md CREDITS README.md UNLICENSE VERSION etc/doap.ttl) + Dir.glob('lib/**/*.rb') gem.require_paths = %w(lib) - gem.required_ruby_version = '>= 2.4' + gem.required_ruby_version = '>= 2.6' gem.requirements = ['libraptor2 (>= 2.0)'] - gem.add_runtime_dependency 'ffi', '~> 1.11' - gem.add_runtime_dependency 'rdf', '~> 3.1' - gem.add_development_dependency 'yard' , '~> 0.9.20' - gem.add_development_dependency 'rspec', '~> 3.9' + gem.add_runtime_dependency 'ffi', '~> 1.15' + gem.add_runtime_dependency 'rdf', '~> 3.2' + gem.add_development_dependency 'yard' , '~> 0.9' + gem.add_development_dependency 'rspec', '~> 3.10' gem.add_development_dependency 'rspec-its','~> 1.3' - gem.add_development_dependency 'rdf-spec', '~> 3.1' + gem.add_development_dependency 'rdf-spec', '~> 3.2' gem.add_development_dependency 'rake', '~> 13.0' gem.post_install_message = <<-MESSAGE diff --git a/spec/format/ntriples_spec.rb b/spec/format/ntriples_spec.rb index d55eff6..417d52e 100644 --- a/spec/format/ntriples_spec.rb +++ b/spec/format/ntriples_spec.rb @@ -70,8 +70,8 @@ let(:reader) {RDF::Raptor::NTriples::Reader.new(reader_input)} let(:reader_input) {%q( - . - "RDF.rb" . + . + "RDF.rb" . )} let(:reader_count) {2} it_behaves_like 'an RDF::Reader' do @@ -178,11 +178,11 @@ let(:writer) {RDF::Raptor::NTriples::Writer} let(:statement) { RDF::Statement.new( - RDF::URI("http://rubygems.org/gems/rdf"), + RDF::URI("https://rubygems.org/gems/rdf"), RDF::URI("http://purl.org/dc/terms/creator"), - RDF::URI("http://ar.to/#self")) + RDF::URI("https://ar.to/#self")) } - let(:stmt_string) {" .\n"} + let(:stmt_string) {" .\n"} let(:graph) {RDF::Graph.new {|g| g << statement}} context "when writing" do @@ -197,7 +197,7 @@ end it "should correctly format URI references" do - writer.new.format_uri(RDF::URI('http://rubgems.org/gems/rdf/')).should == '' + writer.new.format_uri(RDF::URI('https://rubgems.org/gems/rdf/')).should == '' end it "should correctly format plain literals" do diff --git a/spec/format/rdfxml_spec.rb b/spec/format/rdfxml_spec.rb index adc86a3..312de01 100644 --- a/spec/format/rdfxml_spec.rb +++ b/spec/format/rdfxml_spec.rb @@ -22,7 +22,7 @@ describe RDF::Raptor::RDFXML::Reader do let!(:doap) {File.expand_path("../../../etc/doap.xml", __FILE__)} - let!(:doap_count) {20} + let!(:doap_count) {41} it_behaves_like 'an RDF::Reader' do around(:each) do |example| diff --git a/spec/format/turtle_spec.rb b/spec/format/turtle_spec.rb index 4721f4d..969a7ce 100644 --- a/spec/format/turtle_spec.rb +++ b/spec/format/turtle_spec.rb @@ -22,7 +22,7 @@ describe RDF::Raptor::Turtle::Reader do let!(:doap) {File.expand_path("../../../etc/doap.ttl", __FILE__)} - let!(:doap_count) {45} + let!(:doap_count) {47} it_behaves_like 'an RDF::Reader' do around(:each) do |example| diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 0a0285f..311bb06 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -8,9 +8,23 @@ begin require 'simplecov' - SimpleCov.start -rescue LoadError - # SimpleCov only works in Ruby 1.9+ + require 'simplecov-lcov' + + SimpleCov::Formatter::LcovFormatter.config do |config| + #Coveralls is coverage by default/lcov. Send info results + config.report_with_single_file = true + config.single_report_path = 'coverage/lcov.info' + end + + SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([ + SimpleCov::Formatter::HTMLFormatter, + SimpleCov::Formatter::LcovFormatter + ]) + SimpleCov.start do + add_filter "/spec/" + end +rescue LoadError => e + STDERR.puts "Coverage Skipped: #{e.message}" end require 'rdf/raptor'