neo4j 8.2.5 → 8.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6571dc4f35c6315818c2a17920398060c0baf54
4
- data.tar.gz: f24369d3e379ba9b04c5c1c309c2a27055343a47
3
+ metadata.gz: 84072216e4bf8dd272816e63606f35233bf82296
4
+ data.tar.gz: 86ed0ab6230811459a469ce0491d77be12b5b447
5
5
  SHA512:
6
- metadata.gz: d42a83906f06bcf2c7aa384340a08b360caf8ac59654343bcf69b15886e659076df2542ef96132d421db00438a9d588a58733c3e723aae90ae4ac82dccf9522f
7
- data.tar.gz: df87e790c5173b90423badd8380be156a1590ecee6a70e1de9b4d0f728c6d469bd4b875c1442d8f102297af54f2df634814b820b0c29c2c4872f17a61e0f2de3
6
+ metadata.gz: 08849cc3ab7fe6d7e93e9b447c57afd2232c1c04bac1df4e4b2fd596db375baa5979ecf567c1473cc43eeb3953433650d0913f2705fb99a71f498ab846483873
7
+ data.tar.gz: f948472cebd5e1208c52f09ce43b852c2c6bc8f3f8254fb4ce412bd5de5cb91b4541a1b43ad0bfe0816d58713572b8002b38c4d521277141ff6ba67aa050fe9b
data/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.
3
3
  This file should follow the standards specified on [http://keepachangelog.com/]
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [8.3.0] 2017-09-25
7
+
8
+ ### Changed
9
+
10
+ - Allow `chainable: true` option when calling `has_one` associations to start chaining (thanks @thefliik / see #1422)
11
+
6
12
  ## [8.2.5] 2017-09-23
7
13
 
8
14
  ### Fixes
@@ -467,18 +467,14 @@ module Neo4j::ActiveNode
467
467
  define_method(name) do |node = nil, rel = nil, options = {}|
468
468
  options, node = node, nil if node.is_a?(Hash)
469
469
 
470
- # Return all results if a variable-length relationship length was given
471
470
  association_proxy = association_proxy(name, {node: node, rel: rel}.merge!(options))
472
- if options[:rel_length] && !options[:rel_length].is_a?(Integer)
471
+
472
+ # Return all results if options[:chainable] == true or a variable-length relationship length was given
473
+ if options[:chainable] || (options[:rel_length] && !options[:rel_length].is_a?(Integer))
473
474
  association_proxy
474
475
  else
475
- target_class = self.class.send(:association_target_class, name)
476
476
  o = association_proxy.result.first
477
- if target_class
478
- target_class.send(:nodeify, o)
479
- else
480
- o
481
- end
477
+ self.class.send(:association_target_class, name).try(:nodeify, o) || o
482
478
  end
483
479
  end
484
480
  end
data/lib/neo4j/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Neo4j
2
- VERSION = '8.2.5'
2
+ VERSION = '8.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4j
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.2.5
4
+ version: 8.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Ronge, Brian Underwood, Chris Grigg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-23 00:00:00.000000000 Z
11
+ date: 2017-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: orm_adapter