keymaker 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +36 -10
- data/keymaker.gemspec +37 -33
- data/lib/keymaker.rb +3 -2
- data/lib/keymaker/configuration.rb +14 -24
- data/lib/keymaker/node.rb +1 -1
- data/lib/keymaker/request.rb +0 -2
- data/lib/keymaker/requests/add_node_to_index_request.rb +10 -1
- data/lib/keymaker/requests/create_relationship_request.rb +8 -1
- data/lib/keymaker/requests/delete_relationship_request.rb +10 -1
- data/lib/keymaker/requests/execute_cypher_request.rb +8 -3
- data/lib/keymaker/requests/execute_gremlin_request.rb +8 -3
- data/lib/keymaker/requests/remove_node_from_index_request.rb +0 -2
- data/lib/keymaker/requests/service_root_request.rb +1 -1
- data/lib/keymaker/requests/{path_traverse_request.rb → traverse_path_request.rb} +16 -4
- data/lib/keymaker/requests/update_node_properties_request.rb +8 -1
- data/lib/keymaker/response.rb +1 -0
- data/lib/keymaker/service.rb +16 -4
- data/spec/cassettes/Keymaker_AddNodeToIndexRequest/{returns_a_201_status_code.yml → with_valid_options/returns_a_201_status_code.yml} +54 -55
- data/spec/cassettes/Keymaker_AddNodeToIndexRequest/{returns_application → with_valid_options/returns_application}/json.yml +54 -55
- data/spec/cassettes/Keymaker_AddNodeToIndexRequest/{returns_the_Neo4j_REST_API_starting_point_response_request.yml → with_valid_options/returns_the_Neo4j_REST_API_starting_point_response_request.yml} +54 -55
- data/spec/cassettes/Keymaker_CreateNodeRequest/returns_a_201_status_code.yml +112 -0
- data/spec/cassettes/Keymaker_CreateNodeRequest/returns_application/json.yml +112 -0
- data/spec/cassettes/Keymaker_CreateNodeRequest/with_properties/creates_a_node_with_the_given_properties.yml +112 -0
- data/spec/cassettes/Keymaker_CreateNodeRequest/without_properties/creates_an_empty_node.yml +112 -0
- data/spec/cassettes/Keymaker_CreateRelationshipRequest/with_invalid_options/raises_ClientError.yml +201 -0
- data/spec/cassettes/Keymaker_CreateRelationshipRequest/with_properties/creates_a_node_with_the_given_properties.yml +233 -0
- data/spec/cassettes/Keymaker_CreateRelationshipRequest/with_properties/returns_a_201_status_code.yml +196 -0
- data/spec/cassettes/Keymaker_CreateRelationshipRequest/with_properties/returns_application/json.yml +196 -0
- data/spec/cassettes/Keymaker_CreateRelationshipRequest/without_properties/creates_an_empty_relationship_of_type_birthed_.yml +195 -0
- data/spec/cassettes/Keymaker_DeleteRelationshipRequest/with_a_non-existent_relationship/raises_ResourceNotFound.yml +191 -0
- data/spec/cassettes/Keymaker_DeleteRelationshipRequest/with_an_existing_relationship/deletes_the_relationship.yml +219 -0
- data/spec/cassettes/Keymaker_ExecuteCypherRequest/with_a_valid_Cypher_Query/returns_a_200_status_code.yml +111 -0
- data/spec/cassettes/Keymaker_ExecuteCypherRequest/with_an_invalid_Cypher_Query/raises_ClientError.yml +108 -0
- data/spec/cassettes/Keymaker_ExecuteGremlinRequest/with_a_valid_Gremlin_Script/returns_a_200_status_code.yml +98 -0
- data/spec/cassettes/Keymaker_ExecuteGremlinRequest/with_an_invalid_Gremlin_Script/raises_ClientError.yml +107 -0
- data/spec/cassettes/Keymaker_TraversePathRequest/_traverse_path_properties/with_options/builds_the_query_properties_with_defaults.yml +157 -0
- data/spec/cassettes/Keymaker_TraversePathRequest/with_invalid_options/raise_a_ClientError.yml +193 -0
- data/spec/cassettes/Keymaker_TraversePathRequest/with_valid_options/returns_status_code_200.yml +269 -0
- data/spec/cassettes/Keymaker_UpdateNodePropertiesRequest/_node_properties/excludes_the_node_id.yml +157 -0
- data/spec/cassettes/Keymaker_UpdateNodePropertiesRequest/with_invalid_options/raises_a_ClientError.yml +193 -0
- data/spec/cassettes/Keymaker_UpdateNodePropertiesRequest/with_valid_options/returns_a_status_of_204.yml +182 -0
- data/spec/cassettes/Keymaker_UpdateNodePropertiesRequest/with_valid_options/updates_the_properties.yml +214 -0
- data/spec/keymaker/requests/add_node_to_index_request_spec.rb +30 -28
- data/spec/keymaker/requests/batch_get_nodes_request_spec.rb +4 -4
- data/spec/keymaker/requests/batch_request_spec.rb +33 -33
- data/spec/keymaker/requests/create_node_request_spec.rb +34 -0
- data/spec/keymaker/requests/create_relationship_request_spec.rb +58 -0
- data/spec/keymaker/requests/delete_relationship_request_spec.rb +28 -0
- data/spec/keymaker/requests/execute_cypher_request_spec.rb +23 -0
- data/spec/keymaker/requests/execute_gremlin_request_spec.rb +23 -0
- data/spec/keymaker/requests/service_root_request_spec.rb +9 -9
- data/spec/keymaker/requests/traverse_path_request_spec.rb +50 -0
- data/spec/keymaker/requests/update_node_properties_request_spec.rb +50 -0
- data/spec/keymaker/service_spec.rb +31 -0
- data/spec/keymaker_spec.rb +26 -2
- data/spec/support/keymaker.rb +10 -4
- metadata +86 -10
@@ -1,5 +1,5 @@
|
|
1
1
|
module Keymaker
|
2
|
-
class
|
2
|
+
class TraversePathRequest < Request
|
3
3
|
|
4
4
|
# Example request
|
5
5
|
|
@@ -9,12 +9,20 @@ module Keymaker
|
|
9
9
|
# {"order":"breadth_first","uniqueness":"none","return_filter":{"language":"builtin","name":"all"}}
|
10
10
|
|
11
11
|
def submit
|
12
|
-
service.post(
|
12
|
+
service.post(node_traverse_path(opts[:node_id]), traverse_path_properties).on_error do |response|
|
13
|
+
case response.status
|
14
|
+
when (400..499)
|
15
|
+
raise ClientError.new(response, response.body)
|
16
|
+
when (500..599)
|
17
|
+
raise ServerError.new(response, response.body)
|
18
|
+
end
|
19
|
+
end
|
13
20
|
end
|
14
21
|
|
15
|
-
def
|
22
|
+
def traverse_path_properties
|
16
23
|
# :order - breadth_first or depth_first
|
17
24
|
# :relationships - all, in, or out
|
25
|
+
# e.g. [{"type" => "likes", "direction" => "all}]
|
18
26
|
# :uniqueness - node_global, none, relationship_global, node_path, or relationship_path
|
19
27
|
# :prune_evaluator
|
20
28
|
# :return_filter
|
@@ -22,7 +30,7 @@ module Keymaker
|
|
22
30
|
|
23
31
|
{}.tap do |properties|
|
24
32
|
properties[:order] = opts.fetch(:order, "breadth_first")
|
25
|
-
properties[:relationships] = opts.fetch(:relationships,
|
33
|
+
properties[:relationships] = opts.fetch(:relationships, [])
|
26
34
|
properties[:uniqueness] = opts.fetch(:uniqueness, "relationship_global")
|
27
35
|
properties[:prune_evaluator] = opts[:prune_evaluator] if opts[:prune_evaluator]
|
28
36
|
properties[:return_filter] = opts[:return_filter] if opts[:return_filter]
|
@@ -30,5 +38,9 @@ module Keymaker
|
|
30
38
|
end
|
31
39
|
end
|
32
40
|
|
41
|
+
def node_traverse_path(node_id)
|
42
|
+
[node_path, node_id.to_s, "traverse", "path"].join("/")
|
43
|
+
end
|
44
|
+
|
33
45
|
end
|
34
46
|
end
|
@@ -3,7 +3,14 @@ module Keymaker
|
|
3
3
|
class UpdateNodePropertiesRequest < Request
|
4
4
|
|
5
5
|
def submit
|
6
|
-
service.put(node_properties_path(opts[:node_id]), node_properties)
|
6
|
+
service.put(node_properties_path(opts[:node_id]), node_properties).on_error do |response|
|
7
|
+
case response.status
|
8
|
+
when (400..499)
|
9
|
+
raise ClientError.new(response, response.body)
|
10
|
+
when (500..599)
|
11
|
+
raise ServerError.new(response, response.body)
|
12
|
+
end
|
13
|
+
end
|
7
14
|
end
|
8
15
|
|
9
16
|
def node_properties
|
data/lib/keymaker/response.rb
CHANGED
data/lib/keymaker/service.rb
CHANGED
@@ -18,8 +18,9 @@ module Keymaker
|
|
18
18
|
|
19
19
|
def connection
|
20
20
|
@connection ||= Faraday.new(url: config.connection_service_root_url) do |conn|
|
21
|
+
conn.use FaradayMiddleware::Mashify
|
21
22
|
conn.request :json
|
22
|
-
conn.
|
23
|
+
conn.response :json, :content_type => /\bjson$/
|
23
24
|
conn.adapter :net_http
|
24
25
|
end
|
25
26
|
end
|
@@ -42,11 +43,22 @@ module Keymaker
|
|
42
43
|
create_node_request(attrs)
|
43
44
|
end
|
44
45
|
|
46
|
+
def get_node(node_id)
|
47
|
+
response = get_node_request({node_id: node_id})
|
48
|
+
data = response.body.data
|
49
|
+
data.merge!("neo4j_id" => response.neo4j_id, "__raw_response__" => response)
|
50
|
+
end
|
51
|
+
|
45
52
|
# Update Node properties
|
46
53
|
def update_node_properties(node_id, attrs)
|
47
54
|
update_node_properties_request({node_id: node_id}.merge(attrs))
|
48
55
|
end
|
49
56
|
|
57
|
+
# Delete Node
|
58
|
+
def delete_node(node_id)
|
59
|
+
delete_node_request(node_id: node_id)
|
60
|
+
end
|
61
|
+
|
50
62
|
# Create Relationship
|
51
63
|
def create_relationship(rel_type, start_node_id, end_node_id, data={})
|
52
64
|
create_relationship_request({node_id: start_node_id, rel_type: rel_type, end_node_id: end_node_id, data: data})
|
@@ -69,7 +81,7 @@ module Keymaker
|
|
69
81
|
|
70
82
|
# Path Traverse
|
71
83
|
def path_traverse(start_node_id, data={})
|
72
|
-
|
84
|
+
traverse_path_request({node_id: start_node_id}.merge(data))
|
73
85
|
end
|
74
86
|
|
75
87
|
# Batch
|
@@ -80,7 +92,7 @@ module Keymaker
|
|
80
92
|
|
81
93
|
# Cypher Query
|
82
94
|
def execute_query(query, params)
|
83
|
-
execute_cypher_request({query: query, params: params})
|
95
|
+
execute_cypher_request({query: query, params: params}).body
|
84
96
|
end
|
85
97
|
|
86
98
|
# Gremlin Script
|
@@ -111,7 +123,7 @@ module Keymaker
|
|
111
123
|
|
112
124
|
def parse_url(url)
|
113
125
|
connection.build_url(url).tap do |uri|
|
114
|
-
if uri.port != config.port
|
126
|
+
if uri.port != Integer(config.port)
|
115
127
|
raise RuntimeError, "bad port"
|
116
128
|
end
|
117
129
|
end
|
@@ -30,7 +30,7 @@ http_interactions:
|
|
30
30
|
encoding: US-ASCII
|
31
31
|
string: ! '[ ]'
|
32
32
|
http_version: !!null
|
33
|
-
recorded_at:
|
33
|
+
recorded_at: Wed, 25 Jul 2012 00:34:55 GMT
|
34
34
|
- request:
|
35
35
|
method: delete
|
36
36
|
uri: http://localhost:7477/db/data/index/node/users
|
@@ -44,7 +44,7 @@ http_interactions:
|
|
44
44
|
message: !!null
|
45
45
|
headers:
|
46
46
|
content-length:
|
47
|
-
- '
|
47
|
+
- '422'
|
48
48
|
content-encoding:
|
49
49
|
- UTF-8
|
50
50
|
content-type:
|
@@ -58,13 +58,12 @@ http_interactions:
|
|
58
58
|
body:
|
59
59
|
encoding: US-ASCII
|
60
60
|
string: ! "{\n \"message\" : \"No node index named 'users'.\",\n \"exception\"
|
61
|
-
: \"org.neo4j.
|
62
|
-
\ \"stacktrace\" : [ \"org.neo4j.server.rest.web.DatabaseActions.removeNodeIndex(DatabaseActions.java:421)\",
|
61
|
+
: \"NotFoundException\",\n \"stacktrace\" : [ \"org.neo4j.server.rest.web.DatabaseActions.removeNodeIndex(DatabaseActions.java:420)\",
|
63
62
|
\"org.neo4j.server.rest.web.RestfulGraphDatabase.deleteNodeIndex(RestfulGraphDatabase.java:729)\",
|
64
63
|
\"java.lang.reflect.Method.invoke(Method.java:597)\", \"org.neo4j.server.statistic.StatisticFilter.doFilter(StatisticFilter.java:62)\"
|
65
64
|
]\n}"
|
66
65
|
http_version: !!null
|
67
|
-
recorded_at:
|
66
|
+
recorded_at: Wed, 25 Jul 2012 00:34:55 GMT
|
68
67
|
- request:
|
69
68
|
method: post
|
70
69
|
uri: http://localhost:7477/db/data/node
|
@@ -80,9 +79,9 @@ http_interactions:
|
|
80
79
|
message: !!null
|
81
80
|
headers:
|
82
81
|
content-length:
|
83
|
-
- '
|
82
|
+
- '1138'
|
84
83
|
location:
|
85
|
-
- http://localhost:7477/db/data/node/
|
84
|
+
- http://localhost:7477/db/data/node/191
|
86
85
|
content-encoding:
|
87
86
|
- UTF-8
|
88
87
|
content-type:
|
@@ -95,21 +94,21 @@ http_interactions:
|
|
95
94
|
- Jetty(6.1.25)
|
96
95
|
body:
|
97
96
|
encoding: US-ASCII
|
98
|
-
string: ! "{\n \"
|
99
|
-
\ \"
|
100
|
-
: \"http://localhost:7477/db/data/node/
|
101
|
-
: \"http://localhost:7477/db/data/node/
|
102
|
-
\ \"property\" : \"http://localhost:7477/db/data/node/
|
103
|
-
\ \"
|
104
|
-
: \"http://localhost:7477/db/data/node/
|
105
|
-
: \"http://localhost:7477/db/data/node/
|
106
|
-
|
107
|
-
\ \"
|
108
|
-
\ \"
|
109
|
-
\ \"
|
110
|
-
\ \"
|
97
|
+
string: ! "{\n \"extensions\" : {\n },\n \"paged_traverse\" : \"http://localhost:7477/db/data/node/191/paged/traverse/{returnType}{?pageSize,leaseTime}\",\n
|
98
|
+
\ \"outgoing_relationships\" : \"http://localhost:7477/db/data/node/191/relationships/out\",\n
|
99
|
+
\ \"traverse\" : \"http://localhost:7477/db/data/node/191/traverse/{returnType}\",\n
|
100
|
+
\ \"all_typed_relationships\" : \"http://localhost:7477/db/data/node/191/relationships/all/{-list|&|types}\",\n
|
101
|
+
\ \"property\" : \"http://localhost:7477/db/data/node/191/properties/{key}\",\n
|
102
|
+
\ \"all_relationships\" : \"http://localhost:7477/db/data/node/191/relationships/all\",\n
|
103
|
+
\ \"self\" : \"http://localhost:7477/db/data/node/191\",\n \"properties\"
|
104
|
+
: \"http://localhost:7477/db/data/node/191/properties\",\n \"outgoing_typed_relationships\"
|
105
|
+
: \"http://localhost:7477/db/data/node/191/relationships/out/{-list|&|types}\",\n
|
106
|
+
\ \"incoming_relationships\" : \"http://localhost:7477/db/data/node/191/relationships/in\",\n
|
107
|
+
\ \"incoming_typed_relationships\" : \"http://localhost:7477/db/data/node/191/relationships/in/{-list|&|types}\",\n
|
108
|
+
\ \"create_relationship\" : \"http://localhost:7477/db/data/node/191/relationships\",\n
|
109
|
+
\ \"data\" : {\n \"email\" : \"john@resistance.net\"\n }\n}"
|
111
110
|
http_version: !!null
|
112
|
-
recorded_at:
|
111
|
+
recorded_at: Wed, 25 Jul 2012 00:34:55 GMT
|
113
112
|
- request:
|
114
113
|
method: post
|
115
114
|
uri: http://localhost:7477/db/data/node
|
@@ -125,9 +124,9 @@ http_interactions:
|
|
125
124
|
message: !!null
|
126
125
|
headers:
|
127
126
|
content-length:
|
128
|
-
- '
|
127
|
+
- '1139'
|
129
128
|
location:
|
130
|
-
- http://localhost:7477/db/data/node/
|
129
|
+
- http://localhost:7477/db/data/node/192
|
131
130
|
content-encoding:
|
132
131
|
- UTF-8
|
133
132
|
content-type:
|
@@ -140,27 +139,27 @@ http_interactions:
|
|
140
139
|
- Jetty(6.1.25)
|
141
140
|
body:
|
142
141
|
encoding: US-ASCII
|
143
|
-
string: ! "{\n \"
|
144
|
-
\ \"
|
145
|
-
: \"http://localhost:7477/db/data/node/
|
146
|
-
: \"http://localhost:7477/db/data/node/
|
147
|
-
\ \"property\" : \"http://localhost:7477/db/data/node/
|
148
|
-
\ \"
|
149
|
-
: \"http://localhost:7477/db/data/node/
|
150
|
-
: \"http://localhost:7477/db/data/node/
|
151
|
-
|
152
|
-
\ \"
|
153
|
-
\ \"
|
154
|
-
\ \"
|
155
|
-
\ \"
|
142
|
+
string: ! "{\n \"extensions\" : {\n },\n \"paged_traverse\" : \"http://localhost:7477/db/data/node/192/paged/traverse/{returnType}{?pageSize,leaseTime}\",\n
|
143
|
+
\ \"outgoing_relationships\" : \"http://localhost:7477/db/data/node/192/relationships/out\",\n
|
144
|
+
\ \"traverse\" : \"http://localhost:7477/db/data/node/192/traverse/{returnType}\",\n
|
145
|
+
\ \"all_typed_relationships\" : \"http://localhost:7477/db/data/node/192/relationships/all/{-list|&|types}\",\n
|
146
|
+
\ \"property\" : \"http://localhost:7477/db/data/node/192/properties/{key}\",\n
|
147
|
+
\ \"all_relationships\" : \"http://localhost:7477/db/data/node/192/relationships/all\",\n
|
148
|
+
\ \"self\" : \"http://localhost:7477/db/data/node/192\",\n \"properties\"
|
149
|
+
: \"http://localhost:7477/db/data/node/192/properties\",\n \"outgoing_typed_relationships\"
|
150
|
+
: \"http://localhost:7477/db/data/node/192/relationships/out/{-list|&|types}\",\n
|
151
|
+
\ \"incoming_relationships\" : \"http://localhost:7477/db/data/node/192/relationships/in\",\n
|
152
|
+
\ \"incoming_typed_relationships\" : \"http://localhost:7477/db/data/node/192/relationships/in/{-list|&|types}\",\n
|
153
|
+
\ \"create_relationship\" : \"http://localhost:7477/db/data/node/192/relationships\",\n
|
154
|
+
\ \"data\" : {\n \"email\" : \"sarah@resistance.net\"\n }\n}"
|
156
155
|
http_version: !!null
|
157
|
-
recorded_at:
|
156
|
+
recorded_at: Wed, 25 Jul 2012 00:34:56 GMT
|
158
157
|
- request:
|
159
158
|
method: post
|
160
159
|
uri: http://localhost:7477/db/data/index/node/users
|
161
160
|
body:
|
162
161
|
encoding: UTF-8
|
163
|
-
string: ! '{"key":"email","value":"john@resistance.net","uri":"http://localhost:7477/db/data/node/
|
162
|
+
string: ! '{"key":"email","value":"john@resistance.net","uri":"http://localhost:7477/db/data/node/191"}'
|
164
163
|
headers:
|
165
164
|
Content-Type:
|
166
165
|
- application/json
|
@@ -170,9 +169,9 @@ http_interactions:
|
|
170
169
|
message: !!null
|
171
170
|
headers:
|
172
171
|
content-length:
|
173
|
-
- '
|
172
|
+
- '1234'
|
174
173
|
location:
|
175
|
-
- http://localhost:7477/db/data/index/node/users/email/john%40resistance.net/
|
174
|
+
- http://localhost:7477/db/data/index/node/users/email/john%40resistance.net/191
|
176
175
|
content-encoding:
|
177
176
|
- UTF-8
|
178
177
|
content-type:
|
@@ -185,20 +184,20 @@ http_interactions:
|
|
185
184
|
- Jetty(6.1.25)
|
186
185
|
body:
|
187
186
|
encoding: US-ASCII
|
188
|
-
string: ! "{\n \"
|
189
|
-
\ \"outgoing_relationships\" : \"http://localhost:7477/db/data/node/
|
190
|
-
\ \"
|
191
|
-
: \"http://localhost:7477/db/data/node/
|
192
|
-
: \"http://localhost:7477/db/data/node/
|
193
|
-
\ \"
|
194
|
-
\ \"self\" : \"http://localhost:7477/db/data/node/
|
195
|
-
: \"http://localhost:7477/db/data/node/
|
196
|
-
: \"http://localhost:7477/db/data/node/
|
197
|
-
\ \"incoming_relationships\" : \"http://localhost:7477/db/data/node/
|
198
|
-
\ \"
|
199
|
-
\ \"
|
200
|
-
\ \"
|
201
|
-
|
187
|
+
string: ! "{\n \"extensions\" : {\n },\n \"paged_traverse\" : \"http://localhost:7477/db/data/node/191/paged/traverse/{returnType}{?pageSize,leaseTime}\",\n
|
188
|
+
\ \"outgoing_relationships\" : \"http://localhost:7477/db/data/node/191/relationships/out\",\n
|
189
|
+
\ \"traverse\" : \"http://localhost:7477/db/data/node/191/traverse/{returnType}\",\n
|
190
|
+
\ \"all_typed_relationships\" : \"http://localhost:7477/db/data/node/191/relationships/all/{-list|&|types}\",\n
|
191
|
+
\ \"property\" : \"http://localhost:7477/db/data/node/191/properties/{key}\",\n
|
192
|
+
\ \"all_relationships\" : \"http://localhost:7477/db/data/node/191/relationships/all\",\n
|
193
|
+
\ \"self\" : \"http://localhost:7477/db/data/node/191\",\n \"properties\"
|
194
|
+
: \"http://localhost:7477/db/data/node/191/properties\",\n \"outgoing_typed_relationships\"
|
195
|
+
: \"http://localhost:7477/db/data/node/191/relationships/out/{-list|&|types}\",\n
|
196
|
+
\ \"incoming_relationships\" : \"http://localhost:7477/db/data/node/191/relationships/in\",\n
|
197
|
+
\ \"incoming_typed_relationships\" : \"http://localhost:7477/db/data/node/191/relationships/in/{-list|&|types}\",\n
|
198
|
+
\ \"create_relationship\" : \"http://localhost:7477/db/data/node/191/relationships\",\n
|
199
|
+
\ \"data\" : {\n \"email\" : \"john@resistance.net\"\n },\n \"indexed\"
|
200
|
+
: \"http://localhost:7477/db/data/index/node/users/email/john%40resistance.net/191\"\n}"
|
202
201
|
http_version: !!null
|
203
|
-
recorded_at:
|
202
|
+
recorded_at: Wed, 25 Jul 2012 00:34:56 GMT
|
204
203
|
recorded_with: VCR 2.2.2
|
@@ -30,7 +30,7 @@ http_interactions:
|
|
30
30
|
encoding: US-ASCII
|
31
31
|
string: ! '[ ]'
|
32
32
|
http_version: !!null
|
33
|
-
recorded_at:
|
33
|
+
recorded_at: Wed, 25 Jul 2012 00:34:56 GMT
|
34
34
|
- request:
|
35
35
|
method: delete
|
36
36
|
uri: http://localhost:7477/db/data/index/node/users
|
@@ -44,7 +44,7 @@ http_interactions:
|
|
44
44
|
message: !!null
|
45
45
|
headers:
|
46
46
|
content-length:
|
47
|
-
- '
|
47
|
+
- '422'
|
48
48
|
content-encoding:
|
49
49
|
- UTF-8
|
50
50
|
content-type:
|
@@ -58,13 +58,12 @@ http_interactions:
|
|
58
58
|
body:
|
59
59
|
encoding: US-ASCII
|
60
60
|
string: ! "{\n \"message\" : \"No node index named 'users'.\",\n \"exception\"
|
61
|
-
: \"org.neo4j.
|
62
|
-
\ \"stacktrace\" : [ \"org.neo4j.server.rest.web.DatabaseActions.removeNodeIndex(DatabaseActions.java:421)\",
|
61
|
+
: \"NotFoundException\",\n \"stacktrace\" : [ \"org.neo4j.server.rest.web.DatabaseActions.removeNodeIndex(DatabaseActions.java:420)\",
|
63
62
|
\"org.neo4j.server.rest.web.RestfulGraphDatabase.deleteNodeIndex(RestfulGraphDatabase.java:729)\",
|
64
63
|
\"java.lang.reflect.Method.invoke(Method.java:597)\", \"org.neo4j.server.statistic.StatisticFilter.doFilter(StatisticFilter.java:62)\"
|
65
64
|
]\n}"
|
66
65
|
http_version: !!null
|
67
|
-
recorded_at:
|
66
|
+
recorded_at: Wed, 25 Jul 2012 00:34:56 GMT
|
68
67
|
- request:
|
69
68
|
method: post
|
70
69
|
uri: http://localhost:7477/db/data/node
|
@@ -80,9 +79,9 @@ http_interactions:
|
|
80
79
|
message: !!null
|
81
80
|
headers:
|
82
81
|
content-length:
|
83
|
-
- '
|
82
|
+
- '1138'
|
84
83
|
location:
|
85
|
-
- http://localhost:7477/db/data/node/
|
84
|
+
- http://localhost:7477/db/data/node/193
|
86
85
|
content-encoding:
|
87
86
|
- UTF-8
|
88
87
|
content-type:
|
@@ -95,21 +94,21 @@ http_interactions:
|
|
95
94
|
- Jetty(6.1.25)
|
96
95
|
body:
|
97
96
|
encoding: US-ASCII
|
98
|
-
string: ! "{\n \"
|
99
|
-
\ \"
|
100
|
-
: \"http://localhost:7477/db/data/node/
|
101
|
-
: \"http://localhost:7477/db/data/node/
|
102
|
-
\ \"property\" : \"http://localhost:7477/db/data/node/
|
103
|
-
\ \"
|
104
|
-
: \"http://localhost:7477/db/data/node/
|
105
|
-
: \"http://localhost:7477/db/data/node/
|
106
|
-
|
107
|
-
\ \"
|
108
|
-
\ \"
|
109
|
-
\ \"
|
110
|
-
\ \"
|
97
|
+
string: ! "{\n \"extensions\" : {\n },\n \"paged_traverse\" : \"http://localhost:7477/db/data/node/193/paged/traverse/{returnType}{?pageSize,leaseTime}\",\n
|
98
|
+
\ \"outgoing_relationships\" : \"http://localhost:7477/db/data/node/193/relationships/out\",\n
|
99
|
+
\ \"traverse\" : \"http://localhost:7477/db/data/node/193/traverse/{returnType}\",\n
|
100
|
+
\ \"all_typed_relationships\" : \"http://localhost:7477/db/data/node/193/relationships/all/{-list|&|types}\",\n
|
101
|
+
\ \"property\" : \"http://localhost:7477/db/data/node/193/properties/{key}\",\n
|
102
|
+
\ \"all_relationships\" : \"http://localhost:7477/db/data/node/193/relationships/all\",\n
|
103
|
+
\ \"self\" : \"http://localhost:7477/db/data/node/193\",\n \"properties\"
|
104
|
+
: \"http://localhost:7477/db/data/node/193/properties\",\n \"outgoing_typed_relationships\"
|
105
|
+
: \"http://localhost:7477/db/data/node/193/relationships/out/{-list|&|types}\",\n
|
106
|
+
\ \"incoming_relationships\" : \"http://localhost:7477/db/data/node/193/relationships/in\",\n
|
107
|
+
\ \"incoming_typed_relationships\" : \"http://localhost:7477/db/data/node/193/relationships/in/{-list|&|types}\",\n
|
108
|
+
\ \"create_relationship\" : \"http://localhost:7477/db/data/node/193/relationships\",\n
|
109
|
+
\ \"data\" : {\n \"email\" : \"john@resistance.net\"\n }\n}"
|
111
110
|
http_version: !!null
|
112
|
-
recorded_at:
|
111
|
+
recorded_at: Wed, 25 Jul 2012 00:34:56 GMT
|
113
112
|
- request:
|
114
113
|
method: post
|
115
114
|
uri: http://localhost:7477/db/data/node
|
@@ -125,9 +124,9 @@ http_interactions:
|
|
125
124
|
message: !!null
|
126
125
|
headers:
|
127
126
|
content-length:
|
128
|
-
- '
|
127
|
+
- '1139'
|
129
128
|
location:
|
130
|
-
- http://localhost:7477/db/data/node/
|
129
|
+
- http://localhost:7477/db/data/node/194
|
131
130
|
content-encoding:
|
132
131
|
- UTF-8
|
133
132
|
content-type:
|
@@ -140,27 +139,27 @@ http_interactions:
|
|
140
139
|
- Jetty(6.1.25)
|
141
140
|
body:
|
142
141
|
encoding: US-ASCII
|
143
|
-
string: ! "{\n \"
|
144
|
-
\ \"
|
145
|
-
: \"http://localhost:7477/db/data/node/
|
146
|
-
: \"http://localhost:7477/db/data/node/
|
147
|
-
\ \"property\" : \"http://localhost:7477/db/data/node/
|
148
|
-
\ \"
|
149
|
-
: \"http://localhost:7477/db/data/node/
|
150
|
-
: \"http://localhost:7477/db/data/node/
|
151
|
-
|
152
|
-
\ \"
|
153
|
-
\ \"
|
154
|
-
\ \"
|
155
|
-
\ \"
|
142
|
+
string: ! "{\n \"extensions\" : {\n },\n \"paged_traverse\" : \"http://localhost:7477/db/data/node/194/paged/traverse/{returnType}{?pageSize,leaseTime}\",\n
|
143
|
+
\ \"outgoing_relationships\" : \"http://localhost:7477/db/data/node/194/relationships/out\",\n
|
144
|
+
\ \"traverse\" : \"http://localhost:7477/db/data/node/194/traverse/{returnType}\",\n
|
145
|
+
\ \"all_typed_relationships\" : \"http://localhost:7477/db/data/node/194/relationships/all/{-list|&|types}\",\n
|
146
|
+
\ \"property\" : \"http://localhost:7477/db/data/node/194/properties/{key}\",\n
|
147
|
+
\ \"all_relationships\" : \"http://localhost:7477/db/data/node/194/relationships/all\",\n
|
148
|
+
\ \"self\" : \"http://localhost:7477/db/data/node/194\",\n \"properties\"
|
149
|
+
: \"http://localhost:7477/db/data/node/194/properties\",\n \"outgoing_typed_relationships\"
|
150
|
+
: \"http://localhost:7477/db/data/node/194/relationships/out/{-list|&|types}\",\n
|
151
|
+
\ \"incoming_relationships\" : \"http://localhost:7477/db/data/node/194/relationships/in\",\n
|
152
|
+
\ \"incoming_typed_relationships\" : \"http://localhost:7477/db/data/node/194/relationships/in/{-list|&|types}\",\n
|
153
|
+
\ \"create_relationship\" : \"http://localhost:7477/db/data/node/194/relationships\",\n
|
154
|
+
\ \"data\" : {\n \"email\" : \"sarah@resistance.net\"\n }\n}"
|
156
155
|
http_version: !!null
|
157
|
-
recorded_at:
|
156
|
+
recorded_at: Wed, 25 Jul 2012 00:34:56 GMT
|
158
157
|
- request:
|
159
158
|
method: post
|
160
159
|
uri: http://localhost:7477/db/data/index/node/users
|
161
160
|
body:
|
162
161
|
encoding: UTF-8
|
163
|
-
string: ! '{"key":"email","value":"john@resistance.net","uri":"http://localhost:7477/db/data/node/
|
162
|
+
string: ! '{"key":"email","value":"john@resistance.net","uri":"http://localhost:7477/db/data/node/193"}'
|
164
163
|
headers:
|
165
164
|
Content-Type:
|
166
165
|
- application/json
|
@@ -170,9 +169,9 @@ http_interactions:
|
|
170
169
|
message: !!null
|
171
170
|
headers:
|
172
171
|
content-length:
|
173
|
-
- '
|
172
|
+
- '1234'
|
174
173
|
location:
|
175
|
-
- http://localhost:7477/db/data/index/node/users/email/john%40resistance.net/
|
174
|
+
- http://localhost:7477/db/data/index/node/users/email/john%40resistance.net/193
|
176
175
|
content-encoding:
|
177
176
|
- UTF-8
|
178
177
|
content-type:
|
@@ -185,20 +184,20 @@ http_interactions:
|
|
185
184
|
- Jetty(6.1.25)
|
186
185
|
body:
|
187
186
|
encoding: US-ASCII
|
188
|
-
string: ! "{\n \"
|
189
|
-
\ \"outgoing_relationships\" : \"http://localhost:7477/db/data/node/
|
190
|
-
\ \"
|
191
|
-
: \"http://localhost:7477/db/data/node/
|
192
|
-
: \"http://localhost:7477/db/data/node/
|
193
|
-
\ \"
|
194
|
-
\ \"self\" : \"http://localhost:7477/db/data/node/
|
195
|
-
: \"http://localhost:7477/db/data/node/
|
196
|
-
: \"http://localhost:7477/db/data/node/
|
197
|
-
\ \"incoming_relationships\" : \"http://localhost:7477/db/data/node/
|
198
|
-
\ \"
|
199
|
-
\ \"
|
200
|
-
\ \"
|
201
|
-
|
187
|
+
string: ! "{\n \"extensions\" : {\n },\n \"paged_traverse\" : \"http://localhost:7477/db/data/node/193/paged/traverse/{returnType}{?pageSize,leaseTime}\",\n
|
188
|
+
\ \"outgoing_relationships\" : \"http://localhost:7477/db/data/node/193/relationships/out\",\n
|
189
|
+
\ \"traverse\" : \"http://localhost:7477/db/data/node/193/traverse/{returnType}\",\n
|
190
|
+
\ \"all_typed_relationships\" : \"http://localhost:7477/db/data/node/193/relationships/all/{-list|&|types}\",\n
|
191
|
+
\ \"property\" : \"http://localhost:7477/db/data/node/193/properties/{key}\",\n
|
192
|
+
\ \"all_relationships\" : \"http://localhost:7477/db/data/node/193/relationships/all\",\n
|
193
|
+
\ \"self\" : \"http://localhost:7477/db/data/node/193\",\n \"properties\"
|
194
|
+
: \"http://localhost:7477/db/data/node/193/properties\",\n \"outgoing_typed_relationships\"
|
195
|
+
: \"http://localhost:7477/db/data/node/193/relationships/out/{-list|&|types}\",\n
|
196
|
+
\ \"incoming_relationships\" : \"http://localhost:7477/db/data/node/193/relationships/in\",\n
|
197
|
+
\ \"incoming_typed_relationships\" : \"http://localhost:7477/db/data/node/193/relationships/in/{-list|&|types}\",\n
|
198
|
+
\ \"create_relationship\" : \"http://localhost:7477/db/data/node/193/relationships\",\n
|
199
|
+
\ \"data\" : {\n \"email\" : \"john@resistance.net\"\n },\n \"indexed\"
|
200
|
+
: \"http://localhost:7477/db/data/index/node/users/email/john%40resistance.net/193\"\n}"
|
202
201
|
http_version: !!null
|
203
|
-
recorded_at:
|
202
|
+
recorded_at: Wed, 25 Jul 2012 00:34:56 GMT
|
204
203
|
recorded_with: VCR 2.2.2
|