sparql 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/sparql/grammar/parser11.rb +13 -18
  4. metadata +6 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 900c6694040cb2734dd37b95a0ef83d4472b15dab000b9a46d906826e704eb42
4
- data.tar.gz: deb1166c8c7dd97955fbf9365db30c704d91f568581e12a9eac898a69cb8319a
3
+ metadata.gz: 580566c94580d213820adba65200fe89f481d405cbf27d65fe17a4c8eaf3ccd3
4
+ data.tar.gz: ab7b0abec9d6bd8aba6f3dd53f79fd53f78e29e0cde8871453d7186adb6c35a0
5
5
  SHA512:
6
- metadata.gz: b43b92f8a74e1e05531af98e98565341e7e2514f2fbcc517e06d46658f0067845c992f998c919f375ace373ac56e75d3427e772330dd45657e61718d55eb5961
7
- data.tar.gz: 3aa55a0112712092b6fdf21d2e26c52d8ee5719bc128e511caf8dee371e916c891517e6dc8acf0bddf030bf71b6fba540b1798ff417a2490d62dd2d471c4874a
6
+ metadata.gz: b66443f1a4cad8aa4691466dcfb05b42dc7c2b411b7a31dc913510d89e4e05972bee60f189ec7dc0b171734c801adc200d7f1eb13869e6636784218e6e4e1a15
7
+ data.tar.gz: 873f1bb69fee25a53f992a7a42e977f44da82f7ddca9b9030e05c1be485da6b9350f8feebcd2390e76116b3596cebf112da59752e4486517f2d9e602c2b7a7c4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.1
1
+ 3.0.2
@@ -216,7 +216,7 @@ module SPARQL::Grammar
216
216
  unless resolve_iris?
217
217
  # Only output if we're not resolving URIs internally
218
218
  add_prod_datum(:BaseDecl, data[:BaseDecl])
219
- add_prod_datum(:PrefixDecl, data[:PrefixDecl]) if data[:PrefixDecl]
219
+ add_prod_datum(:PrefixDecl, data[:PrefixDecl])
220
220
  end
221
221
  end
222
222
 
@@ -624,11 +624,14 @@ module SPARQL::Grammar
624
624
  if (lhs = (input.delete(:query) || []).first) && !lhs.empty?
625
625
  query = SPARQL::Algebra::Operator::Join.new(lhs, query)
626
626
  end
627
+ if data[:path]
628
+ query = SPARQL::Algebra::Operator::Join.new(query, Array(data[:path]).first)
629
+ end
627
630
  add_prod_datum(:query, query)
628
631
  elsif !Array(data[:query]).empty?
629
632
  # Join query and path
630
633
  add_prod_datum(:query, SPARQL::Algebra::Operator::Join.new(data[:path].first, data[:query].first))
631
- else
634
+ elsif data[:path]
632
635
  add_prod_datum(:query, data[:path])
633
636
  end
634
637
  end
@@ -856,11 +859,8 @@ module SPARQL::Grammar
856
859
  data[:Subject] = prod_data[:Subject]
857
860
  error(nil, "Expected Subject", production: :ObjectList) if !prod_data[:Subject] && validate?
858
861
  error(nil, "Expected Verb", production: :ObjectList) if !(prod_data[:Verb] || prod_data[:VerbPath]) && validate?
859
- if prod_data[:Verb]
860
- data[:Verb] = prod_data[:Verb]
861
- else
862
- data[:VerbPath] = prod_data[:VerbPath]
863
- end
862
+ data[:Verb] = prod_data[:Verb] if prod_data[:Verb]
863
+ data[:VerbPath] = prod_data[:VerbPath] if prod_data[:VerbPath]
864
864
  end
865
865
  production(:ObjectList) do |input, data, callback|
866
866
  add_prod_datum(:pattern, data[:pattern])
@@ -874,7 +874,7 @@ module SPARQL::Grammar
874
874
  if prod_data[:Verb]
875
875
  add_pattern(:Object, subject: prod_data[:Subject], predicate: prod_data[:Verb], object: object)
876
876
  add_prod_datum(:pattern, data[:pattern])
877
- else
877
+ elsif prod_data[:VerbPath]
878
878
  add_prod_datum(:path,
879
879
  SPARQL::Algebra::Expression(:path,
880
880
  prod_data[:Subject].first,
@@ -886,11 +886,8 @@ module SPARQL::Grammar
886
886
 
887
887
  # [81] TriplesSameSubjectPath ::= VarOrTerm PropertyListPathNotEmpty | TriplesNode PropertyListPath
888
888
  production(:TriplesSameSubjectPath) do |input, data, callback|
889
- if data[:pattern]
890
- add_prod_datum(:pattern, data[:pattern])
891
- else
892
- add_prod_datum(:path, data[:path])
893
- end
889
+ add_prod_datum(:pattern, data[:pattern])
890
+ add_prod_datum(:path, data[:path])
894
891
  end
895
892
 
896
893
  # [83] PropertyListPathNotEmpty ::= ( VerbPath | VerbSimple ) ObjectList ( ';' ( ( VerbPath | VerbSimple ) ObjectList )? )*
@@ -900,16 +897,14 @@ module SPARQL::Grammar
900
897
  data[:Subject] = subject
901
898
  end
902
899
  production(:PropertyListPathNotEmpty) do |input, data, callback|
903
- if data[:pattern]
904
- add_prod_datum(:pattern, data[:pattern])
905
- else
906
- add_prod_datum(:path, data[:path])
907
- end
900
+ add_prod_datum(:pattern, data[:pattern])
901
+ add_prod_datum(:path, data[:path])
908
902
  end
909
903
 
910
904
  # [84] VerbPath ::= Path
911
905
  production(:VerbPath) do |input, data, callback|
912
906
  if data[:Path]
907
+ input.delete(:Verb)
913
908
  input[:VerbPath] = data[:Path]
914
909
  else
915
910
  input[:Verb] = data[:iri]
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.1
4
+ version: 3.0.2
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: 2018-04-10 00:00:00.000000000 Z
12
+ date: 2018-08-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdf
@@ -175,22 +175,16 @@ dependencies:
175
175
  name: linkeddata
176
176
  requirement: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '2.2'
181
- - - "<"
178
+ - - "~>"
182
179
  - !ruby/object:Gem::Version
183
- version: '4.0'
180
+ version: '3.0'
184
181
  type: :development
185
182
  prerelease: false
186
183
  version_requirements: !ruby/object:Gem::Requirement
187
184
  requirements:
188
- - - ">="
189
- - !ruby/object:Gem::Version
190
- version: '2.2'
191
- - - "<"
185
+ - - "~>"
192
186
  - !ruby/object:Gem::Version
193
- version: '4.0'
187
+ version: '3.0'
194
188
  - !ruby/object:Gem::Dependency
195
189
  name: open-uri-cached
196
190
  requirement: !ruby/object:Gem::Requirement