neography 0.0.16 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ script: "bundle exec rake neo4j:install neo4j:start spec --trace"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- neography (0.0.15)
4
+ neography (0.0.16)
5
5
  httparty (~> 0.7.3)
6
6
  json
7
7
  os
@@ -17,7 +17,7 @@ An alternative is the Architect4r Gem at https://github.com/namxam/architect4r b
17
17
 
18
18
  or
19
19
 
20
- gem install 'neography', '0.0.15' # for version 1.5 of Neo4j
20
+ gem install 'neography' # for version 1.5M of Neo4j or higher
21
21
 
22
22
  After that, in your ruby script:
23
23
 
@@ -36,7 +36,6 @@ in order to access the functionality.
36
36
  for development:
37
37
  rspec
38
38
  net-http-spy
39
- fakeweb
40
39
 
41
40
  ==== Rails
42
41
 
@@ -44,7 +43,10 @@ Just add gem 'neography' to your Gemfile and run bundle install.
44
43
 
45
44
  The following tasks will be available to you:
46
45
 
47
- rake neo4j:install # Install Neo4j to the neo4j directory under your project
46
+ rake neo4j:install # Install Neo4j to the neo4j directory under your project
47
+ rake neo4j:install[community,1.6.M01] # Install Neo4j Community edition, version 1.6.M01
48
+ rake neo4j:install[advanced,1.5] # Install Neo4j Advanced edition, version 1.5
49
+ rake neo4j:install[enterprise,1.5] # Install Neo4j Enterprise edition, version 1.5
48
50
  rake neo4j:start # Start Neo4j
49
51
  rake neo4j:stop # Stop Neo4j
50
52
  rake neo4j:restart # Restart Neo4j
data/Rakefile CHANGED
@@ -2,6 +2,7 @@ require 'bundler'
2
2
  Bundler::GemHelper.install_tasks
3
3
 
4
4
  require 'rspec/core/rake_task'
5
+ require 'neography/tasks'
5
6
 
6
7
  RSpec::Core::RakeTask.new(:spec) do |t|
7
8
  t.rspec_opts = "--color"
@@ -1,7 +1,6 @@
1
1
  require 'rubygems'
2
2
  require 'neography'
3
3
 
4
- Neography::Config.server = 'neography.org'
5
4
  @neo = Neography::Rest.new
6
5
 
7
6
  def create_person(name)
@@ -1,7 +1,6 @@
1
1
  require 'rubygems'
2
2
  require 'neography'
3
3
 
4
- Neography::Config.server = 'neography.org'
5
4
  @neo = Neography::Rest.new
6
5
 
7
6
  def suggestions_for(node)
@@ -1,7 +1,6 @@
1
1
  require 'rubygems'
2
2
  require 'neography'
3
3
 
4
- Neography::Config.server = 'neography.org'
5
4
  @neo = Neography::Rest.new
6
5
 
7
6
  def create_person(name)
@@ -1,7 +1,6 @@
1
1
  require 'rubygems'
2
2
  require 'neography'
3
3
 
4
- Neography::Config.server = 'neography.org'
5
4
  @neo = Neography::Rest.new
6
5
 
7
6
  johnathan = Neography::Node.create("name" =>'Johnathan')
@@ -10,8 +10,6 @@ def find_and_require_user_defined_code
10
10
  end
11
11
  end
12
12
  end
13
- else
14
- puts "No Extensions Found: #{extensions_path}"
15
13
  end
16
14
  end
17
15
 
@@ -1,11 +1,11 @@
1
1
  module Neography
2
2
  module Index
3
3
 
4
- def index
4
+ def index(*args)
5
5
 
6
6
  end
7
7
 
8
- def find
8
+ def find(*args)
9
9
 
10
10
  end
11
11
 
@@ -1,6 +1,6 @@
1
1
  module Neography
2
2
  class Node < PropertyContainer
3
- include Neography::Index
3
+ extend Neography::Index
4
4
  include Neography::NodeRelationship
5
5
  include Neography::NodePath
6
6
  include Neography::Equal
@@ -2,7 +2,8 @@ module Neography
2
2
  class Relationship < PropertyContainer
3
3
  include Neography::Equal
4
4
  include Neography::Property
5
-
5
+ extend Neography::Index
6
+
6
7
  attr_accessor :start_node, :end_node, :rel_type
7
8
 
8
9
  class << self
@@ -176,6 +176,14 @@ module Neography
176
176
  get("/relationship/#{get_id(id)}")
177
177
  end
178
178
 
179
+ def get_relationship_start_node(rel)
180
+ get_node(rel["start"])
181
+ end
182
+
183
+ def get_relationship_end_node(rel)
184
+ get_node(rel["end"])
185
+ end
186
+
179
187
  def reset_relationship_properties(id, properties)
180
188
  options = { :body => properties.to_json, :headers => {'Content-Type' => 'application/json'} }
181
189
  put("/relationship/#{get_id(id)}/properties", options)
@@ -1,16 +1,18 @@
1
1
  # borrowed from architect4r
2
+ require 'os'
2
3
 
3
4
  namespace :neo4j do
4
5
  desc "Install Neo4j"
5
- task :install do
6
- puts 'Installing Neo4j...'
6
+ task :install, :edition, :version do |t, args|
7
+ args.with_defaults(:edition => "community", :version => "1.6.M01")
8
+ puts "Installing Neo4j-#{args[:edition]}-#{args[:version]}"
7
9
 
8
10
  if OS::Underlying.windows?
9
11
  # Download Neo4j
10
12
  unless File.exist?('neo4j.zip')
11
13
  df = File.open('neo4j.zip', 'wb')
12
14
  begin
13
- df << HTTParty.get("http://dist.neo4j.org/neo4j-community-1.5.M02-windows.zip")
15
+ df << HTTParty.get("http://dist.neo4j.org/neo4j-#{args[:edition]}-#{args[:version]}-windows.zip")
14
16
  ensure
15
17
  df.close()
16
18
  end
@@ -29,7 +31,7 @@ namespace :neo4j do
29
31
  end
30
32
  end
31
33
  end
32
- FileUtils.mv "neo4j-community-1.5.M02", "neo4j"
34
+ FileUtils.mv "neo4j-#{args[:edition]}-#{args[:version]}", "neo4j"
33
35
  end
34
36
 
35
37
  # Install if running with Admin Privileges
@@ -39,10 +41,10 @@ namespace :neo4j do
39
41
  end
40
42
 
41
43
  else
42
- %x[wget http://dist.neo4j.org/neo4j-community-1.5.M02-unix.tar.gz]
43
- %x[tar -xvzf neo4j-community-1.5.M02-unix.tar.gz]
44
- %x[mv neo4j-community-1.5.M02 neo4j]
45
- %x[rm neo4j-community-1.5.M02-unix.tar.gz]
44
+ %x[wget http://dist.neo4j.org/neo4j-#{args[:edition]}-#{args[:version]}-unix.tar.gz]
45
+ %x[tar -xvzf neo4j-#{args[:edition]}-#{args[:version]}-unix.tar.gz]
46
+ %x[mv neo4j-#{args[:edition]}-#{args[:version]} neo4j]
47
+ %x[rm neo4j-#{args[:edition]}-#{args[:version]}-unix.tar.gz]
46
48
  puts "Neo4j Installed in to neo4j directory."
47
49
  end
48
50
  puts "Type 'rake neo4j:start' to start it"
@@ -1,3 +1,3 @@
1
1
  module Neography
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
@@ -2,6 +2,7 @@ require File.join(File.dirname(__FILE__), '..', 'spec_helper')
2
2
 
3
3
  describe Neography::Relationship, "find" do
4
4
  before(:each) do
5
+ pending "Phase 2 - Index part is not done."
5
6
  Neography::Relationship.index(:strength)
6
7
  end
7
8
 
@@ -0,0 +1,46 @@
1
+ require File.join(File.dirname(__FILE__), '..', 'spec_helper')
2
+
3
+ describe Neography::Rest do
4
+ before(:each) do
5
+ @neo = Neography::Rest.new
6
+ end
7
+
8
+ describe "don't break gremlin" do
9
+ it "can handle node and relationship indexes" do
10
+ new_node1 = @neo.create_node
11
+ new_node2 = @neo.create_node
12
+ new_relationship = @neo.create_relationship("friends", new_node1, new_node2)
13
+ key = generate_text(6)
14
+ value = generate_text
15
+ @neo.add_node_to_index("test_index", key, value, new_node1)
16
+ @neo.add_relationship_to_index("test_index2", key, value, new_relationship)
17
+ end
18
+
19
+ it "gremlin works" do
20
+ root_node = @neo.execute_script("g.v(0)")
21
+ root_node.should have_key("self")
22
+ root_node["self"].split('/').last.should == "0"
23
+ end
24
+ end
25
+
26
+
27
+ describe "break gremlin" do
28
+ it "can can't handle node and relationship indexes with the same name" do
29
+ new_node1 = @neo.create_node
30
+ new_node2 = @neo.create_node
31
+ new_relationship = @neo.create_relationship("friends", new_node1, new_node2)
32
+ key = generate_text(6)
33
+ value = generate_text
34
+ @neo.add_node_to_index("test_index3", key, value, new_node1)
35
+ @neo.add_relationship_to_index("test_index3", key, value, new_relationship)
36
+ end
37
+
38
+ it "gremlin works" do
39
+ root_node = @neo.execute_script("g.v(0)")
40
+ root_node.should have_key("self")
41
+ root_node["self"].split('/').last.should == "0"
42
+ end
43
+ end
44
+
45
+
46
+ end
@@ -10,7 +10,7 @@ describe Neography::Rest do
10
10
  new_node = @neo.create_node
11
11
  key = generate_text(6)
12
12
  value = generate_text
13
- @neo.add_node_to_index("test_index", key, value, new_node)
13
+ @neo.add_node_to_index("test_node_index", key, value, new_node)
14
14
  @neo.list_indexes.should_not be_nil
15
15
  end
16
16
 
@@ -20,7 +20,7 @@ describe Neography::Rest do
20
20
  new_relationship = @neo.create_relationship("friends", new_node1, new_node2)
21
21
  key = generate_text(6)
22
22
  value = generate_text
23
- @neo.add_relationship_to_index("test_index", key, value, new_relationship)
23
+ @neo.add_relationship_to_index("test_relationship_index", key, value, new_relationship)
24
24
  @neo.list_relationship_indexes.should_not be_nil
25
25
  end
26
26
  end
@@ -70,10 +70,10 @@ describe Neography::Rest do
70
70
  new_node = @neo.create_node
71
71
  key = generate_text(6)
72
72
  value = generate_text
73
- @neo.add_node_to_index("test_index", key, value, new_node)
74
- new_index = @neo.get_node_index("test_index", key, value)
73
+ @neo.add_node_to_index("test_node_index", key, value, new_node)
74
+ new_index = @neo.get_node_index("test_node_index", key, value)
75
75
  new_index.should_not be_nil
76
- @neo.remove_node_from_index("test_index", key, value, new_node)
76
+ @neo.remove_node_from_index("test_node_index", key, value, new_node)
77
77
  end
78
78
 
79
79
  it "can add a relationship to an index" do
@@ -82,10 +82,10 @@ describe Neography::Rest do
82
82
  new_relationship = @neo.create_relationship("friends", new_node1, new_node2)
83
83
  key = generate_text(6)
84
84
  value = generate_text
85
- @neo.add_relationship_to_index("test_index", key, value, new_relationship)
86
- new_index = @neo.get_relationship_index("test_index", key, value)
85
+ @neo.add_relationship_to_index("test_relationship_index", key, value, new_relationship)
86
+ new_index = @neo.get_relationship_index("test_relationship_index", key, value)
87
87
  new_index.should_not be_nil
88
- @neo.remove_relationship_from_index("test_index", key, value, new_relationship)
88
+ @neo.remove_relationship_from_index("test_relationship_index", key, value, new_relationship)
89
89
  end
90
90
  end
91
91
 
@@ -94,11 +94,11 @@ describe Neography::Rest do
94
94
  new_node = @neo.create_node
95
95
  key = generate_text(6)
96
96
  value = generate_text
97
- @neo.add_node_to_index("test_index", key, value, new_node)
98
- new_index = @neo.get_node_index("test_index", key, value)
97
+ @neo.add_node_to_index("test_node_index", key, value, new_node)
98
+ new_index = @neo.get_node_index("test_node_index", key, value)
99
99
  new_index.should_not be_nil
100
- @neo.remove_node_from_index("test_index", key, value, new_node)
101
- new_index = @neo.get_node_index("test_index", key, value)
100
+ @neo.remove_node_from_index("test_node_index", key, value, new_node)
101
+ new_index = @neo.get_node_index("test_node_index", key, value)
102
102
  new_index.should be_nil
103
103
  end
104
104
 
@@ -106,11 +106,11 @@ describe Neography::Rest do
106
106
  new_node = @neo.create_node
107
107
  key = generate_text(6)
108
108
  value = generate_text
109
- @neo.add_node_to_index("test_index", key, value, new_node)
110
- new_index = @neo.get_node_index("test_index", key, value)
109
+ @neo.add_node_to_index("test_node_index", key, value, new_node)
110
+ new_index = @neo.get_node_index("test_node_index", key, value)
111
111
  new_index.should_not be_nil
112
- @neo.remove_node_from_index("test_index", key, new_node)
113
- new_index = @neo.get_node_index("test_index", key, value)
112
+ @neo.remove_node_from_index("test_node_index", key, new_node)
113
+ new_index = @neo.get_node_index("test_node_index", key, value)
114
114
  new_index.should be_nil
115
115
  end
116
116
 
@@ -118,11 +118,11 @@ describe Neography::Rest do
118
118
  new_node = @neo.create_node
119
119
  key = generate_text(6)
120
120
  value = generate_text
121
- @neo.add_node_to_index("test_index", key, value, new_node)
122
- new_index = @neo.get_node_index("test_index", key, value)
121
+ @neo.add_node_to_index("test_node_index", key, value, new_node)
122
+ new_index = @neo.get_node_index("test_node_index", key, value)
123
123
  new_index.should_not be_nil
124
- @neo.remove_node_from_index("test_index", new_node)
125
- new_index = @neo.get_node_index("test_index", key, value)
124
+ @neo.remove_node_from_index("test_node_index", new_node)
125
+ new_index = @neo.get_node_index("test_node_index", key, value)
126
126
  new_index.should be_nil
127
127
  end
128
128
 
@@ -132,11 +132,11 @@ describe Neography::Rest do
132
132
  new_relationship = @neo.create_relationship("friends", new_node1, new_node2)
133
133
  key = generate_text(6)
134
134
  value = generate_text
135
- @neo.add_relationship_to_index("test_index", key, value, new_relationship)
136
- new_index = @neo.get_relationship_index("test_index", key, value)
135
+ @neo.add_relationship_to_index("test_relationship_index", key, value, new_relationship)
136
+ new_index = @neo.get_relationship_index("test_relationship_index", key, value)
137
137
  new_index.should_not be_nil
138
- @neo.remove_relationship_from_index("test_index", key, value, new_relationship)
139
- new_index = @neo.get_relationship_index("test_index", key, value)
138
+ @neo.remove_relationship_from_index("test_relationship_index", key, value, new_relationship)
139
+ new_index = @neo.get_relationship_index("test_relationship_index", key, value)
140
140
  new_index.should be_nil
141
141
  end
142
142
 
@@ -146,11 +146,11 @@ describe Neography::Rest do
146
146
  new_relationship = @neo.create_relationship("friends", new_node1, new_node2)
147
147
  key = generate_text(6)
148
148
  value = generate_text
149
- @neo.add_relationship_to_index("test_index", key, value, new_relationship)
150
- new_index = @neo.get_relationship_index("test_index", key, value)
149
+ @neo.add_relationship_to_index("test_relationship_index", key, value, new_relationship)
150
+ new_index = @neo.get_relationship_index("test_relationship_index", key, value)
151
151
  new_index.should_not be_nil
152
- @neo.remove_relationship_from_index("test_index", key, new_relationship)
153
- new_index = @neo.get_relationship_index("test_index", key, value)
152
+ @neo.remove_relationship_from_index("test_relationship_index", key, new_relationship)
153
+ new_index = @neo.get_relationship_index("test_relationship_index", key, value)
154
154
  new_index.should be_nil
155
155
  end
156
156
 
@@ -160,11 +160,11 @@ describe Neography::Rest do
160
160
  new_relationship = @neo.create_relationship("friends", new_node1, new_node2)
161
161
  key = generate_text(6)
162
162
  value = generate_text
163
- @neo.add_relationship_to_index("test_index", key, value, new_relationship)
164
- new_index = @neo.get_relationship_index("test_index", key, value)
163
+ @neo.add_relationship_to_index("test_relationship_index", key, value, new_relationship)
164
+ new_index = @neo.get_relationship_index("test_relationship_index", key, value)
165
165
  new_index.should_not be_nil
166
- @neo.remove_relationship_from_index("test_index", new_relationship)
167
- new_index = @neo.get_relationship_index("test_index", key, value)
166
+ @neo.remove_relationship_from_index("test_relationship_index", new_relationship)
167
+ new_index = @neo.get_relationship_index("test_relationship_index", key, value)
168
168
  new_index.should be_nil
169
169
  end
170
170
  end
@@ -174,10 +174,10 @@ describe Neography::Rest do
174
174
  new_node = @neo.create_node
175
175
  key = generate_text(6)
176
176
  value = generate_text
177
- @neo.add_node_to_index("test_index", key, value, new_node)
178
- new_index = @neo.get_node_index("test_index", key, value)
177
+ @neo.add_node_to_index("test_node_index", key, value, new_node)
178
+ new_index = @neo.get_node_index("test_node_index", key, value)
179
179
  new_index.should_not be_nil
180
- @neo.remove_node_from_index("test_index", key, value, new_node)
180
+ @neo.remove_node_from_index("test_node_index", key, value, new_node)
181
181
  end
182
182
 
183
183
  it "can get a relationship index" do
@@ -186,10 +186,10 @@ describe Neography::Rest do
186
186
  new_relationship = @neo.create_relationship("friends", new_node1, new_node2)
187
187
  key = generate_text(6)
188
188
  value = generate_text
189
- @neo.add_relationship_to_index("test_index", key, value, new_relationship)
190
- new_index = @neo.get_relationship_index("test_index", key, value)
189
+ @neo.add_relationship_to_index("test_relationship_index", key, value, new_relationship)
190
+ new_index = @neo.get_relationship_index("test_relationship_index", key, value)
191
191
  new_index.should_not be_nil
192
- @neo.remove_relationship_from_index("test_index", key, value, new_relationship)
192
+ @neo.remove_relationship_from_index("test_relationship_index", key, value, new_relationship)
193
193
  end
194
194
  end
195
195
 
@@ -198,30 +198,30 @@ describe Neography::Rest do
198
198
  new_node = @neo.create_node
199
199
  key = generate_text(6)
200
200
  value = generate_text
201
- @neo.add_node_to_index("test_index", key, value, new_node)
202
- new_index = @neo.get_node_index("test_index", key, value)
201
+ @neo.add_node_to_index("test_node_index", key, value, new_node)
202
+ new_index = @neo.get_node_index("test_node_index", key, value)
203
203
  new_index.first["self"].should == new_node["self"]
204
- @neo.remove_node_from_index("test_index", key, value, new_node)
204
+ @neo.remove_node_from_index("test_node_index", key, value, new_node)
205
205
  end
206
206
 
207
207
  it "can find a node index" do
208
208
  new_node = @neo.create_node
209
209
  key = generate_text(6)
210
210
  value = generate_text
211
- @neo.add_node_to_index("test_index", key, value, new_node)
212
- new_index = @neo.find_node_index("test_index", key, value)
211
+ @neo.add_node_to_index("test_node_index", key, value, new_node)
212
+ new_index = @neo.find_node_index("test_node_index", key, value)
213
213
  new_index.first["self"].should == new_node["self"]
214
- @neo.remove_node_from_index("test_index", key, value, new_node)
214
+ @neo.remove_node_from_index("test_node_index", key, value, new_node)
215
215
  end
216
216
 
217
217
  it "can find a node index using generic query" do
218
218
  new_node = @neo.create_node
219
219
  key = generate_text(6)
220
220
  value = generate_text
221
- @neo.add_node_to_index("test_index", key, value, new_node)
222
- new_index = @neo.find_node_index("test_index", "#{key}: #{value}")
221
+ @neo.add_node_to_index("test_node_index", key, value, new_node)
222
+ new_index = @neo.find_node_index("test_node_index", "#{key}: #{value}")
223
223
  new_index.first["self"].should == new_node["self"]
224
- @neo.remove_node_from_index("test_index", key, value, new_node)
224
+ @neo.remove_node_from_index("test_node_index", key, value, new_node)
225
225
  end
226
226
 
227
227
  it "can get a relationship index" do
@@ -230,10 +230,10 @@ describe Neography::Rest do
230
230
  new_relationship = @neo.create_relationship("friends", new_node1, new_node2)
231
231
  key = generate_text(6)
232
232
  value = generate_text
233
- @neo.add_relationship_to_index("test_index", key, value, new_relationship)
234
- new_index = @neo.get_relationship_index("test_index", key, value)
233
+ @neo.add_relationship_to_index("test_relationship_index", key, value, new_relationship)
234
+ new_index = @neo.get_relationship_index("test_relationship_index", key, value)
235
235
  new_index.first["self"].should == new_relationship["self"]
236
- @neo.remove_relationship_from_index("test_index", key, value, new_relationship)
236
+ @neo.remove_relationship_from_index("test_relationship_index", key, value, new_relationship)
237
237
  end
238
238
 
239
239
  it "can get a relationship index with empty spaces" do
@@ -242,10 +242,10 @@ describe Neography::Rest do
242
242
  new_relationship = @neo.create_relationship("friends", new_node1, new_node2)
243
243
  key = generate_text(6)
244
244
  value = generate_text + " " + generate_text
245
- @neo.add_relationship_to_index("test_index", key, value, new_relationship)
246
- new_index = @neo.get_relationship_index("test_index", key, value)
245
+ @neo.add_relationship_to_index("test_relationship_index", key, value, new_relationship)
246
+ new_index = @neo.get_relationship_index("test_relationship_index", key, value)
247
247
  new_index.first["self"].should == new_relationship["self"]
248
- @neo.remove_relationship_from_index("test_index", key, value, new_relationship)
248
+ @neo.remove_relationship_from_index("test_relationship_index", key, value, new_relationship)
249
249
  end
250
250
 
251
251
  it "can find a relationship index" do
@@ -254,10 +254,10 @@ describe Neography::Rest do
254
254
  new_relationship = @neo.create_relationship("friends", new_node1, new_node2)
255
255
  key = generate_text(6)
256
256
  value = generate_text
257
- @neo.add_relationship_to_index("test_index", key, value, new_relationship)
258
- new_index = @neo.find_relationship_index("test_index", key, value)
257
+ @neo.add_relationship_to_index("test_relationship_index", key, value, new_relationship)
258
+ new_index = @neo.find_relationship_index("test_relationship_index", key, value)
259
259
  new_index.first["self"].should == new_relationship["self"]
260
- @neo.remove_relationship_from_index("test_index", key, value, new_relationship)
260
+ @neo.remove_relationship_from_index("test_relationship_index", key, value, new_relationship)
261
261
  end
262
262
 
263
263
  it "can find a relationship index using generic query" do
@@ -266,10 +266,10 @@ describe Neography::Rest do
266
266
  new_relationship = @neo.create_relationship("friends", new_node1, new_node2)
267
267
  key = generate_text(6)
268
268
  value = generate_text
269
- @neo.add_relationship_to_index("test_index", key, value, new_relationship)
270
- new_index = @neo.find_relationship_index("test_index", "#{key}: #{value}")
269
+ @neo.add_relationship_to_index("test_relationship_index", key, value, new_relationship)
270
+ new_index = @neo.find_relationship_index("test_relationship_index", "#{key}: #{value}")
271
271
  new_index.first["self"].should == new_relationship["self"]
272
- @neo.remove_relationship_from_index("test_index", key, value, new_relationship)
272
+ @neo.remove_relationship_from_index("test_relationship_index", key, value, new_relationship)
273
273
  end
274
274
 
275
275
  it "can find use the results of a node index" do
@@ -278,17 +278,17 @@ describe Neography::Rest do
278
278
  key = generate_text(6)
279
279
  value1 = generate_text
280
280
  value2 = generate_text
281
- @neo.add_node_to_index("test_index", key, value1, new_node1)
282
- @neo.add_node_to_index("test_index", key, value2, new_node2)
283
- existing_node1 = @neo.get_node_index("test_index", key, value1)
284
- existing_node2 = @neo.get_node_index("test_index", key, value2)
281
+ @neo.add_node_to_index("test_node_index", key, value1, new_node1)
282
+ @neo.add_node_to_index("test_node_index", key, value2, new_node2)
283
+ existing_node1 = @neo.get_node_index("test_node_index", key, value1)
284
+ existing_node2 = @neo.get_node_index("test_node_index", key, value2)
285
285
  new_relationship = @neo.create_relationship("friends", existing_node1, existing_node2)
286
286
  new_relationship["start"].should_not be_nil
287
287
  new_relationship["start"].should == new_node1["self"]
288
288
  new_relationship["end"].should_not be_nil
289
289
  new_relationship["end"].should == new_node2["self"]
290
- @neo.remove_node_from_index("test_index", new_node1)
291
- @neo.remove_node_from_index("test_index", new_node2)
290
+ @neo.remove_node_from_index("test_node_index", new_node1)
291
+ @neo.remove_node_from_index("test_node_index", new_node2)
292
292
  end
293
293
 
294
294
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neography
3
3
  version: !ruby/object:Gem::Version
4
- hash: 63
4
+ hash: 61
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 16
10
- version: 0.0.16
9
+ - 17
10
+ version: 0.0.17
11
11
  platform: ruby
12
12
  authors:
13
13
  - Max De Marzi
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-09 00:00:00 Z
18
+ date: 2011-11-30 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rspec
@@ -136,6 +136,7 @@ extra_rdoc_files: []
136
136
  files:
137
137
  - .gitignore
138
138
  - .project
139
+ - .travis.yml
139
140
  - CONTRIBUTORS
140
141
  - Gemfile
141
142
  - Gemfile.lock
@@ -176,6 +177,7 @@ files:
176
177
  - spec/integration/relationship_spec.rb
177
178
  - spec/integration/rest_bulk_spec.rb
178
179
  - spec/integration/rest_experimental_spec.rb
180
+ - spec/integration/rest_gremlin_fail_spec.rb
179
181
  - spec/integration/rest_index_spec.rb
180
182
  - spec/integration/rest_node_spec.rb
181
183
  - spec/integration/rest_path_spec.rb