neo4j 7.0.6 → 7.0.7
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 +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/neo4j/active_node/scope.rb +9 -5
- data/lib/neo4j/shared/declared_property/index.rb +2 -2
- 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: 214bb0b66d0b3fa649214373da3e8923e6f36f87
|
4
|
+
data.tar.gz: 0548874119a1a6ea09ae1daa725b3867bea93cfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41e2e9cce3410653abcf032e5afd1a33e3105edeb4c0c1129b8c0672f82f005b3765552b962237a35de61188b699aaf21679b3431fdf6df303ee5127f565b484
|
7
|
+
data.tar.gz: 88536c0d94cbc7245ac33b57b3b372d0b8d2b02722b043844847bf3fd0d7401048c49354236dc765fde0801020c3528e732b129c570dc8699d25fae4fa414de7
|
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
|
+
## [7.0.6] - 05-26-2016
|
7
|
+
|
8
|
+
### Fixed
|
9
|
+
|
10
|
+
- Allow models to use their superclass' scopes (forward-ported from 6.1.11 / thanks to veetow for the heads-up / see #1205)
|
11
|
+
|
6
12
|
## [7.0.6] - 05-11-2016
|
7
13
|
|
8
14
|
### Added
|
@@ -109,6 +115,12 @@ No changes from `rc.7`
|
|
109
115
|
- All `call` class methods from Type Converters. Use `to_ruby` instead.
|
110
116
|
- `Neo4j::ActiveNode::Labels::InvalidQueryError`, since it's unused.
|
111
117
|
|
118
|
+
## [6.1.11] - 05-25-2016
|
119
|
+
|
120
|
+
### Fixed
|
121
|
+
|
122
|
+
- Allow models to use their superclass' scopes (thanks to veetow for the heads-up / see #1205)
|
123
|
+
|
112
124
|
## [6.1.10] - 03-14-2016
|
113
125
|
|
114
126
|
### 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)
|
@@ -16,12 +16,12 @@ module Neo4j::Shared
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def index!(type = :exact)
|
19
|
-
fail Neo4j::InvalidPropertyOptionsError, "
|
19
|
+
fail Neo4j::InvalidPropertyOptionsError, "Can't set index on constrainted property #{name} (constraints get indexes automatically)" if constraint?(:unique)
|
20
20
|
options[:index] = type
|
21
21
|
end
|
22
22
|
|
23
23
|
def constraint!(type = :unique)
|
24
|
-
fail Neo4j::InvalidPropertyOptionsError, "
|
24
|
+
fail Neo4j::InvalidPropertyOptionsError, "Can't set constraint on indexed property #{name} (constraints get indexes automatically)" if index?(:exact)
|
25
25
|
options[:constraint] = type
|
26
26
|
end
|
27
27
|
|
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: 7.0.
|
4
|
+
version: 7.0.7
|
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-05-
|
11
|
+
date: 2016-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: orm_adapter
|