neography 1.5.2 → 1.6.0
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 +6 -4
- data/lib/neography/connection.rb +1 -1
- data/lib/neography/equal.rb +0 -4
- data/lib/neography/property_container.rb +4 -3
- data/lib/neography/tasks.rb +1 -1
- data/lib/neography/version.rb +1 -1
- data/neography.gemspec +1 -1
- data/spec/integration/node_spec.rb +0 -6
- data/spec/unit/config_spec.rb +7 -1
- data/spec/unit/connection_spec.rb +19 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43f8b62b22553c1f708d41329413b6a111632aa8
|
4
|
+
data.tar.gz: 9125641aee1bcd52bcaa82576138c19302312357
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51bab8d2105cedfa26e7b27c2c71a8dc9b52387ce3187ab34bf0b068cdcde4e26d7a7191b493051657b7850b61582a0fb92be9cf2a4dd08e634a601aa06245de
|
7
|
+
data.tar.gz: a21caf2565507a07421d8b63b0ca2187280378d3c485d361142bd7dbdcbd8104439510e110e8b83daab68f1e4bc6b994c5c0e5439131c55cdab4f929b92e45e7
|
data/lib/neography/config.rb
CHANGED
@@ -7,7 +7,8 @@ module Neography
|
|
7
7
|
:max_threads,
|
8
8
|
:authentication, :username, :password,
|
9
9
|
:parser, :max_execution_time,
|
10
|
-
:proxy, :http_send_timeout, :http_receive_timeout
|
10
|
+
:proxy, :http_send_timeout, :http_receive_timeout,
|
11
|
+
:persistent
|
11
12
|
|
12
13
|
def initialize
|
13
14
|
set_defaults
|
@@ -33,7 +34,8 @@ module Neography
|
|
33
34
|
:max_execution_time => @max_execution_time,
|
34
35
|
:proxy => @proxy,
|
35
36
|
:http_send_timeout => @http_send_timeout,
|
36
|
-
:http_receive_timeout => @http_receive_timeout
|
37
|
+
:http_receive_timeout => @http_receive_timeout,
|
38
|
+
:persistent => @persistent
|
37
39
|
}
|
38
40
|
end
|
39
41
|
|
@@ -58,7 +60,7 @@ module Neography
|
|
58
60
|
@proxy = nil
|
59
61
|
@http_send_timeout = 1200
|
60
62
|
@http_receive_timeout = 1200
|
61
|
-
|
62
|
-
|
63
|
+
@persistent = true
|
64
|
+
end
|
63
65
|
end
|
64
66
|
end
|
data/lib/neography/connection.rb
CHANGED
@@ -19,7 +19,7 @@ module Neography
|
|
19
19
|
@client ||= Excon.new(config[:proxy] || "#{@protocol}#{@server}:#{@port}",
|
20
20
|
:read_timeout => config[:http_receive_timeout],
|
21
21
|
:write_timeout => config[:http_send_timeout],
|
22
|
-
:persistent =>
|
22
|
+
:persistent => config[:persistent],
|
23
23
|
:user => config[:username],
|
24
24
|
:password => config[:password])
|
25
25
|
#authenticate
|
data/lib/neography/equal.rb
CHANGED
data/lib/neography/tasks.rb
CHANGED
@@ -6,7 +6,7 @@ require 'net/http'
|
|
6
6
|
namespace :neo4j do
|
7
7
|
desc "Install Neo4j"
|
8
8
|
task :install, :edition, :version do |t, args|
|
9
|
-
args.with_defaults(:edition => "community", :version => "2.
|
9
|
+
args.with_defaults(:edition => "community", :version => "2.1.3")
|
10
10
|
puts "Installing Neo4j-#{args[:edition]}-#{args[:version]}"
|
11
11
|
|
12
12
|
if OS::Underlying.windows?
|
data/lib/neography/version.rb
CHANGED
data/neography.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.add_development_dependency "coveralls"
|
26
26
|
s.add_development_dependency "debugger"
|
27
27
|
s.add_development_dependency "guard-rspec"
|
28
|
-
s.add_dependency "excon", "
|
28
|
+
s.add_dependency "excon", ">= 0.33.0"
|
29
29
|
s.add_dependency "json", ">= 1.7.7"
|
30
30
|
s.add_dependency "os", ">= 0.9.6"
|
31
31
|
s.add_dependency "rubyzip", ">= 1.0.0"
|
@@ -121,12 +121,6 @@ describe Neography::Node do
|
|
121
121
|
end
|
122
122
|
|
123
123
|
describe "equality" do
|
124
|
-
it "can tell two nodes are the same with equal?" do
|
125
|
-
new_node = Neography::Node.create
|
126
|
-
another_node = Neography::Node.load(new_node)
|
127
|
-
expect(new_node.equal?(another_node)).to be true
|
128
|
-
end
|
129
|
-
|
130
124
|
it "can tell two nodes are the same with eql?" do
|
131
125
|
new_node = Neography::Node.create
|
132
126
|
another_node = Neography::Node.load(new_node)
|
data/spec/unit/config_spec.rb
CHANGED
@@ -102,6 +102,11 @@ module Neography
|
|
102
102
|
it { should == 1200 }
|
103
103
|
end
|
104
104
|
|
105
|
+
describe '#persistent' do
|
106
|
+
subject { super().persistent }
|
107
|
+
it { should == true }
|
108
|
+
end
|
109
|
+
|
105
110
|
|
106
111
|
it "has a hash representation" do
|
107
112
|
expected_hash = {
|
@@ -123,7 +128,8 @@ module Neography
|
|
123
128
|
:max_execution_time => 6000,
|
124
129
|
:proxy => nil,
|
125
130
|
:http_send_timeout => 1200,
|
126
|
-
:http_receive_timeout => 1200
|
131
|
+
:http_receive_timeout => 1200,
|
132
|
+
:persistent => true
|
127
133
|
|
128
134
|
}
|
129
135
|
expect(config.to_hash).to eq(expected_hash)
|
@@ -79,6 +79,25 @@ module Neography
|
|
79
79
|
connection
|
80
80
|
end
|
81
81
|
end
|
82
|
+
|
83
|
+
context "persistent" do
|
84
|
+
let(:persistent) { double(:persistent)}
|
85
|
+
let(:options) do
|
86
|
+
{
|
87
|
+
:persistent => false
|
88
|
+
}
|
89
|
+
end
|
90
|
+
|
91
|
+
it 'configures persistent' do
|
92
|
+
expect(Excon).to receive(:new).with("http://localhost:7474",
|
93
|
+
:read_timeout => 1200,
|
94
|
+
:write_timeout => 1200,
|
95
|
+
:persistent => false,
|
96
|
+
:user => nil,
|
97
|
+
:password => nil).and_return(persistent)
|
98
|
+
connection
|
99
|
+
end
|
100
|
+
end
|
82
101
|
end
|
83
102
|
|
84
103
|
|
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.
|
4
|
+
version: 1.6.0
|
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-
|
11
|
+
date: 2014-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -84,14 +84,14 @@ dependencies:
|
|
84
84
|
name: excon
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 0.33.0
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 0.33.0
|
97
97
|
- !ruby/object:Gem::Dependency
|