Skip to content

Commit

Permalink
Finish 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Apr 11, 2016
2 parents e5470c1 + fcc6e8f commit 0eefc91
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 9 deletions.
36 changes: 36 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# How to contribute

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.

## Development

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-spec/issues)
* Fork and clone the repo:
`git clone [email protected]:your-username/rdf-spec.git`
* Install bundle:
`bundle install`
* Create tests in RSpec and make sure you achieve at least 90% code coverage for the feature your adding or behavior being modified.
* Push to your fork and [submit a pull request][pr].

## Do's and Dont's
* Do your best to adhere to the existing coding conventions and idioms.
* Don't use hard tabs, and don't leave trailing whitespace on any line.
Before committing, run `git diff --check` to make sure of this.
* Do document every method you add using [YARD][] annotations. Read the
[tutorial][YARD-GS] or just look at the existing code for examples.
* Don't touch the `.gemspec` or `VERSION` files. If you need to change them,
do so on your private branch only.
* Do feel free to add yourself to the `CREDITS` file and the
corresponding list in the the `README`. Alphabetical order applies.
* Don't touch the `AUTHORS` file. If your contributions are significant
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.

[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-spec/compare/
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0.beta1
2.0.0
5 changes: 3 additions & 2 deletions lib/rdf/spec/format.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
describe ".reader" do
it "returns a reader" do
subject.each do |f|
expect(f.reader).not_to be_nil
format_namespace = f.name.split('::')[0..-2].inject(Kernel) {|base, const| base.const_get(const)}
expect(f.reader).not_to be_nil if format_namespace.const_defined?(:Reader)
end
end
end
Expand All @@ -46,7 +47,7 @@
it "returns a writer" do
subject.each do |f|
format_namespace = f.name.split('::')[0..-2].inject(Kernel) {|base, const| base.const_get(const)}
expect(f.writer).not_to be_nil if format_namespace.const_defined?(:Writer)
expect(f.writer).not_to be_nil if format_namespace.const_defined?(:Writer)
end
end
end
Expand Down
8 changes: 4 additions & 4 deletions lib/rdf/spec/inspects.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def inspect_with_formatting
string = "[\n"
each do |item|
string += " {\n"
item.keys.map(&:to_s).sort.each do |key|
string += " #{key}: #{item[key.to_sym].inspect}\n"
item.keys.sort_by(&:to_s).each do |key|
string += " #{key.inspect}: #{item[key].inspect}\n"
end
string += " },\n"
end
Expand All @@ -49,8 +49,8 @@ def inspect_with_formatting
string = "[\n"
each do |item|
string += " {\n"
item.bindings.keys.map(&:to_s).sort.each do |key|
string += " #{key}: #{item.bindings[key.to_sym].inspect}\n"
item.bindings.keys.sort_by(&:to_s).each do |key|
string += " #{key.inspect}: #{item.bindings[key].inspect}\n"
end
string += " },\n"
end
Expand Down
12 changes: 12 additions & 0 deletions lib/rdf/spec/transactable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,17 @@

expect(subject.statements).to contain_exactly(*original_contents)
end

context 'without block given' do
it 'returns a transaction' do
expect(subject.transaction).to be_a RDF::Transaction
end

it 'the returned transaction is live' do
tx = subject.transaction(mutable: true)
tx.insert(RDF::Statement(:s, RDF.type, :o))
expect { tx.execute }.not_to raise_error
end
end
end
end
4 changes: 2 additions & 2 deletions rdf-spec.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Gem::Specification.new do |gem|

gem.required_ruby_version = '>= 2.0'
gem.requirements = []
gem.add_runtime_dependency 'rdf', '>= 2.0.0.beta', '< 3'
gem.add_runtime_dependency 'rdf-isomorphic', '>= 2.0.0.beta', '< 3'
gem.add_runtime_dependency 'rdf', '~> 2.0'
gem.add_runtime_dependency 'rdf-isomorphic', '~> 2.0'
gem.add_runtime_dependency 'rspec', '~> 3.0'
gem.add_runtime_dependency 'rspec-its', '~> 1.0'
gem.add_runtime_dependency 'webmock', '~> 1.17'
Expand Down

0 comments on commit 0eefc91

Please sign in to comment.