neo4j-rake_tasks 0.7.9 → 0.7.10

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: 9a38496d8807a96488918702d6c388b88b82eb26
4
- data.tar.gz: ddca35f4d74a36b07acfab500357ab9edacd2661
3
+ metadata.gz: 3d06fb93166d03680acceac222aa93b23fc1d3ef
4
+ data.tar.gz: 187f9870bff61c3100f43ce2419d023d61b6a67c
5
5
  SHA512:
6
- metadata.gz: 92164641ff7b2e100061b54c1c30d7c6a19ddea0cad78e5f2c381a69b59f34d0a9f7994f3b141eeb960df9b387a69fedc419ec6582353c61b114aff1c8f98745
7
- data.tar.gz: 886473b595cbc3bf4f050de080a500de15949b4c7fff6863219619e681b7d1396396afe1fe2b948b421b422924c09d46bb385ce305ebc175b8efe3797d64b532
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 server_version_greater_than?('3.0.0')
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 server_version_greater_than?('3.0.0')
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 server_version_greater_than?('3.0.0')
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 server_version_greater_than?('3.0.0')
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 server_version_greater_than?('3.0.0')
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 server_version_greater_than?('3.0.0')
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 server_version_greater_than?(version)
267
- Gem::Version.new(server_version) > Gem::Version.new(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
@@ -1,5 +1,5 @@
1
1
  module Neo4j
2
2
  module RakeTasks
3
- VERSION = '0.7.9'
3
+ VERSION = '0.7.10'
4
4
  end
5
5
  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.7.9
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-09-30 00:00:00.000000000 Z
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.5.1
199
+ rubygems_version: 2.6.8
200
200
  signing_key:
201
201
  specification_version: 4
202
202
  summary: Rake tasks for managing Neo4j