neo4j-rake_tasks 0.7.9 → 0.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/neo4j/rake_tasks/server_manager.rb +18 -8
- data/lib/neo4j/rake_tasks/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d06fb93166d03680acceac222aa93b23fc1d3ef
|
4
|
+
data.tar.gz: 187f9870bff61c3100f43ce2419d023d61b6a67c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50510cc60a67d5e8c66a95f8086f65dee9bf4da7250e4e3efa86a9f9cd271e7fef1902aaca40e406dba3381ece0174803be29bb15ee4289ec1089b765ac21cfb
|
7
|
+
data.tar.gz: 76632bbe594a446d8347bcca1568505be7fbe2f5a6f22be700c8a9c2eac2c2cd5a8aeb65da95ee2998ba269b83c07ebfa7ea699209353178754d6775cc7689df
|
@@ -23,7 +23,7 @@ module Neo4j
|
|
23
23
|
FileUtils.rm archive_path
|
24
24
|
end
|
25
25
|
|
26
|
-
config_port!(7474) if
|
26
|
+
config_port!(7474) if server_version_greater_than_or_equal_to?('3.0.0')
|
27
27
|
|
28
28
|
puts "Neo4j installed to: #{@path}"
|
29
29
|
end
|
@@ -76,7 +76,7 @@ module Neo4j
|
|
76
76
|
|
77
77
|
stop
|
78
78
|
|
79
|
-
paths = if
|
79
|
+
paths = if server_version_greater_than_or_equal_to?('3.0.0')
|
80
80
|
['data/databases/graph.db/*', 'logs/*']
|
81
81
|
else
|
82
82
|
['data/graph.db/*', 'data/log/*']
|
@@ -116,8 +116,14 @@ module Neo4j
|
|
116
116
|
def config_port!(port)
|
117
117
|
puts "Config ports #{port} (HTTP) / #{port - 1} (HTTPS) / #{port - 2} (Bolt)"
|
118
118
|
|
119
|
-
if
|
119
|
+
if server_version_greater_than_or_equal_to?('3.1.0')
|
120
120
|
# These are not ideal, perhaps...
|
121
|
+
modify_config_file('dbms.connector.https.enabled' => false,
|
122
|
+
'dbms.connector.http.enabled' => true,
|
123
|
+
'dbms.connector.http.listen_address' => "localhost:#{port}",
|
124
|
+
'dbms.connector.https.listen_address' => "localhost:#{port - 1}",
|
125
|
+
'dbms.connector.bolt.listen_address' => "localhost:#{port - 2}")
|
126
|
+
elsif server_version_greater_than_or_equal_to?('3.0.0')
|
121
127
|
modify_config_file('dbms.connector.https.enabled' => false,
|
122
128
|
'dbms.connector.http.enabled' => true,
|
123
129
|
'dbms.connector.http.address' => "localhost:#{port}",
|
@@ -208,7 +214,11 @@ module Neo4j
|
|
208
214
|
end
|
209
215
|
|
210
216
|
def server_url
|
211
|
-
if
|
217
|
+
if server_version_greater_than_or_equal_to?('3.1.0')
|
218
|
+
get_config_property('dbms.connector.http.listen_address').strip.tap do |address|
|
219
|
+
address.prepend('http://') unless address.match(/^http:\/\//)
|
220
|
+
end
|
221
|
+
elsif server_version_greater_than_or_equal_to?('3.0.0')
|
212
222
|
get_config_property('dbms.connector.http.address').strip.tap do |address|
|
213
223
|
address.prepend('http://') unless address.match(/^http:\/\//)
|
214
224
|
end
|
@@ -219,7 +229,7 @@ module Neo4j
|
|
219
229
|
end
|
220
230
|
|
221
231
|
def property_configuration_path
|
222
|
-
if
|
232
|
+
if server_version_greater_than_or_equal_to?('3.0.0')
|
223
233
|
@path.join('conf', 'neo4j.conf')
|
224
234
|
else
|
225
235
|
@path.join('conf', 'neo4j-server.properties')
|
@@ -252,7 +262,7 @@ module Neo4j
|
|
252
262
|
end
|
253
263
|
|
254
264
|
def pid_path
|
255
|
-
if
|
265
|
+
if server_version_greater_than_or_equal_to?('3.0.0')
|
256
266
|
@path.join('run/neo4j.pid')
|
257
267
|
else
|
258
268
|
@path.join('data/neo4j-service.pid')
|
@@ -263,8 +273,8 @@ module Neo4j
|
|
263
273
|
|
264
274
|
NEO4J_VERSIONS_URL = 'https://raw.githubusercontent.com/neo4jrb/neo4j-rake_tasks/master/neo4j_versions.yml'
|
265
275
|
|
266
|
-
def
|
267
|
-
Gem::Version.new(server_version)
|
276
|
+
def server_version_greater_than_or_equal_to?(version)
|
277
|
+
Gem::Version.new(server_version) >= Gem::Version.new(version)
|
268
278
|
end
|
269
279
|
|
270
280
|
def server_version
|
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.7.
|
4
|
+
version: 0.7.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Underwood
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
196
|
version: '0'
|
197
197
|
requirements: []
|
198
198
|
rubyforge_project:
|
199
|
-
rubygems_version: 2.
|
199
|
+
rubygems_version: 2.6.8
|
200
200
|
signing_key:
|
201
201
|
specification_version: 4
|
202
202
|
summary: Rake tasks for managing Neo4j
|