From 48aa0574b8c8ab117fd39b6509bb0f73edb0c608 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Tue, 1 Mar 2016 13:03:31 -0700 Subject: [PATCH 1/6] Fix array inspector when values are hashes. --- lib/rdf/spec/inspects.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/rdf/spec/inspects.rb b/lib/rdf/spec/inspects.rb index 50efe85..cca56d1 100644 --- a/lib/rdf/spec/inspects.rb +++ b/lib/rdf/spec/inspects.rb @@ -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 @@ -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 From c363989707441a6d1bd7150152bbaa2bbbba48ee Mon Sep 17 00:00:00 2001 From: Tom Johnson Date: Thu, 3 Mar 2016 10:16:47 -0800 Subject: [PATCH 2/6] Test `Transactable#transaction` return w/out block --- lib/rdf/spec/transactable.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/rdf/spec/transactable.rb b/lib/rdf/spec/transactable.rb index c308d57..dc5ca5c 100644 --- a/lib/rdf/spec/transactable.rb +++ b/lib/rdf/spec/transactable.rb @@ -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 From 838cb89ddc015306ad0b2f41193db850aa658554 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sat, 5 Mar 2016 15:49:51 -0800 Subject: [PATCH 3/6] Allow formats to not have readers (vocabulary is a write-only format). --- lib/rdf/spec/format.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/rdf/spec/format.rb b/lib/rdf/spec/format.rb index 16dacdb..8c304bc 100644 --- a/lib/rdf/spec/format.rb +++ b/lib/rdf/spec/format.rb @@ -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 @@ -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 From 9789aca9dcb29a6caae566ab616ef475977fb30e Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Thu, 24 Mar 2016 15:45:00 -0700 Subject: [PATCH 4/6] Add CONTRIBUTING.md. --- CONTRIBUTING.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f57d4dd --- /dev/null +++ b/CONTRIBUTING.md @@ -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 mange 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 for on the [Github Repository](http://github.com/ruby-rdf/rdf-spec/issues) +* Fork and clone the repo: + `git clone git@github.com: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/ From 96f9f007ed55546bce4168ed9b5c7c38e7eee0b8 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Tue, 29 Mar 2016 11:55:42 -0700 Subject: [PATCH 5/6] Fix CONTRIBUTING typos. --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f57d4dd..280509e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,9 +4,9 @@ Community contributions are essential for keeping Ruby RDF great. We want to kee ## Development -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. +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 for on the [Github Repository](http://github.com/ruby-rdf/rdf-spec/issues) +* 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 git@github.com:your-username/rdf-spec.git` * Install bundle: From fcc6e8f8d4d4442d277852f601d27a700ecfec74 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sun, 10 Apr 2016 12:18:50 -0700 Subject: [PATCH 6/6] Update version and dependencies for 2.0 release. --- VERSION | 2 +- rdf-spec.gemspec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index fcd0328..227cea2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0.beta1 +2.0.0 diff --git a/rdf-spec.gemspec b/rdf-spec.gemspec index b137384..8d765e6 100755 --- a/rdf-spec.gemspec +++ b/rdf-spec.gemspec @@ -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'