closure_tree 7.3.0 → 7.4.0.rc1
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 +2 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +4 -0
- data/README.md +2 -1
- data/Rakefile +9 -0
- data/lib/closure_tree/support.rb +1 -1
- data/lib/closure_tree/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7465d4d3d8e4188cc0d64ffdc93e31df1f943ea3685d0aa36c1c3980065625bb
|
4
|
+
data.tar.gz: a48c396aa59ea4890ce2700d2dd340659485923714296df792698c5f97414c3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25e8e406ea7dee123d49f02060339b49bf1272adf07c2bcb261a442c396c766fd0e646cc916a4dce08b832ffe2225bdb00f604d39f1a301825f26ad3f839595f
|
7
|
+
data.tar.gz: 5709b20dcd1d2fc78da96c7f9d884ee58c680beb5180c583396052038acacf9d81adfb5b7718160e05624db5027bc7f3286610b4d3a1cbfd6497672455b89432
|
data/.github/workflows/ci.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [7.4.0](https://github.com/ClosureTree/closure_tree/tree/7.4.0)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/ClosureTree/closure_tree/compare/v7.3.0...7.4.0)
|
6
|
+
|
7
|
+
- fix: hierarchy model with namespace should inherit from the superclass of basic model [\#384](https://github.com/ClosureTree/closure_tree/pull/384) ([shawndodo](https://github.com/shawndodo))
|
8
|
+
- Add with\_descendant to readme [\#381](https://github.com/ClosureTree/closure_tree/pull/381) ([mattvague](https://github.com/mattvague))
|
3
9
|
|
4
10
|
### 7.3.0
|
5
11
|
- Ruby 3.0 support
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -337,7 +337,8 @@ When you include ```has_closure_tree``` in your model, you can provide a hash to
|
|
337
337
|
* ```Tag.find_by_path(path, attributes)``` returns the node whose name path is ```path```. See (#find_or_create_by_path).
|
338
338
|
* ```Tag.find_or_create_by_path(path, attributes)``` returns the node whose name path is ```path```, and will create the node if it doesn't exist already.See (#find_or_create_by_path).
|
339
339
|
* ```Tag.find_all_by_generation(generation_level)``` returns the descendant nodes who are ```generation_level``` away from a root. ```Tag.find_all_by_generation(0)``` is equivalent to ```Tag.roots```.
|
340
|
-
* ```Tag.with_ancestor(ancestors)``` scopes to all descendants whose
|
340
|
+
* ```Tag.with_ancestor(ancestors)``` scopes to all descendants whose ancestors(s) is/are in the given list.
|
341
|
+
* ```Tag.with_descendant(ancestors)``` scopes to all ancestors whose descendant(s) is/are in the given list.
|
341
342
|
* ```Tag.lowest_common_ancestor(descendants)``` finds the lowest common ancestor of the descendants.
|
342
343
|
### Instance methods
|
343
344
|
|
data/Rakefile
CHANGED
@@ -26,3 +26,12 @@ namespace :spec do
|
|
26
26
|
task.pattern = 'spec/generators/*_spec.rb'
|
27
27
|
end
|
28
28
|
end
|
29
|
+
|
30
|
+
require 'github_changelog_generator/task'
|
31
|
+
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
32
|
+
config.user = 'ClosureTree'
|
33
|
+
config.project = 'closure_tree'
|
34
|
+
config.issues = false
|
35
|
+
config.future_release = '5.2.0'
|
36
|
+
config.since_tag = 'v7.3.0'
|
37
|
+
end
|
data/lib/closure_tree/support.rb
CHANGED
@@ -33,7 +33,7 @@ module ClosureTree
|
|
33
33
|
|
34
34
|
def hierarchy_class_for_model
|
35
35
|
parent_class = ActiveSupport::VERSION::MAJOR >= 6 ? model_class.module_parent : model_class.parent
|
36
|
-
hierarchy_class = parent_class.const_set(short_hierarchy_class_name, Class.new(
|
36
|
+
hierarchy_class = parent_class.const_set(short_hierarchy_class_name, Class.new(model_class.superclass))
|
37
37
|
use_attr_accessible = use_attr_accessible?
|
38
38
|
include_forbidden_attributes_protection = include_forbidden_attributes_protection?
|
39
39
|
model_class_name = model_class.to_s
|
data/lib/closure_tree/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: closure_tree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.4.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew McEachen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -240,9 +240,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
240
240
|
version: 2.0.0
|
241
241
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
242
242
|
requirements:
|
243
|
-
- - "
|
243
|
+
- - ">"
|
244
244
|
- !ruby/object:Gem::Version
|
245
|
-
version:
|
245
|
+
version: 1.3.1
|
246
246
|
requirements: []
|
247
247
|
rubygems_version: 3.0.3
|
248
248
|
signing_key:
|