-
Notifications
You must be signed in to change notification settings - Fork 4
Skip module check if server doesn't support MODULE LIST #16
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
Conversation
module_graph[3] if module_graph | ||
module_version = module_graph[3] if module_graph | ||
raise ServerError, "RedisGraph module not loaded." if module_version.nil? | ||
raise ServerError, "RedisGraph module incompatible, expecting >= 1.99." if module_version < 19900 |
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.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Metrics/LineLength: Line is too long. [101/80]
Style/NumericLiterals: Use underscores(_) as decimal mark and separate every 3 digits with them.
module_graph = modules.detect { |_name_key, name, _ver_key, _ver| name == 'graph' } | ||
module_graph[3] if module_graph | ||
module_version = module_graph[3] if module_graph | ||
raise ServerError, "RedisGraph module not loaded." if module_version.nil? |
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.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
begin | ||
modules = @connection.call("MODULE", "LIST") | ||
rescue Redis::CommandError | ||
# Ignore check if the connected server does not support the "MODULE LIST" command |
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.
Metrics/LineLength: Line is too long. [87/80]
modules = @connection.call("MODULE", "LIST") | ||
|
||
begin | ||
modules = @connection.call("MODULE", "LIST") |
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.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
end | ||
|
||
# Ensure that the connected Redis server supports modules | ||
# and has loaded the RedisGraph module | ||
def module_version() | ||
def check_module_version() |
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.
Metrics/AbcSize: Assignment Branch Condition size for check_module_version is too high. [16.58/15]
Metrics/MethodLength: Method has too many lines. [12/10]
Style/DefWithParentheses: Omit the parentheses in defs when the method doesn't accept any arguments.
@@ -89,7 +89,7 @@ def create_graph() | |||
it "should print property strings correctly after updates" do | |||
q = """MATCH (a {name: 'src1'}) RETURN a""" | |||
res = @r.query(q) | |||
expect(res.resultset).to eq([[[{"name"=>"src1"}, {"color"=>"cyan"}, {"newval"=>TRUE}]]]) | |||
expect(res.resultset).to eq([[[{"name"=>"src1"}, {"color"=>"cyan"}, {"newval"=>true}]]]) |
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.
Layout/SpaceInsideHashLiteralBraces: Space inside { missing.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Layout/SpaceAroundOperators: Surrounding space missing for operator =>.
Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
Metrics/LineLength: Line is too long. [94/80]
757784d
to
04a1f87
Compare
No description provided.