neo4j-rake_tasks 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f49243dad640d3474b999e8c645c9bd9c60c2cba
|
4
|
+
data.tar.gz: 78738a943de6f3a0974f16deb5cc08570a9d1d1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b45237730eab1a69e1a7b3663ac21d12176caf07032c9975325be5c8d3f4eec53d2eec7c906e9fa79addcaadb0039b9298559c1826f6ef098d90907b4abbd0a3
|
7
|
+
data.tar.gz: 90c39ca72851a2a687af9b9b5d1f93969f15281432e85106f3c54c14baf7914aafdc3d559ecf3a8843614330c4f5a0bde3187af433b9a6dfa2194dc78c54aacf
|
@@ -72,6 +72,15 @@ namespace :neo4j do
|
|
72
72
|
server_manager.console
|
73
73
|
end
|
74
74
|
|
75
|
+
desc 'Open Neo4j REPL Shell'
|
76
|
+
task :shell, :environment do |_, args|
|
77
|
+
args.with_defaults(environment: :development)
|
78
|
+
|
79
|
+
puts "Starting Neo4j shell in #{args[:environment]}..."
|
80
|
+
server_manager = server_manager(args[:environment])
|
81
|
+
server_manager.shell
|
82
|
+
end
|
83
|
+
|
75
84
|
desc 'Configure Server, e.g. rake neo4j:config[development,8888]'
|
76
85
|
task :config, :environment, :port do |_, args|
|
77
86
|
args.with_defaults(environment: :development)
|
@@ -5,8 +5,6 @@ module Neo4j
|
|
5
5
|
module RakeTasks
|
6
6
|
# Represents and manages a server installation at a specific path
|
7
7
|
class ServerManager
|
8
|
-
BASE_INSTALL_DIR = Pathname.new('db/neo4j')
|
9
|
-
|
10
8
|
def initialize(path)
|
11
9
|
@path = Pathname.new(path)
|
12
10
|
FileUtils.mkdir_p(@path)
|
@@ -42,6 +40,16 @@ module Neo4j
|
|
42
40
|
system_or_fail(neo4j_command_path(:console))
|
43
41
|
end
|
44
42
|
|
43
|
+
def shell
|
44
|
+
not_started = !@path.join('data/neo4j-service.pid').exist?
|
45
|
+
|
46
|
+
start if not_started
|
47
|
+
|
48
|
+
system_or_fail(neo4j_shell_binary_path.to_s)
|
49
|
+
|
50
|
+
stop if not_started
|
51
|
+
end
|
52
|
+
|
45
53
|
def info
|
46
54
|
validate_is_system_admin!
|
47
55
|
|
@@ -139,6 +147,10 @@ module Neo4j
|
|
139
147
|
neo4j_binary_path.to_s + " #{command}"
|
140
148
|
end
|
141
149
|
|
150
|
+
def neo4j_shell_binary_path
|
151
|
+
binary_command_path(neo4j_shell_binary_filename)
|
152
|
+
end
|
153
|
+
|
142
154
|
def property_configuration_path
|
143
155
|
@path.join('conf', 'neo4j-server.properties')
|
144
156
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neo4j-rake_tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Underwood
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|