neography 1.3.7 → 1.3.8

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: c8915c7b2abbc72fbe16cb33d50b7e80d0c71b15
4
- data.tar.gz: 2933f91d72dd64da8a60f9a2155068b9baacff32
3
+ metadata.gz: 039df0f3084aed3efe2328a0cc5ec7fc892bf25a
4
+ data.tar.gz: 8b54bd42b4aab949decb5b69bdbd6704517459af
5
5
  SHA512:
6
- metadata.gz: 89c856460ee6365d4e24ebb270349b2fba5f8e4430afba1ba093ba3f85eed84bb524881e19a3f0e9e20792a57d2e5d930ec473b0234af1c3034cdafd136b133c
7
- data.tar.gz: e7bcf2213babefd378c24c910163795c680a49a8bbb9cec62cb46064cb5f9506adbd16d7e58cee9ec412529f3ff74055527f998d3207793ab3877121c221dc11
6
+ metadata.gz: 287cb8520af34a0fe26e53ead1de0d86328d6565a679a6b5d03a989088f11da33db48a4e4cdd81d837f06958bd9796ad11ef5ec35cfed9b58e589835acf62376
7
+ data.tar.gz: 21a921f59b26cb5c6bc09a943679a2bcdf3c9b335dcd6d81d958c10252d7a579a9d49c21f9d19c39b954762870d02b2e57327655d30441f4cfef3480fe522f0f
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --colour
data/.travis.yml CHANGED
@@ -1,4 +1,4 @@
1
- script: "bundle exec rake neo4j:install['enterprise','2.0.0'] neo4j:get_spatial neo4j:start spec --trace"
1
+ script: "bundle exec rake neo4j:install['enterprise','2.0.1'] neo4j:get_spatial neo4j:start spec --trace"
2
2
  language: ruby
3
3
  rvm:
4
- - 1.9.3
4
+ - 2.0.0
data/ChangeLog ADDED
@@ -0,0 +1,617 @@
1
+ v1.3.7
2
+ ======
3
+ 6bd6842 Bump to 1.3.7
4
+ ab0bc96 add add_node_to_index method
5
+ 0a360d9 remove mh spec
6
+ 4371c20 passing spatial tests
7
+ 0465e80 most of the way there, but cypher still failing :(
8
+ 02cca20 add spatial to travis
9
+ c9da4c1 starting on spatial
10
+ 11a6368 added get spatial task
11
+ d39d70a Update Readme, added link to cypher gem
12
+
13
+ v1.3.6
14
+ ======
15
+ 63da260 Bump to 1.3.6
16
+ e37cd3d fix test
17
+ e565ecc fix rollbacks
18
+ 3c9583e corrected failing spec
19
+ d0e75a6 added the option to configure an existing logger (e.g. Rails.logger)
20
+
21
+ v1.3.5
22
+ ======
23
+ 8737a75 Bump to 1.3.5
24
+ 8955dda allow unmanaged extensions if they start with unmanaged
25
+ d4aecae adding request and index to error messages
26
+ 6db7f83 update tests
27
+ 7e63e2e incorporate max-execution-time
28
+ e4e3e87 get rid of double dependency error
29
+ 7755ecc update rubyzip dependency
30
+
31
+ v1.3.4
32
+ ======
33
+ 72eea12 Bump to 1.3.4
34
+ b074c38 Allow to pass extra configuration options when creating indexes
35
+ 9556d55 adding license in gemspec
36
+ 83be1f9 add support for add_label to batch
37
+ 34a576d added another test and fixed paths to not quote values outside of get params
38
+ 30a94ff fixes automatically quoting value in find_node_labels search
39
+
40
+ v1.3.3
41
+ ======
42
+ e2893e9 Bump to 1.3.3
43
+
44
+ v1.3.2
45
+ ======
46
+ 04aa008 Bump to 1.3.2
47
+ 07bed80 log the whole response if there is a problem
48
+ 5800db7 authentication now happens at initialization, not later
49
+
50
+ v1.3.1
51
+ ======
52
+ 3b6f990 Bump to 1.3.1
53
+ 4c36b68 set client authentication on initializer
54
+
55
+ v1.3.0
56
+ ======
57
+ 8daa667 Bump to 1.3.0
58
+ 570b632 skip reference node tests, fix rest schema index spec
59
+ 1e06e91 upgrade default download to 2.0.0
60
+ 235ab7c Slow query logging for HTTP queries
61
+
62
+ v1.2.4
63
+ ======
64
+ d3e1902 Bump to 1.2.4
65
+ 4f49812 basic query logging
66
+ 77ef235 rspec fix
67
+ 6456640 again...
68
+ bd06cc5 TravisCI builds were failing due to the missing props arg.
69
+ e851d5f pass properties to unique relationship creation
70
+ 80c863d allow for Neography::Relationship.create_unique
71
+ 8e33ad7 allow for Neography::Node.create_unique
72
+ 30cf86e Support for create_node_index and drop_node_index in batch
73
+
74
+ v1.2.3
75
+ ======
76
+ d8cadbd Bump to 1.2.3
77
+ 8d1a370 fixing issue 114
78
+
79
+ v1.2.2
80
+ ======
81
+ 619ffeb Bump to 1.2.2
82
+ 5eb807a Check for subclasses of Neography::Node and not just an instance.
83
+ 47cba4c Use is_a? instead of inspect to cater to subclasses of Neography::Node
84
+ 90b3a18 Allow specifying relationship type for batch get_node_relationships
85
+
86
+ v1.2.1
87
+ ======
88
+ 4469ed3 Bump to 1.2.1
89
+ c0431f5 bug fixes to rest transactional endpoint, updating tests to 2.0.0-M06
90
+ f1e1ba9 updating neo4j versions
91
+
92
+ v1.2.0
93
+ ======
94
+ 3479028 Bump to 1.2.0
95
+ 857ffb2 upgrading installer to use 1.9.3
96
+ 215b743 maybe code climate likes this way better?
97
+ 7fe6b95 maybe easier to follow
98
+ 5a6c8c2 adding a little bit of meta
99
+ 6f3cfe5 new badge look from code climate
100
+ 9583b70 Rubyzip 1.0 compatibility
101
+
102
+ v1.1.4
103
+ ======
104
+ 88565f4 Bump to 1.1.4
105
+ 67e2f2e testing against Neo4j 2.0.0M04
106
+ 6225501 getting rid of deprecations
107
+ 1e1a432 add ability to drop indexes
108
+
109
+ v1.1.3
110
+ ======
111
+ fe61741 Bump to 1.1.3
112
+ 2b98eba Lock rubyzip to 0-9-x-stable
113
+
114
+ v1.1.2
115
+ ======
116
+ b7985ae Bump to 1.1.2
117
+ 07fab4e adding test
118
+ 02295aa Label operations take node hashes, not just ids
119
+ a1961bd let vim fix whitespace
120
+ 0726da2 better test names
121
+ d11e08f Fix comment
122
+ 8a475f1 encoding specs
123
+ 5d4e2d0 adding test...
124
+ 85ec0d6 force encoding to see if that makes any difference
125
+ abfa96b add utf-8 to header
126
+ 263a32e Updated README for clarity.
127
+
128
+ v1.1.1
129
+ ======
130
+ 3e25893 Bump to 1.1.1
131
+ 1e2c40a fixing Issue #101
132
+ da45cb3 download wasn't working on windows
133
+
134
+ v1.1.0
135
+ ======
136
+ 13f7632 Bump to 1.1.0
137
+ bc22a90 fixing transactions
138
+
139
+ v1.0.11
140
+ =======
141
+ cbbcc22 Bump to 1.0.11
142
+ 531187b adding tx unit tests
143
+ cd2c452 starting with transactions
144
+ 5be8eb5 weird, works on my mac, just not travis
145
+ 5a3a9d0 reducing size of batch test to 5k
146
+ da919e8 adding unit tests for labels
147
+ 735ebc2 adding nodes labels, still needs unit tests
148
+ 679591e adding cypher profile and stats options
149
+ da3081a allowing Node to be loaded from Cypher
150
+ b921317 clean up a little code
151
+ ae830d8 increasing receive timeout
152
+ 0726323 catching errors in batch and propagating up
153
+ e8f9b2b skip all gremlin specs
154
+ ea658b0 adding schema indexes
155
+ a547370 make the relationship types properly
156
+ 739befe adding relationship types
157
+ 6db5b23 forgot travis
158
+ ee4ce69 make 1.9 default
159
+
160
+ v1.0.10
161
+ =======
162
+ ae14af1 Bump to 1.0.10
163
+ 2b433aa adding start-no-wait
164
+ 4deb7e2 feature: Add unique to add to index
165
+ b452748 catch Neo4j issue
166
+ 0eee207 Potential Fix for Batch issue
167
+ 40e21d2 added failing test
168
+ a2cdf54 added additional expect for exception
169
+ 7b87efb Created failing example for batch queries
170
+ fd13a05 adding get_node_relationships_to method
171
+ 5c18437 up send timeout
172
+ f0bc117 batch chunked
173
+ f800179 fixing issue #81
174
+ e0f56c3 Update README.md
175
+ 845df3e letter version
176
+ f06bc66 add WasCreated type
177
+
178
+ v1.0.9
179
+ ======
180
+ b651d7b Bump to 1.0.9
181
+ c3df2f3 looking about right
182
+ 8e36406 first pass at using httpclient instead of httparty
183
+ 4f53d97 ignore coverage dir
184
+
185
+ v1.0.8
186
+ ======
187
+ c8553c0 Bump to 1.0.8
188
+ f5ab9d1 forgot to require zip
189
+ dee6ccf switching out curl for wget, since some folks don't have wget
190
+
191
+ v1.0.7
192
+ ======
193
+ 02efe14 Bump to 1.0.7
194
+ b31f829 finally fixed that all paths bug
195
+ d4bc286 make tests run 1.8.2 as well
196
+ e194963 upgrading to 1.8.2
197
+ dc99e62 Fixed error test
198
+ ff61391 handle json parsing error for empty return body
199
+
200
+ v1.0.6
201
+ ======
202
+ eff6f2a Bump to 1.0.6
203
+ b234e7f fixes #69
204
+ 4884d9c need another method for find_exact
205
+ 8c95c28 I think this fixes #76
206
+
207
+ v1.0.5
208
+ ======
209
+ d85d88f Bump to 1.0.5
210
+ c450858 Provides a named initialization hook so people depending on the gem can ensure pre-requisite configuration is complete prior to initialization of neography itself
211
+ f9804f5 Railties are best namespaced inside the gem's namespace Example: http://api.rubyonrails.org/classes/Rails/Railtie.html
212
+ 56384b5 rename spec to actual _spec file
213
+ e94ea2e started working on unmanaged extensions
214
+
215
+ v1.0.4
216
+ ======
217
+ 210f494 Bump to 1.0.4
218
+ 525ff47 Add UniquePathNotUniqueException.
219
+
220
+ v1.0.3
221
+ ======
222
+ a1e0459 Bump to 1.0.3
223
+ 89e2ff0 upgrade to 1.8.1
224
+ 091ac99 Pass the db to the new Relationship in Relationship.load
225
+ 608dc63 Actually set the neo_server on Relationships
226
+ 12c27f2 one more time
227
+ ed6e960 wonder if this works on travis
228
+ 2dcfaac make values exist before trying to remove them
229
+ 3263919 config should be subject
230
+ a20d6b5 Avoid removing trying to remove properties that don't exist
231
+ a9687eb getting rid of find_and_require_user_defined_code, closing #68
232
+
233
+ v1.0.2
234
+ ======
235
+ 6fb334b Bump to 1.0.2
236
+ 267bb32 Raise error on HTTP status code 500.
237
+ 173a9a4 add delete test. Will not work on 1.7
238
+ a4a3d31 create_relationship in batch can work without properties
239
+
240
+ v1.0.1
241
+ ======
242
+ b8f5834 Bump to 1.0.1
243
+ cc803eb Fix Exception matching for pre-1.8 Neo4j.
244
+
245
+ v1.0.0
246
+ ======
247
+ c2bbbff version 1
248
+ c4f7599 Update neography.gemspec
249
+ 34762af Spec #del.
250
+ bd65e78 Spec #attributes.
251
+ 6596207 prepare for 1.8 release
252
+ 4bf316e No need for .with on stubs.
253
+ 7470332 Test #other_node.
254
+ 1ebac4a Ignore Gemfile.lock.
255
+ 121fabc Add unit tests for node/relationship properties.
256
+ 9f75c12 removing Gemfile.lock
257
+ 9514ec3 adding latest Gemfile.lock for archival purposes
258
+ ddefa79 Update neography.gemspec
259
+ 491c319 Fix failing spec by using dead code.
260
+ ba37dda Add note about previous versions and errors.
261
+ b48144f Add code accessor to NeographyError.
262
+ 58eae25 Bump Travis Neo4j version to 1.8.RC1.
263
+ 86aa096 Add links to Errors wiki page.
264
+ d3d7752 Raise an error when REST API returns an error.
265
+ e59c8e9 Change spec_helper File requires to simpler requires.
266
+ 485c1e9 Remove link to unused Experimental page.
267
+ 2a850ef Some more textual layout.
268
+ b2bc98f Some more textual layout.
269
+ 10921a6 Some layout.
270
+ 99785b1 Move more documentation into the Wiki.
271
+ 8e3f6d7 Fix code in example.
272
+ 02cf457 Fix links to Wiki, explain content, fix code.
273
+ cfbf7d3 Simplify documentation, move API into Github wiki.
274
+ c60dc37 Fix more butchered syntax.
275
+ a1d80cc Fix more butchered syntax.
276
+ d36d26d Fix butchered syntax.
277
+ 5e47636 Move from rdoc to Markdown.
278
+ b17df33 Remove helper method used by deprecated code.
279
+ fea8727 Deprecated syntax with Neography::Rest server as the first argument to Node and Relationship.
280
+ bee8025 Make configuration a more 'rubyish'.
281
+ 317a44d Move Rest includes to Rest class.
282
+ 3552879 Move global constant into class where it is used.
283
+ 6536a7e Clean up the Node and Relationship classes, add some basic specs.
284
+ 5bb7d01 Cleaner DSL in Batch.
285
+ 798d174 Fix som duplicate code.
286
+ 9725bb8 Clean up some code, use more Rest classes paths.
287
+ 6b8bd1c Minor code layout.
288
+ 12488e5 Add batch unit tests and refactor Batch class.
289
+ 2dd4b16 Add path helpers as class methods.
290
+ 23e4522 Move back to instance variables, cleaner.
291
+ 24dd564 Remove delegation (less magic is cleaner).
292
+ 9e137d2 Make REST delegation a bit cleaner, hopefully.
293
+ cc059ec Ignore .rvmrc.
294
+ 3a5f3b1 Update README.rdoc
295
+ 8aa7ead Add Connection unit test.
296
+ c3eaed8 Use Forwardable in Rest class to delegate API.
297
+ 8d3f2a7 Remove remaining logic to separate Rest classes.
298
+ 1275c33 Moves duplicate code to superclasses, cleaned up other duplication.
299
+ 75f47e8 Update CONTRIBUTORS
300
+ 0a1dcaa Fix URL encoding to make spaces and slashes possible.
301
+ 5e00a50 Add RelationshipAutoIndexes spec.
302
+ d0a27e5 Fix typo.
303
+ 03d2e80 Add RelationshipIndexes spec.
304
+ c7a17c8 Add Relationships specs.
305
+ c758b82 Add Relationships specs.
306
+ 987f5f0 Add NodePaths specs.
307
+ 26f9e0e Add traversal options spec.
308
+ 0160de5 Add traversal spec.
309
+ 903aa56 Add NodeAutoIndexes spec.
310
+ bff0665 Add NodeIndexes specs.
311
+ 65ad592 Add NodeRelationships return specs.
312
+ 7456f9e Update Gemfile.lock.
313
+ cf6f52c Add NodeRelationships specs.
314
+ 9cd051b Fix hash-rocket syntax.
315
+ 5f88ebd Add spec for REST node properties.
316
+ d1b50e8 Add some basic unit tests for REST classes.
317
+ bbe019c Rubified some code.
318
+ 3b9e97f Add _path suffix in all REST classes.
319
+ b8f1312 Second step of major refactor of REST class.
320
+ db2f1dd First step of major refactor of REST class.
321
+ faf7f0c test with 1.8.M07
322
+
323
+ v0.0.31
324
+ =======
325
+ 1f2d14f Bump to 0.0.31
326
+ 9a1d8ba updating gems
327
+ 3f52df5 updating my development gemfile.lock
328
+ 6289b7a Fix bug with finding nodes in index with spaces and/or slashes in value.
329
+ d8e3319 Fix bug with finding nodes in index with spaces in value.
330
+ 620bb11 Update CONTRIBUTORS
331
+ 6bfaef8 adding remove_relationship_from_index as batch operation
332
+
333
+ v0.0.30
334
+ =======
335
+ b227119 Bump to 0.0.30
336
+ 0da275e Making tests work on Travis.
337
+ cfd281f Provide tests as well.
338
+ a871d00 Add User-Agent header.
339
+
340
+ v0.0.29
341
+ =======
342
+ b0f6aec Bump to 0.0.29
343
+ cda0b6e Update lib/neography/multi_json_parser.rb
344
+ 296960d Fix my hard tabs.
345
+ bbb420a Add delete_relationship to batch operations.
346
+ 802802c dealing with JSON parsing issues
347
+ 1b2aa7e adding idea to gitignore
348
+ 6f60af0 Replace Oj with MultiJson for JSON handling so that neography works with jruby
349
+ 65f6ca9 adding more indexing capabilities
350
+ 28313e1 using strict mode on Oj gem, so we don't convert to strings with colons to symbols
351
+ 100aa75 making note that batch create unique node does not return a referable node
352
+ 79ce7eb update travis to 1.8M6
353
+ 6977df6 adding auto indexing methods
354
+ a4eb275 Adding Code Climate badge.
355
+ ad3d0d6 Update travis.yml to use latest neo4j
356
+ 0d17d0a adding multiple ways to remove a node from an index
357
+ a2bdf97 Added Spec Tests for 2 Operations
358
+ a079b5a Added 2 Operations to Batch Methods to rest.rb
359
+
360
+ v0.0.27
361
+ =======
362
+ 7eec488 Bump to 0.0.28
363
+ 1b5b444 Bump to 0.0.27
364
+ a3ae832 adding test
365
+ d528234 Remove require of crack gem as I don't think it's used anywhere.
366
+ 4d5c87a Alter gemspec so we don't depend on exact version of httparty
367
+ e4bd60e Revert "switching httparty to excon" Getting reports of excon causing problems, waiting for failing tests, but holding off since streaming batch still not working. This reverts commit 2a2333cccd3807065483431b0e3b6bdac3229c76.
368
+ 31b4867 reverting
369
+ 0cf2222 typo
370
+ e696516 tweaking travis to use Neo4j 1.8.M03
371
+ cca4290 tweaking travis to use 1.9.3 instead of 1.8.7
372
+ f7c15f6 with 5k nodes streaming test
373
+ 8aa9f96 still trying to see positive results from batch rest streaming... so far no luck
374
+ 2a2333c switching httparty to excon
375
+ 3540965 batch cypher now working
376
+ ac746b1 moving to Oj parser, batch gremlin support, streaming cypher, still need to get streaming batch working
377
+ 514e174 Revert "adding streaming cypher support, using two types of JSON parsing since Crack was breaking on large cypher results, stream is twice as fast as not when pulling in 20k nodes"
378
+ d9d524a creating auto node and relationship commands, tests not done yet
379
+ fcf7c3b adding streaming cypher support, using two types of JSON parsing since Crack was breaking on large cypher results, stream is twice as fast as not when pulling in 20k nodes
380
+ c6075fb Rolling back changes, since rdoc, not markdown is used.
381
+ 2bab85d Updating readme, making core a bit easier to read.
382
+ 29ca66f added travis build status icon to README
383
+ 4a89c61 Bump to 0.0.26
384
+ 346a0f6 using version 1.7 now
385
+ 51b1c42 upgrading to 1.7M03
386
+ d230abf making sure
387
+ 5e02630 fixed issue where setting a previously undefined property using dot notation has no effect on the DB
388
+
389
+ v0.0.25
390
+ =======
391
+ a66922f Bump to 0.0.25
392
+ b04c2bc moving crack parser to its own file
393
+ 1d14860 let people know that wget is required for rake neo4j:install
394
+ 24a1c6c adding test for batch get multiple node relationships, default to all, added to Contributors file, updated Neo4j to 1.7M02
395
+ 65b53b2 Update README.rdoc
396
+ f59d389 Add a batch call to get_node_relationships
397
+ 373d390 Show an error when an unknown option is used.
398
+ 5a83e3a document and fix wrong variable access
399
+ 49c253c Add a way to query the attributes of a relationship
400
+ 7fddfc9 Added clean_database to Rest module to use test-delete-db-extension plugin
401
+ 1f217fb Update README.rdoc
402
+ 7990f3c add clean database method for testing
403
+ 51d5c35 Subclasses HTTParyt's Parser to use Crack parsing again for HTTParty 0.8.1
404
+
405
+ v0.0.24
406
+ =======
407
+ 3efc2b9 Bump to 0.0.24
408
+ c7b2149 making tests 1.8.7 compatible
409
+ 8a73e74 adding cypher_path and gremlin_path options
410
+ bba5783 moving up to 1.7.M01 as the default
411
+ 24bb3e4 fixing weighted path spec
412
+ 122336a Update README.rdoc
413
+ 5bd1325 Support for shortest weighted path
414
+ 86095cd Update to config to allow for different locations for cypher and gremlin plugins
415
+ 9e4540e install 1.6.1 from now on
416
+ 644145b letting reset properties take a newly created relationship
417
+ 8a8e13c Bump to 0.0.23
418
+ f4b31eb adding get_node_index and get_relationship_index to batch
419
+ 4ffc2e2 adding can reset the properties of a relationship test
420
+ 208b317 adding create unique relationship to batch
421
+ 5e4be72 add create unique node to batch
422
+ f16ecb6 Whoa... can't believe I had my email address wrong on the readme for so long!
423
+ 8b6604f just making sure
424
+
425
+ v0.0.22
426
+ =======
427
+ 9809d99 Bump to 0.0.22
428
+ f4a66ad using built in cypher instead of cypher plugin
429
+ 3313e4a adding tests and readme for unique nodes and relationships
430
+ 914d4d3 added 2 more functions - create_unique_node and create_unique_realtionship
431
+ 485e77f make it Rails 2.x compatible
432
+ 72c11fc update link to community server
433
+ 839b2fb update link to rest api
434
+ b48cf0a adding centrality example
435
+
436
+ v0.0.21
437
+ =======
438
+ b67bd6e Bump to 0.0.21
439
+ aac74c5 heroku compatability (thanks Marcel Scherf for the idea)
440
+ 47c2539 lets try that again
441
+ 569d791 make links pretty
442
+ aec2a73 adding some sample links to readme
443
+ cddabd3 trying Neo4j 1.6M03
444
+ 632cfd9 continue to make it inheritable
445
+ 217fc4a fixing previous untested commit (after being lured by siren of github editor)
446
+ bf039e2 allowing Node.load and Node.create to be overridden
447
+ 5b0132c get rid of old function
448
+ 78766b1 discarding nil values, closes #23
449
+ 633206b removed reference to Neo4j 1.4 and neography 0.14 since it's really old
450
+ eb03523 batch arrays of arrays
451
+ 1e37b32 Bump to 0.0.20
452
+ ca429b0 whoops, botched that gemspec change
453
+ c88b20a adding parameters to cypher calls
454
+ c1eef08 making gremlin script parameter aware
455
+ ee2335e Bump to 0.0.19
456
+ 8f15c03 adding more batching functions, now with referencing
457
+ 92ce780 more batching functions
458
+ b211af0 starting naive batch implementation
459
+
460
+ v0.0.18
461
+ =======
462
+ 8c1ce42 Bump to 0.0.18
463
+ 0e3b309 adding travis build status as well as contributing and help sections to readme
464
+ 6de30aa updating rspec dependency
465
+ 9eae2dd skip gremlin and slow in one line...
466
+ 485807c fixing issue 18
467
+ 2b42c9e got tired of failing gremlin tests, excluding for now
468
+ a185539 reverting httparty to a versin that uses crack until strick json is followed
469
+ f232e05 use empty not nil
470
+ 318da9e Added missing db parameter for loading relationship nodes
471
+ 5ac7729 how did that blank? stay in there for so long
472
+ b93913f starting work on batch specs
473
+ f64652a updating dependencies
474
+
475
+ v0.0.17
476
+ =======
477
+ c6bafa4 Bump to 0.0.17
478
+ 7c204f0 pick your own version
479
+ f48cfc7 add get relationship start node and relationship end node.
480
+ 09e8d50 Remove verbose output message.
481
+ 60d32ac using default of localhost for examples now
482
+ d9f460a using 1.5 GA for install, found problem with gremlin (see rest_gremlin_fail_spec.rb)
483
+ 7596066 adding --trace to travis line to see what we get
484
+ 84b31d0 trying to get travis to work
485
+ c82650f tweak readme version info
486
+
487
+ v0.0.16
488
+ =======
489
+ 2d325f5 Bump to 0.0.16
490
+ 7a5c6a8 removing fakeweb, escaping execute_script for gremlin, adding execute_query for cypher, adding tests
491
+ 752924a added railtie to autoload tasks
492
+ 066ed4f ugly attempt at a multi-os installer
493
+ 764a146 adding tasks
494
+ bc49b90 finding nodes and relationships through query. Remote Groovy script through Gremlin plugin ext
495
+ 1097667 Use version 0.0.l4 for Neo4j 1.4 and 0.0.15 for Neo4j 1.5
496
+ ac2e26a Bump to 0.0.15
497
+ 0ae5090 version bump
498
+ d070b78 fix spec for traverse
499
+ 9b97130 fix add relationship to index
500
+ a346ddc fix add node to index
501
+
502
+ v0.0.14
503
+ =======
504
+ 44395df Bump to 0.0.14
505
+ 0aee952 get rid of dead file
506
+ 596f36c clean up file name
507
+ eac66aa fix passing neo_server instance for traverser-nodes
508
+ d92dfae Neo4j API now using underscores for max_depth, prune_evaluator and return_filter
509
+ d58d273 Looks like its missing a .
510
+ 4b097f9 Make neo server connection available in Relationship objects, either by accessing the connection from the start_node or accessing the connection passed by the initialization. [Issue #6]
511
+
512
+ v0.0.13
513
+ =======
514
+ f47f077 Bump to 0.0.13
515
+ 25f02cd root_node returns same as get_node instead of meta-data
516
+ fdffbdb handle arrays in get_id, thanks to Phuong CAO
517
+
518
+ v0.0.12
519
+ =======
520
+ db4f3db Bump to 0.0.12
521
+ 10c8228 advanced queries of the node and relationship indexes
522
+ 3e41e09 adding new ways to remove nodes and relationships from an index
523
+ 1ede7a9 test tweaks for Travis
524
+ cad9c10 excluding slow tests for now
525
+ 9118a80 typo in relationship readme
526
+
527
+ v0.0.11
528
+ =======
529
+ 6e238ae Bump to 0.0.11
530
+ b32f7e1 adding create node and relationship index
531
+ 0029ce5 adding another example
532
+ 4f1dd0a adding fullpath type
533
+
534
+ v0.0.10
535
+ =======
536
+ 8f9f6df Bump to 0.0.10
537
+ 994d90c fix to v2 authentication
538
+ 590d763 make sure we're actually getting the right node and relationships in the index
539
+ 6dac3ab typo in relationship index, and updating readme to use latest api docs
540
+ ab853ae quick initializer
541
+ 2015a05 working on relationship indexes
542
+
543
+ v0.0.9
544
+ ======
545
+ 64fbdfd Bump to 0.0.9
546
+ 23ca874 Bump to 0.0.8
547
+ 49fe9ac adding authentication options, fixing index tests
548
+
549
+ v0.0.8
550
+ ======
551
+ 4eba8e4 Bump to 0.0.8
552
+ 56f0508 added Ian to contributors
553
+ 517bee3 Updated index methods to Neo4j v1.2.06 API
554
+
555
+ v0.0.7
556
+ ======
557
+ 5032bcc Bump to 0.0.7
558
+ 0dd7b47 adding Node Paths
559
+ 56fdc6e adding paths
560
+ 6b29ca8 try neography at neography.org
561
+ 5fd4f25 Bump to 0.0.6
562
+ da88fba More Phase 2 Functionality
563
+ d3c4887 adding to documentation
564
+ 6c3d33c node relationship specs
565
+ f894aa9 adding tests, wacky way to solve untyped incoming,outgoing and both calls
566
+ 8b20bea Adding methods to node traverser
567
+ 07b30d1 Bump to 0.0.5
568
+ dbaa2ee forgot to add max_threads parameter to readme
569
+ 74204e8 adding relationship tests
570
+ 4e0087d Phase 2: Starting on Relationships
571
+ 7182516 node: new properties in phase 2
572
+ 4541ce9 property deletion
573
+ 9e3b38c adding setter and getter methods
574
+ 54ddb73 more phase 2: adding del and equal to node
575
+ 7b90ece starting phase 2
576
+ 8e66583 started addeding fake bulk operations
577
+ 3570045 Bump to 0.0.4
578
+ 2a6a4bf do not send max depth in traversal if not specified during, added example
579
+ b48276d it's ruby, not java, skip the parenthesis
580
+ 9dce8b7 easier way to do friend suggestions
581
+ 34068ab adding examples and get_relationship
582
+ 7a4edc7 Bump to 0.0.3
583
+ 4d0c88a readme changes
584
+ c3a00a0 added find_id and cleaned up tests
585
+ cafaf2e
586
+ 80cc0f0 typos
587
+ 51bec37 Bump to 0.0.2
588
+ ab93266 doc updates
589
+ 90cb6ed adding traverser
590
+ 77b9011 adding path tests
591
+ 95560ec removing unnecessary dependency
592
+ eb4e18f adding logger dependency
593
+ 4e1cf8f documentation changes, use shortest path as default for path
594
+ e42beda more cleanup
595
+ 611af01 forgot to add the new db path to some delete actions, splitting test file
596
+ e01369f cleaning up
597
+ 93e4fbd adding get_path
598
+ 2bedc62 adding indexes
599
+ 2b93d8e adding set_relationship_properties and reset_relationship_properties
600
+ bb3bda9 adding get_relationship_properties and remove_relationship_properties
601
+ 8245c12 added delete_node (and its relationship) and delete_relationship
602
+ d352e6a adding get_node_relationships
603
+ 081d8e0 added create_relationship
604
+ 100cbbc added delete_node
605
+ d92c2a6 get some properties
606
+ 60e0b4c changed set to reset and added regular set node properties
607
+ 25f1abb added remove_node_properties
608
+ 3bd4035 added get node properties
609
+ 7f57fcb adding get node and set node properties
610
+ ef9f673 Spliting off basic Rest wrapper
611
+ 9a9b24a return nil if trying to get properties of a node or relationship that does not exist
612
+ 3a1cef5 make readme prettier
613
+ 0b5b547 starting on relationships
614
+ 0eff227 adding fakeweb and starting to create fake http responses
615
+ 3e4206d added build_node so we return neo_id on node creates and a few more tests
616
+ bc1f9fc starting with basic functionality
617
+ 1ef9209 bundle gem commit
@@ -42,8 +42,10 @@ module Neography
42
42
 
43
43
  ACTIONS.each do |action|
44
44
  define_method(action) do |path, options = {}|
45
- base = path.start_with?("/unmanaged") ? "" : "/db/data"
46
- query_path = configuration + base + path
45
+ # This ugly hack is required because internal Batch paths do not start with "/db/data"
46
+ # if somebody has a cleaner solution... pull request please!
47
+ path = "/db/data" + path if ["node", "relationship", "transaction", "cypher", "propertykeys", "schema", "label", "labels", "batch", "index", "ext"].include?(path.split("/")[1].split("?").first)
48
+ query_path = configuration + path
47
49
  query_body = merge_options(options)[:body]
48
50
  log path, query_body do
49
51
  evaluate_response(@client.send(action.to_sym, query_path, query_body, merge_options(options)[:headers]), path, query_body)
@@ -57,5 +57,11 @@ module Neography
57
57
  end
58
58
  end
59
59
 
60
+ ##
61
+ # List of labels of current node.
62
+ # Returns array of strings
63
+ def labels
64
+ self.neo_server.get_node_labels(self.neo_id)
65
+ end
60
66
  end
61
67
  end
@@ -437,8 +437,8 @@ module Neography
437
437
 
438
438
  # unmanaged extensions
439
439
 
440
- def post_extension(path, params = {})
441
- @extensions.post(path, params)
440
+ def post_extension(path, params = {}, headers = nil)
441
+ @extensions.post(path, params, headers)
442
442
  end
443
443
 
444
444
  def get_extension(path)
@@ -235,6 +235,115 @@ module Neography
235
235
  end
236
236
  end
237
237
 
238
+ # Spatial
239
+
240
+ def get_spatial
241
+ get Spatial.index_path
242
+ end
243
+
244
+ def add_point_layer(layer, lat = nil, lon = nil)
245
+ post Spatial.add_simple_point_layer_path do
246
+ {
247
+ :layer => layer,
248
+ :lat => lat || "lat",
249
+ :lon => lon || "lon"
250
+ }
251
+ end
252
+ end
253
+
254
+ def add_editable_layer(layer, format = "WKT", node_property_name = "wkt")
255
+ post Spatial.add_editable_layer_path do
256
+ {
257
+ :layer => layer,
258
+ :format => format,
259
+ :nodePropertyName => node_property_name
260
+ }
261
+ end
262
+ end
263
+
264
+ def get_layer(layer)
265
+ post Spatial.get_layer_path do
266
+ {
267
+ :layer => layer
268
+ }
269
+ end
270
+ end
271
+
272
+ def add_geometry_to_layer(layer, geometry)
273
+ post Spatial.add_geometry_to_layer_path do
274
+ {
275
+ :layer => layer,
276
+ :geometry => geometry
277
+ }
278
+ end
279
+ end
280
+
281
+ def edit_geometry_from_layer(layer, geometry, node)
282
+ post Spatial.edit_geometry_from_layer_path do
283
+ {
284
+ :layer => layer,
285
+ :geometry => geometry,
286
+ :geometryNodeId => get_id(node)
287
+ }
288
+ end
289
+ end
290
+
291
+ def add_node_to_layer(layer, node)
292
+ post Spatial.add_node_to_layer_path do
293
+ {
294
+ :layer => layer,
295
+ :node => get_id(node)
296
+ }
297
+ end
298
+ end
299
+
300
+ def find_geometries_in_bbox(layer, minx, maxx, miny, maxy)
301
+ post Spatial.find_geometries_in_bbox_path do
302
+ {
303
+ :layer => layer,
304
+ :minx => minx,
305
+ :maxx => maxx,
306
+ :miny => miny,
307
+ :maxy => maxy
308
+ }
309
+ end
310
+ end
311
+
312
+ def find_geometries_within_distance(layer, pointx, pointy, distance)
313
+ post Spatial.find_geometries_within_distance_path do
314
+ {
315
+ :layer => layer,
316
+ :pointX => pointx,
317
+ :pointY => pointy,
318
+ :distanceInKm => distance
319
+ }
320
+ end
321
+ end
322
+
323
+ def create_spatial_index(name, type, lat, lon)
324
+ post NodeIndexes.all_path do
325
+ {
326
+ :name => name,
327
+ :config => {
328
+ :provider => "spatial",
329
+ :geometry_type => type || "point",
330
+ :lat => lat || "lat",
331
+ :lon => lon || "lon"
332
+ }
333
+ }
334
+ end
335
+ end
336
+
337
+ def add_node_to_spatial_index(index, id)
338
+ post NodeIndexes.base_path(:index => index) do
339
+ {
340
+ :uri => build_node_uri(id),
341
+ :key => "k",
342
+ :value => "v"
343
+ }
344
+ end
345
+ end
346
+
238
347
  def get(to, &block)
239
348
  request "GET", to, &block
240
349
  end
@@ -11,10 +11,10 @@ module Neography
11
11
  @connection.get(path)
12
12
  end
13
13
 
14
- def post(path, body = {})
14
+ def post(path, body = {}, headers = nil)
15
15
  options = {
16
- :body => body.to_json,
17
- :headers => json_content_type.merge({'Accept' => 'application/json;stream=true'})
16
+ :body => headers.nil? ? body.to_json : body,
17
+ :headers => headers || json_content_type.merge({'Accept' => 'application/json;stream=true'})
18
18
  }
19
19
 
20
20
  @connection.post(path, options)
@@ -7,7 +7,7 @@ require 'net/http'
7
7
  namespace :neo4j do
8
8
  desc "Install Neo4j"
9
9
  task :install, :edition, :version do |t, args|
10
- args.with_defaults(:edition => "community", :version => "2.0.0")
10
+ args.with_defaults(:edition => "community", :version => "2.0.1")
11
11
  puts "Installing Neo4j-#{args[:edition]}-#{args[:version]}"
12
12
 
13
13
  if OS::Underlying.windows?
@@ -1,3 +1,3 @@
1
1
  module Neography
2
- VERSION = "1.3.7"
2
+ VERSION = "1.3.8"
3
3
  end
@@ -0,0 +1,28 @@
1
+ require 'spec_helper'
2
+
3
+ describe Neography::Rest do
4
+ before(:each) do
5
+ @neo = Neography::Rest.new(:log_enabled => true)
6
+ end
7
+
8
+ describe "can spatial plugin" do
9
+ it "can do spatial in batch", :neo_is_broken => true do
10
+ properties = {:lat => 60.1, :lon => 15.2}
11
+ node = @neo.create_node(properties)
12
+ batch_result = @neo.batch [:add_point_layer, "restaurantsbatch"],
13
+ [:add_node_to_layer, "restaurantsbatch", node],
14
+ [:get_layer, "restaurantsbatch"],
15
+ [:find_geometries_within_distance, "restaurantsbatch", 60.0,15.0, 100.0],
16
+ [:find_geometries_in_bbox, "restaurantsbatch", 60.0, 60.2, 15.0, 15.3]
17
+ # getting "The transaction is marked for rollback only." errors
18
+ # possibly related to a Cypher Transaction Bug.
19
+ puts batch_result.inspect
20
+ batch_result[0].first["data"]["layer"].should == "restaurantsbatch"
21
+ batch_result[1].first["data"]["lat"].should == properties[:lat]
22
+ batch_result[1].first["data"]["lon"].should == properties[:lon]
23
+ batch_result[2].first["data"]["layer"].should == "restaurantsbatch"
24
+ batch_result[3].first["data"].should_not be_empty
25
+ batch_result[4].first["data"].should_not be_empty
26
+ end
27
+ end
28
+ end
@@ -247,5 +247,14 @@ describe Neography::Node do
247
247
  end
248
248
  end
249
249
 
250
-
250
+ describe 'gets labels' do
251
+ let(:subject) {
252
+ node = Neography::Node.create
253
+ node.neo_server.add_label(node, 'Label')
254
+ node.neo_server.add_label(node, 'Label2')
255
+ node
256
+ }
257
+
258
+ it { subject.labels.should == %w(Label Label2) }
259
+ end
251
260
  end
@@ -304,58 +304,75 @@ describe Neography::Rest do
304
304
  batch_result.first["body"]["data"][0][0]["self"].split('/').last.should == id
305
305
  end
306
306
 
307
- it "can delete a node in batch" do
308
- node1 = @neo.create_node
309
- node2 = @neo.create_node
310
- id1 = node1['self'].split('/').last
311
- id2 = node2['self'].split('/').last
312
- batch_result = @neo.batch [:delete_node, id1 ], [:delete_node, id2]
313
- expect {
314
- @neo.get_node(node1).should be_nil
315
- }.to raise_error Neography::NodeNotFoundException
316
- expect {
317
- @neo.get_node(node2).should be_nil
318
- }.to raise_error Neography::NodeNotFoundException
319
- end
320
-
321
- it "can remove a node from an index in batch " do
322
- index = generate_text(6)
323
- key = generate_text(6)
324
- value1 = generate_text
325
- value2 = generate_text
326
- value3 = generate_text
327
-
328
- node1 = @neo.create_unique_node(index, key, value1, { "name" => "Max" })
329
- node2 = @neo.create_unique_node(index, key, value2, { "name" => "Neo" })
330
- node3 = @neo.create_unique_node(index, key, value3, { "name" => "Samir"})
331
-
332
- batch_result = @neo.batch [:remove_node_from_index, index, key, value1, node1 ],
333
- [:remove_node_from_index, index, key, node2 ],
334
- [:remove_node_from_index, index, node3 ]
335
-
336
- @neo.get_node_index(index, key, value1).should be_nil
337
- @neo.get_node_index(index, key, value2).should be_nil
338
- @neo.get_node_index(index, key, value3).should be_nil
339
- end
340
-
341
- it "can remove a relationship from an index in batch" do
342
- index = generate_text(6)
343
- key = generate_text(6)
344
- value1 = generate_text
345
- value2 = generate_text
346
-
347
- node1 = @neo.create_node
348
- node2 = @neo.create_node
349
- relationship1 = @neo.create_unique_relationship(index, key, value1, "friends", node1, node2)
350
- relationship2 = @neo.create_unique_relationship(index, key, value2, "friends", node2, node1)
351
-
352
- batch_result = @neo.batch [:remove_relationship_from_index, index, key, relationship1],
353
- [:remove_relationship_from_index, index, key, relationship2]
354
-
355
- @neo.get_relationship_index(index, key, value1).should be_nil
356
- @neo.get_relationship_index(index, key, value2).should be_nil
357
- end
358
-
307
+ it "can delete a node in batch" do
308
+ node1 = @neo.create_node
309
+ node2 = @neo.create_node
310
+ id1 = node1['self'].split('/').last
311
+ id2 = node2['self'].split('/').last
312
+ batch_result = @neo.batch [:delete_node, id1 ], [:delete_node, id2]
313
+ expect {
314
+ @neo.get_node(node1).should be_nil
315
+ }.to raise_error Neography::NodeNotFoundException
316
+ expect {
317
+ @neo.get_node(node2).should be_nil
318
+ }.to raise_error Neography::NodeNotFoundException
319
+ end
320
+
321
+ it "can remove a node from an index in batch " do
322
+ index = generate_text(6)
323
+ key = generate_text(6)
324
+ value1 = generate_text
325
+ value2 = generate_text
326
+ value3 = generate_text
327
+
328
+ node1 = @neo.create_unique_node(index, key, value1, { "name" => "Max" })
329
+ node2 = @neo.create_unique_node(index, key, value2, { "name" => "Neo" })
330
+ node3 = @neo.create_unique_node(index, key, value3, { "name" => "Samir"})
331
+
332
+ batch_result = @neo.batch [:remove_node_from_index, index, key, value1, node1 ],
333
+ [:remove_node_from_index, index, key, node2 ],
334
+ [:remove_node_from_index, index, node3 ]
335
+
336
+ @neo.get_node_index(index, key, value1).should be_nil
337
+ @neo.get_node_index(index, key, value2).should be_nil
338
+ @neo.get_node_index(index, key, value3).should be_nil
339
+ end
340
+
341
+ it "can remove a relationship from an index in batch" do
342
+ index = generate_text(6)
343
+ key = generate_text(6)
344
+ value1 = generate_text
345
+ value2 = generate_text
346
+
347
+ node1 = @neo.create_node
348
+ node2 = @neo.create_node
349
+ relationship1 = @neo.create_unique_relationship(index, key, value1, "friends", node1, node2)
350
+ relationship2 = @neo.create_unique_relationship(index, key, value2, "friends", node2, node1)
351
+
352
+ batch_result = @neo.batch [:remove_relationship_from_index, index, key, relationship1],
353
+ [:remove_relationship_from_index, index, key, relationship2]
354
+
355
+ @neo.get_relationship_index(index, key, value1).should be_nil
356
+ @neo.get_relationship_index(index, key, value2).should be_nil
357
+ end
358
+
359
+ it "can do spatial via Cypher in batch" do
360
+ properties = {:lat => 60.1, :lon => 15.2}
361
+ node = @neo.create_node(properties)
362
+ batch_result = @neo.batch [:create_spatial_index, "geobatchcypher", "point", "lat", "lon"],
363
+ [:add_node_to_spatial_index, "geobatchcypher", node],
364
+ [:execute_query, "start n = node:geobatchcypher({withinDistance}) return n", {:withinDistance => "withinDistance:[60.0,15.0,100.0]"}],
365
+ [:execute_query, "start n = node:geobatchcypher({bbox}) return n", {:bbox => "bbox:[15.0,15.3,60.0,60.2]"}]
366
+
367
+ batch_result[0]["body"]["provider"].should == "spatial"
368
+ batch_result[0]["body"]["geometry_type"].should == "point"
369
+ batch_result[0]["body"]["lat"].should == "lat"
370
+ batch_result[0]["body"]["lon"].should == "lon"
371
+ batch_result[1]["from"].should == "/index/node/geobatchcypher"
372
+ batch_result[1]["body"]["data"].should == {"lat" => 60.1, "lon" => 15.2}
373
+ batch_result[2]["body"]["data"].should_not be_empty
374
+ batch_result[3]["body"]["data"].should_not be_empty
375
+ end
359
376
  end
360
377
 
361
378
  describe "referenced batch" do
@@ -492,7 +509,7 @@ describe Neography::Rest do
492
509
  e.message.should == "Not Found"
493
510
  e.code.should == 404
494
511
  e.stacktrace.should be_nil
495
- e.request[:path].should == "/batch"
512
+ e.request[:path].should == "/db/data/batch"
496
513
  e.request[:body].should_not be_nil
497
514
  e.index.should == 3
498
515
  end
@@ -0,0 +1,27 @@
1
+ require 'spec_helper'
2
+
3
+ describe Neography::Rest do
4
+ before(:each) do
5
+ @neo = Neography::Rest.new
6
+ end
7
+
8
+ describe "call unmanaged extensions", :unmanaged_extensions => true do
9
+ it "can call a get based unmanaged extension" do
10
+ results = @neo.get_extension('/example/service/queries/fofof/13343')
11
+ results.should_not be_null
12
+ end
13
+
14
+ it "can call a POST based unmanaged extension" do
15
+ results = @neo.post_extention('/movie/recommend', {"title" => "Rambo"})
16
+ results.should_not be_null
17
+ end
18
+
19
+ it "can call a POST based unmanaged extension that uses form-urlencoded" do
20
+ headers = {'Content-Type' =>'application/x-www-form-urlencoded'}
21
+ results = @neo.post_extention('/music/recommend', {"artist" => "Ministry", "song" => "Just one Fix"}, headers)
22
+ results.should_not be_null
23
+ end
24
+
25
+ end
26
+
27
+ end
data/spec/spec_helper.rb CHANGED
@@ -17,7 +17,7 @@ def generate_text(length=8)
17
17
  end
18
18
 
19
19
  RSpec.configure do |c|
20
- c.filter_run_excluding :slow => true, :gremlin => true, :reference => true
20
+ c.filter_run_excluding :slow => true, :gremlin => true, :reference => true, :neo_is_broken => true, :unmanaged_extensions => true
21
21
  end
22
22
 
23
23
 
@@ -80,23 +80,23 @@ module Neography
80
80
  context "requests" do
81
81
 
82
82
  it "does a GET request" do
83
- connection.client.should_receive(:get).with("http://localhost:7474/db/data/foo/bar", nil, nil) { double.as_null_object }
84
- connection.get("/foo/bar")
83
+ connection.client.should_receive(:get).with("http://localhost:7474/db/data/node/bar", nil, nil) { double.as_null_object }
84
+ connection.get("/node/bar")
85
85
  end
86
86
 
87
87
  it "does a POST request" do
88
- connection.client.should_receive(:post).with("http://localhost:7474/db/data/foo/bar", nil, nil) { double.as_null_object }
89
- connection.post("/foo/bar")
88
+ connection.client.should_receive(:post).with("http://localhost:7474/db/data/node/bar", nil, nil) { double.as_null_object }
89
+ connection.post("/node/bar")
90
90
  end
91
91
 
92
92
  it "does a PUT request" do
93
- connection.client.should_receive(:put).with("http://localhost:7474/db/data/foo/bar", nil, nil) { double.as_null_object }
94
- connection.put("/foo/bar")
93
+ connection.client.should_receive(:put).with("http://localhost:7474/db/data/node/bar", nil, nil) { double.as_null_object }
94
+ connection.put("/node/bar")
95
95
  end
96
96
 
97
97
  it "does a DELETE request" do
98
- connection.client.should_receive(:delete).with("http://localhost:7474/db/data/foo/bar", nil, nil) { double.as_null_object }
99
- connection.delete("/foo/bar")
98
+ connection.client.should_receive(:delete).with("http://localhost:7474/db/data/node/bar", nil, nil) { double.as_null_object }
99
+ connection.delete("/node/bar")
100
100
  end
101
101
 
102
102
  context "authentication" do
@@ -110,25 +110,25 @@ module Neography
110
110
 
111
111
  it "does requests with authentication" do
112
112
  connection.client.should_not_receive(:set_auth).with(
113
- "http://localhost:7474/db/data/foo/bar",
113
+ "http://localhost:7474/db/data/node/bar",
114
114
  "foo",
115
115
  "bar") { double.as_null_object }
116
116
 
117
117
  connection.client.should_receive(:get).with(
118
- "http://localhost:7474/db/data/foo/bar", nil, nil
118
+ "http://localhost:7474/db/data/node/bar", nil, nil
119
119
  ) { double.as_null_object }
120
120
 
121
- connection.get("/foo/bar")
121
+ connection.get("/node/bar")
122
122
  end
123
123
  end
124
124
 
125
125
  it "adds the User-Agent to the headers" do
126
126
  connection.client.should_receive(:get).with(
127
- "http://localhost:7474/db/data/foo/bar",
127
+ "http://localhost:7474/db/data/node/bar",
128
128
  nil, { "User-Agent" => "Neography/#{Neography::VERSION}", "X-Stream"=>true, "max-execution-time"=>6000}
129
129
  ) { double.as_null_object }
130
130
 
131
- connection.get("/foo/bar", :headers => {})
131
+ connection.get("/node/bar", :headers => {})
132
132
  end
133
133
 
134
134
  context "errors" do
@@ -137,7 +137,7 @@ module Neography
137
137
  response = error_response(code: 404, message: "a message", exception: "NodeNotFoundException")
138
138
  connection.client.stub(:get).and_return(response)
139
139
  expect {
140
- connection.get("/foo/bar")
140
+ connection.get("/node/bar")
141
141
  }.to raise_error NodeNotFoundException
142
142
  end
143
143
 
@@ -145,7 +145,7 @@ module Neography
145
145
  response = error_response(code: 409, message: "a message", exception: "OperationFailureException")
146
146
  connection.client.stub(:get).and_return(response)
147
147
  expect {
148
- connection.get("/foo/bar")
148
+ connection.get("/node/bar")
149
149
  }.to raise_error OperationFailureException
150
150
  end
151
151
 
@@ -153,7 +153,7 @@ module Neography
153
153
  response = error_response(code: 400, message: "a message", exception: "PropertyValueException")
154
154
  connection.client.stub(:get).and_return(response)
155
155
  expect {
156
- connection.get("/foo/bar")
156
+ connection.get("/node/bar")
157
157
  }.to raise_error PropertyValueException
158
158
  end
159
159
 
@@ -161,7 +161,7 @@ module Neography
161
161
  response = error_response(code: 404, message: "a message", exception: "NoSuchPropertyException")
162
162
  connection.client.stub(:get).and_return(response)
163
163
  expect {
164
- connection.get("/foo/bar")
164
+ connection.get("/node/bar")
165
165
  }.to raise_error NoSuchPropertyException
166
166
  end
167
167
 
@@ -169,7 +169,7 @@ module Neography
169
169
  response = error_response(code: 404, message: "a message", exception: "RelationshipNotFoundException")
170
170
  connection.client.stub(:get).and_return(response)
171
171
  expect {
172
- connection.get("/foo/bar")
172
+ connection.get("/node/bar")
173
173
  }.to raise_error RelationshipNotFoundException
174
174
  end
175
175
 
@@ -177,7 +177,7 @@ module Neography
177
177
  response = error_response(code: 400, message: "a message", exception: "BadInputException")
178
178
  connection.client.stub(:get).and_return(response)
179
179
  expect {
180
- connection.get("/foo/bar")
180
+ connection.get("/node/bar")
181
181
  }.to raise_error BadInputException
182
182
  end
183
183
 
@@ -185,7 +185,7 @@ module Neography
185
185
  response = error_response(code: 401)
186
186
  connection.client.stub(:get).and_return(response)
187
187
  expect {
188
- connection.get("/foo/bar")
188
+ connection.get("/node/bar")
189
189
  }.to raise_error UnauthorizedError
190
190
  end
191
191
 
@@ -193,7 +193,7 @@ module Neography
193
193
  response = error_response(code: 418, message: "I'm a teapot.")
194
194
  connection.client.stub(:get).and_return(response)
195
195
  expect {
196
- connection.get("/foo/bar")
196
+ connection.get("/node/bar")
197
197
  }.to raise_error NeographyError
198
198
  end
199
199
 
@@ -201,7 +201,7 @@ module Neography
201
201
  response = error_response(code: 500, message: "a message", exception: "JsonParseException")
202
202
  connection.client.stub(:get).and_return(response)
203
203
  expect {
204
- connection.get("/foo/bar")
204
+ connection.get("/node/bar")
205
205
  }.to raise_error NeographyError
206
206
  end
207
207
 
@@ -219,13 +219,13 @@ module Neography
219
219
  let(:request_body) { {key1: :val1} }
220
220
 
221
221
  it "should log query" do
222
- connection.should_receive(:log).with("/foo/bar", request_body).once
223
- connection.get("/foo/bar", {body: request_body})
222
+ connection.should_receive(:log).with("/db/data/node/bar", request_body).once
223
+ connection.get("/node/bar", {body: request_body})
224
224
  end
225
225
 
226
226
  it "should return original response" do
227
227
  connection.stub(:evaluate_response).and_return expected_response
228
- connection.get("/foo/bar").should eq expected_response
228
+ connection.get("/node/bar").should eq expected_response
229
229
  end
230
230
 
231
231
  describe "slow_log_threshold" do
@@ -247,7 +247,7 @@ module Neography
247
247
  end
248
248
 
249
249
  after do
250
- connection.get("/foo/bar", {body: request_body})
250
+ connection.get("/node/bar", {body: request_body})
251
251
  end
252
252
  end
253
253
 
@@ -256,4 +256,4 @@ module Neography
256
256
  end
257
257
  end
258
258
 
259
- class Foo; end
259
+ class Foo; end
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.7
4
+ version: 1.3.8
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-27 00:00:00.000000000 Z
11
+ date: 2014-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -145,8 +145,10 @@ extra_rdoc_files: []
145
145
  files:
146
146
  - .gitignore
147
147
  - .project
148
+ - .rspec
148
149
  - .travis.yml
149
150
  - CONTRIBUTORS
151
+ - ChangeLog
150
152
  - Gemfile
151
153
  - LICENSE
152
154
  - README.md
@@ -208,6 +210,7 @@ files:
208
210
  - lib/neography/version.rb
209
211
  - neography.gemspec
210
212
  - spec/integration/authorization_spec.rb
213
+ - spec/integration/broken_spatial_spec.rb
211
214
  - spec/integration/index_spec.rb
212
215
  - spec/integration/neography_spec.rb
213
216
  - spec/integration/node_encoding_spec.rb
@@ -235,6 +238,7 @@ files:
235
238
  - spec/integration/rest_spatial_spec.rb
236
239
  - spec/integration/rest_transaction_spec.rb
237
240
  - spec/integration/rest_traverse_spec.rb
241
+ - spec/integration/unmanaged_spec.rb
238
242
  - spec/matchers.rb
239
243
  - spec/neography_spec.rb
240
244
  - spec/spec_helper.rb
@@ -290,6 +294,7 @@ specification_version: 4
290
294
  summary: ruby wrapper to Neo4j Rest API
291
295
  test_files:
292
296
  - spec/integration/authorization_spec.rb
297
+ - spec/integration/broken_spatial_spec.rb
293
298
  - spec/integration/index_spec.rb
294
299
  - spec/integration/neography_spec.rb
295
300
  - spec/integration/node_encoding_spec.rb
@@ -317,6 +322,7 @@ test_files:
317
322
  - spec/integration/rest_spatial_spec.rb
318
323
  - spec/integration/rest_transaction_spec.rb
319
324
  - spec/integration/rest_traverse_spec.rb
325
+ - spec/integration/unmanaged_spec.rb
320
326
  - spec/matchers.rb
321
327
  - spec/neography_spec.rb
322
328
  - spec/spec_helper.rb