neo4j 9.1.3 → 9.1.4

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: 1efa90e40b4c189999c12deb3372230c90e98813
4
- data.tar.gz: 41006b790c6ae89207f138b55f8f4f292bc95c26
3
+ metadata.gz: 9e112356948535c7bfe105ff61d0f7b8a72cbd8f
4
+ data.tar.gz: e8e12e12455bfc49c9957101d4548e1a68b40bf4
5
5
  SHA512:
6
- metadata.gz: 72b06f46869df7bd46a279b130ce5ca1738f6284b69873845b1a11dbc7fc5b98496ee65b15ebae8ec930590d13570308a8c5e18e44e85705349e841aa5addd3a
7
- data.tar.gz: 6db070d2a03b720bf40dd53997620aaafc2444b3fbc56ec6c214f1486b771c06a575a0f651b3db4e46ad8d559ca1d6c4e5e4b33d82d18d014e7465a2bcfb7481
6
+ metadata.gz: 540ccbdccb4fae9553de9b4e36c4d3fb21942b8c6dc49befe9152ed61b66f3bf665db10d24025b2fdd003f2b0c97e3609740821a6332f4686d522b708a178d8a
7
+ data.tar.gz: 271094b7061d5aa007f2329c1b16f7a682a6c78ac6acb957ec7bc1969c4c6c1516cd740888dcebdc9770a185fe90fef002f8022fb65bcc44dd3c7e608acc076c
@@ -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
+ ## [9.1.4] 2018-02-20
7
+
8
+ ## Fixed
9
+
10
+ - Fixed issue with `ActiveRel.find` for when the ID isn't there (thanks @lshimokawa / WARNING: Use of `ActiveRel.find` is NOT recommended, see #1482)
11
+
6
12
  ## [9.1.3] 2018-02-01
7
13
 
8
14
  ## Fixed
@@ -2,6 +2,8 @@ module Neo4j::ActiveRel
2
2
  module Query
3
3
  extend ActiveSupport::Concern
4
4
 
5
+ class RecordNotFound < Neo4j::RecordNotFound; end
6
+
5
7
  module ClassMethods
6
8
  # Returns the object with the specified neo4j id.
7
9
  # @param [String,Integer] id of node to find
@@ -15,7 +17,9 @@ module Neo4j::ActiveRel
15
17
  def find_by_id(key, session = nil)
16
18
  options = session ? {session: session} : {}
17
19
  query ||= Neo4j::ActiveBase.new_query(options)
18
- query.match('()-[r]-()').where('ID(r)' => key.to_i).limit(1).return(:r).first.r
20
+ result = query.match('()-[r]-()').where('ID(r)' => key.to_i).limit(1).return(:r).first
21
+ fail RecordNotFound.new("Couldn't find #{name} with 'id'=#{key.inspect}", name, key) if result.blank?
22
+ result.r
19
23
  end
20
24
 
21
25
  # Performs a very basic match on the relationship.
@@ -1,3 +1,3 @@
1
1
  module Neo4j
2
- VERSION = '9.1.3'
2
+ VERSION = '9.1.4'
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: 9.1.3
4
+ version: 9.1.4
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: 2018-02-02 00:00:00.000000000 Z
11
+ date: 2018-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: orm_adapter