class Neo4j::RakeTasks::StarnixServerManager
Represents and manages a server on *NIX systems
Public Instance Methods
neo4j_binary_filename()
click to toggle source
# File lib/neo4j/rake_tasks/starnix_server_manager.rb, line 7 def neo4j_binary_filename 'neo4j' end
neo4j_shell_binary_filename()
click to toggle source
# File lib/neo4j/rake_tasks/starnix_server_manager.rb, line 11 def neo4j_shell_binary_filename 'neo4j-shell' end
Protected Instance Methods
download_url(version)
click to toggle source
# File lib/neo4j/rake_tasks/starnix_server_manager.rb, line 25 def download_url(version) ENV.fetch('NEO4J_DIST', 'http://dist.neo4j.org/neo4j-VERSION-unix.tar.gz').gsub('VERSION', version) end
extract!(zip_path)
click to toggle source
# File lib/neo4j/rake_tasks/starnix_server_manager.rb, line 17 def extract!(zip_path) Dir.mktmpdir do |temp_dir_path| system_or_fail("cd #{temp_dir_path} && tar -xvf #{zip_path}") subdir = Dir.glob(File.join(temp_dir_path, '*'))[0] system_or_fail("mv #{File.join(subdir, '*')} #{@path}/") end end