graph_starter 0.13.7 → 0.13.8

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
2
  SHA1:
3
- metadata.gz: 1bc6f7baefb76a12d5761b8dfb5da737f09980e3
4
- data.tar.gz: 55796cf90e256eb06b265d6dd69ed77d66c43d47
3
+ metadata.gz: 2606c830993056abd903e95e71af95ac7f119841
4
+ data.tar.gz: fc6da0e37f60084ba3277d1eda53b81d83f2ecbd
5
5
  SHA512:
6
- metadata.gz: a066cdd9ce16bce00e68fe28f1e215904d890b6a5e77e7023bf95ac5689b93d325f9ced3fd3e698c3d71bda78914d261dea4dc2149d97642a4cfa2a97488e8d5
7
- data.tar.gz: 1dcf98616b232b5e3b800225c3b3f7b98e1a45e6be35803ff0c62dbe1cedd21eba17b8786447e68546ca0a5cfc0b51a92084429f02edae25df276b6e1bd5723d
6
+ metadata.gz: 79f13d45e00136102e069bd7d933ed00cc758ac2f76e94fbf0a9068141e005281403c416dfd0e6a24d6cccbe61ebefcf372c0d99a14c4927083941fb387b7104
7
+ data.tar.gz: b1806dec0a87509be74482ec525ada25c6d8cb7f1ebabf5961b75e07dfbc2bba13e967bd093e7611c2c1ca85ff77405ac64df9701e62ac4b79ccdaed657e8299
@@ -29,7 +29,7 @@ module GraphStarter
29
29
  end
30
30
 
31
31
  def missing_image_tag
32
- @missing_image_tag ||= image_tag 'missing'
32
+ @missing_image_tag ||= image_tag 'missing.png'
33
33
  end
34
34
  end
35
35
  end
@@ -311,12 +311,15 @@ module GraphStarter
311
311
  query, associations = if category_associations.size > 0
312
312
  query = all(:asset).query
313
313
 
314
+ last_associations_var = "categories#{category_associations.size - 1}"
314
315
  query = category_associations.each_with_index.inject(query) do |query, (association_name, i)|
315
316
  category_association = self.associations[association_name]
316
317
  clause = "(asset)#{category_association.arrow_cypher}(category:#{category_association.target_class})"
317
318
 
318
319
  query.optional_match(clause).with(:asset, "#{"categories#{i-1} +" if i > 0} collect(category) AS categories#{i}")
319
- end.unwind(category: "categories#{category_associations.size - 1}")
320
+ end
321
+ .with("asset, CASE #{last_associations_var} WHEN [] THEN [null] ELSE #{last_associations_var} END AS #{last_associations_var}")
322
+ .unwind(category: last_associations_var)
320
323
 
321
324
  [query,
322
325
  [:asset, :category]]
@@ -1,3 +1,3 @@
1
1
  module GraphStarter
2
- VERSION = "0.13.7"
2
+ VERSION = "0.13.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graph_starter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.7
4
+ version: 0.13.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Underwood
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-25 00:00:00.000000000 Z
11
+ date: 2015-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails