acts_as_recursive_tree 4.1.0 → 4.1.1
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/.github/workflows/ci.yml +6 -2
- data/.rubocop_todo.yml +13 -42
- data/Appraisals +5 -0
- data/CHANGELOG.md +3 -0
- data/README.md +4 -0
- data/gemfiles/ar_81.gemfile +8 -0
- data/lib/acts_as_recursive_tree/builders/relation_builder.rb +6 -2
- data/lib/acts_as_recursive_tree/config.rb +6 -0
- data/lib/acts_as_recursive_tree/version.rb +1 -1
- data/spec/acts_as_recursive_tree/options/values_spec.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8b31870a0f7ae0f4ced9817639c863e4b0bdabbed1852a9c98320f71982ba983
|
|
4
|
+
data.tar.gz: ee8f1bdf68fb094004d2ed7c296efa9219decb62848623fdb0e9e73f2597f11d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f0fc7026dbcfe605c22d31633626135abbe72da80ba80c3a7c051b3565047551e1eebff2a01b8596ffc68fd18029b8724d1fb0cf697cf81a8039e182125e169
|
|
7
|
+
data.tar.gz: 9ef0f7c2f1007a92592f585daa798b7629c88540b44b58b51eaa5aca11a2e1ae9d2096ea9f9c28757c12099757622ffa476ff31026e955066023d3c8fe1cafd1
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -19,12 +19,16 @@ jobs:
|
|
|
19
19
|
runs-on: ubuntu-latest
|
|
20
20
|
strategy:
|
|
21
21
|
matrix:
|
|
22
|
-
ruby-version: ['3.1', '3.2', '3.3']
|
|
23
|
-
gemfile: [ar_70, ar_71, ar_72, ar_80, ar_next]
|
|
22
|
+
ruby-version: ['3.1', '3.2', '3.3', '3.4', '4.0']
|
|
23
|
+
gemfile: [ar_70, ar_71, ar_72, ar_80, ar_81, ar_next]
|
|
24
24
|
exclude:
|
|
25
25
|
- ruby-version: '3.1'
|
|
26
26
|
gemfile: ar_80
|
|
27
27
|
- ruby-version: '3.1'
|
|
28
|
+
gemfile: ar_81
|
|
29
|
+
- ruby-version: '3.1'
|
|
30
|
+
gemfile: ar_next
|
|
31
|
+
- ruby-version: '3.2'
|
|
28
32
|
gemfile: ar_next
|
|
29
33
|
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
|
|
30
34
|
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,68 +1,39 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on
|
|
3
|
+
# on 2026-06-26 10:41:32 UTC using RuboCop version 1.68.0.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count: 6
|
|
10
|
-
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
|
11
|
-
# IgnoredMethods: refine
|
|
12
|
-
Metrics/BlockLength:
|
|
13
|
-
Max: 87
|
|
14
|
-
|
|
15
9
|
# Offense count: 1
|
|
16
|
-
# Configuration parameters: CountComments, CountAsOne
|
|
10
|
+
# Configuration parameters: CountComments, CountAsOne.
|
|
11
|
+
Metrics/ClassLength:
|
|
12
|
+
Max: 101
|
|
13
|
+
|
|
14
|
+
# Offense count: 2
|
|
15
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
17
16
|
Metrics/MethodLength:
|
|
18
17
|
Max: 15
|
|
19
18
|
|
|
20
|
-
# Offense count:
|
|
21
|
-
# Configuration parameters: Prefixes.
|
|
19
|
+
# Offense count: 2
|
|
20
|
+
# Configuration parameters: Prefixes, AllowedPatterns.
|
|
22
21
|
# Prefixes: when, with, without
|
|
23
22
|
RSpec/ContextWording:
|
|
24
23
|
Exclude:
|
|
25
|
-
- 'spec/builders_spec.rb'
|
|
26
24
|
- 'spec/model/location_spec.rb'
|
|
27
25
|
- 'spec/model/node_spec.rb'
|
|
28
|
-
- 'spec/model/relation_spec.rb'
|
|
29
|
-
- 'spec/values_spec.rb'
|
|
30
26
|
|
|
31
|
-
# Offense count:
|
|
27
|
+
# Offense count: 30
|
|
32
28
|
# Configuration parameters: AssignmentOnly.
|
|
33
29
|
RSpec/InstanceVariable:
|
|
34
30
|
Exclude:
|
|
35
31
|
- 'spec/model/location_spec.rb'
|
|
36
32
|
- 'spec/model/node_spec.rb'
|
|
37
|
-
- 'spec/model/relation_spec.rb'
|
|
38
|
-
|
|
39
|
-
# Offense count: 1
|
|
40
|
-
RSpec/MultipleDescribes:
|
|
41
|
-
Exclude:
|
|
42
|
-
- 'spec/builders_spec.rb'
|
|
43
|
-
|
|
44
|
-
# Offense count: 2
|
|
45
|
-
RSpec/MultipleExpectations:
|
|
46
|
-
Max: 2
|
|
47
|
-
|
|
48
|
-
# Offense count: 17
|
|
49
|
-
# Configuration parameters: AllowedConstants.
|
|
50
|
-
Style/Documentation:
|
|
51
|
-
Exclude:
|
|
52
|
-
- 'lib/acts_as_recursive_tree.rb'
|
|
53
|
-
- 'lib/acts_as_recursive_tree/acts_macro.rb'
|
|
54
|
-
- 'lib/acts_as_recursive_tree/builders/ancestors.rb'
|
|
55
|
-
- 'lib/acts_as_recursive_tree/builders/descendants.rb'
|
|
56
|
-
- 'lib/acts_as_recursive_tree/builders/leaves.rb'
|
|
57
|
-
- 'lib/acts_as_recursive_tree/model.rb'
|
|
58
|
-
- 'lib/acts_as_recursive_tree/options/depth_condition.rb'
|
|
59
|
-
- 'lib/acts_as_recursive_tree/options/query_options.rb'
|
|
60
|
-
- 'lib/acts_as_recursive_tree/options/values.rb'
|
|
61
|
-
- 'lib/acts_as_recursive_tree/railtie.rb'
|
|
62
33
|
|
|
63
|
-
# Offense count:
|
|
64
|
-
#
|
|
65
|
-
# Configuration parameters:
|
|
34
|
+
# Offense count: 7
|
|
35
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
36
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
|
66
37
|
# URISchemes: http, https
|
|
67
38
|
Layout/LineLength:
|
|
68
39
|
Max: 291
|
data/Appraisals
CHANGED
|
@@ -20,6 +20,11 @@ appraise 'ar-80' do
|
|
|
20
20
|
gem 'activesupport', '~> 8.0'
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
+
appraise 'ar-81' do
|
|
24
|
+
gem 'activerecord', '~> 8.1'
|
|
25
|
+
gem 'activesupport', '~> 8.1'
|
|
26
|
+
end
|
|
27
|
+
|
|
23
28
|
appraise 'ar-next' do
|
|
24
29
|
git 'https://github.com/rails/rails.git', branch: 'main' do
|
|
25
30
|
gem 'activerecord'
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -17,6 +17,8 @@ ActsAsRecursiveTree currently supports following ActiveRecord versions and is te
|
|
|
17
17
|
* ActiveRecord 7.0.x
|
|
18
18
|
* ActiveRecord 7.1.x
|
|
19
19
|
* ActiveRecord 7.2.x
|
|
20
|
+
* ActiveRecord 8.0.x
|
|
21
|
+
* ActiveRecord 8.1.x
|
|
20
22
|
* ActiveRecord NEXT (from git)
|
|
21
23
|
|
|
22
24
|
## Supported Rubies
|
|
@@ -24,6 +26,8 @@ ActsAsRecursiveTree is tested with following rubies:
|
|
|
24
26
|
* MRuby 3.1
|
|
25
27
|
* MRuby 3.2
|
|
26
28
|
* MRuby 3.3
|
|
29
|
+
* MRuby 3.4
|
|
30
|
+
* MRuby 4.0
|
|
27
31
|
|
|
28
32
|
Other Ruby implementations are not tested, but should also work.
|
|
29
33
|
|
|
@@ -32,11 +32,15 @@ module ActsAsRecursiveTree
|
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
def recursive_temp_table
|
|
35
|
-
@recursive_temp_table ||=
|
|
35
|
+
@recursive_temp_table ||= arel_table("recursive_#{klass.table_name}_#{@rand_int}_temp")
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
def travers_loc_table
|
|
39
|
-
@travers_loc_table ||=
|
|
39
|
+
@travers_loc_table ||= arel_table("traverse_#{@rand_int}_loc")
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def arel_table(name)
|
|
43
|
+
config.arel_table_requires_keyword_args? ? Arel::Table.new(name: name) : Arel::Table.new(name)
|
|
40
44
|
end
|
|
41
45
|
|
|
42
46
|
def config
|
|
@@ -31,5 +31,11 @@ module ActsAsRecursiveTree
|
|
|
31
31
|
@cycle_detection = @model_class.connection.adapter_name == 'PostgreSQL' &&
|
|
32
32
|
@model_class.connection.database_version >= 140_000
|
|
33
33
|
end
|
|
34
|
+
|
|
35
|
+
def arel_table_requires_keyword_args?
|
|
36
|
+
return @arel_table_requires_keyword_args if defined?(@arel_table_requires_keyword_args)
|
|
37
|
+
|
|
38
|
+
@arel_table_requires_keyword_args = ::ActiveRecord.version >= '8.2.0.alpha'
|
|
39
|
+
end
|
|
34
40
|
end
|
|
35
41
|
end
|
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: acts_as_recursive_tree
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.1.
|
|
4
|
+
version: 4.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Wolfgang Wedelich-John
|
|
8
8
|
- Willem Mulder
|
|
9
|
-
autorequire:
|
|
9
|
+
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2026-06-26 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activerecord
|
|
@@ -205,6 +205,7 @@ files:
|
|
|
205
205
|
- gemfiles/ar_71.gemfile
|
|
206
206
|
- gemfiles/ar_72.gemfile
|
|
207
207
|
- gemfiles/ar_80.gemfile
|
|
208
|
+
- gemfiles/ar_81.gemfile
|
|
208
209
|
- gemfiles/ar_next.gemfile
|
|
209
210
|
- lib/acts_as_recursive_tree.rb
|
|
210
211
|
- lib/acts_as_recursive_tree/acts_macro.rb
|
|
@@ -248,7 +249,7 @@ licenses:
|
|
|
248
249
|
metadata:
|
|
249
250
|
bug_tracker_uri: https://github.com/1and1/acts_as_recursive_tree/issues
|
|
250
251
|
changelog_uri: https://github.com/1and1/acts_as_recursive_tree/blob/main/CHANGELOG.md
|
|
251
|
-
post_install_message:
|
|
252
|
+
post_install_message:
|
|
252
253
|
rdoc_options: []
|
|
253
254
|
require_paths:
|
|
254
255
|
- lib
|
|
@@ -264,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
264
265
|
version: '0'
|
|
265
266
|
requirements: []
|
|
266
267
|
rubygems_version: 3.3.27
|
|
267
|
-
signing_key:
|
|
268
|
+
signing_key:
|
|
268
269
|
specification_version: 4
|
|
269
270
|
summary: Drop in replacement for acts_as_tree but using recursive queries
|
|
270
271
|
test_files: []
|