Skip to content

Commit 0eefc91

Browse files
committed
Finish 2.0.0
2 parents e5470c1 + fcc6e8f commit 0eefc91

6 files changed

Lines changed: 58 additions & 9 deletions

File tree

CONTRIBUTING.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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](http://github.com/ruby-rdf/rdf-spec/issues)
10+
* Fork and clone the repo:
11+
`git clone git@github.com:your-username/rdf-spec.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+
33+
[YARD]: http://yardoc.org/
34+
[YARD-GS]: http://rubydoc.info/docs/yard/file/docs/GettingStarted.md
35+
[PDD]: http://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
36+
[pr]: https://github.com/ruby-rdf/rdf-spec/compare/

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.0.beta1
1+
2.0.0

lib/rdf/spec/format.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
describe ".reader" do
3636
it "returns a reader" do
3737
subject.each do |f|
38-
expect(f.reader).not_to be_nil
38+
format_namespace = f.name.split('::')[0..-2].inject(Kernel) {|base, const| base.const_get(const)}
39+
expect(f.reader).not_to be_nil if format_namespace.const_defined?(:Reader)
3940
end
4041
end
4142
end
@@ -46,7 +47,7 @@
4647
it "returns a writer" do
4748
subject.each do |f|
4849
format_namespace = f.name.split('::')[0..-2].inject(Kernel) {|base, const| base.const_get(const)}
49-
expect(f.writer).not_to be_nil if format_namespace.const_defined?(:Writer)
50+
expect(f.writer).not_to be_nil if format_namespace.const_defined?(:Writer)
5051
end
5152
end
5253
end

lib/rdf/spec/inspects.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def inspect_with_formatting
3838
string = "[\n"
3939
each do |item|
4040
string += " {\n"
41-
item.keys.map(&:to_s).sort.each do |key|
42-
string += " #{key}: #{item[key.to_sym].inspect}\n"
41+
item.keys.sort_by(&:to_s).each do |key|
42+
string += " #{key.inspect}: #{item[key].inspect}\n"
4343
end
4444
string += " },\n"
4545
end
@@ -49,8 +49,8 @@ def inspect_with_formatting
4949
string = "[\n"
5050
each do |item|
5151
string += " {\n"
52-
item.bindings.keys.map(&:to_s).sort.each do |key|
53-
string += " #{key}: #{item.bindings[key.to_sym].inspect}\n"
52+
item.bindings.keys.sort_by(&:to_s).each do |key|
53+
string += " #{key.inspect}: #{item.bindings[key].inspect}\n"
5454
end
5555
string += " },\n"
5656
end

lib/rdf/spec/transactable.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,17 @@
3939

4040
expect(subject.statements).to contain_exactly(*original_contents)
4141
end
42+
43+
context 'without block given' do
44+
it 'returns a transaction' do
45+
expect(subject.transaction).to be_a RDF::Transaction
46+
end
47+
48+
it 'the returned transaction is live' do
49+
tx = subject.transaction(mutable: true)
50+
tx.insert(RDF::Statement(:s, RDF.type, :o))
51+
expect { tx.execute }.not_to raise_error
52+
end
53+
end
4254
end
4355
end

rdf-spec.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Gem::Specification.new do |gem|
2727

2828
gem.required_ruby_version = '>= 2.0'
2929
gem.requirements = []
30-
gem.add_runtime_dependency 'rdf', '>= 2.0.0.beta', '< 3'
31-
gem.add_runtime_dependency 'rdf-isomorphic', '>= 2.0.0.beta', '< 3'
30+
gem.add_runtime_dependency 'rdf', '~> 2.0'
31+
gem.add_runtime_dependency 'rdf-isomorphic', '~> 2.0'
3232
gem.add_runtime_dependency 'rspec', '~> 3.0'
3333
gem.add_runtime_dependency 'rspec-its', '~> 1.0'
3434
gem.add_runtime_dependency 'webmock', '~> 1.17'

0 commit comments

Comments
 (0)