closure_tree 7.3.0 → 7.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: e4ac0bb16bca6ba730b542b35639b067ad113e2c7010265cae6e0192425e1b82
         | 
| 4 | 
            +
              data.tar.gz: 03004e7033f76268a1e96b3ee4a0c5d9066a4c716caab80c6082ddb60404b598
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 5eac3ad625f051cc1e5fa62165076119d1cda689b619aeb6e83c9a32bbd33f343817c867cfd97abc26d32c56346eb833d39e747ec1d60ae9abf018e79a762442
         | 
| 7 | 
            +
              data.tar.gz: 6f01c8b3b6ef3382340d0743a87e34243e9283bb64d3cefec1a79a7fb23c670f8da02e0125f7497e8afa834077aa75c60830988f14b2c7e095a6f7fe3ac8e02b
         | 
    
        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
         | 
| 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-10-17 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: activerecord
         |