neo4j-java-driver 0.3.1-java → 0.3.2-java

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
  SHA256:
3
- metadata.gz: '0893fa2fcc3e6739bfdb3a07c755be6d32651b41322f81482151ba0b0af8626d'
4
- data.tar.gz: 3cba9a4ca8f64febf41414b73d3584182a02a459e08eacb429d5f2b164f172ba
3
+ metadata.gz: 80aa014268c37593184afdd382a4b592f67f39e14acc90ff275697bdf220835e
4
+ data.tar.gz: d483ae75865378d922e43364ab938c8c8ee49f3794ec1921b550abf4c740257a
5
5
  SHA512:
6
- metadata.gz: 396a37a826375d23cdb7e1a1ab0227e04bd42e597a753f89be8b4cae3faa2402d9ce87d79df24a3b411a292639aa26ecdce8d859c50b1ebd8bb886edd1b8b6b4
7
- data.tar.gz: 605b5995cde9b7a5c148e7d97c7bf322c8052299a566fe88cdc87270e295a117a92fa5bc3b32e4066742903e96fb04c266076be21d8f5b0a8e78117da7cb9038
6
+ metadata.gz: 7ff736a3dcc239556265d588c3855f284ec4e04038391eef015f5cebadcb8e7dbe8137385472a6b7948b8e3e5b3a607df2d0bb7fc69fa1ce46e8847bd2821a9e
7
+ data.tar.gz: 5c2f1a36b1456d8532dc333b6a3b7fbfef9e747581736d3fa5dbaf546113cbcbcbb50b3ae537690d84464a628980332823adde447559991fe8105dbfcb7815cc
@@ -4,9 +4,9 @@ module Neo4j
4
4
  module Driver
5
5
  module Ext
6
6
  module MapAccessor
7
- def properties
8
- as_map(&:as_ruby_object).to_hash.symbolize_keys
9
- end
7
+ include MapConverter
8
+
9
+ alias properties to_hash
10
10
 
11
11
  def [](key)
12
12
  get(key.to_s).as_ruby_object
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Neo4j
4
+ module Driver
5
+ module Ext
6
+ module MapConverter
7
+ def to_hash
8
+ as_map(&:itself).to_hash.transform_values!(&:as_ruby_object).symbolize_keys!
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -4,12 +4,14 @@ module Neo4j
4
4
  module Driver
5
5
  module Ext
6
6
  module RubyConverter
7
+ include MapConverter
8
+
7
9
  def as_ruby_object
8
10
  case type_constructor
9
11
  when Java::OrgNeo4jDriverInternalTypes::TypeConstructor::LIST
10
- java_method(:asList, [org.neo4j.driver.v1.util.Function]).call(&:as_ruby_object).to_a
12
+ values(&:itself).map(&:as_ruby_object)
11
13
  when Java::OrgNeo4jDriverInternalTypes::TypeConstructor::MAP
12
- as_map(->(x) { x.as_ruby_object }, nil).to_hash.symbolize_keys
14
+ to_hash
13
15
  when Java::OrgNeo4jDriverInternalTypes::TypeConstructor::DATE
14
16
  date = as_local_date
15
17
  Date.new(date.year, date.month_value, date.day_of_month)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Neo4j
4
4
  module Driver
5
- VERSION = '0.3.1'
5
+ VERSION = '0.3.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4j-java-driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: java
6
6
  authors:
7
7
  - Heinrich Klobuczek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-22 00:00:00.000000000 Z
11
+ date: 2020-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -236,6 +236,7 @@ files:
236
236
  - jruby/neo4j/driver/ext/internal_statement_result.rb
237
237
  - jruby/neo4j/driver/ext/logger.rb
238
238
  - jruby/neo4j/driver/ext/map_accessor.rb
239
+ - jruby/neo4j/driver/ext/map_converter.rb
239
240
  - jruby/neo4j/driver/ext/ruby_converter.rb
240
241
  - jruby/neo4j/driver/ext/run_override.rb
241
242
  - jruby/neo4j/driver/ext/start_end_naming.rb
@@ -290,7 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
291
  requirements:
291
292
  - jar org.neo4j.driver, neo4j-java-driver, 1.7.5
292
293
  rubyforge_project:
293
- rubygems_version: 2.7.10
294
+ rubygems_version: 2.7.9
294
295
  signing_key:
295
296
  specification_version: 4
296
297
  summary: ''