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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92ded23c28b3eabbb9fa5dbcd51e95e694e0f4bb
4
- data.tar.gz: f809277ed6c601b80ae90af8f7634a94e598474d
3
+ metadata.gz: 9e910e891ebaa4b95b7b70e638b57facd5ab0abe
4
+ data.tar.gz: a9570dd8812d110e508dd1b86c2b72e6c4c8385a
5
5
  SHA512:
6
- metadata.gz: e1c123b35850f7d765dda8cb3a9efc995338b3e9c612f452ba6bd1a7522f693460870300fa7e1883a2d0f7811b17c7ea3f6be0c1d46db0dec95f264d829ebc89
7
- data.tar.gz: 7a5e8d189ff9a9ec644c3ac197e4c56de00f5552dd41d00c5b9b4c38e0e856b7e68b896733d76a7ee1f1d7bf4857f1549a56aa26be579ce6c325063116606c54
6
+ metadata.gz: 8252603ec9eb5d9cca34ca4c8b35882eeeeeff8c2a9f48fce7e00eebd0b0b3a22291cb401234deb95a0680be7c02f4c93b03c838be84bca39a03366772e22f90
7
+ data.tar.gz: cb0505ab1461d56b0dc33258c7a7723ea43992f39c625f1f7db43b1efd8596767be5d701a1c64624d9adf5bc4740b9ea0b6a924c52f8445a65a3bfd0d0cbd175
@@ -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
@@ -27,6 +27,7 @@ end
27
27
  group 'test' do
28
28
  gem 'coveralls', require: false
29
29
  if RUBY_VERSION.to_f < 2.0
30
+ gem 'term-ansicolor', '< 1.4'
30
31
  gem 'tins', '< 1.7'
31
32
  gem 'overcommit', '< 0.35.0'
32
33
  else
@@ -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 !block
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 |query_params = nil, _ = nil|
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
- if proc.arity == 1
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
@@ -1,3 +1,3 @@
1
1
  module Neo4j
2
- VERSION = '8.0.0.alpha.11'
2
+ VERSION = '8.0.0.alpha.12'
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: 8.0.0.alpha.11
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-27 00:00:00.000000000 Z
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