neography 1.3.5 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/neography/config.rb +2 -1
- data/lib/neography/connection.rb +2 -1
- data/lib/neography/rest.rb +1 -1
- data/lib/neography/version.rb +1 -1
- data/spec/integration/rest_transaction_spec.rb +1 -1
- data/spec/unit/config_spec.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0370d9441fe781940dd20f4a89eac1306299d8a
|
4
|
+
data.tar.gz: 51f228c713783eac9783df52a61676ddead5435c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac5122807662830386f371b96335e98b6d3b967bd871dbe8c4f5e53de41ece3638e251d05d891a9323f5551c80d4ae3e1857307c23573c56bf414416a3e4445e
|
7
|
+
data.tar.gz: 6e8b5282ece9f8b52c30c5b599a7ea7ef1d08facb786d34b62be2078e836214f51e4782123d88295de50d71b49abc4f2011f30f45a86db42a8eda51b99ba514a
|
data/lib/neography/config.rb
CHANGED
@@ -3,7 +3,7 @@ module Neography
|
|
3
3
|
|
4
4
|
attr_accessor :protocol, :server, :port, :directory,
|
5
5
|
:cypher_path, :gremlin_path,
|
6
|
-
:log_file, :log_enabled, :slow_log_threshold,
|
6
|
+
:log_file, :log_enabled, :logger, :slow_log_threshold,
|
7
7
|
:max_threads,
|
8
8
|
:authentication, :username, :password,
|
9
9
|
:parser, :max_execution_time
|
@@ -22,6 +22,7 @@ module Neography
|
|
22
22
|
:gremlin_path => @gremlin_path,
|
23
23
|
:log_file => @log_file,
|
24
24
|
:log_enabled => @log_enabled,
|
25
|
+
:logger => @logger,
|
25
26
|
:slow_log_threshold => @slow_log_threshold,
|
26
27
|
:max_threads => @max_threads,
|
27
28
|
:authentication => @authentication,
|
data/lib/neography/connection.rb
CHANGED
@@ -89,6 +89,7 @@ module Neography
|
|
89
89
|
@slow_log_threshold = config[:slow_log_threshold]
|
90
90
|
@max_threads = config[:max_threads]
|
91
91
|
@parser = config[:parser]
|
92
|
+
@logger = config[:logger]
|
92
93
|
|
93
94
|
@max_execution_time = { 'max-execution-time' => config[:max_execution_time] }
|
94
95
|
@user_agent = { "User-Agent" => USER_AGENT }
|
@@ -104,7 +105,7 @@ module Neography
|
|
104
105
|
end
|
105
106
|
|
106
107
|
if @log_enabled
|
107
|
-
@logger
|
108
|
+
@logger ||= Logger.new(@log_file)
|
108
109
|
end
|
109
110
|
end
|
110
111
|
|
data/lib/neography/rest.rb
CHANGED
data/lib/neography/version.rb
CHANGED
@@ -157,7 +157,7 @@ describe Neography::Rest do
|
|
157
157
|
tx.should have_key("transaction")
|
158
158
|
tx["results"].should_not be_empty
|
159
159
|
existing_tx = @neo.rollback_transaction(tx)
|
160
|
-
existing_tx.
|
160
|
+
existing_tx.should_not have_key("transaction")
|
161
161
|
existing_tx.should have_key("results")
|
162
162
|
existing_tx["results"].should be_empty
|
163
163
|
end
|
data/spec/unit/config_spec.rb
CHANGED
@@ -15,6 +15,7 @@ module Neography
|
|
15
15
|
its(:gremlin_path) { should == '/ext/GremlinPlugin/graphdb/execute_script' }
|
16
16
|
its(:log_file) { should == 'neography.log' }
|
17
17
|
its(:log_enabled) { should == false }
|
18
|
+
its(:logger) { should == nil }
|
18
19
|
its(:slow_log_threshold) { should == 0 }
|
19
20
|
its(:max_threads) { should == 20 }
|
20
21
|
its(:authentication) { should == nil }
|
@@ -33,6 +34,7 @@ module Neography
|
|
33
34
|
:gremlin_path => '/ext/GremlinPlugin/graphdb/execute_script',
|
34
35
|
:log_file => 'neography.log',
|
35
36
|
:log_enabled => false,
|
37
|
+
:logger => nil,
|
36
38
|
:slow_log_threshold => 0,
|
37
39
|
:max_threads => 20,
|
38
40
|
:authentication => nil,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neography
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max De Marzi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|