neo4j-ruby-driver 1.7.2 → 1.7.3

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: 73e017d0ba7cbb58f6ab2ef0e4118e33e81bca173483ec8b28a60fe21ffa5d9e
4
- data.tar.gz: eb314a4ad5450cac37dca70dac4ff6e2171d4f8067a094baa112d93e102d788b
3
+ metadata.gz: 4a18dd7ec0dffaa4f69584276bcdd4c73d623c0735c55583b587b95899a42ec4
4
+ data.tar.gz: 965f85328e9fbfdd3c8aca3a2c05236dd13f15465d48860d38dc2a8b3f739331
5
5
  SHA512:
6
- metadata.gz: 8a9548471d5962bf3d53bf0a5fd48ef0a04753a4fa41f5cf19d2038ebebc8e375159b364465f6bd03c00197add59b04c8eddd905fa33aeccc1fe0f9726da36f1
7
- data.tar.gz: 7ad0bdfaaa1f202f86b102a95a3d12cb50c65e64fd3e941fe2c780f4b6cdf87b01428874ec15d6c8eb60fe43c844c94751fe7be0f738ecfd3abb1cc1cec2a3a0
6
+ metadata.gz: cf20d66e491ae5b6b4b988656bbc009f580dadf6aaa7f6c34787fefa628b83f720db6c01efa74e4fc3eaeeacd6043ef6910b285793ee58c410eed67da4ebc67b
7
+ data.tar.gz: 1fcfa5a672a79096a95ae7b22ba4ba2f9d469310acbd6cf2bb4f3e75e05689deef968871927ccf31a3553ae0a0f3da5cc9ba2597e4129432de394dd999b22ee3
@@ -94,7 +94,7 @@ module Neo4j
94
94
  nil
95
95
  end
96
96
  rescue StandardError => e
97
- on_failure(e)
97
+ on_failure(e) unless @failure
98
98
  raise e
99
99
  end
100
100
  end
@@ -50,6 +50,8 @@ module Neo4j
50
50
  when String
51
51
  object = object.encode(Encoding::UTF_8) unless object.encoding == Encoding::UTF_8
52
52
  Bolt::Value.format_as_string(value, object, object.bytesize)
53
+ when Symbol
54
+ to_neo(value, object.to_s)
53
55
  when Hash
54
56
  Bolt::Value.format_as_dictionary(value, object.size)
55
57
  object.each_with_index do |(key, elem), index|
@@ -63,8 +65,6 @@ module Neo4j
63
65
  object = object.to_a
64
66
  Bolt::Value.format_as_list(value, object.size)
65
67
  object.each_with_index { |elem, index| to_neo(Bolt::List.value(value, index), elem) }
66
- when Date
67
- DateValue.to_neo(value, object)
68
68
  when ActiveSupport::Duration
69
69
  DurationValue.to_neo(value, object)
70
70
  when Neo4j::Driver::Types::Point
@@ -84,8 +84,10 @@ module Neo4j
84
84
  LocalDateTimeValue.to_neo(value, object)
85
85
  when ActiveSupport::TimeWithZone
86
86
  TimeWithZoneIdValue.to_neo(value, object)
87
- when Time
87
+ when Time, DateTime
88
88
  TimeWithZoneOffsetValue.to_neo(value, object)
89
+ when Date
90
+ DateValue.to_neo(value, object)
89
91
  else
90
92
  Exceptions::ClientException.unable_to_convert(object)
91
93
  end
@@ -6,7 +6,8 @@ module Neo4j
6
6
  module DurationNormalizer
7
7
  class << self
8
8
  def normalize(object)
9
- parts = object.parts
9
+ parts = object.parts.to_h
10
+ parts.default = 0
10
11
  months_i, months_remainder_seconds = divmod(months(parts), ActiveSupport::Duration::SECONDS_PER_MONTH)
11
12
  months_days, months_remainder_seconds =
12
13
  months_remainder_seconds.divmod(ActiveSupport::Duration::SECONDS_PER_DAY)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Neo4j
4
4
  module Driver
5
- VERSION = '1.7.2'
5
+ VERSION = '1.7.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4j-ruby-driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.2
4
+ version: 1.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Heinrich Klobuczek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-07 00:00:00.000000000 Z
11
+ date: 2020-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -337,7 +337,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
337
337
  - !ruby/object:Gem::Version
338
338
  version: '0'
339
339
  requirements: []
340
- rubygems_version: 3.1.2
340
+ rubygems_version: 3.1.4
341
341
  signing_key:
342
342
  specification_version: 4
343
343
  summary: ''