New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring, cleanup and generalization #319
Conversation
3 similar comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally good, just a couple of questions
.travis.yml
Outdated
@@ -16,7 +16,7 @@ jdk: oraclejdk8 | |||
rvm: | |||
- 2.4.2 | |||
- 2.1.10 | |||
- jruby-9.1.14.0 | |||
- jruby-9.2.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something that I've been doing is putting something like jruby-9
so that it just gets whatever the newest version of jRuby 9.x.x.x is
lib/neo4j/core/cypher_session.rb
Outdated
@@ -1,7 +1,10 @@ | |||
require 'active_support' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally we've been require
ing just the parts of active_support
that are needed. For example
@@ -12,6 +13,7 @@ class CypherSession | |||
module Adaptors | |||
class Bolt < Base | |||
include Adaptors::HasUri | |||
include Adaptors::Schema |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this extraction still allow the gem to work for HTTP on versions of Neo4j before 3.0.0? You couldn't query for everything through Cypher back then...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This extraction is only for the purpose of enabling code sharing between bolt and java_driver adapter. The http adapter is not affected by this.
@@ -102,6 +102,10 @@ def connected? | |||
!!@requestor | |||
end | |||
|
|||
def supports_metadata? | |||
version(nil) >= '2.1.5' | |||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String comparison of versions can break down. See this
@cheerfulstoic could we move ahead on that? It is not ideal to point our production to forks and keep synching the fork with upstream. |
Fixes #
This is a neutral PR that does not introduce any new functionality. It does some refactoring and cleanup and exposes hook methods that are necessary for the java driver adaptor to work properly.
This pull introduces/changes:
close
methods on driver and sessionPings:
@cheerfulstoic
@subvertallchris