lib/neo4j/railtie.rb in neo4j-3.0.0.alpha.5 vs lib/neo4j/railtie.rb in neo4j-3.0.0.alpha.6

- old
+ new

@@ -16,9 +16,14 @@ cfg.session_type ||= :server_db cfg.session_path ||= "http://localhost:7474" cfg.session_options ||= {} cfg.sessions ||= [] + unless (uri = URI(cfg.session_path)).user.blank? + cfg.session_options.reverse_merge!({ basic_auth: { username: uri.user, password: uri.password } }) + cfg.session_path = cfg.session_path.gsub("#{uri.user}:#{uri.password}@", '') + end + if cfg.sessions.empty? cfg.sessions << {type: cfg.session_type, path: cfg.session_path, options: cfg.session_options} end end