acts_as_tree 1.6.1 → 2.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 935893a440670b7d94b79bf3705368e8bbb376bb
4
- data.tar.gz: 559f8dadb94b8a72f0cbf338958c632019d87d0d
3
+ metadata.gz: 780f4a181d2e28b847648e7fcacd7e29e29fbea9
4
+ data.tar.gz: db729268df6e10dbbbfc4626b3c279c4f5a38b4a
5
5
  SHA512:
6
- metadata.gz: fd51a4bfee115a00ee7306906955ab022da8544cdb7de247f66417998572dd0dfc3219a03aa3bad3b7c02658cd75827d76ad1bf04af07cade21e787b3bedf08a
7
- data.tar.gz: d298cf66a35aaa8da2826d270ec3e5b046c6cced630547e40a1640114c849ebf1646d10d2f18c9d5bcd6172e1796afb04179ae7b28d6b84ea68ef58669b37aa4
6
+ metadata.gz: 4df9150dac385c3ebcc0e365d7c9031bc6e535f874ff7e5118c476fd455e36d3887a943f37c8299fda98851321ca5bac9deb3deb90a8ec52bf90c9e1eda58ab6
7
+ data.tar.gz: cabc21ab491173998e506372b08adea1b3ee695ef25cbf4a88ef23e1f34cf9e3d80e54ffe671505a3cb6931df55260baa4b0361ae9b3ea52c1a84e8892cf4e44
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # ActsAsTree [![Build Status](https://secure.travis-ci.org/amerine/acts_as_tree.png?branch=master)][travis]
2
- [travis]: (http://travis-ci.org/amerine/acts_as_tree)
3
-
1
+ # ActsAsTree
2
+ [![Build Status](https://secure.travis-ci.org/amerine/acts_as_tree.svg?branch=master)](http://travis-ci.org/amerine/acts\_as\_tree)
3
+ [![Gem Version](https://badge.fury.io/rb/acts_as_tree.svg)](http://badge.fury.io/rb/acts\_as\_tree)
4
4
 
5
5
  ActsAsTree extends ActiveRecord to add simple support for organizing items into parent–children relationships. By default, ActsAsTree expects a foreign key column called `parent_id`.
6
6
 
@@ -21,11 +21,11 @@ root.children # => [child1]
21
21
  root.children.first.children.first # => subchild1
22
22
  ```
23
23
 
24
- We also have a convenient `Presentation` module you can mixin if you want a little visual representation of the tree strucuture. Example:
24
+ We also have a convenient `TreeView` module you can mixin if you want a little visual representation of the tree strucuture. Example:
25
25
 
26
26
  ```ruby
27
27
  class Category < ActiveRecord::Base
28
- extend ActsAsTree::Presentation
28
+ extend ActsAsTree::TreeView
29
29
 
30
30
  acts_as_tree order: "name"
31
31
  end
@@ -48,37 +48,39 @@ We no longer support Ruby 1.8 or versions of Rails/ActiveRecord older than 3.0.
48
48
  Moving forward we will do our best to support the latest versions of ActiveRecord and Ruby.
49
49
 
50
50
  ## Change Log
51
- * 1.6.1 - April 21, 2014
52
- * Readme Immprovements, see #26 -- schlick
51
+ * 2.0.0 - July 3, 2014
52
+ * Renamed Presentation module to TreeView, see #27, #28 -- felixbuenemann
53
+ * 1.6.1 - May 29, 2014
54
+ * Readme Improvements, see #26 -- schlick
53
55
  * Improvements and Fixes for counter cache (fix counter\_cache: true). See #24, #25 -- dv
54
56
  * Cleanup and fix tests, see #24.
55
57
  * 1.6.0 - April 21, 2014
56
58
  * Added new `leaves` method. See #23 -- MichalPokorny
57
59
  * 1.5.1 - March 28, 2014
58
60
  * Fixing descendants modification bug. See #20 -- amerine, tmuerell
59
- * 1.5.0 - December 16th, 2013
61
+ * 1.5.0 - December 16, 2013
60
62
  * Added new `descendants` method -- adamkleingit
61
63
  * Fixed warning message -- akicho8
62
- * 1.4.0 - June 25th, 2013
64
+ * 1.4.0 - June 25, 2013
63
65
  * `Presentation#tree_view` -- rainchen
64
66
  * `root?` && `leaf?` methods. -- xuanxu
65
- * 1.3.0 - March 29th, 2013
67
+ * 1.3.0 - March 29, 2013
66
68
  * Rails 4.0 Support! -- mischa78
67
69
  * Readme Fixes -- mischa78 & seanhussey
68
- * 1.2.0 - October 29th, 2012
70
+ * 1.2.0 - October 29, 2012
69
71
  * Adding new `self_with_ancestors` accessor -- felixbuenemann
70
72
  * `roots` is now a scope.
71
- * 1.1.0 - April 24th, 2012
73
+ * 1.1.0 - April 24, 2012
72
74
  * Deprecate the ActiveRecord::Acts::Tree module in favor of ActsAsTree
73
- * 1.0.1 - April 18th, 2012
75
+ * 1.0.1 - April 18, 2012
74
76
  * Include the Railtie for easier loading in Rails. Will reassess the forced module inclusion in the future.
75
- * 1.0.0 - April 14th, 2012
77
+ * 1.0.0 - April 14, 2012
76
78
  * Official 1.0 release. Force users to include the ActiveRecord::Acts::Tree module.
77
79
  * 0.2.0 - April 9, 2012
78
80
  * Rails 3 Support
79
81
  * 0.1.1 - February 3, 2010
80
82
  * Bug Fixes
81
- * 0.1.0 - October 9th, 2009
83
+ * 0.1.0 - October 9, 2009
82
84
  * First Gem Release
83
85
 
84
86
  ## Note on Patches/Pull Requests
data/lib/acts_as_tree.rb CHANGED
@@ -135,7 +135,7 @@ module ActsAsTree
135
135
 
136
136
  end
137
137
 
138
- module Presentation
138
+ module TreeView
139
139
  # show records in a tree view
140
140
  # Example:
141
141
  # root
@@ -1,3 +1,3 @@
1
1
  module ActsAsTree
2
- VERSION = "1.6.1"
2
+ VERSION = "2.0.0"
3
3
  end
@@ -249,7 +249,7 @@ class TreeTest < MiniTest::Unit::TestCase
249
249
 
250
250
  def test_tree_view
251
251
  assert_equal false, Mixin.respond_to?(:tree_view)
252
- Mixin.extend ActsAsTree::Presentation
252
+ Mixin.extend ActsAsTree::TreeView
253
253
  assert_equal true, TreeMixin.respond_to?(:tree_view)
254
254
 
255
255
  tree_view_outputs = <<-END.gsub(/^ {6}/, '')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_tree
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Dahlstrand
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-05-29 00:00:00.000000000 Z
15
+ date: 2014-07-03 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activerecord