diff --git a/lib/neography/tasks.rb b/lib/neography/tasks.rb index abc8b54..e95261b 100644 --- a/lib/neography/tasks.rb +++ b/lib/neography/tasks.rb @@ -67,6 +67,22 @@ end puts value end + + desc "Start the Neo4j Server in the background" + task :start_no_wait do + puts "Starting Neo4j in the background..." + if OS::Underlying.windows? + if %x[reg query "HKU\\S-1-5-19"].size > 0 + value = %x[neo4j/bin/Neo4j.bat start-no-wait] #start service + else + puts "Starting Neo4j directly, not as a service." + value = %x[neo4j/bin/Neo4j.bat start-no-wait] + end + else + value = %x[neo4j/bin/neo4j start-no-wait] + end + puts value + end desc "Stop the Neo4j Server" task :stop do diff --git a/neography.gemspec b/neography.gemspec index 676b1ae..b7fa858 100644 --- a/neography.gemspec +++ b/neography.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |s| s.add_development_dependency "coveralls" s.add_dependency "httpclient", ">= 2.3.3" s.add_dependency "rake", ">= 0.8.7" - s.add_dependency "json", ">= 1.6.0" + s.add_dependency "json", ">= 1.7.7" s.add_dependency "os", ">= 0.9.6" s.add_dependency "rubyzip", ">= 0.9.7" s.add_dependency "multi_json", ">= 1.3.2"