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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d1a5980784c2cc78f9e23e4277110bfa3944e306
4
- data.tar.gz: cf3450ef275dd472c8ef8df5d18ad473600188f9
2
+ SHA256:
3
+ metadata.gz: c66e4427ae336bcf6181a21c449147cd14eec2881fd3ec5f2fc8b6ee9a6f36cf
4
+ data.tar.gz: d2d3cfe70d14faaac8a28be5fc09802988524cfa5b6e4d663f220073414d1828
5
5
  SHA512:
6
- metadata.gz: 4c58ce00dabeb684334776062f94de2d2f79fd61eee9d89946643a0f0246bbe7c56b24b9325b119008e77eb2951f2763070b44c6996b51985affa2887203fc87
7
- data.tar.gz: 67119fd8fd88ee3e50f57f969491958003d8ac8947e27cd01aa0bbb3f6a926d2b377a72242c7cb3a8643a69f1f1fd1131a56962182d1ee3fc50480a77663e5a0
6
+ metadata.gz: b459fcc008c816c8203a02037757e4ca5b4d6a32c59924381ee63f60dd1dd23ead86b95f327603905226001b8be4ecea565d31960ee0ea6164a8008d8e34452e
7
+ data.tar.gz: 30918ebb091fc57cb067eb11a8188a1a88fd1315f18c2e288f466195f361ba0fafe8453c6a8cf2902c962c88238a36e33d3e7a400ad5ebda1741764656729175
data/graffiti.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'graffiti'
3
- spec.version = '2.3.1'
3
+ spec.version = '2.3.2'
4
4
  spec.author = 'Dmitry Borodaenko'
5
5
  spec.email = 'angdraug@debian.org'
6
6
  spec.homepage = 'https://github.com/angdraug/graffiti'
@@ -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!(/#{Regexp.escape(node)}\b/) do
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
@@ -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
- begin
86
- query = SquishAssert.new(@store.config, query_text)
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
- begin
363
- query = SquishSelect.new(@store.config, squish)
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
- begin
372
- sql1 = @store.select(query)
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
- begin
377
- sql2 = @store.select(squish)
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.1
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: 2016-04-17 00:00:00.000000000 Z
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
- rubyforge_project:
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