neo4j-rake_tasks 0.7.17 → 0.7.18

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: f685285a1ccebb0d9b8a2f02a04fbce9c37f05e4
4
- data.tar.gz: dabdf4fab5ceef47402b861662b6149af8cd4379
3
+ metadata.gz: 3e3ef754c2d50585fe7418c550ee173967d9b570
4
+ data.tar.gz: 4a429587c5396c173691c657aaa26381a404038b
5
5
  SHA512:
6
- metadata.gz: 23c5c7e7558e15d63ef8c5cdf245bdae457ee8c303caceb4f2b6d233e8f88021c938fad28c38e6372cb35774e4faf13546d4afb27e9bee76a25b14c986b77ef5
7
- data.tar.gz: bf63888038e0cb6ffaec034632237b226df43e24cd1e0aae352179fc590d9525167817cd60d3a793261c44b1b45b9be4c357d61aedec3954500c5d3e21a290c9
6
+ metadata.gz: a3bc51920c24b7e2fab1ba1755d7af98a2dbbfc2c2e0ed7ebef86a803b8e15a8a24422d649230e0483d888e0dac1047cb98498f4c20acaec637f5f68efc9b11a
7
+ data.tar.gz: 57fe9a72da7cc4d9363803cc144f687ff801607b2b50b9b859d1185fc7d81f0d0c0857725e35e3cf3e593c77cd2d275ded9c0426723871f532ae16da7f2fa5e1
@@ -6,7 +6,12 @@ require 'pathname'
6
6
  require File.expand_path('../windows_server_manager', __FILE__)
7
7
  require File.expand_path('../starnix_server_manager', __FILE__)
8
8
 
9
+
9
10
  namespace :neo4j do
11
+ def clear_task_if_defined(task_name)
12
+ Rake::Task["neo4j:#{task_name}"].clear if Rake::Task.task_defined?("neo4j:#{task_name}")
13
+ end
14
+
10
15
  def server_path(environment)
11
16
  Pathname.new('db/neo4j').join(environment.to_s)
12
17
  end
@@ -23,7 +28,7 @@ namespace :neo4j do
23
28
  "\e[36m#{string}\e[0m"
24
29
  end
25
30
 
26
- Rake::Task['neo4j:install'].clear
31
+ clear_task_if_defined(:install)
27
32
  desc 'Install Neo4j with auth disabled in v2.2+'
28
33
  task :install, :edition, :environment do |_, args|
29
34
  args.with_defaults(edition: 'community-latest', environment: 'development')
@@ -44,7 +49,7 @@ namespace :neo4j do
44
49
  puts cyanize(' neo4j:config[ENVIRONMENT,PORT]')
45
50
  end
46
51
 
47
- Rake::Task['neo4j:start'].clear
52
+ clear_task_if_defined(:start)
48
53
  desc 'Start the Neo4j Server'
49
54
  task :start, :environment do |_, args|
50
55
  args.with_defaults(environment: :development)
@@ -54,7 +59,7 @@ namespace :neo4j do
54
59
  server_manager.start
55
60
  end
56
61
 
57
- Rake::Task["neo4j:start_no_wait"].clear
62
+ clear_task_if_defined(:start_no_wait)
58
63
  desc 'Start the Neo4j Server asynchronously'
59
64
  task :start_no_wait, :environment do |_, args|
60
65
  args.with_defaults(environment: :development)
@@ -64,7 +69,7 @@ namespace :neo4j do
64
69
  server_manager.start(false)
65
70
  end
66
71
 
67
- Rake::Task['neo4j:console'].clear
72
+ clear_task_if_defined(:console)
68
73
  desc 'Start the Neo4j Server in the foreground'
69
74
  task :console, :environment do |_, args|
70
75
  args.with_defaults(environment: :development)
@@ -74,7 +79,7 @@ namespace :neo4j do
74
79
  server_manager.console
75
80
  end
76
81
 
77
- Rake::Task['neo4j:shell'].clear
82
+ clear_task_if_defined(:shell)
78
83
  desc 'Open Neo4j REPL Shell'
79
84
  task :shell, :environment do |_, args|
80
85
  args.with_defaults(environment: :development)
@@ -84,7 +89,7 @@ namespace :neo4j do
84
89
  server_manager.shell
85
90
  end
86
91
 
87
- Rake::Task['neo4j:config'].clear
92
+ clear_task_if_defined(:config)
88
93
  desc 'Configure Server, e.g. rake neo4j:config[development,8888]'
89
94
  task :config, :environment, :port do |_, args|
90
95
  args.with_defaults(environment: :development, port: 7474)
@@ -96,7 +101,7 @@ namespace :neo4j do
96
101
  server_manager.config_port!(args[:port].to_i)
97
102
  end
98
103
 
99
- Rake::Task['neo4j:stop'].clear
104
+ clear_task_if_defined(:stop)
100
105
  desc 'Stop the Neo4j Server'
101
106
  task :stop, :environment do |_, args|
102
107
  args.with_defaults(environment: :development)
@@ -107,7 +112,7 @@ namespace :neo4j do
107
112
  server_manager.stop
108
113
  end
109
114
 
110
- Rake::Task['neo4j:info'].clear
115
+ clear_task_if_defined(:info)
111
116
  desc 'Get info for the Neo4j Server'
112
117
  task :info, :environment do |_, args|
113
118
  args.with_defaults(environment: :development)
@@ -118,7 +123,7 @@ namespace :neo4j do
118
123
  server_manager.info
119
124
  end
120
125
 
121
- Rake::Task['neo4j:indexes'].clear
126
+ clear_task_if_defined(:indexes)
122
127
  desc 'List indexes for the Neo4j server'
123
128
  task :indexes, :environment do |_, args|
124
129
  args.with_defaults(environment: :development)
@@ -129,7 +134,7 @@ namespace :neo4j do
129
134
  server_manager.print_indexes
130
135
  end
131
136
 
132
- Rake::Task['neo4j:constraints'].clear
137
+ clear_task_if_defined(:constraints)
133
138
  desc 'List constraints for the Neo4j server'
134
139
  task :constraints, :environment do |_, args|
135
140
  args.with_defaults(environment: :development)
@@ -140,7 +145,7 @@ namespace :neo4j do
140
145
  server_manager.print_constraints
141
146
  end
142
147
 
143
- Rake::Task['neo4j:restart'].clear
148
+ clear_task_if_defined(:restart)
144
149
  desc 'Restart the Neo4j Server'
145
150
  task :restart, :environment do |_, args|
146
151
  args.with_defaults(environment: :development)
@@ -151,7 +156,7 @@ namespace :neo4j do
151
156
  server_manager.restart
152
157
  end
153
158
 
154
- Rake::Task['neo4j:reset_yes_i_am_sure'].clear
159
+ clear_task_if_defined(:reset_yes_i_am_sure)
155
160
  desc 'Reset the Neo4j Server'
156
161
  task :reset_yes_i_am_sure, :environment do |_, args|
157
162
  args.with_defaults(environment: :development)
@@ -162,7 +167,7 @@ namespace :neo4j do
162
167
  server_manager.reset
163
168
  end
164
169
 
165
- Rake::Task['neo4j:change_password'].clear
170
+ clear_task_if_defined(:change_password)
166
171
  desc 'Neo4j 2.2+: Change connection password'
167
172
  task :change_password do |_, _args|
168
173
  # Maybe we should take the environment as an arg and
@@ -170,7 +175,7 @@ namespace :neo4j do
170
175
  server_manager_class.change_password!
171
176
  end
172
177
 
173
- Rake::Task['neo4j:enable_auth'].clear
178
+ clear_task_if_defined(:enable_auth)
174
179
  desc 'Neo4j 2.2+: Enable Auth'
175
180
  task :enable_auth, :environment do |_, args|
176
181
  args.with_defaults(environment: :development)
@@ -181,7 +186,7 @@ namespace :neo4j do
181
186
  puts 'Neo4j basic authentication enabled. Restart server to apply.'
182
187
  end
183
188
 
184
- Rake::Task['neo4j:disable_auth'].clear
189
+ clear_task_if_defined(:disable_auth)
185
190
  desc 'Neo4j 2.2+: Disable Auth'
186
191
  task :disable_auth, :environment do |_, args|
187
192
  args.with_defaults(environment: :development)
@@ -1,5 +1,5 @@
1
1
  module Neo4j
2
2
  module RakeTasks
3
- VERSION = '0.7.17'
3
+ VERSION = '0.7.18'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4j-rake_tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.17
4
+ version: 0.7.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Underwood