keymaker 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/keymaker.gemspec +5 -37
- data/lib/keymaker.rb +8 -5
- data/lib/keymaker/node.rb +69 -45
- data/lib/keymaker/parsers/cypher_response_parser.rb +25 -0
- data/lib/keymaker/serialization.rb +2 -1
- data/lib/keymaker/service.rb +4 -17
- data/spec/keymaker/node_spec.rb +92 -0
- data/spec/keymaker/requests/add_node_to_index_request_spec.rb +13 -13
- data/spec/keymaker/requests/batch_request_spec.rb +3 -56
- data/spec/keymaker/requests/create_node_request_spec.rb +15 -9
- data/spec/keymaker/requests/create_relationship_request_spec.rb +19 -11
- data/spec/keymaker/requests/execute_cypher_request_spec.rb +1 -1
- data/spec/keymaker/requests/get_relationship_types_request_spec.rb +3 -4
- data/spec/keymaker/requests/update_node_properties_request_spec.rb +1 -1
- data/spec/keymaker_spec.rb +38 -8
- data/spec/support/active_model_lint.rb +17 -0
- data/spec/support/keymaker.rb +1 -1
- metadata +8 -73
- data/spec/cassettes/Keymaker_AddNodeToIndexRequest/with_valid_options/returns_a_201_status_code.yml +0 -203
- data/spec/cassettes/Keymaker_AddNodeToIndexRequest/with_valid_options/returns_application/json.yml +0 -203
- data/spec/cassettes/Keymaker_AddNodeToIndexRequest/with_valid_options/returns_the_Neo4j_REST_API_starting_point_response_request.yml +0 -203
- data/spec/cassettes/Keymaker_BatchRequest/when_a_resource_is_not_found/raises_BatchRequestError.yml +0 -120
- data/spec/cassettes/Keymaker_BatchRequest/when_to_and_method_are_not_set/raises_BatchRequestError.yml +0 -106
- data/spec/cassettes/Keymaker_BatchRequest/with_valid_options/returns_a_200_status_code.yml +0 -129
- data/spec/cassettes/Keymaker_BatchRequest/with_valid_options/runs_the_commands_and_returns_their_respective_results.yml +0 -129
- data/spec/cassettes/Keymaker_CreateNodeRequest/returns_a_201_status_code.yml +0 -112
- data/spec/cassettes/Keymaker_CreateNodeRequest/returns_application/json.yml +0 -112
- data/spec/cassettes/Keymaker_CreateNodeRequest/with_properties/creates_a_node_with_the_given_properties.yml +0 -112
- data/spec/cassettes/Keymaker_CreateNodeRequest/without_properties/creates_an_empty_node.yml +0 -112
- data/spec/cassettes/Keymaker_CreateRelationshipRequest/with_invalid_options/raises_ClientError.yml +0 -201
- data/spec/cassettes/Keymaker_CreateRelationshipRequest/with_properties/creates_a_node_with_the_given_properties.yml +0 -233
- data/spec/cassettes/Keymaker_CreateRelationshipRequest/with_properties/returns_a_201_status_code.yml +0 -196
- data/spec/cassettes/Keymaker_CreateRelationshipRequest/with_properties/returns_application/json.yml +0 -196
- data/spec/cassettes/Keymaker_CreateRelationshipRequest/without_properties/creates_an_empty_relationship_of_type_birthed_.yml +0 -195
- data/spec/cassettes/Keymaker_DeleteRelationshipRequest/with_a_non-existent_relationship/raises_ResourceNotFound.yml +0 -191
- data/spec/cassettes/Keymaker_DeleteRelationshipRequest/with_an_existing_relationship/deletes_the_relationship.yml +0 -219
- data/spec/cassettes/Keymaker_ExecuteCypherRequest/with_a_valid_Cypher_Query/returns_a_200_status_code.yml +0 -111
- data/spec/cassettes/Keymaker_ExecuteCypherRequest/with_an_invalid_Cypher_Query/raises_ClientError.yml +0 -108
- data/spec/cassettes/Keymaker_ExecuteGremlinRequest/with_a_valid_Gremlin_Script/returns_a_200_status_code.yml +0 -98
- data/spec/cassettes/Keymaker_ExecuteGremlinRequest/with_an_invalid_Gremlin_Script/raises_ClientError.yml +0 -107
- data/spec/cassettes/Keymaker_GetNodeRequest/with_a_non-existent_node_id/raises_ResourceNotFound.yml +0 -101
- data/spec/cassettes/Keymaker_GetNodeRequest/with_an_empty_node_id/raises_ClientError.yml +0 -111
- data/spec/cassettes/Keymaker_GetRelationshipTypesRequest/with_existing_relationships/returns_a_unique_array_of_relationship_types.yml +0 -220
- data/spec/cassettes/Keymaker_ServiceRootRequest/returns_a_200_status_code.yml +0 -105
- data/spec/cassettes/Keymaker_ServiceRootRequest/returns_application/json.yml +0 -105
- data/spec/cassettes/Keymaker_ServiceRootRequest/returns_the_Neo4j_REST_API_starting_point_response_request.yml +0 -105
- data/spec/cassettes/Keymaker_TraversePathRequest/_traverse_path_properties/with_options/builds_the_query_properties_with_defaults.yml +0 -157
- data/spec/cassettes/Keymaker_TraversePathRequest/with_invalid_options/raise_a_ClientError.yml +0 -193
- data/spec/cassettes/Keymaker_TraversePathRequest/with_valid_options/returns_status_code_200.yml +0 -269
- data/spec/cassettes/Keymaker_UpdateNodePropertiesRequest/_node_properties/excludes_the_node_id.yml +0 -157
- data/spec/cassettes/Keymaker_UpdateNodePropertiesRequest/with_invalid_options/raises_a_ClientError.yml +0 -193
- data/spec/cassettes/Keymaker_UpdateNodePropertiesRequest/with_valid_options/returns_a_status_of_204.yml +0 -182
- data/spec/cassettes/Keymaker_UpdateNodePropertiesRequest/with_valid_options/updates_the_properties.yml +0 -214
@@ -12,21 +12,21 @@ describe Keymaker::AddNodeToIndexRequest, vcr: true do
|
|
12
12
|
it "returns the Neo4j REST API starting point response request" do
|
13
13
|
add_node_to_index_request.body.should include(
|
14
14
|
{
|
15
|
-
"indexed" => "#{neo4j_host}/db/data/index/node/users/email/john%40resistance.net
|
16
|
-
"outgoing_relationships" => "#{neo4j_host}/db/data/node/
|
15
|
+
"indexed" => "#{neo4j_host}/db/data/index/node/users/email/john%40resistance.net/#{john_node_id}",
|
16
|
+
"outgoing_relationships" => "#{neo4j_host}/db/data/node/#{john_node_id}/relationships/out",
|
17
17
|
"data" => {"email" => "john@resistance.net"},
|
18
|
-
"traverse" => "#{neo4j_host}/db/data/node/
|
19
|
-
"all_typed_relationships" => "#{neo4j_host}/db/data/node/
|
20
|
-
"property" => "#{neo4j_host}/db/data/node/
|
21
|
-
"self" => "#{neo4j_host}/db/data/node
|
22
|
-
"properties" => "#{neo4j_host}/db/data/node/
|
23
|
-
"outgoing_typed_relationships" => "#{neo4j_host}/db/data/node/
|
24
|
-
"incoming_relationships" => "#{neo4j_host}/db/data/node/
|
18
|
+
"traverse" => "#{neo4j_host}/db/data/node/#{john_node_id}/traverse/{returnType}",
|
19
|
+
"all_typed_relationships" => "#{neo4j_host}/db/data/node/#{john_node_id}/relationships/all/{-list|&|types}",
|
20
|
+
"property" => "#{neo4j_host}/db/data/node/#{john_node_id}/properties/{key}",
|
21
|
+
"self" => "#{neo4j_host}/db/data/node/#{john_node_id}",
|
22
|
+
"properties" => "#{neo4j_host}/db/data/node/#{john_node_id}/properties",
|
23
|
+
"outgoing_typed_relationships" => "#{neo4j_host}/db/data/node/#{john_node_id}/relationships/out/{-list|&|types}",
|
24
|
+
"incoming_relationships" => "#{neo4j_host}/db/data/node/#{john_node_id}/relationships/in",
|
25
25
|
"extensions" => {},
|
26
|
-
"create_relationship" => "#{neo4j_host}/db/data/node/
|
27
|
-
"paged_traverse" => "#{neo4j_host}/db/data/node/
|
28
|
-
"all_relationships" => "#{neo4j_host}/db/data/node/
|
29
|
-
"incoming_typed_relationships" => "#{neo4j_host}/db/data/node/
|
26
|
+
"create_relationship" => "#{neo4j_host}/db/data/node/#{john_node_id}/relationships",
|
27
|
+
"paged_traverse" => "#{neo4j_host}/db/data/node/#{john_node_id}/paged/traverse/{returnType}{?pageSize,leaseTime}",
|
28
|
+
"all_relationships" => "#{neo4j_host}/db/data/node/#{john_node_id}/relationships/all",
|
29
|
+
"incoming_typed_relationships" => "#{neo4j_host}/db/data/node/#{john_node_id}/relationships/in/{-list|&|types}"
|
30
30
|
}
|
31
31
|
)
|
32
32
|
end
|
@@ -25,7 +25,7 @@ describe Keymaker::BatchRequest, :vcr => true do
|
|
25
25
|
|
26
26
|
context "with valid options" do
|
27
27
|
let(:options) do
|
28
|
-
[
|
28
|
+
[{
|
29
29
|
method: "POST",
|
30
30
|
to: "/node",
|
31
31
|
id: 0,
|
@@ -42,7 +42,7 @@ describe Keymaker::BatchRequest, :vcr => true do
|
|
42
42
|
}, {
|
43
43
|
method: "POST",
|
44
44
|
to: "{0}/relationships",
|
45
|
-
id:
|
45
|
+
id: 2,
|
46
46
|
body: {
|
47
47
|
to: "{1}",
|
48
48
|
data: {
|
@@ -50,60 +50,7 @@ describe Keymaker::BatchRequest, :vcr => true do
|
|
50
50
|
},
|
51
51
|
type: "knows"
|
52
52
|
}
|
53
|
-
}
|
54
|
-
end
|
55
|
-
|
56
|
-
let(:results) do
|
57
|
-
[ {"id"=>0,
|
58
|
-
"location"=>"#{neo4j_host}/db/data/node/26",
|
59
|
-
"body"=>{"outgoing_relationships"=>"#{neo4j_host}/db/data/node/26/relationships/out",
|
60
|
-
"data"=>{"name"=>"John Connor"},
|
61
|
-
"traverse"=>"#{neo4j_host}/db/data/node/26/traverse/{returnType}",
|
62
|
-
"all_typed_relationships"=>"#{neo4j_host}/db/data/node/26/relationships/all/{-list|&|types}",
|
63
|
-
"property"=>"#{neo4j_host}/db/data/node/26/properties/{key}",
|
64
|
-
"self"=>"#{neo4j_host}/db/data/node/26",
|
65
|
-
"properties"=>"#{neo4j_host}/db/data/node/26/properties",
|
66
|
-
"outgoing_typed_relationships"=>"#{neo4j_host}/db/data/node/26/relationships/out/{-list|&|types}",
|
67
|
-
"incoming_relationships"=>"#{neo4j_host}/db/data/node/26/relationships/in",
|
68
|
-
"extensions"=>{},
|
69
|
-
"create_relationship"=>"#{neo4j_host}/db/data/node/26/relationships",
|
70
|
-
"paged_traverse"=>"#{neo4j_host}/db/data/node/26/paged/traverse/{returnType}{?pageSize,leaseTime}",
|
71
|
-
"all_relationships"=>"#{neo4j_host}/db/data/node/26/relationships/all",
|
72
|
-
"incoming_typed_relationships"=>"#{neo4j_host}/db/data/node/26/relationships/in/{-list|&|types}"},
|
73
|
-
"from"=>"/node"},
|
74
|
-
{"id"=>1,
|
75
|
-
"location"=>"#{neo4j_host}/db/data/node/27",
|
76
|
-
"body"=>{"outgoing_relationships"=>"#{neo4j_host}/db/data/node/27/relationships/out",
|
77
|
-
"data"=>{"name"=>"Sarah Connor"},
|
78
|
-
"traverse"=>"#{neo4j_host}/db/data/node/27/traverse/{returnType}",
|
79
|
-
"all_typed_relationships"=>"#{neo4j_host}/db/data/node/27/relationships/all/{-list|&|types}",
|
80
|
-
"property"=>"#{neo4j_host}/db/data/node/27/properties/{key}",
|
81
|
-
"self"=>"#{neo4j_host}/db/data/node/27",
|
82
|
-
"properties"=>"#{neo4j_host}/db/data/node/27/properties",
|
83
|
-
"outgoing_typed_relationships"=>"#{neo4j_host}/db/data/node/27/relationships/out/{-list|&|types}",
|
84
|
-
"incoming_relationships"=>"#{neo4j_host}/db/data/node/27/relationships/in",
|
85
|
-
"extensions"=>{},
|
86
|
-
"create_relationship"=>"#{neo4j_host}/db/data/node/27/relationships",
|
87
|
-
"paged_traverse"=>"#{neo4j_host}/db/data/node/27/paged/traverse/{returnType}{?pageSize,leaseTime}",
|
88
|
-
"all_relationships"=>"#{neo4j_host}/db/data/node/27/relationships/all",
|
89
|
-
"incoming_typed_relationships"=>"#{neo4j_host}/db/data/node/27/relationships/in/{-list|&|types}"},
|
90
|
-
"from"=>"/node"},
|
91
|
-
{"id"=>3,
|
92
|
-
"location"=>"#{neo4j_host}/db/data/relationship/2",
|
93
|
-
"body"=>{"start"=>"#{neo4j_host}/db/data/node/26",
|
94
|
-
"data"=>{"since"=>"1985"},
|
95
|
-
"self"=>"#{neo4j_host}/db/data/relationship/2",
|
96
|
-
"property"=>"#{neo4j_host}/db/data/relationship/2/properties/{key}",
|
97
|
-
"properties"=>"#{neo4j_host}/db/data/relationship/2/properties",
|
98
|
-
"type"=>"knows",
|
99
|
-
"extensions"=>{},
|
100
|
-
"end"=>"#{neo4j_host}/db/data/node/27"},
|
101
|
-
"from"=>"#{neo4j_host}/db/data/node/26/relationships"}
|
102
|
-
]
|
103
|
-
end
|
104
|
-
|
105
|
-
it "runs the commands and returns their respective results" do
|
106
|
-
batch_request.body.should == results
|
53
|
+
}]
|
107
54
|
end
|
108
55
|
|
109
56
|
it "returns a 200 status code" do
|
@@ -3,32 +3,38 @@ require 'keymaker'
|
|
3
3
|
|
4
4
|
describe Keymaker::CreateNodeRequest, vcr: true do
|
5
5
|
|
6
|
-
let(:
|
6
|
+
let(:response) { Keymaker::CreateNodeRequest.new(Keymaker.service, options).submit }
|
7
7
|
let(:options) {{}}
|
8
|
+
let(:node_id) { response.neo4j_id }
|
9
|
+
let(:faraday_response) { response.faraday_response }
|
10
|
+
let(:status) { response.status }
|
11
|
+
let(:body) { response.body }
|
8
12
|
|
9
13
|
context "with properties" do
|
10
14
|
let(:options) {{name: "John Connor"}}
|
11
15
|
it "creates a node with the given properties" do
|
12
|
-
|
13
|
-
|
14
|
-
|
16
|
+
body.should include({
|
17
|
+
"self" => "#{neo4j_host}/db/data/node/#{node_id}",
|
18
|
+
"data" => {"name"=>"John Connor"}
|
19
|
+
})
|
15
20
|
end
|
16
21
|
end
|
17
22
|
|
18
23
|
context "without properties" do
|
19
24
|
it "creates an empty node" do
|
20
|
-
|
21
|
-
|
22
|
-
|
25
|
+
body.should include({
|
26
|
+
"self" => "#{neo4j_host}/db/data/node/#{node_id}",
|
27
|
+
"data"=>{}
|
28
|
+
})
|
23
29
|
end
|
24
30
|
end
|
25
31
|
|
26
32
|
it "returns a 201 status code" do
|
27
|
-
|
33
|
+
status.should == 201
|
28
34
|
end
|
29
35
|
|
30
36
|
it "returns application/json" do
|
31
|
-
|
37
|
+
faraday_response.headers["content-type"].should include("application/json")
|
32
38
|
end
|
33
39
|
|
34
40
|
end
|
@@ -5,7 +5,11 @@ describe Keymaker::CreateRelationshipRequest, vcr: true do
|
|
5
5
|
|
6
6
|
include_context "John and Sarah nodes"
|
7
7
|
|
8
|
-
let(:
|
8
|
+
let(:response) { Keymaker::CreateRelationshipRequest.new(Keymaker.service, options).submit }
|
9
|
+
let(:node_id) { response.neo4j_id }
|
10
|
+
let(:faraday_response) { response.faraday_response }
|
11
|
+
let(:status) { response.status }
|
12
|
+
let(:body) { response.body }
|
9
13
|
|
10
14
|
context "with properties" do
|
11
15
|
let(:options) do
|
@@ -17,18 +21,20 @@ describe Keymaker::CreateRelationshipRequest, vcr: true do
|
|
17
21
|
}
|
18
22
|
end
|
19
23
|
|
20
|
-
it "creates a
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
+
it "creates a relationship with the given properties" do
|
25
|
+
body.should include({
|
26
|
+
"self" => "#{neo4j_host}/db/data/relationship/#{node_id}",
|
27
|
+
"data" => {"location"=>"unknown", "date"=>"1985-02-28"},
|
28
|
+
"type" => "birthed"
|
29
|
+
})
|
24
30
|
end
|
25
31
|
|
26
32
|
it "returns a 201 status code" do
|
27
|
-
|
33
|
+
status.should == 201
|
28
34
|
end
|
29
35
|
|
30
36
|
it "returns application/json" do
|
31
|
-
|
37
|
+
faraday_response.headers["content-type"].should include("application/json")
|
32
38
|
end
|
33
39
|
|
34
40
|
end
|
@@ -42,16 +48,18 @@ describe Keymaker::CreateRelationshipRequest, vcr: true do
|
|
42
48
|
}
|
43
49
|
end
|
44
50
|
it "creates an empty relationship of type: 'birthed'" do
|
45
|
-
|
46
|
-
|
47
|
-
|
51
|
+
body.should include({
|
52
|
+
"self" => "#{neo4j_host}/db/data/relationship/#{node_id}",
|
53
|
+
"data"=>{},
|
54
|
+
"type"=>"birthed"
|
55
|
+
})
|
48
56
|
end
|
49
57
|
end
|
50
58
|
|
51
59
|
context "with invalid options" do
|
52
60
|
let(:options) {{}}
|
53
61
|
it "raises ClientError" do
|
54
|
-
expect {
|
62
|
+
expect { response }.to raise_error(Keymaker::ClientError)
|
55
63
|
end
|
56
64
|
end
|
57
65
|
|
@@ -5,7 +5,7 @@ describe Keymaker::ExecuteCypherRequest, vcr: true do
|
|
5
5
|
let(:execute_cypher_request) { Keymaker::ExecuteCypherRequest.new(Keymaker.service, opts).submit }
|
6
6
|
|
7
7
|
context "with a valid Cypher Query" do
|
8
|
-
let(:opts) { {query: "
|
8
|
+
let(:opts) { {query: "START a = node(*) return a"} }
|
9
9
|
it "returns a 200 status code" do
|
10
10
|
execute_cypher_request.status.should == 200
|
11
11
|
end
|
@@ -7,11 +7,10 @@ describe Keymaker::GetRelationshipTypesRequest, vcr: true do
|
|
7
7
|
|
8
8
|
context "with existing relationships" do
|
9
9
|
include_context "John and Sarah nodes"
|
10
|
-
before do
|
11
|
-
Keymaker.service.create_relationship(:loves, john_node_id, sarah_node_id).neo4j_id
|
12
|
-
end
|
13
10
|
it "returns a unique array of relationship types" do
|
14
|
-
|
11
|
+
Keymaker.service.create_relationship(:loves, john_node_id, sarah_node_id)
|
12
|
+
get_relationship_types_request.body.should include("loves", "knows")
|
15
13
|
end
|
16
14
|
end
|
15
|
+
|
17
16
|
end
|
@@ -23,7 +23,7 @@ describe Keymaker::UpdateNodePropertiesRequest, vcr: true do
|
|
23
23
|
let(:options) do
|
24
24
|
{node_id: john_node_id, email: "john.connor@resistance.net"}
|
25
25
|
end
|
26
|
-
let(:john_node_query) { {query: "START n=node({node_id}) RETURN n.email
|
26
|
+
let(:john_node_query) { {query: "START n=node({node_id}) RETURN n.email", params: {node_id: john_node_id.to_i}} }
|
27
27
|
let(:john_node_cypher_request) { Keymaker::ExecuteCypherRequest.new(Keymaker.service, john_node_query).submit }
|
28
28
|
let(:john_node_email) { john_node_cypher_request.body["data"][0][0] }
|
29
29
|
|
data/spec/keymaker_spec.rb
CHANGED
@@ -150,21 +150,34 @@ describe Keymaker do
|
|
150
150
|
end
|
151
151
|
end
|
152
152
|
|
153
|
-
describe "#
|
153
|
+
describe "#execute_cypher" do
|
154
154
|
|
155
|
-
|
156
|
-
service.execute_query("START user=node:users(email={email}) RETURN user", email: john_email)
|
157
|
-
end
|
155
|
+
let(:do_it) { service.execute_cypher(cypher_string, {}) }
|
158
156
|
|
159
|
-
|
157
|
+
before { service.add_node_to_index(:users, :email, john_email, john_node_id) }
|
160
158
|
|
161
|
-
|
162
|
-
let(:
|
159
|
+
context "setting key with AS" do
|
160
|
+
let(:cypher_string) { "START n=node(*) RETURN n.email AS email" }
|
163
161
|
|
164
162
|
it "performs the cypher query and responds" do
|
165
|
-
|
163
|
+
do_it.first.email.should == john_email
|
166
164
|
end
|
165
|
+
end
|
167
166
|
|
167
|
+
context "not setting the key" do
|
168
|
+
let(:cypher_string) { "START n=node(*) RETURN n.email" }
|
169
|
+
|
170
|
+
it "performs the cypher query and responds" do
|
171
|
+
do_it.first.email.should == john_email
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
context "asks for entire object" do
|
176
|
+
let(:cypher_string) { "START n=node(*) RETURN n" }
|
177
|
+
|
178
|
+
it "performs the cypher query and responds" do
|
179
|
+
do_it.first.email.should == john_email
|
180
|
+
end
|
168
181
|
end
|
169
182
|
|
170
183
|
end
|
@@ -208,6 +221,23 @@ describe Keymaker do
|
|
208
221
|
|
209
222
|
end
|
210
223
|
|
224
|
+
describe "#delete_relationship" do
|
225
|
+
|
226
|
+
def do_it
|
227
|
+
service.delete_relationship(relationship_id)
|
228
|
+
connection.get("/db/data/node/#{john_node_id}/relationships/all").body
|
229
|
+
end
|
230
|
+
|
231
|
+
let(:relationship_id) do
|
232
|
+
service.create_relationship(:loves, john_node_id, sarah_node_id).neo4j_id
|
233
|
+
end
|
234
|
+
|
235
|
+
it "deletes the relationship" do
|
236
|
+
do_it.should == []
|
237
|
+
end
|
238
|
+
|
239
|
+
end
|
240
|
+
|
211
241
|
end
|
212
242
|
|
213
243
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
shared_examples_for "ActiveModel" do
|
2
|
+
require 'test/unit/assertions'
|
3
|
+
require 'active_model/lint'
|
4
|
+
include Test::Unit::Assertions
|
5
|
+
include ActiveModel::Lint::Tests
|
6
|
+
|
7
|
+
ActiveModel::Lint::Tests.public_instance_methods.map {|m| m.to_s}.grep(/^test/).each do |method|
|
8
|
+
example method.gsub("_", " ") do
|
9
|
+
send method
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def model
|
14
|
+
subject
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
data/spec/support/keymaker.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: keymaker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-10-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activemodel
|
@@ -209,6 +209,7 @@ files:
|
|
209
209
|
- lib/keymaker/indexing.rb
|
210
210
|
- lib/keymaker/match_method.rb
|
211
211
|
- lib/keymaker/node.rb
|
212
|
+
- lib/keymaker/parsers/cypher_response_parser.rb
|
212
213
|
- lib/keymaker/rails_tasks.rb
|
213
214
|
- lib/keymaker/railtie.rb
|
214
215
|
- lib/keymaker/request.rb
|
@@ -230,42 +231,8 @@ files:
|
|
230
231
|
- lib/keymaker/response.rb
|
231
232
|
- lib/keymaker/serialization.rb
|
232
233
|
- lib/keymaker/service.rb
|
233
|
-
- spec/cassettes/Keymaker_AddNodeToIndexRequest/with_valid_options/returns_a_201_status_code.yml
|
234
|
-
- spec/cassettes/Keymaker_AddNodeToIndexRequest/with_valid_options/returns_application/json.yml
|
235
|
-
- spec/cassettes/Keymaker_AddNodeToIndexRequest/with_valid_options/returns_the_Neo4j_REST_API_starting_point_response_request.yml
|
236
|
-
- spec/cassettes/Keymaker_BatchRequest/when_a_resource_is_not_found/raises_BatchRequestError.yml
|
237
|
-
- spec/cassettes/Keymaker_BatchRequest/when_to_and_method_are_not_set/raises_BatchRequestError.yml
|
238
|
-
- spec/cassettes/Keymaker_BatchRequest/with_valid_options/returns_a_200_status_code.yml
|
239
|
-
- spec/cassettes/Keymaker_BatchRequest/with_valid_options/runs_the_commands_and_returns_their_respective_results.yml
|
240
|
-
- spec/cassettes/Keymaker_CreateNodeRequest/returns_a_201_status_code.yml
|
241
|
-
- spec/cassettes/Keymaker_CreateNodeRequest/returns_application/json.yml
|
242
|
-
- spec/cassettes/Keymaker_CreateNodeRequest/with_properties/creates_a_node_with_the_given_properties.yml
|
243
|
-
- spec/cassettes/Keymaker_CreateNodeRequest/without_properties/creates_an_empty_node.yml
|
244
|
-
- spec/cassettes/Keymaker_CreateRelationshipRequest/with_invalid_options/raises_ClientError.yml
|
245
|
-
- spec/cassettes/Keymaker_CreateRelationshipRequest/with_properties/creates_a_node_with_the_given_properties.yml
|
246
|
-
- spec/cassettes/Keymaker_CreateRelationshipRequest/with_properties/returns_a_201_status_code.yml
|
247
|
-
- spec/cassettes/Keymaker_CreateRelationshipRequest/with_properties/returns_application/json.yml
|
248
|
-
- spec/cassettes/Keymaker_CreateRelationshipRequest/without_properties/creates_an_empty_relationship_of_type_birthed_.yml
|
249
|
-
- spec/cassettes/Keymaker_DeleteRelationshipRequest/with_a_non-existent_relationship/raises_ResourceNotFound.yml
|
250
|
-
- spec/cassettes/Keymaker_DeleteRelationshipRequest/with_an_existing_relationship/deletes_the_relationship.yml
|
251
|
-
- spec/cassettes/Keymaker_ExecuteCypherRequest/with_a_valid_Cypher_Query/returns_a_200_status_code.yml
|
252
|
-
- spec/cassettes/Keymaker_ExecuteCypherRequest/with_an_invalid_Cypher_Query/raises_ClientError.yml
|
253
|
-
- spec/cassettes/Keymaker_ExecuteGremlinRequest/with_a_valid_Gremlin_Script/returns_a_200_status_code.yml
|
254
|
-
- spec/cassettes/Keymaker_ExecuteGremlinRequest/with_an_invalid_Gremlin_Script/raises_ClientError.yml
|
255
|
-
- spec/cassettes/Keymaker_GetNodeRequest/with_a_non-existent_node_id/raises_ResourceNotFound.yml
|
256
|
-
- spec/cassettes/Keymaker_GetNodeRequest/with_an_empty_node_id/raises_ClientError.yml
|
257
|
-
- spec/cassettes/Keymaker_GetRelationshipTypesRequest/with_existing_relationships/returns_a_unique_array_of_relationship_types.yml
|
258
|
-
- spec/cassettes/Keymaker_ServiceRootRequest/returns_a_200_status_code.yml
|
259
|
-
- spec/cassettes/Keymaker_ServiceRootRequest/returns_application/json.yml
|
260
|
-
- spec/cassettes/Keymaker_ServiceRootRequest/returns_the_Neo4j_REST_API_starting_point_response_request.yml
|
261
|
-
- spec/cassettes/Keymaker_TraversePathRequest/_traverse_path_properties/with_options/builds_the_query_properties_with_defaults.yml
|
262
|
-
- spec/cassettes/Keymaker_TraversePathRequest/with_invalid_options/raise_a_ClientError.yml
|
263
|
-
- spec/cassettes/Keymaker_TraversePathRequest/with_valid_options/returns_status_code_200.yml
|
264
|
-
- spec/cassettes/Keymaker_UpdateNodePropertiesRequest/_node_properties/excludes_the_node_id.yml
|
265
|
-
- spec/cassettes/Keymaker_UpdateNodePropertiesRequest/with_invalid_options/raises_a_ClientError.yml
|
266
|
-
- spec/cassettes/Keymaker_UpdateNodePropertiesRequest/with_valid_options/returns_a_status_of_204.yml
|
267
|
-
- spec/cassettes/Keymaker_UpdateNodePropertiesRequest/with_valid_options/updates_the_properties.yml
|
268
234
|
- spec/configuration_spec.rb
|
235
|
+
- spec/keymaker/node_spec.rb
|
269
236
|
- spec/keymaker/requests/add_node_to_index_request_spec.rb
|
270
237
|
- spec/keymaker/requests/batch_get_nodes_request_spec.rb
|
271
238
|
- spec/keymaker/requests/batch_request_spec.rb
|
@@ -284,6 +251,7 @@ files:
|
|
284
251
|
- spec/keymaker_spec.rb
|
285
252
|
- spec/service_spec.rb
|
286
253
|
- spec/spec_helper.rb
|
254
|
+
- spec/support/active_model_lint.rb
|
287
255
|
- spec/support/keymaker.rb
|
288
256
|
- spec/support/vcr.rb
|
289
257
|
homepage: https://github.com/therubymug/keymaker
|
@@ -300,7 +268,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
300
268
|
version: '0'
|
301
269
|
segments:
|
302
270
|
- 0
|
303
|
-
hash:
|
271
|
+
hash: 3979827781340380936
|
304
272
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
305
273
|
none: false
|
306
274
|
requirements:
|
@@ -314,42 +282,8 @@ signing_key:
|
|
314
282
|
specification_version: 2
|
315
283
|
summary: A multi-layer REST API wrapper for neo4j.
|
316
284
|
test_files:
|
317
|
-
- spec/cassettes/Keymaker_AddNodeToIndexRequest/with_valid_options/returns_a_201_status_code.yml
|
318
|
-
- spec/cassettes/Keymaker_AddNodeToIndexRequest/with_valid_options/returns_application/json.yml
|
319
|
-
- spec/cassettes/Keymaker_AddNodeToIndexRequest/with_valid_options/returns_the_Neo4j_REST_API_starting_point_response_request.yml
|
320
|
-
- spec/cassettes/Keymaker_BatchRequest/when_a_resource_is_not_found/raises_BatchRequestError.yml
|
321
|
-
- spec/cassettes/Keymaker_BatchRequest/when_to_and_method_are_not_set/raises_BatchRequestError.yml
|
322
|
-
- spec/cassettes/Keymaker_BatchRequest/with_valid_options/returns_a_200_status_code.yml
|
323
|
-
- spec/cassettes/Keymaker_BatchRequest/with_valid_options/runs_the_commands_and_returns_their_respective_results.yml
|
324
|
-
- spec/cassettes/Keymaker_CreateNodeRequest/returns_a_201_status_code.yml
|
325
|
-
- spec/cassettes/Keymaker_CreateNodeRequest/returns_application/json.yml
|
326
|
-
- spec/cassettes/Keymaker_CreateNodeRequest/with_properties/creates_a_node_with_the_given_properties.yml
|
327
|
-
- spec/cassettes/Keymaker_CreateNodeRequest/without_properties/creates_an_empty_node.yml
|
328
|
-
- spec/cassettes/Keymaker_CreateRelationshipRequest/with_invalid_options/raises_ClientError.yml
|
329
|
-
- spec/cassettes/Keymaker_CreateRelationshipRequest/with_properties/creates_a_node_with_the_given_properties.yml
|
330
|
-
- spec/cassettes/Keymaker_CreateRelationshipRequest/with_properties/returns_a_201_status_code.yml
|
331
|
-
- spec/cassettes/Keymaker_CreateRelationshipRequest/with_properties/returns_application/json.yml
|
332
|
-
- spec/cassettes/Keymaker_CreateRelationshipRequest/without_properties/creates_an_empty_relationship_of_type_birthed_.yml
|
333
|
-
- spec/cassettes/Keymaker_DeleteRelationshipRequest/with_a_non-existent_relationship/raises_ResourceNotFound.yml
|
334
|
-
- spec/cassettes/Keymaker_DeleteRelationshipRequest/with_an_existing_relationship/deletes_the_relationship.yml
|
335
|
-
- spec/cassettes/Keymaker_ExecuteCypherRequest/with_a_valid_Cypher_Query/returns_a_200_status_code.yml
|
336
|
-
- spec/cassettes/Keymaker_ExecuteCypherRequest/with_an_invalid_Cypher_Query/raises_ClientError.yml
|
337
|
-
- spec/cassettes/Keymaker_ExecuteGremlinRequest/with_a_valid_Gremlin_Script/returns_a_200_status_code.yml
|
338
|
-
- spec/cassettes/Keymaker_ExecuteGremlinRequest/with_an_invalid_Gremlin_Script/raises_ClientError.yml
|
339
|
-
- spec/cassettes/Keymaker_GetNodeRequest/with_a_non-existent_node_id/raises_ResourceNotFound.yml
|
340
|
-
- spec/cassettes/Keymaker_GetNodeRequest/with_an_empty_node_id/raises_ClientError.yml
|
341
|
-
- spec/cassettes/Keymaker_GetRelationshipTypesRequest/with_existing_relationships/returns_a_unique_array_of_relationship_types.yml
|
342
|
-
- spec/cassettes/Keymaker_ServiceRootRequest/returns_a_200_status_code.yml
|
343
|
-
- spec/cassettes/Keymaker_ServiceRootRequest/returns_application/json.yml
|
344
|
-
- spec/cassettes/Keymaker_ServiceRootRequest/returns_the_Neo4j_REST_API_starting_point_response_request.yml
|
345
|
-
- spec/cassettes/Keymaker_TraversePathRequest/_traverse_path_properties/with_options/builds_the_query_properties_with_defaults.yml
|
346
|
-
- spec/cassettes/Keymaker_TraversePathRequest/with_invalid_options/raise_a_ClientError.yml
|
347
|
-
- spec/cassettes/Keymaker_TraversePathRequest/with_valid_options/returns_status_code_200.yml
|
348
|
-
- spec/cassettes/Keymaker_UpdateNodePropertiesRequest/_node_properties/excludes_the_node_id.yml
|
349
|
-
- spec/cassettes/Keymaker_UpdateNodePropertiesRequest/with_invalid_options/raises_a_ClientError.yml
|
350
|
-
- spec/cassettes/Keymaker_UpdateNodePropertiesRequest/with_valid_options/returns_a_status_of_204.yml
|
351
|
-
- spec/cassettes/Keymaker_UpdateNodePropertiesRequest/with_valid_options/updates_the_properties.yml
|
352
285
|
- spec/configuration_spec.rb
|
286
|
+
- spec/keymaker/node_spec.rb
|
353
287
|
- spec/keymaker/requests/add_node_to_index_request_spec.rb
|
354
288
|
- spec/keymaker/requests/batch_get_nodes_request_spec.rb
|
355
289
|
- spec/keymaker/requests/batch_request_spec.rb
|
@@ -368,5 +302,6 @@ test_files:
|
|
368
302
|
- spec/keymaker_spec.rb
|
369
303
|
- spec/service_spec.rb
|
370
304
|
- spec/spec_helper.rb
|
305
|
+
- spec/support/active_model_lint.rb
|
371
306
|
- spec/support/keymaker.rb
|
372
307
|
- spec/support/vcr.rb
|