graffiti 2.3.1 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/graffiti.gemspec +1 -1
- data/lib/graffiti/sql_mapper.rb +1 -1
- data/lib/graffiti/squish.rb +1 -1
- data/test/ts_graffiti.rb +8 -16
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c66e4427ae336bcf6181a21c449147cd14eec2881fd3ec5f2fc8b6ee9a6f36cf
|
4
|
+
data.tar.gz: d2d3cfe70d14faaac8a28be5fc09802988524cfa5b6e4d663f220073414d1828
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b459fcc008c816c8203a02037757e4ca5b4d6a32c59924381ee63f60dd1dd23ead86b95f327603905226001b8be4ecea565d31960ee0ea6164a8008d8e34452e
|
7
|
+
data.tar.gz: 30918ebb091fc57cb067eb11a8188a1a88fd1315f18c2e288f466195f361ba0fafe8453c6a8cf2902c962c88238a36e33d3e7a400ad5ebda1741764656729175
|
data/graffiti.gemspec
CHANGED
data/lib/graffiti/sql_mapper.rb
CHANGED
@@ -829,7 +829,7 @@ class SqlMapper
|
|
829
829
|
# update the global filter
|
830
830
|
@nodes.keys.sort.each do |node|
|
831
831
|
if r = rebind[ @bindings[node].first ]
|
832
|
-
@global_filter.gsub
|
832
|
+
@global_filter = @global_filter.gsub(/#{Regexp.escape(node)}\b/) do
|
833
833
|
select_nodes[ @bindings[node].first ] = true
|
834
834
|
r.to_s
|
835
835
|
end
|
data/lib/graffiti/squish.rb
CHANGED
@@ -101,7 +101,7 @@ class SquishQuery
|
|
101
101
|
@group, @order, @order_dir, @ns = match.to_a.collect {|m| m.to_s }
|
102
102
|
match = nil
|
103
103
|
@key.upcase!
|
104
|
-
@order_dir.upcase
|
104
|
+
@order_dir = @order_dir.upcase # can't mutate: ASC/DESC comes frozen from QUERY
|
105
105
|
|
106
106
|
# namespaces
|
107
107
|
# todo: validate ns
|
data/test/ts_graffiti.rb
CHANGED
@@ -82,10 +82,8 @@ WHERE (dc::creator ?msg 1)
|
|
82
82
|
(s::content ?msg ?content)
|
83
83
|
USING dc FOR #{@ns['dc']}
|
84
84
|
s FOR #{@ns['s']}}
|
85
|
-
|
86
|
-
|
87
|
-
rescue
|
88
|
-
assert false, "SquishAssert initialization raised #{$!.class}: #{$!}"
|
85
|
+
query = assert_nothing_raised do
|
86
|
+
SquishAssert.new(@store.config, query_text)
|
89
87
|
end
|
90
88
|
|
91
89
|
# query parser
|
@@ -359,24 +357,18 @@ ORDER BY c.published_date DESC"
|
|
359
357
|
private
|
360
358
|
|
361
359
|
def test_squish_select(squish, sql)
|
362
|
-
|
363
|
-
|
364
|
-
rescue
|
365
|
-
assert false, "SquishSelect initialization raised #{$!.class}: #{$!}"
|
360
|
+
query = assert_nothing_raised do
|
361
|
+
SquishSelect.new(@store.config, squish)
|
366
362
|
end
|
367
363
|
|
368
364
|
yield query if block_given?
|
369
365
|
|
370
366
|
# query result
|
371
|
-
|
372
|
-
|
373
|
-
rescue
|
374
|
-
assert false, "select with pre-parsed query raised #{$!.class}: #{$!}"
|
367
|
+
sql1 = assert_nothing_raised do
|
368
|
+
@store.select(query)
|
375
369
|
end
|
376
|
-
|
377
|
-
|
378
|
-
rescue
|
379
|
-
assert false, "select with query text raised #{$!.class}: #{$!}"
|
370
|
+
sql2 = assert_nothing_raised do
|
371
|
+
@store.select(squish)
|
380
372
|
end
|
381
373
|
assert sql1 == sql2
|
382
374
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graffiti
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Borodaenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: syncache
|
@@ -137,8 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
requirements: []
|
140
|
-
|
141
|
-
rubygems_version: 2.5.1
|
140
|
+
rubygems_version: 3.2.5
|
142
141
|
signing_key:
|
143
142
|
specification_version: 4
|
144
143
|
summary: Relational RDF store for Ruby
|