sparql 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0bff4a7c42287bdfe66a68fe8b9749ba03a28c79
4
- data.tar.gz: 1922e7c06a6387ec9dd8b4797fb262f8d8b2b70d
2
+ SHA256:
3
+ metadata.gz: 900c6694040cb2734dd37b95a0ef83d4472b15dab000b9a46d906826e704eb42
4
+ data.tar.gz: deb1166c8c7dd97955fbf9365db30c704d91f568581e12a9eac898a69cb8319a
5
5
  SHA512:
6
- metadata.gz: 12f7636ac3e765bebe48ffff2de8255bdc8465279576a4a7ceeea7c196412ee0410b115418646bcc329b9a187e204469438b2d0f01676d0c7e9332bae9797b9c
7
- data.tar.gz: 0f7cba620c3a2548d1e7645b25713f1071135290f34ba583a2c70054700a9e0c1b5ea7d0176d3fc049f0e7dfc2c0e334108893fd2d491f5354c01a03821408d8
6
+ metadata.gz: b43b92f8a74e1e05531af98e98565341e7e2514f2fbcc517e06d46658f0067845c992f998c919f375ace373ac56e75d3427e772330dd45657e61718d55eb5961
7
+ data.tar.gz: 3aa55a0112712092b6fdf21d2e26c52d8ee5719bc128e511caf8dee371e916c891517e6dc8acf0bddf030bf71b6fba540b1798ff417a2490d62dd2d471c4874a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.0
1
+ 3.0.1
@@ -52,7 +52,7 @@ class Array
52
52
  # @param [Hash{Symbol => Object}] options ({})
53
53
  # options passed from query
54
54
  # @return [RDF::Term]
55
- # @see {SPARQL::Algebra::Expression.evaluate}
55
+ # @see SPARQL::Algebra::Expression.evaluate
56
56
  def evaluate(bindings, options = {})
57
57
  SPARQL::Algebra::Expression.extension(*self.map {|o| o.evaluate(bindings, options)})
58
58
  end
@@ -25,7 +25,7 @@ module SPARQL; module Algebra
25
25
  # @return [RDF::Literal::Boolean] `true` or `false`
26
26
  # @raise [TypeError] if either operand is not an RDF term or operands are not comperable
27
27
  #
28
- # @see {RDF::Term#==}
28
+ # @see RDF::Term#==
29
29
  def apply(term1, term2)
30
30
  term1 = term1.dup.extend(RDF::TypeCheck)
31
31
  term2 = term2.dup.extend(RDF::TypeCheck)
@@ -63,8 +63,8 @@ module SPARQL; module Algebra
63
63
 
64
64
  # The variable introduced by the BIND clause must not have been used in the group graph pattern up to the point of use in BIND
65
65
  def validate!
66
- bind_vars = operand(0).map(&:first)
67
- query_vars = operand(1).vars
66
+ bind_vars = operand(0).map(&:first).map(&:name)
67
+ query_vars = operand(1).vars.map(&:name)
68
68
 
69
69
  unless (bind_vars.compact & query_vars.compact).empty?
70
70
  raise ArgumentError,
@@ -11,6 +11,8 @@ module SPARQL; module Algebra
11
11
  # (row (?title "SPARQL Tutorial"))
12
12
  # (row (?book :book2)))
13
13
  #
14
+ # @example empty table
15
+ # (table unit)
14
16
  # @see http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#inline-data
15
17
  class Table < Operator
16
18
  include Query
@@ -33,7 +35,7 @@ module SPARQL; module Algebra
33
35
  # @see http://www.w3.org/TR/sparql11-query/#sparqlAlgebra
34
36
  def execute(queryable, options = {}, &block)
35
37
  @solutions = RDF::Query::Solutions()
36
- operands[1..-1].each do |row|
38
+ Array(operands[1..-1]).each do |row|
37
39
  next unless row.is_a?(Array)
38
40
  bindings = row[1..-1].inject({}) do |memo, (var, value)|
39
41
  memo[var.to_sym] = value unless value == :undef
@@ -45,7 +45,7 @@ module SPARQL; module Algebra
45
45
 
46
46
  # The same blank node label cannot be used in two different basic graph patterns in the same query
47
47
  def validate!
48
- left_nodes, right_nodes = operand(0).ndvars, operand(1).ndvars
48
+ left_nodes, right_nodes = operand(0).ndvars.map(&:name), operand(1).ndvars.map(&:name)
49
49
 
50
50
  unless (left_nodes.compact & right_nodes.compact).empty?
51
51
  raise ArgumentError,
@@ -716,7 +716,7 @@ module SPARQL::Grammar
716
716
  production(:InlineDataOneVar) do |input, data, callback|
717
717
  add_prod_datum :Var, data[:Var]
718
718
 
719
- data[:DataBlockValue].each do |d|
719
+ Array(data[:DataBlockValue]).each do |d|
720
720
  add_prod_datum :row, [[:row, data[:Var].dup << d]]
721
721
  end
722
722
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sparql
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg Kellogg
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-12-31 00:00:00.000000000 Z
12
+ date: 2018-04-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdf
@@ -436,7 +436,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
436
436
  version: '0'
437
437
  requirements: []
438
438
  rubyforge_project:
439
- rubygems_version: 2.6.14
439
+ rubygems_version: 2.7.6
440
440
  signing_key:
441
441
  specification_version: 4
442
442
  summary: SPARQL Query and Update library for Ruby.