neo4j 8.0.0.alpha.7 → 8.0.0.alpha.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +33 -5
- data/lib/neo4j/railtie.rb +16 -1
- data/lib/neo4j/session_manager.rb +0 -15
- data/lib/neo4j/tasks/migration.rake +2 -1
- data/lib/neo4j/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a4dced9d6e5bc8185bc712bc60dce1e7f7cce74
|
4
|
+
data.tar.gz: 3c9284c3a08fa0968bd86ce1593e768c64fd818b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b62366ac431d4d32a7f5923beb873c6a628efb84701c9cfd777a28c75eda783e1b342854c878d15afedf257432b181d1080a0209df2bb947d40773d08a2e5c3a
|
7
|
+
data.tar.gz: 237623a12317e0ba70ae6964f0a2f8c441ce864b82652516d495050b5bca83652b9a633c7bb969426ab52dc2948444f83ea7c0f0ef0b58864a3e93ea6419e8da
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,35 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
|
9
|
+
## [8.0.0.alpha.7] 2016-09-13
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
|
13
|
+
- Multiple sessions in Rails config no longer supported
|
14
|
+
|
15
|
+
## [8.0.0.alpha.6] 2016-09-14
|
16
|
+
|
17
|
+
### Fixed
|
18
|
+
|
19
|
+
- Issues with railtie
|
20
|
+
|
21
|
+
## [8.0.0.alpha.6] 2016-09-12
|
22
|
+
|
23
|
+
### Fixed
|
24
|
+
|
25
|
+
- Instead of using `session_type`, `session_url`, `session_path`, and `session_options` in config `session.type`, `session.url`, `session.path`, and `session.options` should now be used.
|
26
|
+
- Issue where `session_url` (now `session.url`) was not working
|
27
|
+
- Broken sessions when threading
|
28
|
+
|
29
|
+
## [8.0.0.alpha.5] 2016-09-08
|
30
|
+
|
31
|
+
### Fixed
|
32
|
+
|
33
|
+
- Various issues with not be able to run migrations when migration were pending (see 22b7e6aaadd46c11d421b4dac8d3fb15f663a4c4)
|
34
|
+
|
35
|
+
## [8.0.0.alpha.4] 2016-09-08
|
36
|
+
|
8
37
|
### Added
|
9
38
|
|
10
39
|
- A `Neo4j::Migrations.maintain_test_schema!` method, to keep the test database up to date with schema changes. (see #1277)
|
@@ -14,15 +43,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
14
43
|
### Changed
|
15
44
|
|
16
45
|
- `ActiveNode#destroy` and `ActiveRel#destroy` now return the object in question rather than `true` to be compatible with `ActiveRecord` (see #1254)
|
17
|
-
- Multiple sessions in Rails config no longer supported
|
18
|
-
- Instead of using `session_type`, `session_url`, `session_path`, and `session_options` in config `session.type`, `session.url`, `session.path`, and `session.options` should now be used.
|
19
46
|
|
20
47
|
### Fixed
|
21
48
|
|
22
49
|
- Bugs with using `neo_id` as `ActiveNode` `id_property` (thanks klobuczek / see #1274)
|
23
|
-
|
24
|
-
|
25
|
-
|
50
|
+
|
51
|
+
## [8.0.0.alpha.3]
|
52
|
+
|
53
|
+
### Skipped
|
26
54
|
|
27
55
|
## [8.0.0.alpha.2] 2016-08-05
|
28
56
|
|
data/lib/neo4j/railtie.rb
CHANGED
@@ -60,7 +60,8 @@ module Neo4j
|
|
60
60
|
def setup!(neo4j_config = nil)
|
61
61
|
support_deprecated_session_configs!(neo4j_config)
|
62
62
|
|
63
|
-
|
63
|
+
session_data = neo4j_config.session.empty? ? yaml_config_data : neo4j_config.session
|
64
|
+
type, url, path, options, wait_for_connection = session_data.values_at(:type, :path, :url, :options, :wait_for_connection)
|
64
65
|
register_neo4j_cypher_logging(type || default_session_type)
|
65
66
|
|
66
67
|
Neo4j::SessionManager.open_neo4j_session(type || default_session_type,
|
@@ -96,6 +97,20 @@ module Neo4j
|
|
96
97
|
ENV['NEO4J_URL'] || ENV['NEO4J_PATH'] || 'http://localhost:7474'
|
97
98
|
end
|
98
99
|
|
100
|
+
def yaml_config_data
|
101
|
+
@yaml_config_data ||= if yaml_path
|
102
|
+
HashWithIndifferentAccess.new(YAML.load(ERB.new(yaml_path.read).result)[Rails.env])
|
103
|
+
else
|
104
|
+
{}
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
def yaml_path
|
109
|
+
return unless defined?(Rails)
|
110
|
+
@yaml_path ||= %w(config/neo4j.yml config/neo4j.yaml).map do |path|
|
111
|
+
Rails.root.join(path)
|
112
|
+
end.detect(&:exist?)
|
113
|
+
end
|
99
114
|
|
100
115
|
TYPE_SUBSCRIBERS = {
|
101
116
|
http: Neo4j::Core::CypherSession::Adaptors::HTTP.method(:subscribe_to_request),
|
@@ -31,21 +31,6 @@ module Neo4j
|
|
31
31
|
restricted_field.set nil, false
|
32
32
|
end
|
33
33
|
|
34
|
-
def config_data
|
35
|
-
@config_data ||= if yaml_path
|
36
|
-
HashWithIndifferentAccess.new(YAML.load(ERB.new(yaml_path.read).result)[Rails.env])
|
37
|
-
else
|
38
|
-
{}
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
def yaml_path
|
43
|
-
return unless defined?(Rails)
|
44
|
-
@yaml_path ||= %w(config/neo4j.yml config/neo4j.yaml).map do |path|
|
45
|
-
Rails.root.join(path)
|
46
|
-
end.detect(&:exist?)
|
47
|
-
end
|
48
|
-
|
49
34
|
# TODO: Deprecate embedded_db and http in favor of embedded and http
|
50
35
|
#
|
51
36
|
def cypher_session_adaptor(type, path_or_url, options = {})
|
@@ -5,7 +5,8 @@ unless Rake::Task.task_defined?('environment')
|
|
5
5
|
desc 'Run a script against the database to perform system-wide changes'
|
6
6
|
task :environment do
|
7
7
|
require 'neo4j/session_manager'
|
8
|
-
|
8
|
+
require 'ostruct'
|
9
|
+
Neo4j::Railtie.setup!(OpenStruct.new)
|
9
10
|
end
|
10
11
|
end
|
11
12
|
|
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.8
|
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-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: orm_adapter
|