neo4j 6.1.10 → 6.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/neo4j/active_node/scope.rb +9 -5
- data/lib/neo4j/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24479c7254a9b490b1b321e25b61c6a8d5b01729
|
4
|
+
data.tar.gz: 49a11431ab61452edf90f3f921f1ba80ba1309f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e96b0e032983d7b83baa19468d380443324fd16c08f9a5303aad49d2d790c1495ba97fefd6cafaa1a8e1aedce0585f2516475d71033e5116d49eb55576a6a372
|
7
|
+
data.tar.gz: ad29072f6b50740753bd8dcceb64904f3bcb18003cb46a5c97f97de8c948fbf25639ea14a2a11450528fe2a4c98ca580da828f16c8441fe142730dc743eecc90
|
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
|
+
## [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
|
-
|
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 =
|
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
|
-
|
59
|
+
full_scopes.key?(name.to_sym)
|
60
60
|
end
|
61
61
|
|
62
|
-
def
|
63
|
-
@
|
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)
|
data/lib/neo4j/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2016-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: orm_adapter
|