neo4j 6.1.10 → 6.1.11

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: 44f009121aff36056cc7bb5b8e43289808ef4b2e
4
- data.tar.gz: d0a949bc37dff327631d6662619f0e82e3c45a4c
3
+ metadata.gz: 24479c7254a9b490b1b321e25b61c6a8d5b01729
4
+ data.tar.gz: 49a11431ab61452edf90f3f921f1ba80ba1309f7
5
5
  SHA512:
6
- metadata.gz: 9317f40e2023b164a862828b26fae32c68a05b158175d3ccea8a92f8afbc11842f6ed02efca7c98a1e90074b4a32c0a799909cb0eac1f8f10bde2e1f6443f30b
7
- data.tar.gz: b5854b8a73db74c84fb3ab3c5934fdc22bb1986887251b28f235c9dd0263d330a42911fec21c5d35a2d2d2f72ecf88da0e14586c438c8674698a353e16d13c77
6
+ metadata.gz: e96b0e032983d7b83baa19468d380443324fd16c08f9a5303aad49d2d790c1495ba97fefd6cafaa1a8e1aedce0585f2516475d71033e5116d49eb55576a6a372
7
+ data.tar.gz: ad29072f6b50740753bd8dcceb64904f3bcb18003cb46a5c97f97de8c948fbf25639ea14a2a11450528fe2a4c98ca580da828f16c8441fe142730dc743eecc90
@@ -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
+ ## [6.1.11] - 05-25-2016
7
+
8
+ ### Fixed
9
+
10
+ - Allow models to use their superclass' scopes (thanks to veetow for the heads-up / see #1205)
11
+
6
12
  ## [6.1.10] - 03-14-2016
7
13
 
8
14
  ### Fixed
@@ -35,13 +35,13 @@ module Neo4j::ActiveNode
35
35
  #
36
36
  # @see http://guides.rubyonrails.org/active_record_querying.html#scopes
37
37
  def scope(name, proc)
38
- _scope[name.to_sym] = proc
38
+ scopes[name.to_sym] = proc
39
39
 
40
40
  klass = class << self; self; end
41
41
  klass.instance_eval do
42
42
  define_method(name) do |query_params = nil, _ = nil|
43
43
  eval_context = ScopeEvalContext.new(self, current_scope || self.query_proxy)
44
- proc = _scope[name.to_sym]
44
+ proc = full_scopes[name.to_sym]
45
45
  _call_scope_context(eval_context, query_params, proc)
46
46
  end
47
47
  end
@@ -56,11 +56,15 @@ module Neo4j::ActiveNode
56
56
  # rubocop:enable Style/PredicateName
57
57
 
58
58
  def scope?(name)
59
- _scope.key?(name.to_sym)
59
+ full_scopes.key?(name.to_sym)
60
60
  end
61
61
 
62
- def _scope
63
- @_scope ||= {}
62
+ def scopes
63
+ @scopes ||= {}
64
+ end
65
+
66
+ def full_scopes
67
+ scopes.merge(self.superclass.respond_to?(:scopes) ? self.superclass.scopes : {})
64
68
  end
65
69
 
66
70
  def _call_scope_context(eval_context, query_params, proc)
@@ -1,3 +1,3 @@
1
1
  module Neo4j
2
- VERSION = '6.1.10'
2
+ VERSION = '6.1.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: 6.1.10
4
+ version: 6.1.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: 2016-03-14 00:00:00.000000000 Z
11
+ date: 2016-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: orm_adapter