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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ba038495cfe75b3fe4fbcd93352cab82f6e644773131bb9964c516abcfa5f27
4
- data.tar.gz: f4a6a3e5a6954a8efddd02b654be4e247db11d336d805688000e5bee035ea1c4
3
+ metadata.gz: 8b31870a0f7ae0f4ced9817639c863e4b0bdabbed1852a9c98320f71982ba983
4
+ data.tar.gz: ee8f1bdf68fb094004d2ed7c296efa9219decb62848623fdb0e9e73f2597f11d
5
5
  SHA512:
6
- metadata.gz: 8e3bbc761abb8d48146d52223d8f989c9e2a5e6d01cbea3b6f49c8a540bf73bb524d161c5de8d1151212268a30875ac063f459074eda0afc2e11338c446bfde7
7
- data.tar.gz: 944cd971a85ce0d19c181e7f774dd291bff8f97033ce8d3dc5980ac0a57e031b557675a68566843392dd9ce01bd66ed85c931977b9f3537f2b48eaa0665b9b05
6
+ metadata.gz: 1f0fc7026dbcfe605c22d31633626135abbe72da80ba80c3a7c051b3565047551e1eebff2a01b8596ffc68fd18029b8724d1fb0cf697cf81a8039e182125e169
7
+ data.tar.gz: 9ef0f7c2f1007a92592f585daa798b7629c88540b44b58b51eaa5aca11a2e1ae9d2096ea9f9c28757c12099757622ffa476ff31026e955066023d3c8fe1cafd1
@@ -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 2021-08-02 08:58:28 UTC using RuboCop version 1.18.4.
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, ExcludedMethods, IgnoredMethods.
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: 18
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: 37
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: 9
64
- # Cop supports --auto-correct.
65
- # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
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
@@ -1,3 +1,6 @@
1
+ ### Version 4.1.1
2
+ - ADD: Future support for change in Rails 8.2
3
+
1
4
  ### Version 4.1.0
2
5
  - ADD: Support for Rails 8.0
3
6
 
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
 
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 8.1"
6
+ gem "activesupport", "~> 8.1"
7
+
8
+ gemspec path: "../"
@@ -32,11 +32,15 @@ module ActsAsRecursiveTree
32
32
  end
33
33
 
34
34
  def recursive_temp_table
35
- @recursive_temp_table ||= Arel::Table.new("recursive_#{klass.table_name}_#{@rand_int}_temp")
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 ||= Arel::Table.new("traverse_#{@rand_int}_loc")
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActsAsRecursiveTree
4
- VERSION = '4.1.0'
4
+ VERSION = '4.1.1'
5
5
  end
@@ -17,7 +17,7 @@ RSpec.describe ActsAsRecursiveTree::Options::Values do
17
17
  end
18
18
  end
19
19
 
20
- let(:table) { Arel::Table.new('test_table') }
20
+ let(:table) { Location.arel_table }
21
21
  let(:attribute) { table['test_attr'] }
22
22
 
23
23
  context 'with invalid agurment' do
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.0
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: 2024-11-12 00:00:00.000000000 Z
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: []