neography 1.3.5 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8cb990bec3b2c9e7a9134d22360940ddd1e7f839
4
- data.tar.gz: 39b4c012fbc1cb3281681c101987a3a0ec8a6f7f
3
+ metadata.gz: c0370d9441fe781940dd20f4a89eac1306299d8a
4
+ data.tar.gz: 51f228c713783eac9783df52a61676ddead5435c
5
5
  SHA512:
6
- metadata.gz: 837ea1e306b28344ac8474ae5624476191bd4506f53aa9c6ea2375b91d2e13119a4ae2986af0d2edc472abc765e85b5e316cfc37604292ad51f75c62ac699846
7
- data.tar.gz: baa0fda9441fc33e46b0123b4ba3f34350dcfbf138755fef003c03fca980932f7a04fb89b88d27337b5c158062b52b0188336013a189320f13ab0d9a353cd880
6
+ metadata.gz: ac5122807662830386f371b96335e98b6d3b967bd871dbe8c4f5e53de41ece3638e251d05d891a9323f5551c80d4ae3e1857307c23573c56bf414416a3e4445e
7
+ data.tar.gz: 6e8b5282ece9f8b52c30c5b599a7ea7ef1d08facb786d34b62be2078e836214f51e4782123d88295de50d71b49abc4f2011f30f45a86db42a8eda51b99ba514a
@@ -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,
@@ -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 = Logger.new(@log_file)
108
+ @logger ||= Logger.new(@log_file)
108
109
  end
109
110
  end
110
111
 
@@ -144,7 +144,7 @@ module Neography
144
144
  end
145
145
 
146
146
  def rollback_transaction(tx)
147
- @transactions.add(tx)
147
+ @transactions.rollback(tx)
148
148
  end
149
149
 
150
150
  # nodes
@@ -1,3 +1,3 @@
1
1
  module Neography
2
- VERSION = "1.3.5"
2
+ VERSION = "1.3.6"
3
3
  end
@@ -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.should have_key("transaction")
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
@@ -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.5
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-21 00:00:00.000000000 Z
11
+ date: 2014-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec