neography 1.7.3 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42ae568995256d807ee15d867fa86fc5e3519fb6
|
4
|
+
data.tar.gz: a2d03c783d0180d1466521110a2972c351ecf3ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ab3ca2558f4589d932d79110b38590217ed914af50a9f66c2f72e889613a0c866c0e29b1c16fb97d160504c4112d4f9d1addd764a2bf97b3b911bea75a69cc2
|
7
|
+
data.tar.gz: 1546ac69eba14da9f590b7fbde392a98d21e4cd0aeba595ef43df2fe0c5e58da73309ae796b68c46700f7ff025acb583d8dda67d7feb0a494aee82d5c54844f7
|
data/.travis.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
script: "bundle exec rake neo4j:install['enterprise','2.
|
1
|
+
script: "bundle exec rake neo4j:install['enterprise','2.3.0'] neo4j:get_spatial neo4j:unsecure neo4j:start spec --trace"
|
2
2
|
language: ruby
|
3
3
|
rvm:
|
4
4
|
- 2.2.0
|
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.3.0")
|
10
10
|
puts "Installing Neo4j-#{args[:edition]}-#{args[:version]}"
|
11
11
|
|
12
12
|
if OS::Underlying.windows?
|
@@ -163,12 +163,18 @@ namespace :neo4j do
|
|
163
163
|
end
|
164
164
|
|
165
165
|
task :get_spatial, :version do |t, args|
|
166
|
-
args.with_defaults(:version => "2.
|
166
|
+
args.with_defaults(:version => "2.2.3")
|
167
167
|
puts "Installing Neo4j-Spatial #{args[:version]}"
|
168
168
|
|
169
169
|
unless File.exist?('neo4j-spatial.zip')
|
170
170
|
df = File.open('neo4j-spatial.zip', 'wb')
|
171
171
|
case args[:version]
|
172
|
+
when "2.2.3"
|
173
|
+
dist = "https://raw.githubusercontent.com"
|
174
|
+
request = "/neo4j-contrib/m2/master/releases/org/neo4j/neo4j-spatial/0.15-neo4j-2.2.3/neo4j-spatial-0.15-neo4j-2.2.3-server-plugin.zip"
|
175
|
+
when "2.2.0"
|
176
|
+
dist = "https://raw.githubusercontent.com"
|
177
|
+
request = "/neo4j-contrib/m2/master/releases/org/neo4j/neo4j-spatial/0.14-neo4j-2.2.0/neo4j-spatial-0.14-neo4j-2.2.0-server-plugin.zip"
|
172
178
|
when "2.1.4"
|
173
179
|
dist = "m2.neo4j.org"
|
174
180
|
request = "/content/repositories/releases/org/neo4j/neo4j-spatial/0.13-neo4j-2.1.4/neo4j-spatial-0.13-neo4j-2.1.4-server-plugin.zip"
|
@@ -189,11 +195,15 @@ namespace :neo4j do
|
|
189
195
|
end
|
190
196
|
|
191
197
|
begin
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
198
|
+
case args[:version] when "2.2.3", "2.2.0"
|
199
|
+
df.write(Net::HTTP.get(URI(dist+request)))
|
200
|
+
else
|
201
|
+
Net::HTTP.start(dist) do |http|
|
202
|
+
http.request_get(request) do |resp|
|
203
|
+
resp.read_body do |segment|
|
204
|
+
df.write(segment)
|
205
|
+
end
|
206
|
+
end
|
197
207
|
end
|
198
208
|
end
|
199
209
|
ensure
|
data/lib/neography/version.rb
CHANGED
@@ -504,15 +504,15 @@ describe Neography::Rest do
|
|
504
504
|
new_relationship1 = @neo.create_relationship("friends", node1, node2)
|
505
505
|
new_relationship2 = @neo.create_relationship("brothers", node1, node3)
|
506
506
|
batch_result = @neo.batch [:get_node_relationships, node1]
|
507
|
-
expect(batch_result.first["body"].length).to be(2)
|
508
|
-
expect(batch_result.first["body"][
|
509
|
-
expect(batch_result.first["body"][0]["start"].split('/').last).to eq(node1["self"].split('/').last)
|
510
|
-
expect(batch_result.first["body"][0]["end"].split('/').last).to eq(node2["self"].split('/').last)
|
511
|
-
expect(batch_result.first["body"][0]["self"]).to eq(new_relationship1["self"])
|
512
|
-
expect(batch_result.first["body"][1]["type"]).to eq("brothers")
|
507
|
+
expect(batch_result.first["body"].length).to be(2)
|
508
|
+
expect(batch_result.first["body"][1]["type"]).to eq("friends")
|
513
509
|
expect(batch_result.first["body"][1]["start"].split('/').last).to eq(node1["self"].split('/').last)
|
514
|
-
expect(batch_result.first["body"][1]["end"].split('/').last).to eq(
|
515
|
-
expect(batch_result.first["body"][1]["self"]).to eq(
|
510
|
+
expect(batch_result.first["body"][1]["end"].split('/').last).to eq(node2["self"].split('/').last)
|
511
|
+
expect(batch_result.first["body"][1]["self"]).to eq(new_relationship1["self"])
|
512
|
+
expect(batch_result.first["body"][0]["type"]).to eq("brothers")
|
513
|
+
expect(batch_result.first["body"][0]["start"].split('/').last).to eq(node1["self"].split('/').last)
|
514
|
+
expect(batch_result.first["body"][0]["end"].split('/').last).to eq(node3["self"].split('/').last)
|
515
|
+
expect(batch_result.first["body"][0]["self"]).to eq(new_relationship2["self"])
|
516
516
|
end
|
517
517
|
|
518
518
|
it "can get relationships of specific type" do
|
@@ -48,16 +48,16 @@ describe Neography::Rest do
|
|
48
48
|
new_relationship = @neo.create_relationship("enemies", new_node1, new_node2, {"since" => '10-2-2010', "met" => "work"})
|
49
49
|
relationships = @neo.get_node_relationships_to(new_node1, new_node2)
|
50
50
|
expect(relationships).not_to be_nil
|
51
|
-
expect(relationships[0]["start"]).to eq(new_node1["self"])
|
52
|
-
expect(relationships[0]["end"]).to eq(new_node2["self"])
|
53
|
-
expect(relationships[0]["type"]).to eq("friends")
|
54
|
-
expect(relationships[0]["data"]["met"]).to eq("college")
|
55
|
-
expect(relationships[0]["data"]["since"]).to eq('10-1-2005')
|
56
51
|
expect(relationships[1]["start"]).to eq(new_node1["self"])
|
57
52
|
expect(relationships[1]["end"]).to eq(new_node2["self"])
|
58
|
-
expect(relationships[1]["type"]).to eq("
|
59
|
-
expect(relationships[1]["data"]["met"]).to eq("
|
60
|
-
expect(relationships[1]["data"]["since"]).to eq('10-
|
53
|
+
expect(relationships[1]["type"]).to eq("friends")
|
54
|
+
expect(relationships[1]["data"]["met"]).to eq("college")
|
55
|
+
expect(relationships[1]["data"]["since"]).to eq('10-1-2005')
|
56
|
+
expect(relationships[0]["start"]).to eq(new_node1["self"])
|
57
|
+
expect(relationships[0]["end"]).to eq(new_node2["self"])
|
58
|
+
expect(relationships[0]["type"]).to eq("enemies")
|
59
|
+
expect(relationships[0]["data"]["met"]).to eq("work")
|
60
|
+
expect(relationships[0]["data"]["since"]).to eq('10-2-2010')
|
61
61
|
end
|
62
62
|
|
63
63
|
it "can get all of a node's outgoing relationship" do
|
@@ -266,16 +266,16 @@ describe Neography::Rest do
|
|
266
266
|
new_relationship = @neo.create_relationship("enemies", new_node1, new_node3, {"since" => '10-2-2010', "met" => "work"})
|
267
267
|
relationships = @neo.get_node_relationships(new_node1)
|
268
268
|
expect(relationships).not_to be_nil
|
269
|
-
expect(relationships[0]["start"]).to eq(new_node1["self"])
|
270
|
-
expect(relationships[0]["end"]).to eq(new_node2["self"])
|
271
|
-
expect(relationships[0]["type"]).to eq("friends")
|
272
|
-
expect(relationships[0]["data"]["met"]).to eq("college")
|
273
|
-
expect(relationships[0]["data"]["since"]).to eq('10-1-2005')
|
274
269
|
expect(relationships[1]["start"]).to eq(new_node1["self"])
|
275
|
-
expect(relationships[1]["end"]).to eq(
|
276
|
-
expect(relationships[1]["type"]).to eq("
|
277
|
-
expect(relationships[1]["data"]["met"]).to eq("
|
278
|
-
expect(relationships[1]["data"]["since"]).to eq('10-
|
270
|
+
expect(relationships[1]["end"]).to eq(new_node2["self"])
|
271
|
+
expect(relationships[1]["type"]).to eq("friends")
|
272
|
+
expect(relationships[1]["data"]["met"]).to eq("college")
|
273
|
+
expect(relationships[1]["data"]["since"]).to eq('10-1-2005')
|
274
|
+
expect(relationships[0]["start"]).to eq(new_node1["self"])
|
275
|
+
expect(relationships[0]["end"]).to eq(new_node3["self"])
|
276
|
+
expect(relationships[0]["type"]).to eq("enemies")
|
277
|
+
expect(relationships[0]["data"]["met"]).to eq("work")
|
278
|
+
expect(relationships[0]["data"]["since"]).to eq('10-2-2010')
|
279
279
|
end
|
280
280
|
|
281
281
|
it "can get a node's outgoing relationship" do
|
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.8.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: 2015-
|
11
|
+
date: 2015-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -42,112 +42,112 @@ dependencies:
|
|
42
42
|
name: coveralls
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: guard-rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: excon
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 0.33.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.33.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: json
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 1.7.7
|
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: 1.7.7
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: os
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 0.9.6
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 0.9.6
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rubyzip
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - '>='
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: 1.0.0
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - '>='
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 1.0.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: multi_json
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - '>='
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: 1.3.2
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - '>='
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: 1.3.2
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: rake
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - '>='
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: 0.8.7
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - '>='
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 0.8.7
|
153
153
|
description: A Ruby wrapper to the Neo4j Rest API see http://docs.neo4j.org/chunked/stable/rest-api.html
|
@@ -157,10 +157,10 @@ executables: []
|
|
157
157
|
extensions: []
|
158
158
|
extra_rdoc_files: []
|
159
159
|
files:
|
160
|
-
-
|
161
|
-
-
|
162
|
-
-
|
163
|
-
-
|
160
|
+
- .gitignore
|
161
|
+
- .project
|
162
|
+
- .rspec
|
163
|
+
- .travis.yml
|
164
164
|
- CHANGELOG.md
|
165
165
|
- CONTRIBUTORS
|
166
166
|
- Gemfile
|
@@ -294,17 +294,17 @@ require_paths:
|
|
294
294
|
- lib
|
295
295
|
required_ruby_version: !ruby/object:Gem::Requirement
|
296
296
|
requirements:
|
297
|
-
- -
|
297
|
+
- - '>='
|
298
298
|
- !ruby/object:Gem::Version
|
299
299
|
version: '0'
|
300
300
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
301
301
|
requirements:
|
302
|
-
- -
|
302
|
+
- - '>='
|
303
303
|
- !ruby/object:Gem::Version
|
304
304
|
version: '0'
|
305
305
|
requirements: []
|
306
306
|
rubyforge_project: neography
|
307
|
-
rubygems_version: 2.
|
307
|
+
rubygems_version: 2.0.14
|
308
308
|
signing_key:
|
309
309
|
specification_version: 4
|
310
310
|
summary: ruby wrapper to Neo4j Rest API
|