neo4j-core 3.0.5 → 3.0.6

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: 20021948746b82897d81ebb31d4a59767358dcd2
4
- data.tar.gz: 6cd5c4daf6d4a3ba0a0e42265633bbefc3e48a91
3
+ metadata.gz: a58ef5ab410283225a5e5e6b25ce337bb813597e
4
+ data.tar.gz: 91b4eb5c899ca69012d03eb280740e721ad40486
5
5
  SHA512:
6
- metadata.gz: 8676dfad9c081b81a232d32d4fd9466a47918ad4de2ccfbd0d4bff7215b1fe2050e9d395d23d04f5e40c8c52c6c92ec546c746f60aa7d959a511c647e9a742c7
7
- data.tar.gz: 07531aa910bac193d36a0c16b76df81ef7862579c3981d0f4bce5dacb130aeb744445336a65b9b163d0c3d4d4a49fd518e7d492849b466025532ee27dce7b7b4
6
+ metadata.gz: 470912abeb54928745e1823f646515e5bf1fd65b557ad7cee192ffa613c44e2ac6fdd8d2a521ba428c7a33b52a8d217f17a4620ac4e644ad999dcdb6e8b564c2
7
+ data.tar.gz: ee8cf90662d690c78cc84dc6a1475fae297f0314720c23e72a63967b2eea87f51c425769c918bdfb630219b23f5ae1d34981d98f5519be64afd58f98258d89d9
@@ -115,7 +115,7 @@ module Neo4j::Core
115
115
  private
116
116
 
117
117
  def key_value_string(key, value, previous_keys = [], force_equals = false)
118
- param = (previous_keys + [key]).join('_').gsub(/[\(\)\._]+/, '_')
118
+ param = (previous_keys + [key]).join('_').gsub(/[^a-z0-9]+/i, '_')
119
119
  @params[param.to_sym] = value
120
120
 
121
121
  if !value.is_a?(Array) || force_equals
@@ -1,5 +1,5 @@
1
1
  module Neo4j
2
2
  module Core
3
- VERSION = "3.0.5"
3
+ VERSION = "3.0.6"
4
4
  end
5
5
  end
@@ -32,6 +32,12 @@ module Neo4j::Embedded
32
32
  "#{self.class} db_location: '#{@db_location}', running: #{running?}"
33
33
  end
34
34
 
35
+ def version
36
+ # Wow
37
+ version_string = graph_db.to_java(Java::OrgNeo4jKernel::GraphDatabaseAPI).getDependencyResolver().resolveDependency(Java::OrgNeo4jKernel::KernelData.java_class).version().to_s
38
+ version_string.split(' ')[-1]
39
+ end
40
+
35
41
  def start
36
42
  raise Error.new("Embedded Neo4j db is already running") if running?
37
43
  puts "Start embedded Neo4j db at #{db_location}"
@@ -10,6 +10,7 @@ module Neo4j::Server
10
10
  @id = if value.is_a?(Hash)
11
11
  hash = value['data']
12
12
  @props = Hash[hash.map{ |k, v| [k.to_sym, v] }]
13
+ @labels = value['metadata']['labels'].map(&:to_sym) if value['metadata']
13
14
  value['id'] # value['self'].match(/\d+$/)[0].to_i
14
15
  else
15
16
  value
@@ -106,8 +107,9 @@ module Neo4j::Server
106
107
 
107
108
  # (see Neo4j::Node#labels)
108
109
  def labels
109
- r = @session._query_or_fail("START n=node(#{neo_id}) RETURN labels(n) as labels", true)
110
- r.map(&:to_sym)
110
+ @labels ||= @session._query_or_fail("START n=node(#{neo_id}) RETURN labels(n) as labels", true)
111
+
112
+ @labels.map(&:to_sym)
111
113
  end
112
114
 
113
115
  def _cypher_label_list(labels)
@@ -85,7 +85,7 @@ module Neo4j::Server
85
85
  end
86
86
 
87
87
  attr_reader :struct
88
-
88
+
89
89
  def initialize(response, uncommited = false)
90
90
  @response = response
91
91
  @uncommited = uncommited
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4j-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 3.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Ronge
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-03 00:00:00.000000000 Z
11
+ date: 2014-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -215,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
215
  version: '0'
216
216
  requirements: []
217
217
  rubyforge_project: neo4j-core
218
- rubygems_version: 2.4.2
218
+ rubygems_version: 2.2.2
219
219
  signing_key:
220
220
  specification_version: 4
221
221
  summary: A graph database for Ruby