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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7034c0f3149bb3fabe92f4d03f118e4704b80a5ccbfa371e50f1a0f7f624c534
4
- data.tar.gz: 9a9faf0245f8252442c3c2e80a73eeccdf1e94d748dcb8a2ace96ebf131984c1
3
+ metadata.gz: 7465d4d3d8e4188cc0d64ffdc93e31df1f943ea3685d0aa36c1c3980065625bb
4
+ data.tar.gz: a48c396aa59ea4890ce2700d2dd340659485923714296df792698c5f97414c3c
5
5
  SHA512:
6
- metadata.gz: 13ee25bbdd76b240ebc74a2f3b6b5846c09a302f60ec2d48dff0d0d8a825f015a66bed08e1eec2bdfad80d437e139337e9e9bbdbb0831ac3b0a4bd5e0493e7e8
7
- data.tar.gz: 97f0e9bbde7fb694bf52833cfd9c469b5f22944752b5f33586486c2edd10958ac422dc957a847d3ba63153de85b63e9e84494b0529cb855590a72610726d5c2f
6
+ metadata.gz: 25e8e406ea7dee123d49f02060339b49bf1272adf07c2bcb261a442c396c766fd0e646cc916a4dce08b832ffe2225bdb00f604d39f1a301825f26ad3f839595f
7
+ data.tar.gz: 5709b20dcd1d2fc78da96c7f9d884ee58c680beb5180c583396052038acacf9d81adfb5b7718160e05624db5027bc7f3286610b4d3a1cbfd6497672455b89432
@@ -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.rc1')
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.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-07-07 00:00:00.000000000 Z
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: '0'
245
+ version: 1.3.1
246
246
  requirements: []
247
247
  rubygems_version: 3.0.3
248
248
  signing_key: