neo4j 8.0.0.alpha.11 → 8.0.0.alpha.12
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 +14 -0
- data/Gemfile +1 -0
- data/lib/neo4j/active_node/query/query_proxy.rb +1 -2
- data/lib/neo4j/active_node/query/query_proxy_methods.rb +4 -0
- data/lib/neo4j/active_node/scope.rb +2 -7
- data/lib/neo4j/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e910e891ebaa4b95b7b70e638b57facd5ab0abe
|
4
|
+
data.tar.gz: a9570dd8812d110e508dd1b86c2b72e6c4c8385a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8252603ec9eb5d9cca34ca4c8b35882eeeeeff8c2a9f48fce7e00eebd0b0b3a22291cb401234deb95a0680be7c02f4c93b03c838be84bca39a03366772e22f90
|
7
|
+
data.tar.gz: cb0505ab1461d56b0dc33258c7a7723ea43992f39c625f1f7db43b1efd8596767be5d701a1c64624d9adf5bc4740b9ea0b6a924c52f8445a65a3bfd0d0cbd175
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [8.0.0.alpha.12] 2016-09-29
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
|
12
|
+
- Allow multiple arguments to scopes (see #1297 / thanks @klobuczek)
|
13
|
+
- Fixed validations with unpersisted nodes (see #1293 / thanks @klobuczek & @ProGM)
|
14
|
+
- Fixed various association bugs (see #1293 / thanks @klobuczek & @ProGM)
|
15
|
+
- Fix `as` losing the current query chain scope (see #1298 and #1278 / thanks @ProGM & @ernestoe)
|
8
16
|
|
9
17
|
## [8.0.0.alpha.11] 2016-09-27
|
10
18
|
|
@@ -126,6 +134,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
126
134
|
|
127
135
|
- Made some memory optimizations (thanks ProGM / see #1221)
|
128
136
|
|
137
|
+
## [7.2.3] - 09-28-2016
|
138
|
+
|
139
|
+
### Fixed
|
140
|
+
|
141
|
+
- `as` resetting scope of the current query chain (see #1298)
|
142
|
+
|
129
143
|
## [7.2.2] - 09-22-2016
|
130
144
|
|
131
145
|
### Fixed
|
data/Gemfile
CHANGED
@@ -183,8 +183,7 @@ module Neo4j
|
|
183
183
|
#
|
184
184
|
# @return [QueryProxy] A new QueryProxy
|
185
185
|
def branch(&block)
|
186
|
-
fail LocalJumpError, 'no block given' if
|
187
|
-
|
186
|
+
fail LocalJumpError, 'no block given' if block.nil?
|
188
187
|
instance_eval(&block).query.proxy_as(self.model, identity)
|
189
188
|
end
|
190
189
|
|
@@ -17,6 +17,10 @@ module Neo4j
|
|
17
17
|
rels.first
|
18
18
|
end
|
19
19
|
|
20
|
+
def as(node_var)
|
21
|
+
new_link(node_var)
|
22
|
+
end
|
23
|
+
|
20
24
|
# Give ability to call `#find` on associations to get a scoped find
|
21
25
|
# Doesn't pass through via `method_missing` because Enumerable has a `#find` method
|
22
26
|
def find(*args)
|
@@ -39,7 +39,7 @@ module Neo4j::ActiveNode
|
|
39
39
|
|
40
40
|
klass = class << self; self; end
|
41
41
|
klass.instance_eval do
|
42
|
-
define_method(name) do
|
42
|
+
define_method(name) do |*query_params|
|
43
43
|
eval_context = ScopeEvalContext.new(self, current_scope || self.query_proxy)
|
44
44
|
proc = full_scopes[name.to_sym]
|
45
45
|
_call_scope_context(eval_context, query_params, proc)
|
@@ -68,14 +68,9 @@ module Neo4j::ActiveNode
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def _call_scope_context(eval_context, query_params, proc)
|
71
|
-
|
72
|
-
eval_context.instance_exec(query_params, &proc)
|
73
|
-
else
|
74
|
-
eval_context.instance_exec(&proc)
|
75
|
-
end
|
71
|
+
eval_context.instance_exec(*query_params.fill(nil, query_params.length..proc.arity - 1), &proc)
|
76
72
|
end
|
77
73
|
|
78
|
-
|
79
74
|
def current_scope #:nodoc:
|
80
75
|
ScopeRegistry.value_for(:current_scope, base_class.to_s)
|
81
76
|
end
|
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: 8.0.0.alpha.
|
4
|
+
version: 8.0.0.alpha.12
|
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-09-
|
11
|
+
date: 2016-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: orm_adapter
|
@@ -370,3 +370,4 @@ signing_key:
|
|
370
370
|
specification_version: 4
|
371
371
|
summary: A graph database for Ruby
|
372
372
|
test_files: []
|
373
|
+
has_rdoc: true
|