neo4j 7.0.6 → 7.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c6ae51fafbda1eedad90d0500b4255243c5599c
4
- data.tar.gz: ba8dce88dcb6dc10bbcf19a959e9d2bd3797a581
3
+ metadata.gz: 214bb0b66d0b3fa649214373da3e8923e6f36f87
4
+ data.tar.gz: 0548874119a1a6ea09ae1daa725b3867bea93cfa
5
5
  SHA512:
6
- metadata.gz: 6b322bd2cd84b6befbfcc57e6a3a330b9ec2ec03cd8a2aceea92d61d29af305896fc878f506d5a2661c98e49c6bfb0216dbfdfaaeb1656ba05122c2895381656
7
- data.tar.gz: 3259941e9b7d399fd8c17b38d8614ed56b285bab4518b9db1fc409aa6d2d297cc1e3b1ac9c01479806c15b41a72fca19fc3b03575905327656bbaa7877f82065
6
+ metadata.gz: 41e2e9cce3410653abcf032e5afd1a33e3105edeb4c0c1129b8c0672f82f005b3765552b962237a35de61188b699aaf21679b3431fdf6df303ee5127f565b484
7
+ data.tar.gz: 88536c0d94cbc7245ac33b57b3b372d0b8d2b02722b043844847bf3fd0d7401048c49354236dc765fde0801020c3528e732b129c570dc8699d25fae4fa414de7
@@ -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
- _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)
@@ -16,12 +16,12 @@ module Neo4j::Shared
16
16
  end
17
17
 
18
18
  def index!(type = :exact)
19
- fail Neo4j::InvalidPropertyOptionsError, "Unable to set index on constrainted property #{name} (constraints get indexes automatically)" if constraint?(:unique)
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, "Unable to set constraint on indexed property #{name} (constraints get indexes automatically)" if index?(:exact)
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
 
@@ -1,3 +1,3 @@
1
1
  module Neo4j
2
- VERSION = '7.0.6'
2
+ VERSION = '7.0.7'
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: 7.0.6
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-12 00:00:00.000000000 Z
11
+ date: 2016-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: orm_adapter