keymaker 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/README.md +71 -11
  2. data/Rakefile +1 -1
  3. data/keymaker.gemspec +46 -15
  4. data/lib/keymaker.rb +25 -12
  5. data/lib/keymaker/configuration.rb +4 -0
  6. data/lib/keymaker/errors.rb +22 -0
  7. data/lib/keymaker/match_method.rb +24 -0
  8. data/lib/keymaker/request.rb +2 -1
  9. data/lib/keymaker/{add_node_to_index_request.rb → requests/add_node_to_index_request.rb} +0 -0
  10. data/lib/keymaker/requests/batch_get_nodes_request.rb +24 -0
  11. data/lib/keymaker/requests/batch_request.rb +18 -0
  12. data/lib/keymaker/{create_node_request.rb → requests/create_node_request.rb} +0 -0
  13. data/lib/keymaker/{create_relationship_request.rb → requests/create_relationship_request.rb} +0 -0
  14. data/lib/keymaker/requests/delete_node_request.rb +18 -0
  15. data/lib/keymaker/{delete_relationship_request.rb → requests/delete_relationship_request.rb} +0 -0
  16. data/lib/keymaker/{execute_cypher_request.rb → requests/execute_cypher_request.rb} +0 -0
  17. data/lib/keymaker/{execute_gremlin_request.rb → requests/execute_gremlin_request.rb} +0 -0
  18. data/lib/keymaker/requests/get_node_request.rb +16 -0
  19. data/lib/keymaker/requests/get_relationship_types_request.rb +18 -0
  20. data/lib/keymaker/{path_traverse_request.rb → requests/path_traverse_request.rb} +0 -0
  21. data/lib/keymaker/{remove_node_from_index_request.rb → requests/remove_node_from_index_request.rb} +0 -0
  22. data/lib/keymaker/requests/service_root_request.rb +11 -0
  23. data/lib/keymaker/{update_node_properties_request.rb → requests/update_node_properties_request.rb} +0 -0
  24. data/lib/keymaker/response.rb +8 -1
  25. data/lib/keymaker/service.rb +17 -43
  26. data/spec/cassettes/Keymaker_AddNodeToIndexRequest/returns_a_201_status_code.yml +204 -0
  27. data/spec/cassettes/Keymaker_AddNodeToIndexRequest/returns_application/json.yml +204 -0
  28. data/spec/cassettes/Keymaker_AddNodeToIndexRequest/returns_the_Neo4j_REST_API_starting_point_response_request.yml +204 -0
  29. data/spec/cassettes/Keymaker_BatchRequest/when_a_resource_is_not_found/raises_BatchRequestError.yml +120 -0
  30. data/spec/cassettes/Keymaker_BatchRequest/when_to_and_method_are_not_set/raises_BatchRequestError.yml +106 -0
  31. data/spec/cassettes/Keymaker_BatchRequest/with_valid_options/returns_a_200_status_code.yml +129 -0
  32. data/spec/cassettes/Keymaker_BatchRequest/with_valid_options/runs_the_commands_and_returns_their_respective_results.yml +129 -0
  33. data/spec/cassettes/Keymaker_GetNodeRequest/with_a_non-existent_node_id/raises_ResourceNotFound.yml +101 -0
  34. data/spec/cassettes/Keymaker_GetNodeRequest/with_an_empty_node_id/raises_ClientError.yml +111 -0
  35. data/spec/cassettes/Keymaker_GetRelationshipTypesRequest/with_existing_relationships/returns_a_unique_array_of_relationship_types.yml +220 -0
  36. data/spec/cassettes/Keymaker_ServiceRootRequest/returns_a_200_status_code.yml +105 -0
  37. data/spec/cassettes/Keymaker_ServiceRootRequest/returns_application/json.yml +105 -0
  38. data/spec/cassettes/Keymaker_ServiceRootRequest/returns_the_Neo4j_REST_API_starting_point_response_request.yml +105 -0
  39. data/spec/{keymaker/configuration_spec.rb → configuration_spec.rb} +0 -0
  40. data/spec/keymaker/requests/add_node_to_index_request_spec.rb +41 -0
  41. data/spec/keymaker/requests/batch_get_nodes_request_spec.rb +23 -0
  42. data/spec/keymaker/requests/batch_request_spec.rb +115 -0
  43. data/spec/keymaker/requests/delete_node_request_spec.rb +37 -0
  44. data/spec/keymaker/requests/get_node_request_spec.rb +24 -0
  45. data/spec/keymaker/requests/get_relationship_types_request_spec.rb +17 -0
  46. data/spec/keymaker/requests/service_root_request_spec.rb +35 -0
  47. data/spec/{keymaker/service_spec.rb → service_spec.rb} +0 -0
  48. data/spec/support/vcr.rb +8 -0
  49. metadata +116 -19
  50. data/lib/keymaker/batch_get_nodes_request.rb +0 -19
@@ -0,0 +1,204 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://localhost:7477/db/data/ext/GremlinPlugin/graphdb/execute_script
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"script":"g.clear();g.V()"}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: !!null
16
+ headers:
17
+ content-length:
18
+ - '3'
19
+ content-encoding:
20
+ - UTF-8
21
+ content-type:
22
+ - application/json
23
+ access-control-allow-origin:
24
+ - ! '*'
25
+ connection:
26
+ - close
27
+ server:
28
+ - Jetty(6.1.25)
29
+ body:
30
+ encoding: US-ASCII
31
+ string: ! '[ ]'
32
+ http_version: !!null
33
+ recorded_at: Fri, 06 Jul 2012 02:25:17 GMT
34
+ - request:
35
+ method: delete
36
+ uri: http://localhost:7477/db/data/index/node/users
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ''
40
+ headers: {}
41
+ response:
42
+ status:
43
+ code: 404
44
+ message: !!null
45
+ headers:
46
+ content-length:
47
+ - '470'
48
+ content-encoding:
49
+ - UTF-8
50
+ content-type:
51
+ - application/json
52
+ access-control-allow-origin:
53
+ - ! '*'
54
+ connection:
55
+ - close
56
+ server:
57
+ - Jetty(6.1.25)
58
+ body:
59
+ encoding: US-ASCII
60
+ string: ! "{\n \"message\" : \"No node index named 'users'.\",\n \"exception\"
61
+ : \"org.neo4j.graphdb.NotFoundException: No node index named 'users'.\",\n
62
+ \ \"stacktrace\" : [ \"org.neo4j.server.rest.web.DatabaseActions.removeNodeIndex(DatabaseActions.java:421)\",
63
+ \"org.neo4j.server.rest.web.RestfulGraphDatabase.deleteNodeIndex(RestfulGraphDatabase.java:729)\",
64
+ \"java.lang.reflect.Method.invoke(Method.java:597)\", \"org.neo4j.server.statistic.StatisticFilter.doFilter(StatisticFilter.java:62)\"
65
+ ]\n}"
66
+ http_version: !!null
67
+ recorded_at: Fri, 06 Jul 2012 02:25:17 GMT
68
+ - request:
69
+ method: post
70
+ uri: http://localhost:7477/db/data/node
71
+ body:
72
+ encoding: UTF-8
73
+ string: ! '{"email":"john@resistance.net"}'
74
+ headers:
75
+ Content-Type:
76
+ - application/json
77
+ response:
78
+ status:
79
+ code: 201
80
+ message: !!null
81
+ headers:
82
+ content-length:
83
+ - '1150'
84
+ location:
85
+ - http://localhost:7477/db/data/node/1004
86
+ content-encoding:
87
+ - UTF-8
88
+ content-type:
89
+ - application/json
90
+ access-control-allow-origin:
91
+ - ! '*'
92
+ connection:
93
+ - close
94
+ server:
95
+ - Jetty(6.1.25)
96
+ body:
97
+ encoding: US-ASCII
98
+ string: ! "{\n \"outgoing_relationships\" : \"http://localhost:7477/db/data/node/1004/relationships/out\",\n
99
+ \ \"data\" : {\n \"email\" : \"john@resistance.net\"\n },\n \"traverse\"
100
+ : \"http://localhost:7477/db/data/node/1004/traverse/{returnType}\",\n \"all_typed_relationships\"
101
+ : \"http://localhost:7477/db/data/node/1004/relationships/all/{-list|&|types}\",\n
102
+ \ \"property\" : \"http://localhost:7477/db/data/node/1004/properties/{key}\",\n
103
+ \ \"self\" : \"http://localhost:7477/db/data/node/1004\",\n \"properties\"
104
+ : \"http://localhost:7477/db/data/node/1004/properties\",\n \"outgoing_typed_relationships\"
105
+ : \"http://localhost:7477/db/data/node/1004/relationships/out/{-list|&|types}\",\n
106
+ \ \"incoming_relationships\" : \"http://localhost:7477/db/data/node/1004/relationships/in\",\n
107
+ \ \"extensions\" : {\n },\n \"create_relationship\" : \"http://localhost:7477/db/data/node/1004/relationships\",\n
108
+ \ \"paged_traverse\" : \"http://localhost:7477/db/data/node/1004/paged/traverse/{returnType}{?pageSize,leaseTime}\",\n
109
+ \ \"all_relationships\" : \"http://localhost:7477/db/data/node/1004/relationships/all\",\n
110
+ \ \"incoming_typed_relationships\" : \"http://localhost:7477/db/data/node/1004/relationships/in/{-list|&|types}\"\n}"
111
+ http_version: !!null
112
+ recorded_at: Fri, 06 Jul 2012 02:25:17 GMT
113
+ - request:
114
+ method: post
115
+ uri: http://localhost:7477/db/data/node
116
+ body:
117
+ encoding: UTF-8
118
+ string: ! '{"email":"sarah@resistance.net"}'
119
+ headers:
120
+ Content-Type:
121
+ - application/json
122
+ response:
123
+ status:
124
+ code: 201
125
+ message: !!null
126
+ headers:
127
+ content-length:
128
+ - '1151'
129
+ location:
130
+ - http://localhost:7477/db/data/node/1005
131
+ content-encoding:
132
+ - UTF-8
133
+ content-type:
134
+ - application/json
135
+ access-control-allow-origin:
136
+ - ! '*'
137
+ connection:
138
+ - close
139
+ server:
140
+ - Jetty(6.1.25)
141
+ body:
142
+ encoding: US-ASCII
143
+ string: ! "{\n \"outgoing_relationships\" : \"http://localhost:7477/db/data/node/1005/relationships/out\",\n
144
+ \ \"data\" : {\n \"email\" : \"sarah@resistance.net\"\n },\n \"traverse\"
145
+ : \"http://localhost:7477/db/data/node/1005/traverse/{returnType}\",\n \"all_typed_relationships\"
146
+ : \"http://localhost:7477/db/data/node/1005/relationships/all/{-list|&|types}\",\n
147
+ \ \"property\" : \"http://localhost:7477/db/data/node/1005/properties/{key}\",\n
148
+ \ \"self\" : \"http://localhost:7477/db/data/node/1005\",\n \"properties\"
149
+ : \"http://localhost:7477/db/data/node/1005/properties\",\n \"outgoing_typed_relationships\"
150
+ : \"http://localhost:7477/db/data/node/1005/relationships/out/{-list|&|types}\",\n
151
+ \ \"incoming_relationships\" : \"http://localhost:7477/db/data/node/1005/relationships/in\",\n
152
+ \ \"extensions\" : {\n },\n \"create_relationship\" : \"http://localhost:7477/db/data/node/1005/relationships\",\n
153
+ \ \"paged_traverse\" : \"http://localhost:7477/db/data/node/1005/paged/traverse/{returnType}{?pageSize,leaseTime}\",\n
154
+ \ \"all_relationships\" : \"http://localhost:7477/db/data/node/1005/relationships/all\",\n
155
+ \ \"incoming_typed_relationships\" : \"http://localhost:7477/db/data/node/1005/relationships/in/{-list|&|types}\"\n}"
156
+ http_version: !!null
157
+ recorded_at: Fri, 06 Jul 2012 02:25:17 GMT
158
+ - request:
159
+ method: post
160
+ uri: http://localhost:7477/db/data/index/node/users
161
+ body:
162
+ encoding: UTF-8
163
+ string: ! '{"key":"email","value":"john@resistance.net","uri":"http://localhost:7477/db/data/node/1004"}'
164
+ headers:
165
+ Content-Type:
166
+ - application/json
167
+ response:
168
+ status:
169
+ code: 201
170
+ message: !!null
171
+ headers:
172
+ content-length:
173
+ - '1247'
174
+ location:
175
+ - http://localhost:7477/db/data/index/node/users/email/john%40resistance.net/1004
176
+ content-encoding:
177
+ - UTF-8
178
+ content-type:
179
+ - application/json
180
+ access-control-allow-origin:
181
+ - ! '*'
182
+ connection:
183
+ - close
184
+ server:
185
+ - Jetty(6.1.25)
186
+ body:
187
+ encoding: US-ASCII
188
+ string: ! "{\n \"indexed\" : \"http://localhost:7477/db/data/index/node/users/email/john%40resistance.net/1004\",\n
189
+ \ \"outgoing_relationships\" : \"http://localhost:7477/db/data/node/1004/relationships/out\",\n
190
+ \ \"data\" : {\n \"email\" : \"john@resistance.net\"\n },\n \"traverse\"
191
+ : \"http://localhost:7477/db/data/node/1004/traverse/{returnType}\",\n \"all_typed_relationships\"
192
+ : \"http://localhost:7477/db/data/node/1004/relationships/all/{-list|&|types}\",\n
193
+ \ \"property\" : \"http://localhost:7477/db/data/node/1004/properties/{key}\",\n
194
+ \ \"self\" : \"http://localhost:7477/db/data/node/1004\",\n \"properties\"
195
+ : \"http://localhost:7477/db/data/node/1004/properties\",\n \"outgoing_typed_relationships\"
196
+ : \"http://localhost:7477/db/data/node/1004/relationships/out/{-list|&|types}\",\n
197
+ \ \"incoming_relationships\" : \"http://localhost:7477/db/data/node/1004/relationships/in\",\n
198
+ \ \"extensions\" : {\n },\n \"create_relationship\" : \"http://localhost:7477/db/data/node/1004/relationships\",\n
199
+ \ \"paged_traverse\" : \"http://localhost:7477/db/data/node/1004/paged/traverse/{returnType}{?pageSize,leaseTime}\",\n
200
+ \ \"all_relationships\" : \"http://localhost:7477/db/data/node/1004/relationships/all\",\n
201
+ \ \"incoming_typed_relationships\" : \"http://localhost:7477/db/data/node/1004/relationships/in/{-list|&|types}\"\n}"
202
+ http_version: !!null
203
+ recorded_at: Fri, 06 Jul 2012 02:25:17 GMT
204
+ recorded_with: VCR 2.2.2
@@ -0,0 +1,120 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://localhost:7477/db/data/ext/GremlinPlugin/graphdb/execute_script
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"script":"g.clear();g.V()"}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: !!null
16
+ headers:
17
+ content-length:
18
+ - '3'
19
+ content-encoding:
20
+ - UTF-8
21
+ content-type:
22
+ - application/json
23
+ access-control-allow-origin:
24
+ - ! '*'
25
+ connection:
26
+ - close
27
+ server:
28
+ - Jetty(6.1.25)
29
+ body:
30
+ encoding: US-ASCII
31
+ string: ! '[ ]'
32
+ http_version: !!null
33
+ recorded_at: Tue, 10 Jul 2012 02:33:49 GMT
34
+ - request:
35
+ method: delete
36
+ uri: http://localhost:7477/db/data/index/node/users
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ''
40
+ headers: {}
41
+ response:
42
+ status:
43
+ code: 404
44
+ message: !!null
45
+ headers:
46
+ content-length:
47
+ - '422'
48
+ content-encoding:
49
+ - UTF-8
50
+ content-type:
51
+ - application/json
52
+ access-control-allow-origin:
53
+ - ! '*'
54
+ connection:
55
+ - close
56
+ server:
57
+ - Jetty(6.1.25)
58
+ body:
59
+ encoding: US-ASCII
60
+ string: ! "{\n \"message\" : \"No node index named 'users'.\",\n \"exception\"
61
+ : \"NotFoundException\",\n \"stacktrace\" : [ \"org.neo4j.server.rest.web.DatabaseActions.removeNodeIndex(DatabaseActions.java:420)\",
62
+ \"org.neo4j.server.rest.web.RestfulGraphDatabase.deleteNodeIndex(RestfulGraphDatabase.java:729)\",
63
+ \"java.lang.reflect.Method.invoke(Method.java:597)\", \"org.neo4j.server.statistic.StatisticFilter.doFilter(StatisticFilter.java:62)\"
64
+ ]\n}"
65
+ http_version: !!null
66
+ recorded_at: Tue, 10 Jul 2012 02:33:49 GMT
67
+ - request:
68
+ method: post
69
+ uri: http://localhost:7477/db/data/batch
70
+ body:
71
+ encoding: UTF-8
72
+ string: ! '[{"method":"GET","to":"/node/999999999"}]'
73
+ headers:
74
+ Content-Type:
75
+ - application/json
76
+ response:
77
+ status:
78
+ code: 500
79
+ message: !!null
80
+ headers:
81
+ content-length:
82
+ - '2172'
83
+ content-encoding:
84
+ - UTF-8
85
+ content-type:
86
+ - application/json
87
+ access-control-allow-origin:
88
+ - ! '*'
89
+ connection:
90
+ - close
91
+ server:
92
+ - Jetty(6.1.25)
93
+ body:
94
+ encoding: US-ASCII
95
+ string: ! "{\n \"message\" : \"{\\n \\\"message\\\" : \\\"Cannot find node
96
+ with id [999999999] in database.\\\",\\n \\\"exception\\\" : \\\"NodeNotFoundException\\\",\\n
97
+ \ \\\"stacktrace\\\" : [ \\\"org.neo4j.server.rest.web.DatabaseActions.node(DatabaseActions.java:123)\\\",
98
+ \\\"org.neo4j.server.rest.web.DatabaseActions.getNode(DatabaseActions.java:234)\\\",
99
+ \\\"org.neo4j.server.rest.web.RestfulGraphDatabase.getNode(RestfulGraphDatabase.java:225)\\\",
100
+ \\\"java.lang.reflect.Method.invoke(Method.java:597)\\\", \\\"org.neo4j.server.statistic.StatisticFilter.doFilter(StatisticFilter.java:62)\\\",
101
+ \\\"org.neo4j.server.web.Jetty6WebServer.invokeDirectly(Jetty6WebServer.java:270)\\\",
102
+ \\\"org.neo4j.server.rest.batch.NonStreamingBatchOperations.invoke(NonStreamingBatchOperations.java:55)\\\",
103
+ \\\"org.neo4j.server.rest.batch.BatchOperations.performRequest(BatchOperations.java:178)\\\",
104
+ \\\"org.neo4j.server.rest.batch.BatchOperations.parseAndPerform(BatchOperations.java:149)\\\",
105
+ \\\"org.neo4j.server.rest.batch.NonStreamingBatchOperations.performBatchJobs(NonStreamingBatchOperations.java:48)\\\",
106
+ \\\"org.neo4j.server.rest.web.BatchOperationService.batchProcess(BatchOperationService.java:117)\\\",
107
+ \\\"org.neo4j.server.rest.web.BatchOperationService.performBatchOperations(BatchOperationService.java:71)\\\",
108
+ \\\"java.lang.reflect.Method.invoke(Method.java:597)\\\", \\\"org.neo4j.server.statistic.StatisticFilter.doFilter(StatisticFilter.java:62)\\\"
109
+ ]\\n}\",\n \"exception\" : \"BatchOperationFailedException\",\n \"stacktrace\"
110
+ : [ \"org.neo4j.server.rest.batch.NonStreamingBatchOperations.invoke(NonStreamingBatchOperations.java:63)\",
111
+ \"org.neo4j.server.rest.batch.BatchOperations.performRequest(BatchOperations.java:178)\",
112
+ \"org.neo4j.server.rest.batch.BatchOperations.parseAndPerform(BatchOperations.java:149)\",
113
+ \"org.neo4j.server.rest.batch.NonStreamingBatchOperations.performBatchJobs(NonStreamingBatchOperations.java:48)\",
114
+ \"org.neo4j.server.rest.web.BatchOperationService.batchProcess(BatchOperationService.java:117)\",
115
+ \"org.neo4j.server.rest.web.BatchOperationService.performBatchOperations(BatchOperationService.java:71)\",
116
+ \"java.lang.reflect.Method.invoke(Method.java:597)\", \"org.neo4j.server.statistic.StatisticFilter.doFilter(StatisticFilter.java:62)\"
117
+ ]\n}"
118
+ http_version: !!null
119
+ recorded_at: Tue, 10 Jul 2012 02:33:49 GMT
120
+ recorded_with: VCR 2.2.2
@@ -0,0 +1,106 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://localhost:7477/db/data/ext/GremlinPlugin/graphdb/execute_script
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"script":"g.clear();g.V()"}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: !!null
16
+ headers:
17
+ content-length:
18
+ - '3'
19
+ content-encoding:
20
+ - UTF-8
21
+ content-type:
22
+ - application/json
23
+ access-control-allow-origin:
24
+ - ! '*'
25
+ connection:
26
+ - close
27
+ server:
28
+ - Jetty(6.1.25)
29
+ body:
30
+ encoding: US-ASCII
31
+ string: ! '[ ]'
32
+ http_version: !!null
33
+ recorded_at: Tue, 10 Jul 2012 02:33:49 GMT
34
+ - request:
35
+ method: delete
36
+ uri: http://localhost:7477/db/data/index/node/users
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ''
40
+ headers: {}
41
+ response:
42
+ status:
43
+ code: 404
44
+ message: !!null
45
+ headers:
46
+ content-length:
47
+ - '422'
48
+ content-encoding:
49
+ - UTF-8
50
+ content-type:
51
+ - application/json
52
+ access-control-allow-origin:
53
+ - ! '*'
54
+ connection:
55
+ - close
56
+ server:
57
+ - Jetty(6.1.25)
58
+ body:
59
+ encoding: US-ASCII
60
+ string: ! "{\n \"message\" : \"No node index named 'users'.\",\n \"exception\"
61
+ : \"NotFoundException\",\n \"stacktrace\" : [ \"org.neo4j.server.rest.web.DatabaseActions.removeNodeIndex(DatabaseActions.java:420)\",
62
+ \"org.neo4j.server.rest.web.RestfulGraphDatabase.deleteNodeIndex(RestfulGraphDatabase.java:729)\",
63
+ \"java.lang.reflect.Method.invoke(Method.java:597)\", \"org.neo4j.server.statistic.StatisticFilter.doFilter(StatisticFilter.java:62)\"
64
+ ]\n}"
65
+ http_version: !!null
66
+ recorded_at: Tue, 10 Jul 2012 02:33:49 GMT
67
+ - request:
68
+ method: post
69
+ uri: http://localhost:7477/db/data/batch
70
+ body:
71
+ encoding: UTF-8
72
+ string: ! '[{"foo":"WET","ot":"/node/1"}]'
73
+ headers:
74
+ Content-Type:
75
+ - application/json
76
+ response:
77
+ status:
78
+ code: 500
79
+ message: !!null
80
+ headers:
81
+ content-length:
82
+ - '816'
83
+ content-encoding:
84
+ - UTF-8
85
+ content-type:
86
+ - application/json
87
+ access-control-allow-origin:
88
+ - ! '*'
89
+ connection:
90
+ - close
91
+ server:
92
+ - Jetty(6.1.25)
93
+ body:
94
+ encoding: US-ASCII
95
+ string: ! "{\n \"message\" : \"\",\n \"exception\" : \"BatchOperationFailedException\",\n
96
+ \ \"stacktrace\" : [ \"org.neo4j.server.rest.batch.NonStreamingBatchOperations.invoke(NonStreamingBatchOperations.java:63)\",
97
+ \"org.neo4j.server.rest.batch.BatchOperations.performRequest(BatchOperations.java:178)\",
98
+ \"org.neo4j.server.rest.batch.BatchOperations.parseAndPerform(BatchOperations.java:149)\",
99
+ \"org.neo4j.server.rest.batch.NonStreamingBatchOperations.performBatchJobs(NonStreamingBatchOperations.java:48)\",
100
+ \"org.neo4j.server.rest.web.BatchOperationService.batchProcess(BatchOperationService.java:117)\",
101
+ \"org.neo4j.server.rest.web.BatchOperationService.performBatchOperations(BatchOperationService.java:71)\",
102
+ \"java.lang.reflect.Method.invoke(Method.java:597)\", \"org.neo4j.server.statistic.StatisticFilter.doFilter(StatisticFilter.java:62)\"
103
+ ]\n}"
104
+ http_version: !!null
105
+ recorded_at: Tue, 10 Jul 2012 02:33:49 GMT
106
+ recorded_with: VCR 2.2.2
@@ -0,0 +1,129 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://localhost:7477/db/data/ext/GremlinPlugin/graphdb/execute_script
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"script":"g.clear();g.V()"}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: !!null
16
+ headers:
17
+ content-length:
18
+ - '3'
19
+ content-encoding:
20
+ - UTF-8
21
+ content-type:
22
+ - application/json
23
+ access-control-allow-origin:
24
+ - ! '*'
25
+ connection:
26
+ - close
27
+ server:
28
+ - Jetty(6.1.25)
29
+ body:
30
+ encoding: US-ASCII
31
+ string: ! '[ ]'
32
+ http_version: !!null
33
+ recorded_at: Tue, 10 Jul 2012 02:33:49 GMT
34
+ - request:
35
+ method: delete
36
+ uri: http://localhost:7477/db/data/index/node/users
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ''
40
+ headers: {}
41
+ response:
42
+ status:
43
+ code: 404
44
+ message: !!null
45
+ headers:
46
+ content-length:
47
+ - '422'
48
+ content-encoding:
49
+ - UTF-8
50
+ content-type:
51
+ - application/json
52
+ access-control-allow-origin:
53
+ - ! '*'
54
+ connection:
55
+ - close
56
+ server:
57
+ - Jetty(6.1.25)
58
+ body:
59
+ encoding: US-ASCII
60
+ string: ! "{\n \"message\" : \"No node index named 'users'.\",\n \"exception\"
61
+ : \"NotFoundException\",\n \"stacktrace\" : [ \"org.neo4j.server.rest.web.DatabaseActions.removeNodeIndex(DatabaseActions.java:420)\",
62
+ \"org.neo4j.server.rest.web.RestfulGraphDatabase.deleteNodeIndex(RestfulGraphDatabase.java:729)\",
63
+ \"java.lang.reflect.Method.invoke(Method.java:597)\", \"org.neo4j.server.statistic.StatisticFilter.doFilter(StatisticFilter.java:62)\"
64
+ ]\n}"
65
+ http_version: !!null
66
+ recorded_at: Tue, 10 Jul 2012 02:33:49 GMT
67
+ - request:
68
+ method: post
69
+ uri: http://localhost:7477/db/data/batch
70
+ body:
71
+ encoding: UTF-8
72
+ string: ! '[{"method":"POST","to":"/node","id":0,"body":{"name":"John Connor"}},{"method":"POST","to":"/node","id":1,"body":{"name":"Sarah
73
+ Connor"}},{"method":"POST","to":"{0}/relationships","id":3,"body":{"to":"{1}","data":{"since":"1985"},"type":"knows"}}]'
74
+ headers:
75
+ Content-Type:
76
+ - application/json
77
+ response:
78
+ status:
79
+ code: 200
80
+ message: !!null
81
+ headers:
82
+ content-encoding:
83
+ - UTF-8
84
+ content-type:
85
+ - application/json
86
+ access-control-allow-origin:
87
+ - ! '*'
88
+ connection:
89
+ - close
90
+ server:
91
+ - Jetty(6.1.25)
92
+ body:
93
+ encoding: US-ASCII
94
+ string: ! "[{\"id\":0,\"location\":\"http://localhost:7477/db/data/node/28\",\"body\":{\n
95
+ \ \"extensions\" : {\n },\n \"paged_traverse\" : \"http://localhost:7477/db/data/node/28/paged/traverse/{returnType}{?pageSize,leaseTime}\",\n
96
+ \ \"outgoing_relationships\" : \"http://localhost:7477/db/data/node/28/relationships/out\",\n
97
+ \ \"traverse\" : \"http://localhost:7477/db/data/node/28/traverse/{returnType}\",\n
98
+ \ \"all_typed_relationships\" : \"http://localhost:7477/db/data/node/28/relationships/all/{-list|&|types}\",\n
99
+ \ \"property\" : \"http://localhost:7477/db/data/node/28/properties/{key}\",\n
100
+ \ \"all_relationships\" : \"http://localhost:7477/db/data/node/28/relationships/all\",\n
101
+ \ \"self\" : \"http://localhost:7477/db/data/node/28\",\n \"properties\"
102
+ : \"http://localhost:7477/db/data/node/28/properties\",\n \"outgoing_typed_relationships\"
103
+ : \"http://localhost:7477/db/data/node/28/relationships/out/{-list|&|types}\",\n
104
+ \ \"incoming_relationships\" : \"http://localhost:7477/db/data/node/28/relationships/in\",\n
105
+ \ \"incoming_typed_relationships\" : \"http://localhost:7477/db/data/node/28/relationships/in/{-list|&|types}\",\n
106
+ \ \"create_relationship\" : \"http://localhost:7477/db/data/node/28/relationships\",\n
107
+ \ \"data\" : {\n \"name\" : \"John Connor\"\n }\n},\"from\":\"/node\"},{\"id\":1,\"location\":\"http://localhost:7477/db/data/node/29\",\"body\":{\n
108
+ \ \"extensions\" : {\n },\n \"paged_traverse\" : \"http://localhost:7477/db/data/node/29/paged/traverse/{returnType}{?pageSize,leaseTime}\",\n
109
+ \ \"outgoing_relationships\" : \"http://localhost:7477/db/data/node/29/relationships/out\",\n
110
+ \ \"traverse\" : \"http://localhost:7477/db/data/node/29/traverse/{returnType}\",\n
111
+ \ \"all_typed_relationships\" : \"http://localhost:7477/db/data/node/29/relationships/all/{-list|&|types}\",\n
112
+ \ \"property\" : \"http://localhost:7477/db/data/node/29/properties/{key}\",\n
113
+ \ \"all_relationships\" : \"http://localhost:7477/db/data/node/29/relationships/all\",\n
114
+ \ \"self\" : \"http://localhost:7477/db/data/node/29\",\n \"properties\"
115
+ : \"http://localhost:7477/db/data/node/29/properties\",\n \"outgoing_typed_relationships\"
116
+ : \"http://localhost:7477/db/data/node/29/relationships/out/{-list|&|types}\",\n
117
+ \ \"incoming_relationships\" : \"http://localhost:7477/db/data/node/29/relationships/in\",\n
118
+ \ \"incoming_typed_relationships\" : \"http://localhost:7477/db/data/node/29/relationships/in/{-list|&|types}\",\n
119
+ \ \"create_relationship\" : \"http://localhost:7477/db/data/node/29/relationships\",\n
120
+ \ \"data\" : {\n \"name\" : \"Sarah Connor\"\n }\n},\"from\":\"/node\"},{\"id\":3,\"location\":\"http://localhost:7477/db/data/relationship/3\",\"body\":{\n
121
+ \ \"extensions\" : {\n },\n \"start\" : \"http://localhost:7477/db/data/node/28\",\n
122
+ \ \"property\" : \"http://localhost:7477/db/data/relationship/3/properties/{key}\",\n
123
+ \ \"self\" : \"http://localhost:7477/db/data/relationship/3\",\n \"properties\"
124
+ : \"http://localhost:7477/db/data/relationship/3/properties\",\n \"type\"
125
+ : \"knows\",\n \"end\" : \"http://localhost:7477/db/data/node/29\",\n \"data\"
126
+ : {\n \"since\" : \"1985\"\n }\n},\"from\":\"http://localhost:7477/db/data/node/28/relationships\"}]"
127
+ http_version: !!null
128
+ recorded_at: Tue, 10 Jul 2012 02:33:49 GMT
129
+ recorded_with: VCR 2.2.2