Skip to content

Commit

Permalink
Release 2.0.0.beta1
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Feb 22, 2016
2 parents 901ab96 + 7e0aafc commit 855fa7f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
16 changes: 8 additions & 8 deletions lib/rdf/spec/mutable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@
en = RDF::Literal('abc', language: 'en')
fi = RDF::Literal('abc', language: 'fi')

subject.insert([RDF::URI('s'), RDF::URI('p'), en])
expect { subject.delete([RDF::URI('s'), RDF::URI('p'), fi]) }
subject.insert([RDF::URI('http://example.com/s'), RDF::URI('http://example.com/p'), en])
expect { subject.delete([RDF::URI('http://example.com/s'), RDF::URI('http://example.com/p'), fi]) }
.not_to change { subject.count }
end
end
Expand All @@ -207,9 +207,9 @@
dec = RDF::Literal::Decimal.new(1)
int = RDF::Literal::Integer.new(1)

subject.insert([RDF::URI('s'), RDF::URI('p'), dec])
subject.insert([RDF::URI('http://example.com/s'), RDF::URI('http://example.com/p'), dec])

expect { subject.delete([RDF::URI('s'), RDF::URI('p'), int]) }
expect { subject.delete([RDF::URI('http://example.com/s'), RDF::URI('http://example.com/p'), int]) }
.not_to change { subject.count }
end
end
Expand All @@ -219,9 +219,9 @@
one = RDF::Literal::Integer.new("1")
zero_one = RDF::Literal::Integer.new("01")

subject.insert([RDF::URI('s'), RDF::URI('p'), one])
subject.insert([RDF::URI('http://example.com/s'), RDF::URI('http://example.com/p'), one])

expect { subject.delete([RDF::URI('s'), RDF::URI('p'), zero_one]) }
expect { subject.delete([RDF::URI('http://example.com/s'), RDF::URI('http://example.com/p'), zero_one]) }
.not_to change { subject.count }
end
end
Expand Down Expand Up @@ -262,9 +262,9 @@
it 'handles Graph names' do
if @supports_named_graphs
dels = non_bnode_statements.take(10).map do |st|
RDF::Statement.from(st.to_hash.merge(graph_name: RDF::URI('fake')))
RDF::Statement.from(st.to_hash.merge(graph_name: RDF::URI('http://example.com/fake')))
end
dels.map! { |st| st.graph_name = RDF::URI('fake'); st }
dels.map! { |st| st.graph_name = RDF::URI('http://example.com/fake'); st }
dels.extend(RDF::Enumerable)
expect { subject.delete_insert(dels, []) }
.not_to change { subject.statements.count }
Expand Down
22 changes: 11 additions & 11 deletions lib/rdf/spec/transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

context 'with a graph_name' do
let(:queryable) do
graph_name = RDF::URI('g')
graph_name = RDF::URI('http://example.com/g')
graph = RDF::Graph.new(graph_name: graph_name, data: repository)
graph.insert(*RDF::Spec.quads)
klass.new(repository, graph_name: graph_name)
Expand Down Expand Up @@ -96,7 +96,7 @@
end

describe "#delete" do
let(:st) { RDF::Statement(:s, RDF::URI('p'), 'o') }
let(:st) { RDF::Statement(:s, RDF::URI('http://example.com/p'), 'o') }

it 'adds to deletes' do
repository.insert(st)
Expand All @@ -108,7 +108,7 @@
end

it 'adds multiple to deletes' do
sts = [st] << RDF::Statement(:x, RDF::URI('y'), 'z')
sts = [st] << RDF::Statement(:x, RDF::URI('http://example.com/y'), 'z')
repository.insert(*sts)

expect do
Expand All @@ -118,7 +118,7 @@
end

it 'adds enumerable to deletes' do
sts = [st] << RDF::Statement(:x, RDF::URI('y'), 'z')
sts = [st] << RDF::Statement(:x, RDF::URI('http://example.com/y'), 'z')
sts.extend(RDF::Enumerable)
repository.insert(sts)

Expand Down Expand Up @@ -149,7 +149,7 @@
end

it 'overwrites existing graph names' do
st.graph_name = RDF::URI('g')
st.graph_name = RDF::URI('http://example.com/g')
repository.insert(st)

expect do
Expand All @@ -172,7 +172,7 @@
end

describe "#insert" do
let(:st) { RDF::Statement(:s, RDF::URI('p'), 'o') }
let(:st) { RDF::Statement(:s, RDF::URI('http://example.com/p'), 'o') }

it 'adds to inserts' do
expect do
Expand All @@ -183,7 +183,7 @@
end

it 'adds multiple to inserts' do
sts = [st] << RDF::Statement(:x, RDF::URI('y'), 'z')
sts = [st] << RDF::Statement(:x, RDF::URI('http://example.com/y'), 'z')

expect do
subject.insert(*sts)
Expand All @@ -193,7 +193,7 @@
end

it 'adds enumerable to inserts' do
sts = [st] << RDF::Statement(:x, RDF::URI('y'), 'z')
sts = [st] << RDF::Statement(:x, RDF::URI('http://example.com/y'), 'z')
sts.extend(RDF::Enumerable)

expect do
Expand Down Expand Up @@ -221,7 +221,7 @@
end

it 'overwrites existing graph names' do
st.graph_name = RDF::URI('g')
st.graph_name = RDF::URI('http://example.com/g')
with_name = st.dup
with_name.graph_name = graph_uri

Expand Down Expand Up @@ -251,7 +251,7 @@
end

describe '#execute' do
let(:st) { RDF::Statement(:s, RDF::URI('p'), 'o') }
let(:st) { RDF::Statement(:s, RDF::URI('http://example.com/p'), 'o') }

context 'after rollback' do
before { subject.rollback }
Expand Down Expand Up @@ -333,7 +333,7 @@

describe '#rollback' do
before { subject.insert(st); subject.delete(st) }
let(:st) { RDF::Statement(:s, RDF::URI('p'), 'o') }
let(:st) { RDF::Statement(:s, RDF::URI('http://example.com/p'), 'o') }

it 'empties changes when available' do
expect { subject.rollback }.to change { subject.changes }.to be_empty
Expand Down

0 comments on commit 855fa7f

Please sign in to comment.