lib/neo4j/railtie.rb in neo4j-6.0.0.alpha.1 vs lib/neo4j/railtie.rb in neo4j-6.0.0.alpha.2

- old
+ new

@@ -32,11 +32,11 @@ cfg.sessions << {type: cfg.session_type, path: cfg.session_path, options: cfg.session_options} end def setup_config_defaults!(cfg) - cfg.session_type ||= :server_db - cfg.session_path ||= 'http://localhost:7474' + cfg.session_type ||= ENV['NEO4J_PATH'] ? :embedded_db : :server_db + cfg.session_path ||= ENV['NEO4J_URL'] || ENV['NEO4J_PATH'] || 'http://localhost:7474' cfg.session_options ||= {} cfg.sessions ||= [] uri = URI(cfg.session_path) return if uri.user.blank?