Skip to content

Commit

Permalink
Finish 3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Dec 29, 2021
2 parents e75bf0c + e3ae615 commit 5df64cb
Show file tree
Hide file tree
Showing 13 changed files with 135 additions and 78 deletions.
1 change: 1 addition & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
repo_token: YOp34g46QSPvbNL8LTcDmoXuuK69HOOxe
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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') }}
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: Run tests
run: ruby --version; bundle exec rspec spec || $ALLOW_FAILURES
- name: Coveralls GitHub Action
uses: coverallsapp/[email protected]
if: "matrix.ruby == '3.0'"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

14 changes: 8 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-aggregate-repo/issues)
* create or respond to an issue on the [Github Repository](https://github.com/ruby-rdf/rdf-aggregate-repo/issues)
* Fork and clone the repo:
`git clone [email protected]:your-username/rdf-aggregate-repo.git`
* Install bundle:
Expand All @@ -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-aggregate-repo/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/
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ group :debug do
end

group :test do
gem 'simplecov', '~> 0.21', platforms: :mri
gem 'simplecov-lcov', '~> 0.8', platforms: :mri
gem "rake"
end
34 changes: 19 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

An aggregate RDF::Dataset supporting a subset of named graphs and zero or more named graphs mapped to the default graph.

[![Gem Version](https://badge.fury.io/rb/rdf-aggregate-repo.png)](http://badge.fury.io/rb/rdf-aggregate-repo)
[![Build Status](https://travis-ci.org/ruby-rdf/rdf-aggregate-repo.png?branch=master)](http://travis-ci.org/ruby-rdf/rdf-aggregate-repo)
[![Gem Version](https://badge.fury.io/rb/rdf-aggregate-repo.png)](https://badge.fury.io/rb/rdf-aggregate-repo)
[![Build Status](https://github.com/ruby-rdf/rdf-aggregate-repo/workflows/CI/badge.svg?branch=develop)](https://github.com/ruby-rdf/rdf-aggregate-repo/actions?query=workflow%3ACI)
[![Coverage Status](https://coveralls.io/repos/ruby-rdf/rdf-aggregate-repo/badge.svg?branch=develop)](https://coveralls.io/github/ruby-rdf/rdf-aggregate-repo?branch=develop)
[![Gitter chat](https://badges.gitter.im/ruby-rdf/rdf.png)](https://gitter.im/ruby-rdf/rdf)

## Description

Expand All @@ -13,7 +15,7 @@ Maps named graphs from one or more `RDF::Queryable` instances into a single data

require 'rdf'
require 'rdf/nquads'
repo = RDF::Repository.load("http://ruby-rdf.github.com/rdf/etc/doap.nq")
repo = RDF::Repository.load("https://ruby-rdf.github.com/rdf/etc/doap.nq")

# Instantiate a new aggregate repo based on an existing repo
aggregate = RDF::AggregateRepo.new(repo)
Expand All @@ -22,23 +24,23 @@ Maps named graphs from one or more `RDF::Queryable` instances into a single data
aggregate.add_default(false)

# Use a single named graph
aggregate.add_named(RDF::URI("http://greggkellogg.net/foaf#me"))
aggregate.add_named(RDF::URI("https://greggkellogg.net/foaf#me"))

# Retrieve all contexts
aggreggate.contexts.to_a #=> [RDF::URI("http://greggkellogg.net/foaf#me")]
aggreggate.contexts.to_a #=> [RDF::URI("https://greggkellogg.net/foaf#me")]

## Dependencies

* [Ruby](http://ruby-lang.org/) (>= 2.4)
* [RDF.rb][] (~> 3.1)
* [Ruby](https://ruby-lang.org/) (>= 2.6)
* [RDF.rb][] (~> 3.2)

## Mailing List

* <http://lists.w3.org/Archives/Public/public-rdf-ruby/>
* <https://lists.w3.org/Archives/Public/public-rdf-ruby/>

## Author

* [Gregg Kellogg](http://github.com/gkellogg) - <http://greggkellogg.net/>
* [Gregg Kellogg](https://github.com/gkellogg) - <https://greggkellogg.net/>

## Contributing
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.
Expand All @@ -56,15 +58,17 @@ This repository uses [Git Flow](https://github.com/nvie/gitflow) to mange develo
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.

## License

This is free and unencumbered public domain software. For more information,
see <http://unlicense.org/> or the accompanying {file:UNLICENSE} file.
see <https://unlicense.org/> or the accompanying {file:UNLICENSE} file.

[RDF.rb]: http://ruby-rdf.github.com/
[RDF.rb]: https://ruby-rdf.github.com/
[RDF Datasets]: https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-dataset
[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
[YARD]: https://yardoc.org/
[YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md
[PDD]: https://unlicense.org/#unlicensing-contributions
2 changes: 1 addition & 1 deletion UNLICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://unlicense.org/>
For more information, please refer to <https://unlicense.org/>
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.0
3.2.0
40 changes: 19 additions & 21 deletions etc/doap.ttl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@base <https://rubygems.org/gems/rdf-aggregate-repo> .
@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,27 +8,24 @@
@prefix ex: <http://example.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://rubygems.org/gems/rdf-aggregate-repo> a doap:Project, earl:Software ;
<> a doap:Project, earl:Software ;
doap:name "RDF::AggregateRepo" ;
doap:homepage <http://ruby-rdf.github.com/rdf-aggregate-repo> ;
doap:license <http://creativecommons.org/licenses/publicdomain/> ;
doap:shortdesc "An aggregate RDF::Repository supporting a subset of named graphs and zero or more named graphs mapped to the default graph."@en ;
doap:description "A gem extending RDF.rb with SPARQL dataset construction semantics."@en ;
doap:homepage <https://github.com/ruby-rdf/rdf-aggregate-repo> ;
doap:license <https://unlicense.org/1.0/> ;
doap:description "An aggregate RDF::Repository supporting a subset of named graphs and zero or more named graphs mapped to the default graph."@en ;
doap:shortdesc "RDF::AggregateRepo extends RDF.rb with SPARQL dataset construction semantics."@en ;
doap:created "2013-04-26"^^xsd:date ;
doap:programming-language "Ruby" ;
doap:implements <http://www.w3.org/TR/sparql11-query/#specifyingDataset> ;
doap:category <http://dbpedia.org/resource/Resource_Description_Framework>,
<http://dbpedia.org/resource/Ruby_(programming_language)> ;
doap:download-page <http://rubygems.org/gems/rdf-aggregate-repo> ;
doap:mailing-list <http://lists.w3.org/Archives/Public/public-rdf-ruby/> ;
doap:bug-database <http://github.com/ruby-rdf/rdf-aggregate-repo/issues> ;
doap:blog <http://greggkellogg.net/> ;
doap:developer <http://greggkellogg.net/foaf#me> ;
doap:maintainer <http://greggkellogg.net/foaf#me> ;
doap:documenter <http://greggkellogg.net/foaf#me> ;
foaf:maker <http://greggkellogg.net/foaf#me> ;
dc:title "RDF::AggregateRepo"@en ;
dc:description "A gem extending RDF.rb with SPARQL dataset construction semantics."@en ;
dc:date "2013-04-26"^^xsd:date ;
dc:creator <http://greggkellogg.net/foaf#me> ;
dc:isPartOf <http://rubygems.org/gems/rdf> .
doap:implements <https://www.w3.org/TR/sparql11-query/#specifyingDataset> ;
doap:category <https://dbpedia.org/resource/Resource_Description_Framework>,
<https://dbpedia.org/resource/Ruby_(programming_language)> ;
doap:download-page <> ;
doap:mailing-list <https://lists.w3.org/Archives/Public/public-rdf-ruby/> ;
doap:bug-database <https://github.com/ruby-rdf/rdf-aggregate-repo/issues> ;
doap:blog <https://greggkellogg.net/> ;
doap:developer <https://greggkellogg.net/foaf#me> ;
doap:maintainer <https://greggkellogg.net/foaf#me> ;
doap:documenter <https://greggkellogg.net/foaf#me> ;
foaf:maker <https://greggkellogg.net/foaf#me> ;
dc:creator <https://greggkellogg.net/foaf#me> ;
dc:isPartOf <https://rubygems.org/gems/rdf> .
6 changes: 3 additions & 3 deletions lib/rdf/aggregate_repo/merge_graph.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module RDF
# name false
# end
#
# @see http://www.w3.org/TR/rdf11-mt/#dfn-merge
# @see https://www.w3.org/TR/rdf11-mt/#dfn-merge
class MergeGraph
include RDF::Value
include RDF::Countable
Expand All @@ -40,8 +40,8 @@ class MergeGraph
##
# Create a new aggregation instance.
#
# @param [RDF::Resource] :graph_name
# @param [RDF::Resource] :name alias for :graph_name
# @param [RDF::Resource] graph_name
# @param [RDF::Resource] name alias for `graph_name`
# @yield merger
# @yieldparam [RDF::MergeGraph] self
# @yieldreturn [void] ignored
Expand Down
14 changes: 7 additions & 7 deletions rdf-aggregate-repo.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
gem.date = File.mtime('VERSION').strftime('%Y-%m-%d')

gem.name = 'rdf-aggregate-repo'
gem.homepage = 'http://ruby-rdf.github.com/rdf-aggregate-repo'
gem.homepage = 'https://github.com/ruby-rdf/rdf-aggregate-repo'
gem.license = 'Unlicense'
gem.summary = 'An aggregate RDF::Repository supporting a subset of named graphs and zero or more named graphs mapped to the default graph.'
gem.description = %(A gem extending RDF.rb with SPARQL dataset construction semantics.)
Expand All @@ -18,14 +18,14 @@ Gem::Specification.new do |gem|
gem.files = %w(AUTHORS 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 = []
gem.add_runtime_dependency 'rdf', '~> 3.1'
gem.add_development_dependency 'rdf-spec', '~> 3.1'
gem.add_development_dependency 'rdf-turtle', '~> 3.1'
gem.add_development_dependency 'rspec', '~> 3.9'
gem.add_runtime_dependency 'rdf', '~> 3.2'
gem.add_development_dependency 'rdf-spec', '~> 3.2'
gem.add_development_dependency 'rdf-turtle', '~> 3.2'
gem.add_development_dependency 'rspec', '~> 3.10'
gem.add_development_dependency 'rspec-its', '~> 1.3'
gem.add_development_dependency 'yard', '~> 0.9.20'
gem.add_development_dependency 'yard', '~> 0.9'

gem.post_install_message = nil
end
14 changes: 7 additions & 7 deletions spec/aggregate_repo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,23 @@

context "with specific named entities" do
let(:repo) {RDF::Repository.new {|r| RDF::Spec.quads.each {|s| r << s}}}
let(:gkellogg) {RDF::Graph(graph_name: "http://greggkellogg.net/foaf#me", data: repo)}
let(:bendiken) {RDF::Graph(graph_name: "http://ar.to/#self", data: repo)}
let(:bhuga) {RDF::Graph(graph_name: "http://bhuga.net/#ben", data: repo)}
let(:gkellogg) {RDF::Graph(graph_name: "https://greggkellogg.net/foaf#me", data: repo)}
let(:bendiken) {RDF::Graph(graph_name: "https://ar.to/#self", data: repo)}
let(:bhuga) {RDF::Graph(graph_name: "https://bhuga.net/#ben", data: repo)}
before(:each) do
r = repo
@dataset = RDF::AggregateRepo.new do
source r
default RDF::URI("http://greggkellogg.net/foaf#me")
named RDF::URI("http://ar.to/#self")
named RDF::URI("http://bhuga.net/#ben")
default RDF::URI("https://greggkellogg.net/foaf#me")
named RDF::URI("https://ar.to/#self")
named RDF::URI("https://bhuga.net/#ben")
end
end
subject {@dataset}

it {is_expected.not_to be_empty}
its(:count) {is_expected.to eql [gkellogg, bendiken, bhuga].map(&:count).reduce(:+)}
its(:graph_names) {is_expected.to eql [RDF::URI("http://ar.to/#self"), RDF::URI("http://bhuga.net/#ben")]}
its(:graph_names) {is_expected.to eql [RDF::URI("https://ar.to/#self"), RDF::URI("https://bhuga.net/#ben")]}
describe "#default_graph" do
subject {@dataset.default_graph}
its(:count) {is_expected.to eql gkellogg.count}
Expand Down
24 changes: 23 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require "bundler/setup"
require 'rdf/aggregate_repo'
require 'rdf/spec'
require 'rdf/spec/matchers'

Expand All @@ -11,3 +10,26 @@
ruby: lambda {|version| RUBY_VERSION.to_s !~ /^#{version}/},
}
end

begin
require 'simplecov'
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/aggregate_repo'

0 comments on commit 5df64cb

Please sign in to comment.