neo4j 8.2.2 → 8.2.3

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: e5861188abcbc84eddc8c83d12f1a9e8d624c4b9
4
- data.tar.gz: 8fe16e1c7c5be6e9dd99e40f8995ac49e81e8157
3
+ metadata.gz: ed3de6664c585f0e48662a419cdb5287f361d2ec
4
+ data.tar.gz: d0be71975e969b60b575e22ba333613c4eada69f
5
5
  SHA512:
6
- metadata.gz: 6e41237691379fbb59c4121de33f59b424d1b8b6eebd063497d4f80998a8f0d231057d9b90c9c12924f8e73607cec3e614729a998f2b829619a4c20c9fa60687
7
- data.tar.gz: e5895c4ed969f3682488485ef18f3f8531824e92ca4ae1890e736cdbf62735b7d073c2ca766ebc4362916ca39501a12ead2ec90e35acb3c0bf11ad6941d7848c
6
+ metadata.gz: e8494b0eb6c7fc75733b806656d4cdc46eb2877056f6ae9161bc0a96aa300452ed881bd32e3025d3da84f0d235655bf976c70114a57c8a809be70dbf6f81c26d
7
+ data.tar.gz: 1687fdb57c2d83a94aaebdb6682bf0b22ba5100b31d03fa58b1f233cf78223b89f4888a35f69e782fc2cafdca40e95cc0e1c93c92a969788aaa5e174510c6bf2
@@ -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
+ ## [8.2.3] 2017-09-19
7
+
8
+ ### Fixes
9
+
10
+ - Scopes now work when inherited three or more levels deep (see #1415, #1413, #1412 / thanks @thefliik)
11
+
6
12
  ## [8.2.2] 2017-09-18
7
13
 
8
14
  ### Fixes
data/README.md CHANGED
@@ -59,8 +59,7 @@ Neo4j.rb v4.1.0 was released in January of 2015. Its changes are outlined [here]
59
59
  | 2.1.x | No | Yes | Yes * | Yes |
60
60
  | 2.2.x | No | No | Yes | Yes |
61
61
  | 2.3.x | No | No | Yes | Yes |
62
- | 3.0.x | No | No | No | Yes |
63
- | 3.1.x | No | No | No | Yes |
62
+ | >= 3.0.0 | No | No | No | Yes |
64
63
 
65
64
  `*` Neo4j.rb >= 4.x doesn't support Neo4j versions before 2.1.5. To use 2.1.x you should upgrade to a version >= 2.1.5
66
65
 
@@ -164,7 +164,8 @@ module Neo4j
164
164
  base_query.optional_match(
165
165
  "(#{identity})#{path.each_with_index.map do |element, index|
166
166
  relationship_part(element.association, path_name(path[0..index]))
167
- end.join}")
167
+ end.join}"
168
+ )
168
169
  end
169
170
 
170
171
  def relationship_part(association, path_name)
@@ -55,16 +55,21 @@ module Neo4j::ActiveNode
55
55
  end
56
56
  # rubocop:enable Style/PredicateName
57
57
 
58
+ # @return [Boolean] true if model has access to scope with this name
58
59
  def scope?(name)
59
60
  full_scopes.key?(name.to_sym)
60
61
  end
61
62
 
63
+ # @return [Hash] of scopes assigned to this model. Keys are scope name, value is scope callable.
62
64
  def scopes
63
65
  @scopes ||= {}
64
66
  end
65
67
 
68
+ # @return [Hash] of scopes available to this model. Keys are scope name, value is scope callable.
66
69
  def full_scopes
67
- self.superclass.respond_to?(:scopes) ? self.superclass.scopes.merge(scopes) : scopes
70
+ self.ancestors.find_all { |a| a.respond_to?(:scopes) }.reverse.inject({}) do |scopes, a|
71
+ scopes.merge(a.scopes)
72
+ end
68
73
  end
69
74
 
70
75
  def _call_scope_context(eval_context, query_params, proc)
@@ -95,7 +95,7 @@ COMMENT
95
95
 
96
96
  args.with_defaults(remove_missing: false)
97
97
 
98
- schema_data = YAML.load(File.read(SCHEMA_YAML_PATH))
98
+ schema_data = YAML.safe_load(File.read(SCHEMA_YAML_PATH))
99
99
 
100
100
  Neo4j::Core::CypherSession::Adaptors::Base.subscribe_to_query(&method(:puts))
101
101
 
@@ -1,3 +1,3 @@
1
1
  module Neo4j
2
- VERSION = '8.2.2'
2
+ VERSION = '8.2.3'
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.2.2
4
+ version: 8.2.3
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: 2017-09-18 00:00:00.000000000 Z
11
+ date: 2017-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: orm_adapter