acts_as_dag 2.0.0 → 2.0.1
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/README.md +2 -0
- data/lib/acts_as_dag/acts_as_dag.rb +8 -8
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 2ef664650fe43597abf3351e148b8901a5a93fbc
         | 
| 4 | 
            +
              data.tar.gz: e0815bacf6b301658b2f09ea4dd3145c77c53ef1
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 64d34f683f65f295c96b7673f47fd070fa5fb14150349ee2c3232bd81dce0523c20777d76f07e7f303e5de3ecd0257724b73672fc5635860726bb78a1b33738f
         | 
| 7 | 
            +
              data.tar.gz: 604d62acc24f1d45c81672a9f757218cdd2d05a4c368edd6eece10218e089ace703d235a17e7b8e5a57d07bf0e35ad6aa5d26a5997e5066117ef9fc176cc4603
         | 
    
        data/README.md
    CHANGED
    
    | @@ -133,6 +133,8 @@ depth            Return the depth of the node, root nodes are at depth 0 | |
| 133 133 | 
             
            siblings_of(node)       Siblings of node, node can be either a record or an id
         | 
| 134 134 | 
             
            ```
         | 
| 135 135 |  | 
| 136 | 
            +
            ### Remove deprecated functionality
         | 
| 137 | 
            +
            This gem was extracted from an early project. Functionality required for that project found its way into the gem, but is only incidentally related to the generation of the DAG. This has been moved to the ActsAsDag::Deprecated module, and will be removed in a future version.
         | 
| 136 138 |  | 
| 137 139 | 
             
            ## Credits
         | 
| 138 140 |  | 
| @@ -63,17 +63,17 @@ module ActsAsDAG | |
| 63 63 | 
             
                  #  \ /
         | 
| 64 64 | 
             
                  #   D
         | 
| 65 65 | 
             
                  #
         | 
| 66 | 
            -
                  has_many :ancestors,         | 
| 67 | 
            -
                  has_many :descendants,       | 
| 66 | 
            +
                  has_many :ancestors,        :through => :ancestor_links, :source => :ancestor
         | 
| 67 | 
            +
                  has_many :descendants,      :through => :descendant_links, :source => :descendant
         | 
| 68 68 |  | 
| 69 | 
            -
                  has_many :path,              | 
| 70 | 
            -
                  has_many :subtree,           | 
| 69 | 
            +
                  has_many :path,             :through => :path_links, :source => :ancestor
         | 
| 70 | 
            +
                  has_many :subtree,          :through => :subtree_links, :source => :descendant
         | 
| 71 71 |  | 
| 72 | 
            -
                  has_many :ancestor_links,   lambda { where(options[:link_conditions]).where("ancestor_id != descendant_id") }, :class_name => descendant_class, :foreign_key => 'descendant_id'
         | 
| 73 | 
            -
                  has_many :descendant_links, lambda { where(options[:link_conditions]).where("descendant_id != ancestor_id") }, :class_name => descendant_class, :foreign_key => 'ancestor_id'
         | 
| 72 | 
            +
                  has_many :ancestor_links,   lambda { where(options[:link_conditions]).where("ancestor_id != descendant_id").order("distance DESC") }, :class_name => descendant_class, :foreign_key => 'descendant_id'
         | 
| 73 | 
            +
                  has_many :descendant_links, lambda { where(options[:link_conditions]).where("descendant_id != ancestor_id").order("distance ASC") }, :class_name => descendant_class, :foreign_key => 'ancestor_id'
         | 
| 74 74 |  | 
| 75 | 
            -
                  has_many :path_links,       lambda { where | 
| 76 | 
            -
                  has_many :subtree_links,    lambda { where | 
| 75 | 
            +
                  has_many :path_links,       lambda { where(options[:link_conditions]).order("distance DESC") }, :class_name => descendant_class, :foreign_key => 'descendant_id', :dependent => :delete_all
         | 
| 76 | 
            +
                  has_many :subtree_links,    lambda { where(options[:link_conditions]).order("distance ASC") }, :class_name => descendant_class, :foreign_key => 'ancestor_id', :dependent => :delete_all
         | 
| 77 77 |  | 
| 78 78 | 
             
                  has_many :parents,          :through => :parent_links, :source => :parent
         | 
| 79 79 | 
             
                  has_many :children,         :through => :child_links, :source => :child
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: acts_as_dag
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.0. | 
| 4 | 
            +
              version: 2.0.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Nicholas Jakobsen
         | 
| @@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 72 72 | 
             
                  version: '0'
         | 
| 73 73 | 
             
            requirements: []
         | 
| 74 74 | 
             
            rubyforge_project: 
         | 
| 75 | 
            -
            rubygems_version: 2. | 
| 75 | 
            +
            rubygems_version: 2.4.6
         | 
| 76 76 | 
             
            signing_key: 
         | 
| 77 77 | 
             
            specification_version: 4
         | 
| 78 78 | 
             
            summary: Adds directed acyclic graph functionality to ActiveRecord.
         |