neo4j 8.0.0.alpha.6 → 8.0.0.alpha.7

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: ac1f95d91c95d7a8d809de657a186fe9a98f0872
4
- data.tar.gz: b1fb1a75eaacc95293219bdc997513a523222ee1
3
+ metadata.gz: 7e27235ebda95170bf3b1be86184d65f52c6ce62
4
+ data.tar.gz: fd49a4500e63667ecf2073c47dc56bb28f9bafe2
5
5
  SHA512:
6
- metadata.gz: 8a01f591a8e12eb3d305f9c7fcba1779bba18034d1ad413e8b856ee362a61e66cc5a06dbe5e810f9f9fe9542a25f336b052f8a1a34669c16582ac509de6ab8c7
7
- data.tar.gz: aad90232c15f4c746195237be20f98e2a4bf091c4f32a65f7a205660a90ca6f3af73fdf5e8176493fa2d201714ae07bb2357bb58716dedf3a4f88b16e6503a0d
6
+ metadata.gz: c2c5b918e977389e50ba89ba7bd95391846a47e2357987e2691b79e57526324a4aba4cfaee5ec03e3f35359c2c29e10a9fa3233ce606009062d27a822a2fd48c
7
+ data.tar.gz: 67e94db613943bf239a2db082b44f6baa6a1ca98abe274ac66d5536c293e5348f9cd3361d098d8a9e2d5b9c6bf1be1383af28c1e4d1944be366568f4ff2a268a
@@ -36,16 +36,19 @@ module Neo4j
36
36
  load 'neo4j/tasks/migration.rake'
37
37
  end
38
38
 
39
- console do |app|
39
+ console do
40
40
  Neo4j::Config[:logger] = ActiveSupport::Logger.new(STDOUT)
41
-
42
- register_neo4j_cypher_logging(app.config.neo4j.sessions.map { |s| s[:type] })
43
41
  end
44
42
 
45
43
  # Starting Neo after :load_config_initializers allows apps to
46
44
  # register migrations in config/initializers
47
45
  initializer 'neo4j.start', after: :load_config_initializers do |app|
48
- Neo4j::ActiveBase.on_establish_session { setup! app.config.neo4j }
46
+ neo4j_config = ActiveSupport::OrderedOptions.new
47
+ app.config.neo4j.each { |k, v| neo4j_config[k] = v } if app.config.neo4j
48
+
49
+ Neo4j::Config.configuration.merge!(neo4j_config.to_h)
50
+
51
+ Neo4j::ActiveBase.on_establish_session { setup! neo4j_config }
49
52
 
50
53
  Neo4j::Config[:logger] ||= Rails.logger
51
54
 
@@ -54,14 +57,9 @@ module Neo4j
54
57
  end
55
58
  end
56
59
 
57
- def setup!(cfg = nil)
58
- neo4j_config ||= ActiveSupport::OrderedOptions.new
59
- cfg.each {|k, v| neo4j_config[k] = v } if cfg
60
-
60
+ def setup!(neo4j_config = nil)
61
61
  support_deprecated_session_configs!(neo4j_config)
62
62
 
63
- Neo4j::Config.configuration.merge!(neo4j_config.to_h)
64
-
65
63
  type, url, path, options, wait_for_connection = neo4j_config.session.values_at(:type, :path, :url, :options, :wait_for_connection)
66
64
  register_neo4j_cypher_logging(type || default_session_type)
67
65
 
@@ -90,14 +88,12 @@ module Neo4j
90
88
  fail "Invalid scheme for NEO4J_URL: #{scheme}" if !%w(http bolt).include?(scheme)
91
89
  end
92
90
  else
93
- ENV['NEO4J_TYPE'] || config_data[:type] || :http
91
+ ENV['NEO4J_TYPE'] || :http
94
92
  end.to_sym
95
93
  end
96
94
 
97
95
  def default_session_path_or_url
98
- ENV['NEO4J_URL'] || ENV['NEO4J_PATH'] ||
99
- config_data[:url] || config_data[:path] ||
100
- 'http://localhost:7474'
96
+ ENV['NEO4J_URL'] || ENV['NEO4J_PATH'] || 'http://localhost:7474'
101
97
  end
102
98
 
103
99
 
@@ -7,8 +7,8 @@ require 'neo4j/core/cypher_session/adaptors/embedded'
7
7
  module Neo4j
8
8
  class SessionManager
9
9
  class << self
10
- def open_neo4j_session(type, url_or_path, url, wait_for_connection = false, options = {})
11
- enable_unlimited_strength_crypto! if java_platform? && session_type_is_embedded?(session_type)
10
+ def open_neo4j_session(type, url_or_path, wait_for_connection = false, options = {})
11
+ enable_unlimited_strength_crypto! if java_platform? && session_type_is_embedded?(type)
12
12
 
13
13
  adaptor = wait_for_value(wait_for_connection) do
14
14
  cypher_session_adaptor(type, url_or_path, options.merge(wrap_level: :proc))
@@ -1,3 +1,3 @@
1
1
  module Neo4j
2
- VERSION = '8.0.0.alpha.6'
2
+ VERSION = '8.0.0.alpha.7'
3
3
  end
@@ -7,7 +7,8 @@ require 'neo4j/version'
7
7
  Gem::Specification.new do |s|
8
8
  s.name = 'neo4j'
9
9
  s.version = Neo4j::VERSION
10
- s.required_ruby_version = '>= 2.1.9'
10
+
11
+ s.required_ruby_version = ((RUBY_PLATFORM == 'java') ? '>= 1.9.3' : '>= 2.1.9')
11
12
 
12
13
  s.authors = 'Andreas Ronge, Brian Underwood, Chris Grigg'
13
14
  s.email = 'andreas.ronge@gmail.com, brian@brian-underwood.codes, chris@subvertallmedia.com'
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.6
4
+ version: 8.0.0.alpha.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-09-12 00:00:00.000000000 Z
11
+ date: 2016-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: orm_adapter