Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

moving create_graph to a rake task

  • Loading branch information...
commit 0ddc3b2a629da2031c71fe7796a135f7557dee35 1 parent d8a7ff0
@maxdemarzi authored
Showing with 8 additions and 5 deletions.
  1. +8 −0 Rakefile
  2. +0 −5 neoflix.rb
View
8 Rakefile
@@ -1 +1,9 @@
require 'neography/tasks'
+require './neoflix.rb'
+
+namespace :neo4j do
+ task :create do
+ neo = Neography::Rest.new(ENV['NEO4J_URL'] || "http://localhost:7474")
+ create_graph(neo)
+ end
+end
View
5 neoflix.rb
@@ -142,11 +142,6 @@ def get_recommendations(neo, node_id)
}.to_json
end
- get '/create_graph' do
- neo.execute_script("g.clear();")
- create_graph(neo)
- end
-
get '/' do
@neoid = params["movies"]
haml :index
Please sign in to comment.
Something went wrong with that request. Please try again.