geoff 0.0.8 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- geoff (0.0.8)
4
+ geoff (0.1.0)
5
5
  activesupport (~> 3.2.3)
6
6
  json
7
7
  neo4j
@@ -68,17 +68,17 @@ class Geoff
68
68
 
69
69
  def rebuild_indexes
70
70
  log 're-building indexes'
71
- if defined?(r.get_type.to_s)
72
- types = root_node.relationships.map { |r| Kernel.const_get(r.get_type.to_s) }
73
-
74
- Neo4j::Transaction.run do
75
- types.each do |type|
76
- re_index(type)
77
- end
71
+ Neo4j::Transaction.run do
72
+ node_types.each do |type|
73
+ re_index(type)
78
74
  end
79
75
  end
80
76
  end
81
77
 
78
+ def node_types
79
+ root_node.relationships.map { |r| Kernel.const_get(r.get_type.to_s) rescue nil }.compact
80
+ end
81
+
82
82
  def re_index(type)
83
83
  log "-> re-indexing #{type}"
84
84
  props = type.instance_variable_get(:@_decl_props)
data/lib/geoff/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Geoff
2
- VERSION = "0.0.8"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geoff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: