closure_tree 7.3.0 → 7.4.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: 7034c0f3149bb3fabe92f4d03f118e4704b80a5ccbfa371e50f1a0f7f624c534
4
- data.tar.gz: 9a9faf0245f8252442c3c2e80a73eeccdf1e94d748dcb8a2ace96ebf131984c1
3
+ metadata.gz: e4ac0bb16bca6ba730b542b35639b067ad113e2c7010265cae6e0192425e1b82
4
+ data.tar.gz: 03004e7033f76268a1e96b3ee4a0c5d9066a4c716caab80c6082ddb60404b598
5
5
  SHA512:
6
- metadata.gz: 13ee25bbdd76b240ebc74a2f3b6b5846c09a302f60ec2d48dff0d0d8a825f015a66bed08e1eec2bdfad80d437e139337e9e9bbdbb0831ac3b0a4bd5e0493e7e8
7
- data.tar.gz: 97f0e9bbde7fb694bf52833cfd9c469b5f22944752b5f33586486c2edd10958ac422dc957a847d3ba63153de85b63e9e84494b0529cb855590a72610726d5c2f
6
+ metadata.gz: 5eac3ad625f051cc1e5fa62165076119d1cda689b619aeb6e83c9a32bbd33f343817c867cfd97abc26d32c56346eb833d39e747ec1d60ae9abf018e79a762442
7
+ data.tar.gz: 6f01c8b3b6ef3382340d0743a87e34243e9283bb64d3cefec1a79a7fb23c670f8da02e0125f7497e8afa834077aa75c60830988f14b2c7e095a6f7fe3ac8e02b
@@ -55,6 +55,8 @@ jobs:
55
55
  rails: activerecord_5.2
56
56
  - ruby: '2.5'
57
57
  rails: activerecord_edge
58
+ - ruby: '2.6'
59
+ rails: activerecord_edge
58
60
 
59
61
  steps:
60
62
  - name: Checkout
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
@@ -1,3 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
+
5
+
6
+ gem "bump", "~> 0.10.0"
7
+ gem "github_changelog_generator", "~> 1.16"
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 ancestor is in the given list.
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
@@ -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(ActiveRecord::Base))
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
@@ -1,3 +1,3 @@
1
1
  module ClosureTree
2
- VERSION = Gem::Version.new('7.3.0')
2
+ VERSION = Gem::Version.new('7.4.0')
3
3
  end
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.3.0
4
+ version: 7.4.0
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-07-07 00:00:00.000000000 Z
11
+ date: 2021-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord