acts_as_recursive_tree 3.0.0 → 3.1.0

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: 6cb3b3fef0f54be5c64a667f3ce289fb536bbdce72dc9758eae7a3c27385adf1
4
- data.tar.gz: 5c65367bf564d3d12b70506ec2ecdaed1e9aaed535a822ccebff0b1aefe99b59
3
+ metadata.gz: b3681366c263bd90e2479c6a4761042825547241a15e828678c260789f05ad54
4
+ data.tar.gz: c526e787809100bcba957ddeae424ffa068afe7f10e8e2ece1aec354cce6c70b
5
5
  SHA512:
6
- metadata.gz: 187193f5f118a30d1359cde9b40d239e2d89ed9166dce8c0e73469dd3baf28b86fd7874ed89c763f6bdeff4c8d012bb78fa6cd521998f28289134d7bd0cce13a
7
- data.tar.gz: 6ca7d12b131992d6f901d462c857b79a976e323f40d0f198d6e1c26f3ce1ff36d6707226d695687b8b1bfb2a1209f7ca754ab4412bb23d581771add1ee1826bd
6
+ metadata.gz: 2b4e5b9a5a1462b39cc8c2cc0184d8db0653b1d02be8728d2bf46fa309d847224765c3e6b8ac885f064a42f64b34375d9e032e888d5588c9940d55225ceced4a
7
+ data.tar.gz: 4e8a2077169e98b889671412c87c80d21f03541bbcdc62cefe520e47c626459c29ff1ee6a07bb54a9ebd94ca8418c4369d27ff9950a3c559b0bd7ef41970afc6
@@ -19,8 +19,15 @@ jobs:
19
19
  runs-on: ubuntu-latest
20
20
  strategy:
21
21
  matrix:
22
- ruby-version: ['2.5', '2.6', '2.7']
23
- gemfile: [ar_52, ar_60, ar_61]
22
+ ruby-version: ['2.5', '2.6', '2.7', '3.0']
23
+ gemfile: [ar_52, ar_60, ar_61, ar_70]
24
+ exclude:
25
+ - ruby-version: '3.0'
26
+ gemfile: ar_52
27
+ - ruby-version: '2.5'
28
+ gemfile: ar_70
29
+ - ruby-version: '2.6'
30
+ gemfile: ar_70
24
31
  env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
25
32
  BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
26
33
  steps:
data/.rubocop.yml CHANGED
@@ -9,6 +9,9 @@ AllCops:
9
9
  NewCops: enable
10
10
  SuggestExtensions: false
11
11
 
12
+ Gemspec/RequireMFA:
13
+ Enabled: false
14
+
12
15
  Metrics/AbcSize:
13
16
  Max: 20
14
17
 
data/Appraisals CHANGED
@@ -14,3 +14,8 @@ appraise 'ar-61' do
14
14
  gem 'activerecord', '~> 6.1.0'
15
15
  gem 'activesupport', '~> 6.1.0'
16
16
  end
17
+
18
+ appraise 'ar-70' do
19
+ gem 'activerecord', '~> 7.0.0'
20
+ gem 'activesupport', '~> 7.0.0'
21
+ end
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### Version 3.1.0
2
+ - Rails 7 support
3
+
1
4
  ### Version 3.0.0
2
5
  - BREAKING: Dropped support for Rails < 5.2
3
6
  - BREAKING: Increased minimum Ruby version to 2.5
data/README.md CHANGED
@@ -12,6 +12,12 @@ When you have tree based data in your application, you always to struggle with r
12
12
 
13
13
  Luckily, there is already a SQL standard that makes it very easy to retrieve data in the traditional parent/child relation. Currently this is only supported in sqlite and Postgres. With this it is possible to query complete trees without the need of extra tables or indices.
14
14
 
15
+ ## Supported environments
16
+ ActsAsRecursiveTree currently supports following ActiveRecord versions and is tested for compatibility:
17
+ * ActiveRecord 5.2.x
18
+ * ActiveRecord 6.0.x
19
+ * ActiveRecord 6.1.x
20
+ * ActiveRecord 7.0.x
15
21
 
16
22
  ## Installation
17
23
 
@@ -16,24 +16,24 @@ Gem::Specification.new do |spec|
16
16
  spec.license = 'MIT'
17
17
  spec.metadata = {
18
18
  'bug_tracker_uri' => 'https://github.com/1and1/acts_as_recursive_tree/issues',
19
- 'changelog_uri' => 'https://github.com/1and1/acts_as_recursive_tree/CHANGELOG.md'
19
+ 'changelog_uri' => 'https://github.com/1and1/acts_as_recursive_tree/blob/main/CHANGELOG.md'
20
20
  }
21
21
  spec.required_ruby_version = '>= 2.5.0'
22
22
  spec.files = `git ls-files -z`.split("\x0")
23
23
  spec.test_files = spec.files.grep(%r{^spec/})
24
24
  spec.require_paths = ['lib']
25
25
 
26
- spec.add_runtime_dependency 'activerecord', '>= 5.2.0', '< 7.0'
27
- spec.add_runtime_dependency 'activesupport', '>= 5.2.0', '< 7.0'
26
+ spec.add_runtime_dependency 'activerecord', '>= 5.2.0', '< 7.1'
27
+ spec.add_runtime_dependency 'activesupport', '>= 5.2.0', '< 7.1'
28
28
  spec.add_runtime_dependency 'zeitwerk', '>= 2.4'
29
29
 
30
30
  spec.add_development_dependency 'appraisal', '~> 2.4'
31
31
  spec.add_development_dependency 'database_cleaner', '~> 1.5'
32
32
  spec.add_development_dependency 'rake'
33
33
  spec.add_development_dependency 'rspec-rails', '>= 3.5'
34
- spec.add_development_dependency 'rubocop', '>= 1.8.0'
35
- spec.add_development_dependency 'rubocop-rails', '>= 2.9.0'
36
- spec.add_development_dependency 'rubocop-rspec', '>= 2.1.0'
34
+ spec.add_development_dependency 'rubocop', '~> 1.23.0'
35
+ spec.add_development_dependency 'rubocop-rails', '~> 2.12.0'
36
+ spec.add_development_dependency 'rubocop-rspec', '~> 2.6.0'
37
37
 
38
38
  spec.add_development_dependency 'sqlite3', '~> 1.3'
39
39
  end
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 7.0.0"
6
+ gem "activesupport", "~> 7.0.0"
7
+
8
+ gemspec path: "../"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActsAsRecursiveTree
4
- VERSION = '3.0.0'
4
+ VERSION = '3.1.0'
5
5
  end
data/spec/db/database.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'fileutils'
4
+
3
5
  database_folder = "#{File.dirname(__FILE__)}/../db"
4
6
  database_adapter = 'sqlite'
5
7
 
@@ -24,7 +24,7 @@ describe Node do
24
24
  expect(@root.children.count).to be(3)
25
25
  end
26
26
 
27
- it 'does not include root node ' do
27
+ it 'does not include root node' do
28
28
  expect(@root.children).not_to include(@root)
29
29
  end
30
30
  end
data/spec/values_spec.rb CHANGED
@@ -72,9 +72,16 @@ describe ActsAsRecursiveTree::Options::Values do
72
72
  end
73
73
 
74
74
  context 'Relation' do
75
- subject(:value) { described_class.create(relation, OpenStruct.new(primary_key: :id)) }
75
+ subject(:value) { described_class.create(relation, double) }
76
76
 
77
77
  let(:relation) { Node.where(name: 'test') }
78
+ let(:double) do
79
+ Class.new do
80
+ def self.primary_key
81
+ :id
82
+ end
83
+ end
84
+ end
78
85
 
79
86
  it { is_expected.to be_a ActsAsRecursiveTree::Options::Values::Relation }
80
87
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_recursive_tree
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wolfgang Wedelich-John
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-08-02 00:00:00.000000000 Z
12
+ date: 2021-12-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: 5.2.0
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '7.0'
23
+ version: '7.1'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,7 +30,7 @@ dependencies:
30
30
  version: 5.2.0
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '7.0'
33
+ version: '7.1'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: activesupport
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -40,7 +40,7 @@ dependencies:
40
40
  version: 5.2.0
41
41
  - - "<"
42
42
  - !ruby/object:Gem::Version
43
- version: '7.0'
43
+ version: '7.1'
44
44
  type: :runtime
45
45
  prerelease: false
46
46
  version_requirements: !ruby/object:Gem::Requirement
@@ -50,7 +50,7 @@ dependencies:
50
50
  version: 5.2.0
51
51
  - - "<"
52
52
  - !ruby/object:Gem::Version
53
- version: '7.0'
53
+ version: '7.1'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: zeitwerk
56
56
  requirement: !ruby/object:Gem::Requirement
@@ -125,44 +125,44 @@ dependencies:
125
125
  name: rubocop
126
126
  requirement: !ruby/object:Gem::Requirement
127
127
  requirements:
128
- - - ">="
128
+ - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: 1.8.0
130
+ version: 1.23.0
131
131
  type: :development
132
132
  prerelease: false
133
133
  version_requirements: !ruby/object:Gem::Requirement
134
134
  requirements:
135
- - - ">="
135
+ - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: 1.8.0
137
+ version: 1.23.0
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: rubocop-rails
140
140
  requirement: !ruby/object:Gem::Requirement
141
141
  requirements:
142
- - - ">="
142
+ - - "~>"
143
143
  - !ruby/object:Gem::Version
144
- version: 2.9.0
144
+ version: 2.12.0
145
145
  type: :development
146
146
  prerelease: false
147
147
  version_requirements: !ruby/object:Gem::Requirement
148
148
  requirements:
149
- - - ">="
149
+ - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: 2.9.0
151
+ version: 2.12.0
152
152
  - !ruby/object:Gem::Dependency
153
153
  name: rubocop-rspec
154
154
  requirement: !ruby/object:Gem::Requirement
155
155
  requirements:
156
- - - ">="
156
+ - - "~>"
157
157
  - !ruby/object:Gem::Version
158
- version: 2.1.0
158
+ version: 2.6.0
159
159
  type: :development
160
160
  prerelease: false
161
161
  version_requirements: !ruby/object:Gem::Requirement
162
162
  requirements:
163
- - - ">="
163
+ - - "~>"
164
164
  - !ruby/object:Gem::Version
165
- version: 2.1.0
165
+ version: 2.6.0
166
166
  - !ruby/object:Gem::Dependency
167
167
  name: sqlite3
168
168
  requirement: !ruby/object:Gem::Requirement
@@ -204,6 +204,7 @@ files:
204
204
  - gemfiles/ar_52.gemfile
205
205
  - gemfiles/ar_60.gemfile
206
206
  - gemfiles/ar_61.gemfile
207
+ - gemfiles/ar_70.gemfile
207
208
  - lib/acts_as_recursive_tree.rb
208
209
  - lib/acts_as_recursive_tree/acts_macro.rb
209
210
  - lib/acts_as_recursive_tree/associations.rb
@@ -239,7 +240,7 @@ licenses:
239
240
  - MIT
240
241
  metadata:
241
242
  bug_tracker_uri: https://github.com/1and1/acts_as_recursive_tree/issues
242
- changelog_uri: https://github.com/1and1/acts_as_recursive_tree/CHANGELOG.md
243
+ changelog_uri: https://github.com/1and1/acts_as_recursive_tree/blob/main/CHANGELOG.md
243
244
  post_install_message:
244
245
  rdoc_options: []
245
246
  require_paths: