neo4j 5.0.10 → 5.0.11

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: 70f94d10009b5997fd9e16e1c54d3d8aba81e014
4
- data.tar.gz: 9b6e7e245073f7f297c412c974a2593c9814dad2
3
+ metadata.gz: 2c70d14b4d7b0daabad296927e241502dc5305a0
4
+ data.tar.gz: e1cfa3557e4816cdda82bf19e4752a44ed0b1cbe
5
5
  SHA512:
6
- metadata.gz: 118af5e336d8da2859e2e784df7af9dc7fdf4d1bd4c30cc2e33e7df1a76ad32defae44313d5fc03dfa10884079a5fbc0bd20932df6ae68c122eb2e0a4af4a10e
7
- data.tar.gz: 28311d4abb96271ee9abdf5a7a3c6df7ec2e36c4c1481ecd21464b71fa784e3822d5d9d7ff4651dcbc6e70d60e05138caf74cb249acac74c935fa05854aec8fe
6
+ metadata.gz: d4bbdc12ce4cc6334f8efb5539b350242bd4e1e0ff2d307ffee4e3ebb11ff6038eabf30c1ee6ffed6b95121379914ced6574547b1b842a9240c15222617e77ff
7
+ data.tar.gz: e725886f6c88440b4c190077bad606a5b0d3dce95b6f3cffd33f8be03bba1d1cc3f58b040318a8ef582d1b5818af6e33e6f014bd795c8ee24b546db70cf44bd0
@@ -29,7 +29,7 @@ module Neo4j::ActiveNode
29
29
  end
30
30
 
31
31
  extend Forwardable
32
- %w(include? empty? count find ==).each do |delegated_method|
32
+ %w(include? empty? count find first last ==).each do |delegated_method|
33
33
  def_delegator :@enumerable, delegated_method
34
34
  end
35
35
 
@@ -36,7 +36,7 @@ module Neo4j
36
36
  pluck_proc = proc { |var| "#{func}(COLLECT(#{var})) as #{var}" }
37
37
  [new_query, pluck_proc]
38
38
  else
39
- new_query = self.order(order).limit(1)
39
+ new_query = self.order(order_property).limit(1)
40
40
  pluck_proc = proc { |var| var }
41
41
  [new_query, pluck_proc]
42
42
  end
@@ -47,6 +47,12 @@ module Neo4j
47
47
  result.first
48
48
  end
49
49
 
50
+ def order_property
51
+ # This should maybe be based on a setting in the association
52
+ # rather than a hardcoded `nil`
53
+ model ? model.id_property_name : nil
54
+ end
55
+
50
56
  private :first_and_last
51
57
 
52
58
  # @return [Integer] number of nodes of this class
data/lib/neo4j/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Neo4j
2
- VERSION = '5.0.10'
2
+ VERSION = '5.0.11'
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: 5.0.10
4
+ version: 5.0.11
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: 2015-08-01 00:00:00.000000000 Z
11
+ date: 2015-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: orm_adapter