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 acf4ad5 + 921e8cd commit fd6483f
Show file tree
Hide file tree
Showing 38 changed files with 157 additions and 206 deletions.
108 changes: 0 additions & 108 deletions .byebug_history

This file was deleted.

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/github-action@v1.1.2
if: "matrix.ruby == '3.0'"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Gemfile.lock
bin/
/.bundle/
/releases
/.byebug_history
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion .yardopts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
AUTHORS
UNLICENSE
VERSION
CHANGES.md
7 changes: 6 additions & 1 deletion CHANGES.md → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Changelog for Spira <http://github.com/rdf-ruby/spira>
# Changelog for Spira <https://github.com/rdf-ruby/spira>

## [Unreleased]
### Changed

* Spira#using_repository now returns the given repository

## 0.3.0
* General updates to bring up to date.
Expand Down
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/spira/issues)
* create or respond to an issue on the [Github Repository](https://github.com/ruby-rdf/spira/issues)
* Fork and clone the repo:
`git clone git@github.com:your-username/spira.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/spira/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/
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ group :development, :test do
gem 'rdf-turtle', github: "ruby-rdf/rdf-turtle", branch: "develop"
gem 'rdf-vocab', github: "ruby-rdf/rdf-vocab", branch: "develop"
gem 'sxp', github: "dryruby/sxp.rb", branch: "develop"
gem 'rake', '~> 10.0'
gem 'rake', '~> 13.0'
gem 'redcarpet', '~> 3.2.2' unless RUBY_ENGINE == 'jruby'
gem 'byebug', platform: :mri
gem 'psych', platforms: [:mri, :rbx]
end

group :test do
gem 'simplecov', platforms: :mri
gem 'coveralls', '~> 0.8', platforms: :mri
gem 'simplecov', '~> 0.21', platforms: :mri
gem 'simplecov-lcov', '~> 0.8', platforms: :mri
gem 'guard' #, '~> 2.13.0'
gem 'guard-rspec' #, '~> 3.1.0'
gem 'guard-ctags-bundler' #, '~> 1.4.0'
Expand Down
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Spira [![Build Status](https://travis-ci.org/ruby-rdf/spira.png?branch=develop)](http://travis-ci.org/ruby-rdf/spira) [![Coverage Status](https://coveralls.io/repos/ruby-rdf/spira/badge.png?branch=develop)](https://coveralls.io/r/ruby-rdf/spira) [![Code Climate](https://codeclimate.com/github/ruby-rdf/spira.png)](https://codeclimate.com/github/ruby-rdf/spira) [![Dependency Status](https://gemnasium.com/ruby-rdf/spira.png)](https://gemnasium.com/ruby-rdf/spira)
# Spira

[![Gem Version](https://badge.fury.io/rb/spira.png)](https://badge.fury.io/rb/spira)
[![Build Status](https://github.com/ruby-rdf/spira/workflows/CI/badge.svg?branch=develop)](https://github.com/ruby-rdf/spira/actions?query=workflow%3ACI)
[![Coverage Status](https://coveralls.io/repos/ruby-rdf/spira/badge.png?branch=develop)](https://coveralls.io/r/ruby-rdf/spira)
[![Code Climate](https://codeclimate.com/github/ruby-rdf/spira.png)](https://codeclimate.com/github/ruby-rdf/spira)

It's time to breathe life into your linked data.

Expand All @@ -13,10 +18,6 @@ losing access to statement-oriented nature of linked data, if you so choose.
It can be used either to access existing RDF data in a resource-oriented way,
or to create a new store of RDF data based on simple defaults.

An introductory blog post is at <http://blog.datagraph.org/2010/05/spira>

A changelog is available in the {file:CHANGES.md} file.

### Example

```ruby
Expand Down Expand Up @@ -103,7 +104,7 @@ The easiest way to work with Spira is to install it via Rubygems:

$ sudo gem install spira

Downloads will be available on the github project page, as well as on Rubyforge.
Downloads will be available on the github project page.

## Defining Model Classes

Expand Down Expand Up @@ -225,7 +226,7 @@ end
Spira.repository = RDF::Repository.new

rolling_stones = Album.for RDF::URI.new('http://example.org/cds/rolling-stones-hits')
# See RDF.rb at http://rdf.rubyforge.org/RDF/Enumerable.html for more information about #has_predicate?
# See RDF.rb at https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Enumerable.html for more information about #has_predicate?
rolling_stones.has_predicate?(RDF.type) #=> true
Album.type #=> RDF::URI('http://example.org/types/album')
```
Expand Down Expand Up @@ -391,7 +392,7 @@ are implemented:

The default type for a Spira property is `Spira::Types::Any`, which uses
`RDF::Literal`'s automatic boxing/unboxing of XSD types as best it can.
See [`RDF::Literal`](http://rdf.rubyforge.org/RDF/Literal.html) for more information.
See [`RDF::Literal`](https://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Literal.html) for more information.

You can implement your own types as well. Your class' serialize method should
turn an RDF::Value into a ruby object, and vice versa.
Expand Down Expand Up @@ -504,7 +505,10 @@ This repository uses [Git Flow](https://github.com/nvie/gitflow) to mange develo
list in the the `README`. Alphabetical order applies.
* 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.

[public-rdf-ruby w3c mailing list]: http://lists.w3.org/Archives/Public/public-rdf-ruby/
[RDF.rb]: http://rubygems.org/gems/rdf
[public-rdf-ruby w3c mailing list]: https://lists.w3.org/Archives/Public/public-rdf-ruby/
[RDF.rb]: https://rubygems.org/gems/rdf
[PDD]: https://unlicense.org/#unlicensing-contributions
5 changes: 0 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,3 @@ EOC
writer.flush
end
end

desc "Upload docs to rubyforge"
task uploadyardocs: [:yardoc, :addanalytics] do
`rsync -av doc/yard/* bhuga@rubyforge.org:/var/www/gforge-projects/spira`
end
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.1
3.2.0
9 changes: 5 additions & 4 deletions lib/spira.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# Spira is a framework for building projections of RDF data into Ruby classes.
# It is built on top of RDF.rb.
#
# @see http://rdf.rubyforge.org
# @see http://github.com/bhuga/spira
# @see https://rubygems.org/gems/rdf
# @see https://github.com/bhuga/spira
# @see Spira::Resource

module Spira
Expand Down Expand Up @@ -63,13 +63,14 @@ def clear_repository!

# Execute a block on a specific repository
#
# @param [RDF::Repository] repository the repository to work on
# @param [Symbol] name the repository name
# @param [RDF::Repository] repo the repository to work on
# @yield the block with the instructions while using the repository
# @return [RDF::Repository] the given repository
def using_repository(repo)
old_repository = Spira.repository
Spira.repository = repo
yield if block_given?
repo
ensure
Spira.repository = old_repository
end
Expand Down
10 changes: 7 additions & 3 deletions lib/spira/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,16 @@ def id
# Initialize a new Spira::Base instance of this resource class using
# a new blank node subject. Accepts a hash of arguments for initial
# attributes. To use a URI or existing blank node as a subject, use
# {Spira.for} instead.
# the `.for` method on the subclass instead.
#
# @example
# class Person < Spira::Base; end
# bob = Person.for("bob")
#
# @param [Hash{Symbol => Any}] props Default attributes for this instance
# @yield [self] Executes a given block
# @yieldparam [self] self The newly created instance
# @see Spira.for
# @see Spira::Persistence::ClassMethods#for
# @see RDF::URI#as
# @see RDF::Node#as
def initialize(props = {}, options = {})
Expand Down Expand Up @@ -188,7 +192,7 @@ def inspect
# an RDF level, and will work across subclasses as long as the attributes
# are the same.
#
# @see http://rdf.rubyforge.org/isomorphic/
# @see https://rubygems.org/gems/rdf-isomorphic/
def ==(other)
# TODO: define behavior for equality on subclasses.
# TODO: should we compare attributes here?
Expand Down
Loading

0 comments on commit fd6483f

Please sign in to comment.