Skip to content

Commit eedda87

Browse files
committed
Release 0.3.0.beta1
2 parents 0ce20fc + 4099c7d commit eedda87

File tree

14 files changed

+65
-95
lines changed

14 files changed

+65
-95
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ build/
3535
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
3636
.rvmrc
3737
/Gemfile.lock
38+
/.byebug_history

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ env:
66
rvm:
77
- 2.0
88
- 2.1
9-
- 2.2
10-
- jruby
9+
- 2.2.4
10+
- 2.3.0
11+
- jruby-9.0.4.0
1112
- rbx-2
1213
cache: bundler
1314
sudo: false
15+
matrix:
16+
allow_failures:
17+
- rvm: rbx-2

Gemfile

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,26 @@ source "http://rubygems.org"
22

33
gemspec
44

5-
gem 'rdf', git: "git://github.com/ruby-rdf/rdf.git", branch: "develop"
6-
gem 'ebnf', git: "git://github.com/gkellogg/ebnf.git", branch: "develop"
5+
gem 'rdf', github: "ruby-rdf/rdf", branch: "develop"
6+
gem 'ebnf', github: "gkellogg/ebnf", branch: "develop"
77

8-
group :development do
8+
group :debug do
99
gem "wirble"
10-
gem "byebug", platforms: :mri_21
10+
gem "byebug", platforms: :mri
1111
end
1212

1313
group :development, :test do
14+
gem 'json-ld', github: "ruby-rdf/json-ld", branch: "develop"
15+
gem 'rdf-aggregate-repo', github: "ruby-rdf/rdf-aggregate-repo", branch: "develop"
16+
gem 'rdf-isomorphic', github: "ruby-rdf/rdf-isomorphic", branch: "develop"
17+
gem 'rdf-spec', github: "ruby-rdf/rdf-spec", branch: "develop"
18+
gem "rdf-vocab", github: "ruby-rdf/rdf-vocab", branch: "develop"
19+
gem 'rdf-turtle', github: "ruby-rdf/rdf-turtle", branch: "develop"
20+
gem 'rdf-xsd', github: "ruby-rdf/rdf-xsd", branch: "develop"
21+
gem 'sparql', github: "ruby-rdf/sparql", branch: "develop"
22+
gem 'sparql-client', github: "ruby-rdf/sparql-client", branch: "develop"
23+
gem 'sxp', github: "gkellogg/sxp-ruby"
24+
gem 'rest-client-components'
1425
gem 'simplecov', require: false
1526
gem 'coveralls', require: false
1627
gem 'psych', platforms: [:mri, :rbx]

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ The parser takes branch and follow tables generated from the [LD Patch Grammar](
6161
## Dependencies
6262

6363
* [Ruby](http://ruby-lang.org/) (>= 2.0.0)
64-
* [RDF.rb](http://rubygems.org/gems/rdf) (>= 1.1.15)
65-
* [EBNF][] (>= 0.3.0)
66-
* [SPARQL][] (>= 1.1.7)
67-
* [SXP][] (>= 0.1.5)
68-
* [RDF::XSD][] (>= 1.1.4)
64+
* [RDF.rb](http://rubygems.org/gems/rdf) (~> 2.0)
65+
* [EBNF][] (~> 1.0)
66+
* [SPARQL][] (~> 2.0)
67+
* [SXP][] (~> 0.1.6)
68+
* [RDF::XSD][] (~> 2.0)
6969

7070
## Mailing List
7171
* <http://lists.w3.org/Archives/Public/public-rdf-ruby/>

VERSION

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

ld-patch.gemspec

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,24 @@ Gem::Specification.new do |gem|
2020
gem.has_rdoc = false
2121
gem.description = %(
2222
Implements the W3C Linked Data Patch Format and operations for RDF.rb.
23-
Makes use of the SPARQL gem for performing updates)
23+
Makes use of the SPARQL gem for performing updates.)
2424

2525
gem.required_ruby_version = '>= 2.0.0'
2626
gem.requirements = []
27-
gem.add_runtime_dependency 'rdf', '~> 1.1', '>= 1.1.15'
28-
gem.add_runtime_dependency 'ebnf', '~> 1.0'
29-
gem.add_runtime_dependency 'sparql', '~> 1.1', '>= 1.1.7'
30-
gem.add_runtime_dependency 'sxp', '~> 0.1'
31-
gem.add_runtime_dependency 'rdf-xsd', '~> 1.1'
27+
gem.add_runtime_dependency 'rdf', '>= 2.0.0.beta', '< 3'
28+
gem.add_runtime_dependency 'ebnf', '~> 1.0', '>= 1.0.1'
29+
gem.add_runtime_dependency 'sparql', '>= 1.99', '< 3'
30+
gem.add_runtime_dependency 'sxp', '>= 1.0.0.beta', '< 2'
31+
gem.add_runtime_dependency 'rdf-xsd', '>= 1.99', '< 3'
3232

33+
gem.add_development_dependency 'json-ld', '>= 1.99', '< 3'
3334
gem.add_development_dependency 'rack', '~> 1.6'
34-
gem.add_development_dependency 'linkeddata', '~> 1.1'
35-
gem.add_development_dependency 'rdf-spec', '~> 1.1'
35+
gem.add_development_dependency 'rdf-spec', '>= 2.0.0.beta', '< 3'
3636
gem.add_development_dependency 'open-uri-cached', '~> 0.0', '>= 0.0.5'
37-
gem.add_development_dependency 'rspec', '~> 3.2'
37+
gem.add_development_dependency 'rspec', '~> 3.4'
3838
gem.add_development_dependency 'rspec-its', '~> 1.2'
3939
gem.add_development_dependency 'yard' , '~> 0.8'
40-
gem.add_development_dependency 'webmock', '~> 1.17'
40+
gem.add_development_dependency 'webmock', '~> 1.22'
4141

4242
gem.post_install_message = nil
4343
end

lib/ld/patch/algebra/index.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def execute(queryable, options = {})
2424
index = operand(0)
2525

2626
results = terms.map do |term|
27-
list = RDF::List.new(term, queryable)
27+
list = RDF::List.new(subject: term, graph: queryable)
2828
list.at(index.to_i)
2929
end.flatten
3030

lib/ld/patch/algebra/patch.rb

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,25 @@ class Patch < SPARQL::Algebra::Operator
1010
NAME = :patch
1111

1212
##
13-
# Executes this upate on the given `writable` graph or repository.
13+
# Executes this upate on the given `transactable` graph or repository.
1414
#
15-
# @param [RDF::Queryable] queryable
16-
# the graph or repository to write
15+
# @param [RDF::Transactable] graph
16+
# the graph to update.
1717
# @param [Hash{Symbol => Object}] options
1818
# any additional options
19-
# @return [RDF::Queryable]
20-
# Returns queryable.
19+
# @return [RDF::Transactable]
20+
# Returns graph.
2121
# @raise [Error]
2222
# If any error is caught along the way, and rolls back the transaction
23-
def execute(queryable, options = {})
23+
def execute(graph, options = {})
2424
debug(options) {"Delete"}
2525

26-
# FIXME: due to insufficient transaction support, this is implemented by running through operands twice: the first using a clone of the graph, and the second acting on the graph directly
27-
graph = RDF::Graph.new << queryable
28-
loop do
26+
graph.transaction(mutable: true) do |tx|
2927
operands.inject(RDF::Query::Solutions.new([RDF::Query::Solution.new])) do |bindings, op|
3028
# Invoke operand using bindings from prvious operation
31-
op.execute(graph, options.merge(bindings: bindings))
29+
op.execute(tx, options.merge(bindings: bindings))
3230
end
33-
34-
break if graph.equal?(queryable)
35-
graph = queryable
3631
end
37-
queryable
3832
end
3933
end
4034
end

lib/ld/patch/algebra/update_list.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def execute(queryable, options = {})
4040
raise LD::Patch::Error, "UpdateList ambigious value for #{var_or_iri.to_ntriples} and #{predicate.to_ntriples}" if list_heads.length > 1
4141
raise LD::Patch::Error, "UpdateList no value found for #{var_or_iri.to_ntriples} and #{predicate.to_ntriples}" if list_heads.empty?
4242
lh = list_heads.first
43-
list = RDF::List.new(lh, queryable)
43+
list = RDF::List.new(subject: lh, graph: queryable)
4444
raise LD::Patch::Error, "Invalid list" unless list.valid?
4545

4646
start = case

lib/ld/patch/parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ class Parser
261261
else
262262
debug("object") {"current: #{current.inspect}"}
263263
object = current[:resource] || current[:literal] || current[:iri]
264-
(input[:triples] ||= []) << RDF::Query::Pattern.new(input[:subject], input[:predicate], object)
264+
(input[:triples] ||= []) << RDF::Query::Pattern.new(subject: input[:subject], predicate: input[:predicate], object: object)
265265
end
266266
end
267267

0 commit comments

Comments
 (0)