├── .github └── workflows │ ├── ci.yml │ └── generate-docs.yml ├── .gitignore ├── .yardopts ├── AUTHORS ├── CONTRIBUTING.md ├── CREDITS ├── Gemfile ├── README.md ├── Rakefile ├── UNLICENSE ├── VERSION ├── etc └── Gemfile ├── lib └── linkeddata.rb ├── linkeddata.gemspec └── spec ├── linkeddata_spec.rb └── spec_helper.rb /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | # This workflow runs continuous CI across different versions of ruby on all branches and pull requests to develop. 2 | 3 | name: CI 4 | on: 5 | push: 6 | branches: [ '**' ] 7 | pull_request: 8 | branches: [ develop ] 9 | workflow_dispatch: 10 | 11 | jobs: 12 | tests: 13 | name: Ruby ${{ matrix.ruby }} 14 | if: "contains(github.event.commits[0].message, '[ci skip]') == false" 15 | runs-on: ubuntu-latest 16 | env: 17 | CI: true 18 | ALLOW_FAILURES: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'jruby' }} 19 | strategy: 20 | fail-fast: false 21 | matrix: 22 | ruby: ['3.0', 3.1, 3.2, ruby-head, jruby] 23 | steps: 24 | - name: Clone repository 25 | uses: actions/checkout@v3 26 | - name: Set up Ruby 27 | uses: ruby/setup-ruby@v1 28 | with: 29 | ruby-version: ${{ matrix.ruby }} 30 | - name: Install dependencies 31 | run: bundle install --jobs 4 --retry 3 32 | - name: Run tests 33 | run: ruby --version; bundle exec rspec spec || $ALLOW_FAILURES 34 | 35 | -------------------------------------------------------------------------------- /.github/workflows/generate-docs.yml: -------------------------------------------------------------------------------- 1 | name: Build & deploy documentation 2 | on: 3 | push: 4 | branches: 5 | - master 6 | workflow_dispatch: 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | name: Update gh-pages with docs 11 | steps: 12 | - name: Clone repository 13 | uses: actions/checkout@v3 14 | - name: Set up Ruby 15 | uses: ruby/setup-ruby@v1 16 | with: 17 | ruby-version: "3.1" 18 | - name: Install required gem dependencies 19 | run: gem install yard --no-document 20 | - name: Build YARD Ruby Documentation 21 | run: yardoc 22 | - name: Deploy 23 | uses: peaceiris/actions-gh-pages@v3 24 | with: 25 | github_token: ${{ secrets.GITHUB_TOKEN }} 26 | publish_dir: ./doc/yard 27 | publish_branch: gh-pages 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .tmp 3 | .yardoc 4 | pkg 5 | tmp 6 | /doc/ 7 | /pkg/ 8 | /*.gem 9 | Gemfile.lock 10 | -------------------------------------------------------------------------------- /.yardopts: -------------------------------------------------------------------------------- 1 | --title "Linked Data for Ruby" 2 | --output-dir doc/yard 3 | --protected 4 | --no-private 5 | --hide-void-return 6 | --markup markdown 7 | --readme README.md 8 | - 9 | AUTHORS 10 | CREDITS 11 | UNLICENSE 12 | VERSION 13 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | * Arto Bendiken 2 | * Ben Lavender 3 | * Gregg Kellogg 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | Community contributions are essential for keeping Ruby RDF great. We want to keep it as easy as possible to contribute changes that get things working in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. 4 | 5 | ## Development 6 | 7 | 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. 8 | 9 | * create or respond to an issue on the [Github Repository](https://github.com/ruby-rdf/linkeddata/issues) 10 | * Fork and clone the repo: 11 | `git clone git@github.com:your-username/linkeddata.git` 12 | * Install bundle: 13 | `bundle install` 14 | * Create tests in RSpec and make sure you achieve at least 90% code coverage for the feature your adding or behavior being modified. 15 | * Push to your fork and [submit a pull request][pr]. 16 | 17 | ## Do's and Dont's 18 | * Do your best to adhere to the existing coding conventions and idioms. 19 | * Don't use hard tabs, and don't leave trailing whitespace on any line. 20 | Before committing, run `git diff --check` to make sure of this. 21 | * Do document every method you add using [YARD][] annotations. Read the 22 | [tutorial][YARD-GS] or just look at the existing code for examples. 23 | * Don't touch the `.gemspec` or `VERSION` files. If you need to change them, 24 | do so on your private branch only. 25 | * Do feel free to add yourself to the `CREDITS` file and the 26 | corresponding list in the the `README`. Alphabetical order applies. 27 | * Don't touch the `AUTHORS` file. If your contributions are significant 28 | enough, be assured we will eventually add you in there. 29 | * Do note that in order for us to merge any non-trivial changes (as a rule 30 | of thumb, additions larger than about 15 lines of code), we need an 31 | explicit [public domain dedication][PDD] on record from you, 32 | which you will be asked to agree to on the first commit to a repo within the organization. 33 | Note that the agreement applies to all repos in the [Ruby RDF](https://github.com/ruby-rdf/) organization. 34 | 35 | [YARD]: https://yardoc.org/ 36 | [YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md 37 | [PDD]: https://unlicense.org/#unlicensing-contributions 38 | [pr]: https://github.com/ruby-rdf/rdf/compare/ 39 | -------------------------------------------------------------------------------- /CREDITS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruby-rdf/linkeddata/4d91a8d268e484c37483ff4f9382e99f8c21d204/CREDITS -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gemspec 4 | 5 | gem 'ebnf', github: "dryruby/ebnf", branch: "develop" 6 | gem 'json-ld', github: "ruby-rdf/json-ld", branch: "develop" 7 | gem 'json-ld-preloaded', github: "ruby-rdf/json-ld-preloaded", branch: "develop" 8 | gem 'ld-patch', github: "ruby-rdf/ld-patch", branch: "develop" 9 | gem 'rdf', github: "ruby-rdf/rdf", branch: "develop" 10 | gem 'rdf-aggregate-repo', github: "ruby-rdf/rdf-aggregate-repo", branch: "develop" 11 | gem 'rdf-hamster-repo', github: 'ruby-rdf/rdf-hamster-repo', branch: 'develop' 12 | gem 'rdf-isomorphic', github: 'ruby-rdf/rdf-isomorphic', branch: 'develop' 13 | gem 'rdf-json', github: 'ruby-rdf/rdf-json', branch: 'develop' 14 | gem 'rdf-microdata', github: 'ruby-rdf/rdf-microdata', branch: 'develop' 15 | gem 'rdf-n3', github: 'ruby-rdf/rdf-n3', branch: 'develop' 16 | gem 'rdf-normalize', github: 'ruby-rdf/rdf-normalize', branch: 'develop' 17 | gem 'rdf-ordered-repo', github: 'ruby-rdf/rdf-ordered-repo', branch: 'develop' 18 | gem 'rdf-rdfa', github: 'ruby-rdf/rdf-rdfa', branch: 'develop' 19 | gem 'rdf-rdfxml', github: 'ruby-rdf/rdf-rdfxml', branch: 'develop' 20 | gem 'rdf-reasoner', github: 'ruby-rdf/rdf-reasoner', branch: 'develop' 21 | gem 'rdf-spec', github: 'ruby-rdf/rdf-spec', branch: 'develop' 22 | gem 'rdf-tabular', github: 'ruby-rdf/rdf-tabular', branch: 'develop' 23 | gem 'rdf-trig', github: 'ruby-rdf/rdf-trig', branch: 'develop' 24 | gem 'rdf-trix', github: 'ruby-rdf/rdf-trix', branch: 'develop' 25 | gem 'rdf-turtle', github: 'ruby-rdf/rdf-turtle', branch: 'develop' 26 | gem 'rdf-vocab', github: 'ruby-rdf/rdf-vocab', branch: 'develop' 27 | gem 'rdf-xsd', github: 'ruby-rdf/rdf-xsd', branch: 'develop' 28 | gem 'shacl', github: 'ruby-rdf/shacl', branch: 'develop' 29 | gem 'shex', github: 'ruby-rdf/shex', branch: 'develop' 30 | gem 'sparql', github: 'ruby-rdf/sparql', branch: 'develop' 31 | gem 'sparql-client', github: 'ruby-rdf/sparql-client', branch: 'develop' 32 | gem 'sxp', github: 'dryruby/sxp.rb', branch: 'develop' 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Linked Data for Ruby 2 | 3 | This is a meta-distribution of [RDF.rb][] including all currently available 4 | and usable parsing/serialization extensions, intended to make producing and 5 | consuming [Linked Data][] with Ruby as quick & easy as possible. 6 | 7 | [![Gem Version](https://badge.fury.io/rb/linkeddata.svg)](http://badge.fury.io/rb/linkeddata) 8 | [![Build Status](https://github.com/ruby-rdf/linkeddata/workflows/CI/badge.svg?branch=develop)](https://github.com/ruby-rdf/linkeddata/actions?query=workflow%3ACI) 9 | [![Gitter chat](https://badges.gitter.im/ruby-rdf/rdf.png)](https://gitter.im/ruby-rdf/rdf) 10 | 11 | ## Features 12 | 13 | * Includes [N-Triples][] and [N-Quads][] support using [RDF.rb][]. 14 | * Includes [JSON-LD][] support using the [JSON::LD][] and [JSON::LD::Preloaded] gems. 15 | * Includes [RDFa][] support using the [RDF::RDFa][] gem. 16 | * Includes [RDF/XML][] support using the [RDF::RDFXML][] gem. 17 | * Includes [Microdata][] support using the [RDF::Microdata][] gem. 18 | * Includes [Notation3][] support using the [RDF::N3][] gem. 19 | * Includes [TriG][] support using the [RDF::TriG][] gem. 20 | * Includes [TriX][] support using the [RDF::TriX][] gem. 21 | * Includes [Turtle][] support using the [RDF::Turtle][] gem. 22 | * Includes [CSVW][] support for tabular data using the [RDF::Tabular][] gem. 23 | * Includes [YAML-LD][] support using the [YAML_LD][] gem. 24 | * Includes [RDF Dataset Normalization][Normalization] support using the [RDF::Normalize][] gem. 25 | * Includes [RDFS][], [schema.org][] and limited [OWL][] reasoning using the [RDF::Reasoner][] gem. 26 | * Includes [RDF/JSON][] support using the [RDF::JSON][] gem. 27 | * Includes [SHACL][] support using the [SHACL][] gem. 28 | * Includes [ShEx][] support using the [ShEx][] gem. 29 | * Includes [LD Patch][] support using the [LD::Patch][] gem. 30 | * Includes Aggregate Repository support using [RDF::AggregateRepo][], which allows graphs and repositories to be aggregated from multiple sources. 31 | * Includes [SPARQL][] support using the [SPARQL][SPARQL gem] and [SPARQL::Client][] gems 32 | * Includes numerous compiled vocabularies using the [RDF::Vocab][] gem. 33 | * Includes support for all [XSD datatypes][] using the [RDF::XSD][] gem. 34 | * Maintains release parity with RDF.rb. 35 | 36 | The [RDF::Raptor][] gem can be added to add support for high-performance readers and writers using [Raptor][] 37 | ## Examples 38 | 39 | require 'linkeddata' 40 | 41 | ## Documentation 42 | 43 | * 44 | 45 | ## Dependencies 46 | Note, this distribution requires [Nokogiri][], which makes it not pure-ruby. 47 | 48 | * [Ruby](https://www.ruby-lang.org/en/) (>= 3.0) 49 | * [RDF.rb][] ('~> 3.3') 50 | * [RDF::AggregateRepo][] ('~> 3.3') 51 | * [RDF::HamsterRepo][] ('~> 0.5') 52 | * [RDF::Isomorphic][] ('~> 3.3') 53 | * [RDF::JSON][] ('~> 3.3') 54 | * [RDF::Microdata][] ('~> 3.3') 55 | * [RDF::N3][] ('~> 3.3') 56 | * [RDF::Normalize][] ('~> 0.7') 57 | * [RDF::OrderedRepo][] ('~>3.3') 58 | * [RDF::RDFa][] ('~> 3.3') 59 | * [RDF::RDFXML][] ('~> 3.3') 60 | * [RDF::Reasoner][] ('~> 0.9') 61 | * [RDF::Tabular][] ('~> 3.3') 62 | * [RDF::TriG][] ('~> 3.3') 63 | * [RDF::TriX][] ('~> 3.3') 64 | * [RDF::Turtle][] ('~> 3.3') 65 | * [RDF::Vocab][] ('~> 3.3') 66 | * [RDF::XSD][] ('~> 3.3') 67 | * [JSON::LD][] ('~> 3.3') 68 | * [JSON::LD::Preloaded][] ('~> 3.3') 69 | * [LD::Patch][] ('~> 3.3') 70 | * [SHACL][SHACL gem] ('~> 0.4') 71 | * [ShEx][ShEx gem] ('~> 0.8') 72 | * [SPARQL][SPARQL gem] ('~> 3.3') 73 | * [SPARQL::Client][] ('~> 3.3') 74 | * [Nokogiri][] ('~> 1.15') 75 | * [Equivalent-XML](https://rubygems.org/gems/equivalent-xml) ('~> 0.6') 76 | 77 | ## Installation 78 | 79 | The recommended installation method is via [RubyGems](https://rubygems.org/). 80 | To install the latest official release of the gem, do: 81 | 82 | % [sudo] gem install linkeddata 83 | 84 | ## Contributing 85 | This repository uses [Git Flow](https://github.com/nvie/gitflow) to mange development and release activity. All submissions _must_ be on a feature branch based on the _develop_ branch to ease staging and integration. 86 | 87 | * Do your best to adhere to the existing coding conventions and idioms. 88 | * Don't use hard tabs, and don't leave trailing whitespace on any line. 89 | * Do document every method you add using [YARD][] annotations. Read the 90 | [tutorial][YARD-GS] or just look at the existing code for examples. 91 | * Don't touch the `.gemspec`, `VERSION` or `AUTHORS` files. If you need to 92 | change them, do so on your private branch only. 93 | * Do feel free to add yourself to the `CREDITS` file and the corresponding 94 | list in the `README`. Alphabetical order applies. 95 | * Do note that in order for us to merge any non-trivial changes (as a rule 96 | of thumb, additions larger than about 15 lines of code), we need an 97 | explicit [public domain dedication][PDD] on record from you, 98 | which you will be asked to agree to on the first commit to a repo within the organization. 99 | Note that the agreement applies to all repos in the [Ruby RDF](https://github.com/ruby-rdf/) organization. 100 | 101 | ## License 102 | 103 | This is free and unencumbered public domain software. For more information, 104 | see or the accompanying {file:UNLICENSE} file. 105 | 106 | [YARD]: https://yardoc.org/ 107 | [YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md 108 | [PDD]: https://unlicense.org/#unlicensing-contributions 109 | 110 | [RDF.rb]: https://ruby-rdf.github.io/rdf 111 | [RDF::AggregateRepo]: https://ruby-rdf.github.io/rdf-aggregate-repo 112 | [RDF::HamsterRepo]: https://ruby-rdf.github.io/rdf-hamster-repo 113 | [RDF::Isomorphic]: https://ruby-rdf.github.io/rdf-isomorphic 114 | [RDF::JSON]: https://ruby-rdf.github.io/rdf-json 115 | [RDF::Microdata]: https://ruby-rdf.github.io/rdf-microdata 116 | [RDF::N3]: https://ruby-rdf.github.io/rdf-n3 117 | [RDF::Normalize]: https://ruby-rdf.github.io/rdf-normalize 118 | [RDF::Ordredepo]: https://ruby-rdf.github.io/rdf-ordered-repo 119 | [RDF::Raptor]: https://ruby-rdf.github.io/rdf-raptor 120 | [RDF::RDFa]: https://ruby-rdf.github.io/rdf-rdfa 121 | [RDF::RDFXML]: https://ruby-rdf.github.io/rdf-rdfxml 122 | [RDF::Reasoner]: https://ruby-rdf.github.io/rdf-reasoner 123 | [RDF::Tabular]: https://ruby-rdf.github.io/rdf-tabular 124 | [RDF::TriG]: https://ruby-rdf.github.io/rdf-trig 125 | [RDF::TriX]: https://ruby-rdf.github.io/rdf-trix 126 | [RDF::Turtle]: https://ruby-rdf.github.io/rdf-turtle 127 | [RDF::Vocab]: https://ruby-rdf.github.io/rdf-vocab 128 | [RDF::XSD]: https://ruby-rdf.github.io/rdf-xsd 129 | [JSON::LD]: https://ruby-rdf.github.io/json-ld 130 | [JSON::LD::Preloaded]: https://ruby-rdf.github.io/json-ld-preloaded 131 | [LD::Patch]: https://ruby-rdf.github.io/ld-patch 132 | [SHACL gem]: https://ruby-rdf.github.io/shacl 133 | [ShEx gem]: https://ruby-rdf.github.io/shex 134 | [SPARQL gem]: https://ruby-rdf.github.io/sparql 135 | [SPARQL::Client]: https://ruby-rdf.github.io/sparql-client 136 | [YAML_LD]: https://ruby-rdf.github.io/yaml-ld 137 | 138 | [Linked Data]: http://linkeddata.org/ 139 | [CSVW]: https://www.w3.org/standards/techs/csv#w3c_all 140 | [JSON-LD]: http://www.w3.org/TR/json-ld/ "JSON-LD 1.1" 141 | [LD Patch]: http://www.w3.org/TR/ldpatch/ "LD Patch" 142 | [Microdata]: http://www.w3.org/TR/microdata-rdf/ "Microdata to RDF" 143 | [N-Quads]: http://www.w3.org/TR/n-quads/ "N-Quads" 144 | [N-Triples]: http://www.w3.org/TR/n-triples/ "N-Triples" 145 | [Nokogiri]: https://rubygems.org/gems/nokogiri 146 | [Normalization]: https://json-ld.github.io/normalization/spec/ "RDF Dataset Normalization" 147 | [Notation3]: https://www.w3.org/TeamSubmission/n3/ 148 | [OWL]: http://www.w3.org/TR/owl2-overview/ 149 | [Raptor]: http://librdf.org/raptor/ 150 | [RDF/JSON]: https://dvcs.w3.org/hg/rdf/raw-file/default/rdf-json/index.html 151 | [RDF/XML]: http://www.w3.org/TR/rdf-syntax-grammar/ 152 | [RDFa]: http://www.w3.org/TR/rdfa-core/ 153 | [RDFS]: http://www.w3.org/TR/rdf11-mt/ 154 | [schema.org]: http://schema.org/ 155 | [SHACL]: https://www.w3.org/TR/shacl/ 156 | [ShEx]: http://shex.io/shex-semantics/ 157 | [SPARQL]: http://www.w3.org/TR/sparql11-overview/ 158 | [TriG]: http://www.w3.org/TR/trig/ 159 | [TriX]: http://www.w3.org/2004/03/trix/ 160 | [Turtle]: http://www.w3.org/TR/turtle/ 161 | [XSD Datatypes]: http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#built-in-datatypes 162 | [YAML-LD]: https://json-ld.github.io/yaml-ld/spec 163 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), 'lib'))) 3 | require 'rubygems' 4 | 5 | namespace :gem do 6 | desc "Build the linkeddata-#{File.read('VERSION').chomp}.gem file" 7 | task :build do 8 | sh "gem build linkeddata.gemspec && mv linkeddata-#{File.read('VERSION').chomp}.gem pkg/" 9 | end 10 | 11 | desc "Release the linkeddata-#{File.read('VERSION').chomp}.gem file" 12 | task :release do 13 | sh "gem push pkg/linkeddata-#{File.read('VERSION').chomp}.gem" 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /UNLICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 3.3.3 2 | -------------------------------------------------------------------------------- /etc/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rdf', git: 'git://github.com/ruby-rdf/rdf.git' 4 | gem 'rdf-isomorphic', git: 'git://github.com/ruby-rdf/rdf-isomorphic.git' 5 | gem 'rdf-json', git: 'git://github.com/ruby-rdf/rdf-json.git' 6 | gem 'rdf-n3', git: 'git://github.com/ruby-rdf/rdf-n3.git' 7 | gem 'rdf-rdfa', git: 'git://github.com/ruby-rdf/rdf-rdfa.git' 8 | gem 'rdf-rdfxml', git: 'git://github.com/ruby-rdf/rdf-rdfxml.git' 9 | gem 'rdf-trix', git: 'git://github.com/ruby-rdf/rdf-trix.git' 10 | -------------------------------------------------------------------------------- /lib/linkeddata.rb: -------------------------------------------------------------------------------- 1 | module LinkedData 2 | # @see https://rubygems.org/gems/rdf 3 | require 'rdf' 4 | require 'rdf/ntriples' 5 | require 'rdf/nquads' 6 | 7 | # @see https://rubygems.org/gems/json-ld 8 | require 'json/ld' 9 | 10 | # @see https://rubygems.org/gems/json-ld-preloaded 11 | require 'json/ld/preloaded' 12 | 13 | # @see https://rubygems.org/gems/ld-patch 14 | require 'ld/patch' 15 | 16 | # @see https://rubygems.org/gems/rdf-aggregate-repo 17 | require 'rdf/aggregate_repo' 18 | 19 | # @see https://rubygems.org/gems/rdf-hamster-repo 20 | require 'rdf/hamster_repo' 21 | 22 | # @see https://rubygems.org/gems/rdf-isomorphic 23 | require 'rdf/isomorphic' 24 | 25 | # @see https://rubygems.org/gems/rdf-json 26 | require 'rdf/json' 27 | 28 | # @see https://rubygems.org/gems/rdf-microdata 29 | require 'rdf/microdata' 30 | 31 | # @see https://rubygems.org/gems/rdf-n3 32 | require 'rdf/n3' 33 | 34 | # @see https://rubygems.org/gems/rdf-normalize 35 | require 'rdf/normalize' 36 | 37 | # @see https://rubygems.org/gems/rdf-ordered-repo 38 | require 'rdf/ordered_repo' 39 | 40 | # @see https://rubygems.org/gems/rdf-rdfa 41 | require 'rdf/rdfa' 42 | 43 | # @see https://rubygems.org/gems/rdf-reasoner 44 | require 'rdf/reasoner' 45 | 46 | # @see https://rubygems.org/gems/rdf-rdfxml 47 | require 'rdf/rdfxml' 48 | 49 | # @see https://rubygems.org/gems/rdf-tabular 50 | require 'rdf/tabular' 51 | 52 | # @see https://rubygems.org/gems/rdf-trig 53 | require 'rdf/trig' 54 | 55 | # @see https://rubygems.org/gems/rdf-trix 56 | require 'rdf/trix' 57 | 58 | # @see https://rubygems.org/gems/rdf-turtle 59 | require 'rdf/turtle' 60 | 61 | # @see https://rubygems.org/gems/rdf-vocab 62 | require 'rdf/vocab' 63 | 64 | # @see https://rubygems.org/gems/rdf-xsd 65 | require 'rdf/xsd' 66 | 67 | # @see https://rubygems.org/gems/shacl 68 | require 'shacl' 69 | 70 | # @see https://rubygems.org/gems/shex 71 | require 'shex' 72 | 73 | # @see https://rubygems.org/gems/sparql-client 74 | require 'sparql' 75 | 76 | # @see https://rubygems.org/gems/sparql-client 77 | require 'sparql/client' 78 | 79 | # @see https://rubygems.org/gems/yaml-ld 80 | require 'yaml_ld' 81 | 82 | include RDF 83 | end 84 | -------------------------------------------------------------------------------- /linkeddata.gemspec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby -rubygems 2 | # -*- encoding: utf-8 -*- 3 | 4 | Gem::Specification.new do |gem| 5 | gem.version = File.read('VERSION').chomp 6 | gem.date = File.mtime('VERSION').strftime('%Y-%m-%d') 7 | 8 | gem.name = 'linkeddata' 9 | gem.homepage = 'https://ruby-rdf.github.io/linkeddata' 10 | gem.license = 'Unlicense' 11 | gem.summary = 'Linked Data for Ruby.' 12 | gem.description = 'A metadistribution of RDF.rb including a full set of parsing/serialization plugins.' 13 | gem.metadata = { 14 | "documentation_uri" => "http://rdf.greggkellogg.net/yard/index.html", 15 | "bug_tracker_uri" => "https://github.com/ruby-rdf/rdf/issues", 16 | "homepage_uri" => "https://github.com/ruby-rdf/linkeddata", 17 | "mailing_list_uri" => "https://lists.w3.org/Archives/Public/public-rdf-ruby/", 18 | "source_code_uri" => "https://github.com/ruby-rdf/linkeddata", 19 | } 20 | 21 | gem.authors = ['Arto Bendiken', 'Ben Lavender', 'Gregg Kellogg', 'Tom Johnson'] 22 | gem.email = 'public-rdf-ruby@w3.org' 23 | 24 | gem.platform = Gem::Platform::RUBY 25 | gem.files = %w(AUTHORS CREDITS README.md UNLICENSE VERSION lib/linkeddata.rb) 26 | gem.require_paths = %w(lib) 27 | 28 | gem.required_ruby_version = '>= 3.0' 29 | gem.requirements = [] 30 | gem.add_runtime_dependency 'rdf', '~> 3.3', '>= 3.3.2' 31 | gem.add_runtime_dependency 'rdf-aggregate-repo', '~> 3.3' 32 | gem.add_runtime_dependency 'rdf-hamster-repo', '~> 3.3' 33 | gem.add_runtime_dependency 'rdf-isomorphic', '~> 3.3' 34 | gem.add_runtime_dependency 'rdf-json', '~> 3.3' 35 | gem.add_runtime_dependency 'rdf-microdata', '~> 3.3' 36 | gem.add_runtime_dependency 'rdf-n3', '~> 3.3', '>= 3.3.1' 37 | gem.add_runtime_dependency 'rdf-normalize', '~> 0.7' 38 | gem.add_runtime_dependency 'rdf-ordered-repo', '~> 3.3' 39 | gem.add_runtime_dependency 'rdf-rdfa', '~> 3.3' 40 | gem.add_runtime_dependency 'rdf-rdfxml', '~> 3.3' 41 | gem.add_runtime_dependency 'rdf-reasoner', '~> 0.9' 42 | gem.add_runtime_dependency 'rdf-tabular', '~> 3.3' 43 | gem.add_runtime_dependency 'rdf-trig', '~> 3.3' 44 | gem.add_runtime_dependency 'rdf-trix', '~> 3.3' 45 | gem.add_runtime_dependency 'rdf-turtle', '~> 3.3', '>= 3.3.1' 46 | gem.add_runtime_dependency 'rdf-vocab', '~> 3.3', '>= 3.3.2' 47 | gem.add_runtime_dependency 'rdf-xsd', '~> 3.3' 48 | gem.add_runtime_dependency 'json-ld', '~> 3.3', '>= 3.3.2' 49 | gem.add_runtime_dependency 'json-ld-preloaded', '~> 3.3', '>= 3.3.1' 50 | gem.add_runtime_dependency 'ld-patch', '~> 3.3', '>= 3.3.1' 51 | gem.add_runtime_dependency 'shacl', '~> 0.4', '>= 0.4.2' 52 | gem.add_runtime_dependency 'shex', '~> 0.8', '>= 0.8.1' 53 | gem.add_runtime_dependency 'sparql', '~> 3.3', '>= 3.3.2' 54 | gem.add_runtime_dependency 'sparql-client', '~> 3.3' 55 | gem.add_runtime_dependency 'nokogiri', '~> 1.18', '>= 1.18.8' 56 | #gem.add_runtime_dependency 'equivalent-xml', '~> 0.6' 57 | gem.add_runtime_dependency 'yaml-ld', '~> 0.0', '>= 0.0.3' 58 | gem.add_development_dependency 'yard', '~> 0.9' 59 | gem.add_development_dependency 'rspec', '~> 3.13' 60 | gem.add_development_dependency 'rspec-its', '~> 1.3' 61 | gem.add_development_dependency 'rdf-spec', '~> 3.2' 62 | gem.post_install_message = nil 63 | end 64 | -------------------------------------------------------------------------------- /spec/linkeddata_spec.rb: -------------------------------------------------------------------------------- 1 | require File.join(File.dirname(__FILE__), 'spec_helper') 2 | 3 | describe LinkedData do 4 | it "should have a version" do 5 | expect { LinkedData::VERSION }.not_to raise_error 6 | expect { LinkedData::VERSION.to_s }.not_to raise_error 7 | expect { LinkedData::VERSION.to_a }.not_to raise_error 8 | end 9 | 10 | it "should have the same version as RDF.rb" do 11 | expect(LinkedData::VERSION.to_s).to eq RDF::VERSION.to_s 12 | expect(LinkedData::VERSION.to_a).to eq RDF::VERSION.to_a 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'linkeddata' 2 | require 'rdf/spec' 3 | 4 | RSpec.configure do |config| 5 | config.include(RDF::Spec::Matchers) 6 | config.exclusion_filter = {:ruby => lambda { |version| 7 | RUBY_VERSION.to_s !~ /^#{version}/ 8 | }} 9 | end 10 | 11 | include LinkedData 12 | --------------------------------------------------------------------------------