neo4j 6.0.4 → 6.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/neo4j/active_base.rb +19 -0
- data/lib/neo4j/active_base/session_registry.rb +12 -0
- data/lib/neo4j/active_node/scope.rb +0 -4
- data/lib/neo4j/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 724a4190d800d63d07f3b4c8bb970f5c771e630a
|
4
|
+
data.tar.gz: e733ecfc04025dab1b1c3b950f05410fbf753063
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b94b84c1d37125d22fd292183bc366141768c0bae5bf768eda0aba836f9eafe7c0bff0f6674c6aab667ab53c8c9e508d102db7c0b77d976498ad447c01a311c
|
7
|
+
data.tar.gz: 8db3d934146ca5b72aa7ecf6ee8a0c432ff358fd6c93b030210c08b5c534cacc922f98f88414b6f1e244ab98ec43edbd847604a35c2bf9177c1d52e451070cb7
|
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
|
+
## [6.0.5] - 12-29-2015
|
7
|
+
|
8
|
+
### Fixed
|
9
|
+
|
10
|
+
- If a property and a scope have the same name, a "Stack level too deep" error occurs. Fixed by removing the instance method which scopes define. Could break something, but I very much doubt anybody is using this, and if they are it's likely a bug (#1088)
|
11
|
+
|
6
12
|
## [6.0.4] - 12-23-2015
|
7
13
|
|
8
14
|
### Fixed
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Neo4j
|
2
|
+
# To contain any base login for ActiveNode/ActiveRel which
|
3
|
+
# is external to the main classes
|
4
|
+
module ActiveBase
|
5
|
+
class << self
|
6
|
+
def current_session
|
7
|
+
SessionRegistry.current_session
|
8
|
+
end
|
9
|
+
|
10
|
+
def set_current_session(session)
|
11
|
+
SessionRegistry.current_session = session
|
12
|
+
end
|
13
|
+
|
14
|
+
def set_current_session_by_adaptor(adaptor)
|
15
|
+
set_current_session(Neo4j::Core::CypherSession.new(adaptor))
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'active_support/per_thread_registry'
|
2
|
+
|
3
|
+
module Neo4j
|
4
|
+
module ActiveBase
|
5
|
+
# Provides a simple API to manage sessions in a thread-safe manner
|
6
|
+
class SessionRegistry
|
7
|
+
extend ActiveSupport::PerThreadRegistry
|
8
|
+
|
9
|
+
attr_accessor :current_session
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -37,10 +37,6 @@ module Neo4j::ActiveNode
|
|
37
37
|
def scope(name, proc)
|
38
38
|
_scope[name.to_sym] = proc
|
39
39
|
|
40
|
-
define_method(name) do |query_params = nil, some_var = nil|
|
41
|
-
self.class.send(name, query_params, some_var, current_scope)
|
42
|
-
end
|
43
|
-
|
44
40
|
klass = class << self; self; end
|
45
41
|
klass.instance_eval do
|
46
42
|
define_method(name) do |query_params = nil, _ = nil|
|
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: 6.0.
|
4
|
+
version: 6.0.5
|
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: 2015-12-
|
11
|
+
date: 2015-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: orm_adapter
|
@@ -224,6 +224,8 @@ files:
|
|
224
224
|
- config/neo4j/add_classnames.yml
|
225
225
|
- config/neo4j/config.yml
|
226
226
|
- lib/neo4j.rb
|
227
|
+
- lib/neo4j/active_base.rb
|
228
|
+
- lib/neo4j/active_base/session_registry.rb
|
227
229
|
- lib/neo4j/active_node.rb
|
228
230
|
- lib/neo4j/active_node/callbacks.rb
|
229
231
|
- lib/neo4j/active_node/dependent.rb
|