activegraph 11.0.0.beta.4-java → 11.0.0-java

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
  SHA256:
3
- metadata.gz: 8dc481abfed5877b776d4b16fbb2921cbe9ddee37d9af2cdf2dcddda018281ff
4
- data.tar.gz: 7815f77cd99b09da933043fce90145ed3f4b2504e652a04b9230321fd6a436dd
3
+ metadata.gz: ff5c438f49a153bf4b4e2e96794f47ab669e2837ea0637ec12acbf77d69f7756
4
+ data.tar.gz: c499d88bb7b1d85f2eaee619b1c34e86878c862d6330359cb00dff017ba80faf
5
5
  SHA512:
6
- metadata.gz: dba2f455e3666cb716dda24c5f5c20458f5638f0b1b349ea4410abb34cbb8b7737b58d0c1f6ace9ae2c1ad013aaa75204be79ec0a3ed306f97fcf242aa8795fa
7
- data.tar.gz: 56742eb18cd0c9e7160b29fef5b666440a4ae41fe71afb9b91d407aff5954a5328497639d517c6d4f737d93a4b1ff7db980790356ef06aa232e031b001955759
6
+ metadata.gz: 8e482893cd376083bfbcfc39043efac399272be57ce4371c2d06ec8c1edc81a537dc4a3eb9cd24a82137e6843e8e39d29fa9d344a1714af40b6911db0ec728a8
7
+ data.tar.gz: '078f51eb6ca43245f61d3c8109ddd919445880d9ce70bbb4a549e138eb8fe2fc04bcc0555067ed67b2c667c9b67877e8876c79d03cac2769e69ef9cc3388e597'
data/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file.
3
3
  This file should follow the standards specified on [http://keepachangelog.com/]
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [11.0.0] 2021-06-25
7
+
8
+ ## Added
9
+
10
+ - support for neo4j 4.1, 4.2, 4.3
11
+
12
+ ## [10.1.0] 2021-02-05
13
+
14
+ ## Added
15
+
16
+ - support for ruby 3.0.0
17
+
6
18
  ## [10.0.2] 2020-12-08
7
19
 
8
20
  ## Fixed
data/Gemfile CHANGED
@@ -7,7 +7,7 @@ gemspec
7
7
  gem 'listen', '< 3.1'
8
8
 
9
9
  active_model_version = ENV['ACTIVE_MODEL_VERSION']
10
- gem 'activemodel', "~> #{active_model_version}" if active_model_version
10
+ gem 'activemodel', "~> #{active_model_version}" if active_model_version&.length&.positive?
11
11
 
12
12
  group 'test' do
13
13
  gem 'coveralls', require: false
@@ -15,7 +15,6 @@ group 'test' do
15
15
  gem 'codecov', require: false
16
16
  gem 'simplecov', require: false
17
17
  gem 'simplecov-html', require: false
18
- gem 'rspec', '~> 3.4'
19
18
  gem 'its'
20
19
  gem 'test-unit'
21
20
  gem 'colored'
data/README.md CHANGED
@@ -45,31 +45,34 @@ Neo4j.rb v4.1.0 was released in January of 2015. Its changes are outlined [here]
45
45
 
46
46
  ## Neo4j version support
47
47
 
48
- | **Neo4j Version** | v2.x | v3.x | >= v4.x | >= 7.0.3 | activegraph 10.0 |
49
- |-------------------|------|-------|---------|----------|------------------|
50
- | 1.9.x | Yes | No | No | No | No |
51
- | 2.0.x | No | Yes | No | No | No |
52
- | 2.1.x | No | Yes | Yes * | Yes | No |
53
- | 2.2.x | No | No | Yes | Yes | No |
54
- | 2.3.x | No | No | Yes | Yes | No |
55
- | 3.0, 3.1, 3.3 | No | No | No | Yes | No |
56
- | 3.4, 3.5 | No | No | No | Yes | Yes |
57
- | 4.0 | No | No | No | No | Yes |
58
- | 4.1 | No | No | No | No | No |
48
+ | **Neo4j Version** | v2.x | v3.x | >= v4.x | >= 7.0.3 | activegraph 10 | activegraph 11 (jRuby only) |
49
+ |-------------------|------|-------|---------|----------|------------------|-----------------------------|
50
+ | 1.9.x | Yes | No | No | No | No | No
51
+ | 2.0.x | No | Yes | No | No | No | No
52
+ | 2.1.x | No | Yes | Yes * | Yes | No | No
53
+ | 2.2.x | No | No | Yes | Yes | No | No
54
+ | 2.3.x | No | No | Yes | Yes | No | No
55
+ | 3.0, 3.1, 3.3 | No | No | No | Yes | No | No
56
+ | 3.4 | No | No | No | Yes | Yes | No
57
+ | 3.5 | No | No | No | Yes | Yes | Yes
58
+ | 4.0 | No | No | No | No | Yes | Yes
59
+ | 4.1 | No | No | No | No | No | Yes
60
+ | 4.2 | No | No | No | No | No | Yes
61
+ | 4.3 | No | No | No | No | No | Yes
59
62
 
60
63
  `*` Neo4j.rb >= 4.x doesn't support Neo4j versions before 2.1.5. To use 2.1.x you should upgrade to a version >= 2.1.5
61
64
 
62
65
  ## Neo4j feature support
63
66
 
64
- | **Neo4j Feature** | v2.x | v3.x | >= v4.x | >= 8.x | activegraph 10.0 |
65
- |----------------------------|--------|------|---------|--------|------------------|
66
- | Bolt Protocol | No | No | No | Yes | Yes |
67
- | Auth | No | No | Yes | Yes | Yes |
68
- | Remote Cypher | Yes | Yes | Yes | Yes | No |
69
- | Transactions | Yes | Yes | Yes | Yes | Yes |
70
- | High Availability | No | Yes | Yes | Yes | Yes |
71
- | Causal Cluster | No | No | No | No | Yes |
72
- | Embedded JVM support | Yes | Yes | Yes | Yes | via bolt only |
67
+ | **Neo4j Feature** | v2.x | v3.x | >= v4.x | >= 8.x | >= activegraph 10.0 |
68
+ |----------------------------|--------|------|---------|--------|---------------------|
69
+ | Bolt Protocol | No | No | No | Yes | Yes |
70
+ | Auth | No | No | Yes | Yes | Yes |
71
+ | Remote Cypher | Yes | Yes | Yes | Yes | No |
72
+ | Transactions | Yes | Yes | Yes | Yes | Yes |
73
+ | High Availability | No | Yes | Yes | Yes | Yes |
74
+ | Causal Cluster | No | No | No | No | Yes |
75
+ | Embedded JVM support | Yes | Yes | Yes | Yes | via bolt only |
73
76
 
74
77
  ## Documentation
75
78
 
data/activegraph.gemspec CHANGED
@@ -34,9 +34,10 @@ DESCRIPTION
34
34
 
35
35
  s.add_dependency('activemodel', '>= 4.0')
36
36
  s.add_dependency('activesupport', '>= 4.0')
37
- s.add_dependency('i18n', '!= 1.3.0') # version 1.3.0 introduced a bug with `symbolize_key`
37
+ s.add_dependency('i18n', '!= 1.8.8') # https://github.com/jruby/jruby/issues/6547
38
38
  s.add_dependency('orm_adapter', '~> 0.5.0')
39
- s.add_dependency("neo4j-java-driver", '~> 4.2.0.beta.0')
39
+ s.add_dependency('sorted_set')
40
+ s.add_dependency("neo4j-java-driver", '>= 4.3.0')
40
41
  s.add_development_dependency('guard')
41
42
  s.add_development_dependency('guard-rspec')
42
43
  s.add_development_dependency('guard-rubocop')
@@ -49,4 +50,5 @@ DESCRIPTION
49
50
  s.add_development_dependency('rubocop', '>= 0.56.0')
50
51
  s.add_development_dependency('yard')
51
52
  s.add_development_dependency('dryspec')
53
+ s.add_development_dependency('rspec', '< 3.10') # Cannot proxy frozen objects
52
54
  end
@@ -9,27 +9,29 @@ module ActiveGraph
9
9
  end
10
10
 
11
11
  def indexes
12
- read_transaction do
13
- result = query('CALL db.indexes()', {}, skip_instrumentation: true)
14
-
12
+ raw_indexes do |keys, result|
15
13
  result.map do |row|
16
- { type: row[:type].to_sym, label: label(result, row), properties: properties(row),
14
+ { type: row[:type].to_sym, label: label(keys, row), properties: properties(row),
17
15
  state: row[:state].to_sym }
18
16
  end
19
17
  end
20
18
  end
21
19
 
22
20
  def constraints
23
- session do |session|
24
- session.read_transaction do |tx|
25
- tx.run('CALL db.indexes()')
26
- .select(&method(v4?(tx.run('CALL db.indexes()')) ? :v4_filter : :v3_filter)).map do |row|
27
- { type: :uniqueness, label: label(tx.run('CALL db.indexes()'), row), properties: properties(row) }
28
- end
21
+ raw_indexes do |keys, result|
22
+ result.select(&method(v4?(keys) ? :v4_filter : :v3_filter)).map do |row|
23
+ { type: :uniqueness, label: label(keys, row), properties: properties(row) }
29
24
  end
30
25
  end
31
26
  end
32
27
 
28
+ def raw_indexes
29
+ read_transaction do
30
+ result = query('CALL db.indexes()', {}, skip_instrumentation: true)
31
+ yield result.keys, result.reject { |row| row[:type] == 'LOOKUP' }
32
+ end
33
+ end
34
+
33
35
  private
34
36
 
35
37
  def v4_filter(row)
@@ -40,22 +42,22 @@ module ActiveGraph
40
42
  row[:type] == 'node_unique_property'
41
43
  end
42
44
 
43
- def label(result, row)
44
- if v34?(result)
45
+ def label(keys, row)
46
+ if v34?(keys)
45
47
  row[:label]
46
48
  else
47
- (v4?(result) ? row[:labelsOrTypes] : row[:tokenNames]).first
49
+ (v4?(keys) ? row[:labelsOrTypes] : row[:tokenNames]).first
48
50
  end.to_sym
49
51
  end
50
52
 
51
- def v4?(result)
53
+ def v4?(keys)
52
54
  return @v4 unless @v4.nil?
53
- @v4 = result.keys.include?(:labelsOrTypes)
55
+ @v4 = keys.include?(:labelsOrTypes)
54
56
  end
55
57
 
56
- def v34?(result)
58
+ def v34?(keys)
57
59
  return @v34 unless @v34.nil?
58
- @v34 = result.keys.include?(:label)
60
+ @v34 = keys.include?(:label)
59
61
  end
60
62
 
61
63
  def properties(row)
@@ -1,15 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'sorted_set'
4
+
1
5
  module ActiveGraph
2
6
  module Migrations
3
7
  class Runner
4
- STATUS_TABLE_FORMAT = '%-10s %-20s %s'.freeze
5
- SEPARATOR = '--------------------------------------------------'.freeze
6
- FILE_MISSING = '**** file missing ****'.freeze
7
- STATUS_TABLE_HEADER = ['Status'.freeze, 'Migration ID'.freeze, 'Migration Name'.freeze].freeze
8
- UP_MESSAGE = 'up'.freeze
9
- DOWN_MESSAGE = 'down'.freeze
10
- INCOMPLETE_MESSAGE = 'incomplete'.freeze
11
- MIGRATION_RUNNING = {up: 'running'.freeze, down: 'reverting'.freeze}.freeze
12
- MIGRATION_DONE = {up: 'migrated'.freeze, down: 'reverted'.freeze}.freeze
8
+ STATUS_TABLE_FORMAT = '%-10s %-20s %s'
9
+ SEPARATOR = '--------------------------------------------------'
10
+ FILE_MISSING = '**** file missing ****'
11
+ STATUS_TABLE_HEADER = ['Status', 'Migration ID', 'Migration Name'].freeze
12
+ UP_MESSAGE = 'up'
13
+ DOWN_MESSAGE = 'down'
14
+ INCOMPLETE_MESSAGE = 'incomplete'
15
+ MIGRATION_RUNNING = {up: 'running', down: 'reverting'}.freeze
16
+ MIGRATION_DONE = {up: 'migrated', down: 'reverted'}.freeze
13
17
 
14
18
  def initialize(options = {})
15
19
  @silenced = options[:silenced] || !!ENV['MIGRATIONS_SILENCED']
@@ -24,11 +24,12 @@ module ActiveGraph
24
24
  end
25
25
 
26
26
  def fetch_index_descriptions
27
- result = ActiveGraph::Base.query('CALL db.indexes()')
28
- if result.keys.include?(:description)
29
- v3_indexes(result)
30
- else
31
- v4_indexes(result)
27
+ ActiveGraph::Base.raw_indexes do |keys, result|
28
+ if keys.include?(:description)
29
+ v3_indexes(result)
30
+ else
31
+ v4_indexes(result)
32
+ end
32
33
  end
33
34
  end
34
35
 
@@ -28,7 +28,7 @@ module ActiveGraph
28
28
  def validate_each(record, attribute, value)
29
29
  return unless found(record, attribute, value).exists?
30
30
 
31
- record.errors.add(attribute, :taken, options.except(:case_sensitive, :scope).merge(value: value))
31
+ record.errors.add(attribute, :taken, **options.except(:case_sensitive, :scope).merge(value: value))
32
32
  end
33
33
 
34
34
  def found(record, attribute, value)
@@ -180,7 +180,7 @@ class #{migration_class_name} < ActiveGraph::Migrations::Base
180
180
  drop_#{index_or_constraint} #{label.to_sym.inspect}, #{property_name.to_sym.inspect}
181
181
  end
182
182
  end
183
- CONTENT
183
+ CONTENT
184
184
 
185
185
  File.open(path, 'w') { |f| f << content }
186
186
 
@@ -1,3 +1,3 @@
1
1
  module ActiveGraph
2
- VERSION = '11.0.0.beta.4'
2
+ VERSION = '11.0.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activegraph
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.0.0.beta.4
4
+ version: 11.0.0
5
5
  platform: java
6
6
  authors:
7
7
  - Andreas Ronge, Brian Underwood, Chris Grigg, Heinrich Klobuczek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-16 00:00:00.000000000 Z
11
+ date: 2021-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -17,8 +17,8 @@ dependencies:
17
17
  - !ruby/object:Gem::Version
18
18
  version: '4.0'
19
19
  name: activemodel
20
- type: :runtime
21
20
  prerelease: false
21
+ type: :runtime
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
@@ -31,8 +31,8 @@ dependencies:
31
31
  - !ruby/object:Gem::Version
32
32
  version: '4.0'
33
33
  name: activesupport
34
- type: :runtime
35
34
  prerelease: false
35
+ type: :runtime
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
@@ -43,15 +43,15 @@ dependencies:
43
43
  requirements:
44
44
  - - "!="
45
45
  - !ruby/object:Gem::Version
46
- version: 1.3.0
46
+ version: 1.8.8
47
47
  name: i18n
48
- type: :runtime
49
48
  prerelease: false
49
+ type: :runtime
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "!="
53
53
  - !ruby/object:Gem::Version
54
- version: 1.3.0
54
+ version: 1.8.8
55
55
  - !ruby/object:Gem::Dependency
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
@@ -59,8 +59,8 @@ dependencies:
59
59
  - !ruby/object:Gem::Version
60
60
  version: 0.5.0
61
61
  name: orm_adapter
62
- type: :runtime
63
62
  prerelease: false
63
+ type: :runtime
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
@@ -69,17 +69,31 @@ dependencies:
69
69
  - !ruby/object:Gem::Dependency
70
70
  requirement: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - "~>"
72
+ - - ">="
73
73
  - !ruby/object:Gem::Version
74
- version: 4.2.0.beta.0
75
- name: neo4j-java-driver
74
+ version: '0'
75
+ name: sorted_set
76
+ prerelease: false
76
77
  type: :runtime
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: 4.3.0
89
+ name: neo4j-java-driver
77
90
  prerelease: false
91
+ type: :runtime
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
- - - "~>"
94
+ - - ">="
81
95
  - !ruby/object:Gem::Version
82
- version: 4.2.0.beta.0
96
+ version: 4.3.0
83
97
  - !ruby/object:Gem::Dependency
84
98
  requirement: !ruby/object:Gem::Requirement
85
99
  requirements:
@@ -87,8 +101,8 @@ dependencies:
87
101
  - !ruby/object:Gem::Version
88
102
  version: '0'
89
103
  name: guard
90
- type: :development
91
104
  prerelease: false
105
+ type: :development
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - ">="
@@ -101,8 +115,8 @@ dependencies:
101
115
  - !ruby/object:Gem::Version
102
116
  version: '0'
103
117
  name: guard-rspec
104
- type: :development
105
118
  prerelease: false
119
+ type: :development
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
122
  - - ">="
@@ -115,8 +129,8 @@ dependencies:
115
129
  - !ruby/object:Gem::Version
116
130
  version: '0'
117
131
  name: guard-rubocop
118
- type: :development
119
132
  prerelease: false
133
+ type: :development
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
136
  - - ">="
@@ -129,8 +143,8 @@ dependencies:
129
143
  - !ruby/object:Gem::Version
130
144
  version: 0.3.0
131
145
  name: neo4j-rake_tasks
132
- type: :development
133
146
  prerelease: false
147
+ type: :development
134
148
  version_requirements: !ruby/object:Gem::Requirement
135
149
  requirements:
136
150
  - - ">="
@@ -143,8 +157,8 @@ dependencies:
143
157
  - !ruby/object:Gem::Version
144
158
  version: '0'
145
159
  name: os
146
- type: :development
147
160
  prerelease: false
161
+ type: :development
148
162
  version_requirements: !ruby/object:Gem::Requirement
149
163
  requirements:
150
164
  - - ">="
@@ -157,8 +171,8 @@ dependencies:
157
171
  - !ruby/object:Gem::Version
158
172
  version: '0'
159
173
  name: pry
160
- type: :development
161
174
  prerelease: false
175
+ type: :development
162
176
  version_requirements: !ruby/object:Gem::Requirement
163
177
  requirements:
164
178
  - - ">="
@@ -171,8 +185,8 @@ dependencies:
171
185
  - !ruby/object:Gem::Version
172
186
  version: '4.0'
173
187
  name: railties
174
- type: :development
175
188
  prerelease: false
189
+ type: :development
176
190
  version_requirements: !ruby/object:Gem::Requirement
177
191
  requirements:
178
192
  - - ">="
@@ -185,8 +199,8 @@ dependencies:
185
199
  - !ruby/object:Gem::Version
186
200
  version: '0'
187
201
  name: rake
188
- type: :development
189
202
  prerelease: false
203
+ type: :development
190
204
  version_requirements: !ruby/object:Gem::Requirement
191
205
  requirements:
192
206
  - - ">="
@@ -199,8 +213,8 @@ dependencies:
199
213
  - !ruby/object:Gem::Version
200
214
  version: 0.56.0
201
215
  name: rubocop
202
- type: :development
203
216
  prerelease: false
217
+ type: :development
204
218
  version_requirements: !ruby/object:Gem::Requirement
205
219
  requirements:
206
220
  - - ">="
@@ -213,8 +227,8 @@ dependencies:
213
227
  - !ruby/object:Gem::Version
214
228
  version: '0'
215
229
  name: yard
216
- type: :development
217
230
  prerelease: false
231
+ type: :development
218
232
  version_requirements: !ruby/object:Gem::Requirement
219
233
  requirements:
220
234
  - - ">="
@@ -227,13 +241,27 @@ dependencies:
227
241
  - !ruby/object:Gem::Version
228
242
  version: '0'
229
243
  name: dryspec
230
- type: :development
231
244
  prerelease: false
245
+ type: :development
232
246
  version_requirements: !ruby/object:Gem::Requirement
233
247
  requirements:
234
248
  - - ">="
235
249
  - !ruby/object:Gem::Version
236
250
  version: '0'
251
+ - !ruby/object:Gem::Dependency
252
+ requirement: !ruby/object:Gem::Requirement
253
+ requirements:
254
+ - - "<"
255
+ - !ruby/object:Gem::Version
256
+ version: '3.10'
257
+ name: rspec
258
+ prerelease: false
259
+ type: :development
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - "<"
263
+ - !ruby/object:Gem::Version
264
+ version: '3.10'
237
265
  description: 'A Neo4j OGM (Object-Graph-Mapper) for Ruby heavily inspired by ActiveRecord.
238
266
 
239
267
  '
@@ -411,11 +439,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
411
439
  version: '2.5'
412
440
  required_rubygems_version: !ruby/object:Gem::Requirement
413
441
  requirements:
414
- - - ">"
442
+ - - ">="
415
443
  - !ruby/object:Gem::Version
416
- version: 1.3.1
444
+ version: '0'
417
445
  requirements: []
418
- rubygems_version: 3.0.6
446
+ rubygems_version: 3.1.6
419
447
  signing_key:
420
448
  specification_version: 4
421
449
  summary: A graph database for Ruby