Skip to content

Commit b8fd4c2

Browse files
committed
Release 1.99.0:
* Use correct include for Matchers in Reader/Writer * This fixes an error that caused examples for RDF::Writer & RDF::Reader to be passed over silently. * Add a triple pattern matcher * This matcher handles checking whether a given pattern is matched in a `Queryable`. e.g. `it { is_expected.to match_triple_pattern [:s, :p, :o]` * Add test for http_adaptor when Location is a relative URL. * Allow Reader#for to call original * This test failed if an implementation of Mutable calls `Reader#for` more than once. The change allows additional calls with other arguments to pass through to the original implementation. * Enumerable#statements, #triples, #subjects, #objects, #predicates, #contexts, #quads now return an Array, not an Enumerator. * Support using `graph_name` in addition to (as eventual replacement for) `context` (conditional on RDF::VERSION). * `Enumerable#contexts` replaced with `Enumerable#graph_names`. Other `each` or `enum` of context removed in favor of graph enumerations. * Correct behaviors for open_file: * charset should be a downcased string. * content_encoding reflects Content-Encoding, as an array of downcased strings. * Non-UTF input is transformed to UTF-8, so that `external_encoding` is now "utf-8" with `charset` the original character set. * Add tests for `Enumerable#terms`, `#has_term?`, `#each_term`, and `#enum_term`. * Add specs for `Enumerable#project_graph` * Use different kind of invalid statement for testing enumerable. Add test to verify that Writable will not add an incomplete statement. * Expect inserting an incomplete statement to raise ArgumentError.
2 parents 153c658 + 1495514 commit b8fd4c2

23 files changed

+649
-425
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ source "http://rubygems.org"
22

33
gemspec
44

5-
gem "rdf", :git => "git://github.com/ruby-rdf/rdf.git", :branch => "develop"
5+
gem "rdf", git: "git://github.com/ruby-rdf/rdf.git", branch: "develop"
66

77
group :development do
88
gem "wirble"

Rakefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env ruby
22
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), 'lib')))
33
require 'rubygems'
4-
require 'rdf/spec'
54

65
namespace :gem do
76
desc "Build the rdf-spec-#{File.read('VERSION').chomp}.gem file"
@@ -16,7 +15,7 @@ namespace :gem do
1615
end
1716

1817
desc "Build etc files"
19-
task :etc => %w(etc/triples.nt etc/quads.nq)
18+
task etc: %w(etc/triples.nt etc/quads.nq)
2019

2120
desc "Clean etc files"
2221
task :clean do

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.13
1+
1.99.0

lib/rdf/spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require 'rdf' # @see http://rubygems.org/gems/rdf
22
require 'rspec' # @see http://rubygems.org/gems/rspec
3+
require 'rdf/spec/inspects'
34
require 'rspec/its'
45

56
module RDF

lib/rdf/spec/countable.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@
2424
describe RDF::Countable do
2525
subject {countable}
2626

27-
it {should respond_to(:empty?)}
28-
it {should_not be_empty}
29-
it {should respond_to(:count)}
30-
its(:count) {should == @statements.size}
31-
it {should respond_to(:size)}
32-
its(:size) {should == @statements.size}
27+
it {is_expected.to respond_to(:empty?)}
28+
it {is_expected.to_not be_empty}
29+
it {is_expected.to respond_to(:count)}
30+
its(:count) {is_expected.to eq @statements.size}
31+
it {is_expected.to respond_to(:size)}
32+
its(:size) {is_expected.to eq @statements.size}
3333

3434
context "when empty" do
3535
subject {[].extend(RDF::Countable)}
36-
it {should be_empty}
37-
its(:count) {should == 0}
38-
its(:size) {should == 0}
36+
it {is_expected.to be_empty}
37+
its(:count) {is_expected.to eq 0}
38+
its(:size) {is_expected.to eq 0}
3939
end
4040

41-
its(:to_enum) {should be_countable}
42-
its(:enum_for) {should be_countable}
41+
its(:to_enum) {is_expected.to be_countable}
42+
its(:enum_for) {is_expected.to be_countable}
4343
it "#enum_for(:each)" do
4444
expect(subject.enum_for(:each)).to be_countable
4545
end

lib/rdf/spec/durable.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@
2727

2828
subject {@load_durable.call}
2929

30-
it { should respond_to(:durable?) }
30+
it { is_expected.to respond_to(:durable?) }
3131

32-
it "should support #durable?" do
32+
it "is_expected.to support #durable?" do
3333
expect([true,false]).to be_member(subject.durable?)
3434
end
3535

36-
it {should respond_to(:nondurable?)}
36+
it {is_expected.to respond_to(:nondurable?)}
3737

38-
it "should support #nondurable?" do
38+
it "is_expected.to support #nondurable?" do
3939
expect([true,false]).to be_member(@load_durable.call.nondurable?)
4040
end
4141

42-
its(:nondurable?) {should_not == subject.durable?}
42+
its(:nondurable?) {is_expected.to_not eq subject.durable?}
4343

44-
it "should save contents between instantiations" do
44+
it "is_expected.to save contents between instantiations" do
4545
if subject.durable?
4646
subject.load(RDF::Spec::TRIPLES_FILE)
4747
expect(subject.count).to eq File.readlines(RDF::Spec::TRIPLES_FILE).size

0 commit comments

Comments
 (0)