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 +4 -4
- data/.github/workflows/ci.yml +9 -2
- data/.rubocop.yml +3 -0
- data/Appraisals +5 -0
- data/CHANGELOG.md +3 -0
- data/README.md +6 -0
- data/acts_as_recursive_tree.gemspec +6 -6
- data/gemfiles/ar_70.gemfile +8 -0
- data/lib/acts_as_recursive_tree/version.rb +1 -1
- data/spec/db/database.rb +2 -0
- data/spec/model/node_spec.rb +1 -1
- data/spec/values_spec.rb +8 -1
- metadata +20 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3681366c263bd90e2479c6a4761042825547241a15e828678c260789f05ad54
|
4
|
+
data.tar.gz: c526e787809100bcba957ddeae424ffa068afe7f10e8e2ece1aec354cce6c70b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b4e5b9a5a1462b39cc8c2cc0184d8db0653b1d02be8728d2bf46fa309d847224765c3e6b8ac885f064a42f64b34375d9e032e888d5588c9940d55225ceced4a
|
7
|
+
data.tar.gz: 4e8a2077169e98b889671412c87c80d21f03541bbcdc62cefe520e47c626459c29ff1ee6a07bb54a9ebd94ca8418c4369d27ff9950a3c559b0bd7ef41970afc6
|
data/.github/workflows/ci.yml
CHANGED
@@ -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
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
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.
|
27
|
-
spec.add_runtime_dependency 'activesupport', '>= 5.2.0', '< 7.
|
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', '
|
35
|
-
spec.add_development_dependency 'rubocop-rails', '
|
36
|
-
spec.add_development_dependency 'rubocop-rspec', '
|
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
|
data/spec/db/database.rb
CHANGED
data/spec/model/node_spec.rb
CHANGED
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,
|
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.
|
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-
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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:
|