neo4j-rake_tasks 0.7.10 → 0.7.11

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: 3d06fb93166d03680acceac222aa93b23fc1d3ef
4
- data.tar.gz: 187f9870bff61c3100f43ce2419d023d61b6a67c
3
+ metadata.gz: 5903137904171e505442856ac49dc73d4932b112
4
+ data.tar.gz: c3fafc51f682c8d3347ba595cb2b460fdc2d8a50
5
5
  SHA512:
6
- metadata.gz: 50510cc60a67d5e8c66a95f8086f65dee9bf4da7250e4e3efa86a9f9cd271e7fef1902aaca40e406dba3381ece0174803be29bb15ee4289ec1089b765ac21cfb
7
- data.tar.gz: 76632bbe594a446d8347bcca1568505be7fbe2f5a6f22be700c8a9c2eac2c2cd5a8aeb65da95ee2998ba269b83c07ebfa7ea699209353178754d6775cc7689df
6
+ metadata.gz: 3a4a3db4b64048e5f7239519a8a8d0b282eb7136250ac0b8eb1b0e9c6c53813e16d6f880e89b90923dbf5f8c3579b16fc289549450f8f3357351cf0a5c24171a
7
+ data.tar.gz: ec69f5727d5ff082ca8a56979463b5833d642498667a1992dda6cd6fc4e4165040efe8fe25991de9da6ab07eb5ea8e35e6a3957aba13870f8dd95659fa54f5d9
@@ -20,10 +20,6 @@ namespace :neo4j do
20
20
  ::Neo4j::RakeTasks::ServerManager.new_for_os(server_path(environment))
21
21
  end
22
22
 
23
- def edition_supports_auth?(edition_string)
24
- !/-2\.0|1\.[0-9]/.match(edition_string)
25
- end
26
-
27
23
  desc 'Install Neo4j with auth disabled in v2.2+'
28
24
  task :install, :edition, :environment do |_, args|
29
25
  args.with_defaults(edition: 'community-latest', environment: 'development')
@@ -32,7 +28,8 @@ namespace :neo4j do
32
28
 
33
29
  server_manager = server_manager(args[:environment])
34
30
  server_manager.install(args[:edition])
35
- if edition_supports_auth?(args[:edition])
31
+
32
+ if server_manager.supports_auth?
36
33
  server_manager.config_auth_enabeled!(false)
37
34
  end
38
35
 
@@ -106,6 +106,10 @@ module Neo4j
106
106
  end
107
107
  end
108
108
 
109
+ def supports_auth?
110
+ Gem::Version.new(server_version) >= Gem::Version.new('2.2.0')
111
+ end
112
+
109
113
  def config_auth_enabeled!(enabled)
110
114
  value = enabled ? 'true' : 'false'
111
115
  modify_config_file(
@@ -1,5 +1,5 @@
1
1
  module Neo4j
2
2
  module RakeTasks
3
- VERSION = '0.7.10'
3
+ VERSION = '0.7.11'
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.10
4
+ version: 0.7.11
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-12-23 00:00:00.000000000 Z
11
+ date: 2017-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored