acts_as_tree 2.9.0 → 2.9.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/.travis.yml +8 -5
- data/README.md +9 -68
- data/acts_as_tree.gemspec +1 -1
- data/gemfiles/rails-3.0.gemfile +1 -0
- data/gemfiles/rails-3.1.gemfile +1 -0
- data/gemfiles/rails-3.2.gemfile +1 -0
- data/gemfiles/rails-4.0.gemfile +1 -0
- data/gemfiles/rails-4.1.gemfile +1 -0
- data/gemfiles/rails-4.2.gemfile +1 -0
- data/gemfiles/rails-5.0.gemfile +1 -0
- data/gemfiles/rails-5.1.gemfile +1 -0
- data/gemfiles/rails-5.2.gemfile +1 -0
- data/gemfiles/rails-6.0.gemfile +2 -1
- data/lib/acts_as_tree.rb +20 -13
- data/lib/acts_as_tree/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b54406e889488d26198bfd828c4b7c4f5bbbd9591d72587383a54a98d3a4f2e
|
4
|
+
data.tar.gz: 4985d8855958455cbc3b5bf8ae9bae905f77f127b784b07a053ed46fc6b75ac3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4a7588a2627dde7931dbfd61586e7d710893eb431f25c2972893cb66ff6f1c7f443b99ec6c361e6897ca660fbfd0d82e3cf5d4c01e158be76e607c006aa76ca
|
7
|
+
data.tar.gz: c3b54fa299a2fc63422e9fa302138a8fc3aef4e69965dae10223c911b2e25763ecb3021ad46a4ad60d18c4cc9bb2da7b9c341a3c6562a2c5103b4c533be7b9d6
|
data/.travis.yml
CHANGED
@@ -7,11 +7,12 @@ before_install: gem install bundler -v '~> 1.15' --conservative --minimal-deps
|
|
7
7
|
|
8
8
|
matrix:
|
9
9
|
include:
|
10
|
-
|
10
|
+
# using ruby 1.9.3 for lack of 1.9.2 rvm binaries
|
11
|
+
- rvm: 1.9.3
|
11
12
|
gemfile: gemfiles/rails-3.0.gemfile
|
12
|
-
- rvm: 1.9.
|
13
|
+
- rvm: 1.9.3
|
13
14
|
gemfile: gemfiles/rails-3.1.gemfile
|
14
|
-
- rvm: 1.9.
|
15
|
+
- rvm: 1.9.3
|
15
16
|
gemfile: gemfiles/rails-3.2.gemfile
|
16
17
|
# rails 4.x requries ruby >= 1.9.3
|
17
18
|
- rvm: 1.9.3
|
@@ -28,8 +29,10 @@ matrix:
|
|
28
29
|
- rvm: 2.2.10
|
29
30
|
gemfile: gemfiles/rails-5.2.gemfile
|
30
31
|
# rails 6.x requires ruby >= 2.5.0
|
31
|
-
- rvm: 2.5.
|
32
|
+
- rvm: 2.5.6
|
33
|
+
gemfile: gemfiles/rails-6.0.gemfile
|
34
|
+
- rvm: 2.6.4
|
32
35
|
gemfile: gemfiles/rails-6.0.gemfile
|
33
36
|
# test latest rails and ruby
|
34
|
-
- rvm: 2.
|
37
|
+
- rvm: 2.7.0
|
35
38
|
gemfile: gemfiles/rails-6.0.gemfile
|
data/README.md
CHANGED
@@ -74,68 +74,8 @@ We no longer support Ruby 1.8 or versions of Rails/ActiveRecord older than 3.0.
|
|
74
74
|
Moving forward we will do our best to support the latest versions of ActiveRecord and Ruby.
|
75
75
|
|
76
76
|
## Change Log
|
77
|
-
|
78
|
-
|
79
|
-
* Added support for rails 6.0, see #81 -- felixbuenemann
|
80
|
-
* 2.8.0 - August 27, 2018
|
81
|
-
* Added support for rails 5.2, see #76, #77 -- felixbuenemann
|
82
|
-
* 2.7.1 - January 30, 2018
|
83
|
-
* Fix column quoting if the `:order` option is a symbol, see #73, #74 -- felixbuenemann
|
84
|
-
* 2.7.0 - September 15, 2017
|
85
|
-
* Added support for rails 5.1, see #67, #68 -- felixbuenemann, marcinwierzbicki
|
86
|
-
* 2.6.1 - January 18, 2017
|
87
|
-
* Avoid conflicts of `#level` method with existing column, see #57, #58, #60 -- markhgbrewster
|
88
|
-
* Fix tests on rails 4.2 with ruby < 2.1 -- felixbuenemann
|
89
|
-
* 2.6.0 - October 9, 2016
|
90
|
-
* Add generations methods, see #56 -- markhgbrewster
|
91
|
-
* 2.5.1 - September 8, 2016
|
92
|
-
* Fix early database connection in acts\_as\_tree, see #55 -- felixbuenemann
|
93
|
-
* 2.5.0 - August 14, 2016
|
94
|
-
* Allow for use of a different primary key, see #50 -- Two9A
|
95
|
-
* 2.4.0 - January 12, 2016
|
96
|
-
* Added support for rails 5.0, see #46 -- klacointe
|
97
|
-
* 2.3.0 - November 6, 2015
|
98
|
-
* Added touch option to acts\_as\_tree relation. See #40 -- mbenitezm
|
99
|
-
* Fix tests on rails 3.x with ruby 1.9.2. See #41 -- felixbuenemann
|
100
|
-
* 2.2.0 - June 15, 2015
|
101
|
-
* Added TreeWalker.walk\_tree instance method. See #32, #37, #38 -- felixbuenemann, genewoo
|
102
|
-
* Fix tests on rails 3.x. See #36 -- marshall-lee
|
103
|
-
* 2.1.0 - September 25, 2014
|
104
|
-
* Added TreeWalker. See #30 -- 545ch4
|
105
|
-
* 2.0.0 - July 3, 2014
|
106
|
-
* Renamed Presentation module to TreeView, see #27, #28 -- felixbuenemann
|
107
|
-
* 1.6.1 - May 29, 2014
|
108
|
-
* Readme Improvements, see #26 -- schlick
|
109
|
-
* Improvements and Fixes for counter cache (fix counter\_cache: true). See #24, #25 -- dv
|
110
|
-
* Cleanup and fix tests, see #24.
|
111
|
-
* 1.6.0 - April 21, 2014
|
112
|
-
* Added new `leaves` method. See #23 -- MichalPokorny
|
113
|
-
* 1.5.1 - March 28, 2014
|
114
|
-
* Fixing descendants modification bug. See #20 -- amerine, tmuerell
|
115
|
-
* 1.5.0 - December 16, 2013
|
116
|
-
* Added new `descendants` method -- adamkleingit
|
117
|
-
* Fixed warning message -- akicho8
|
118
|
-
* 1.4.0 - June 25, 2013
|
119
|
-
* `Presentation#tree_view` -- rainchen
|
120
|
-
* `root?` && `leaf?` methods. -- xuanxu
|
121
|
-
* 1.3.0 - March 29, 2013
|
122
|
-
* Rails 4.0 Support! -- mischa78
|
123
|
-
* Readme Fixes -- mischa78 & seanhussey
|
124
|
-
* 1.2.0 - October 29, 2012
|
125
|
-
* Adding new `self_with_ancestors` accessor -- felixbuenemann
|
126
|
-
* `roots` is now a scope.
|
127
|
-
* 1.1.0 - April 24, 2012
|
128
|
-
* Deprecate the ActiveRecord::Acts::Tree module in favor of ActsAsTree
|
129
|
-
* 1.0.1 - April 18, 2012
|
130
|
-
* Include the Railtie for easier loading in Rails. Will reassess the forced module inclusion in the future.
|
131
|
-
* 1.0.0 - April 14, 2012
|
132
|
-
* Official 1.0 release. Force users to include the ActiveRecord::Acts::Tree module.
|
133
|
-
* 0.2.0 - April 9, 2012
|
134
|
-
* Rails 3 Support
|
135
|
-
* 0.1.1 - February 3, 2010
|
136
|
-
* Bug Fixes
|
137
|
-
* 0.1.0 - October 9, 2009
|
138
|
-
* First Gem Release
|
77
|
+
|
78
|
+
The Change Log has moved to the [releases](https://github.com/amerine/acts_as_tree/releases) page.
|
139
79
|
|
140
80
|
## Note on Patches/Pull Requests
|
141
81
|
|
@@ -159,13 +99,14 @@ Moving forward we will do our best to support the latest versions of ActiveRecor
|
|
159
99
|
adding new features, but not changing existing functionality bump the minor
|
160
100
|
version, if you're shipping a bugfix, just bump the patch.
|
161
101
|
2. Following the above rules, change the version found in lib/acts\_as\_tree/version.rb.
|
162
|
-
3.
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
6. Run `rake release`
|
167
|
-
This will create and push a tag to Github, then generate a gem and push it to
|
102
|
+
3. Commit these changes in one "release-prep" commit (on the master branch).
|
103
|
+
4. Push that commit up to the repo.
|
104
|
+
5. Run `rake release`
|
105
|
+
This will create and push a tag to GitHub, then generate a gem and push it to
|
168
106
|
Rubygems.
|
107
|
+
6. Create a new release from the tag on GitHub, by choosing "Draft a new release" button
|
108
|
+
on the [releases](https://github.com/amerine/acts_as_tree/releases) tab and include
|
109
|
+
the relevant changes in the description.
|
169
110
|
7. Profit.
|
170
111
|
|
171
112
|
## License (MIT)
|
data/acts_as_tree.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.add_dependency "activerecord", ">= 3.0.0"
|
21
21
|
|
22
22
|
# Dependencies (installed via 'bundle install')...
|
23
|
-
s.add_development_dependency "sqlite3"
|
23
|
+
s.add_development_dependency "sqlite3"
|
24
24
|
s.add_development_dependency "rdoc"
|
25
25
|
s.add_development_dependency "minitest", ">= 4.7.5"
|
26
26
|
end
|
data/gemfiles/rails-3.0.gemfile
CHANGED
data/gemfiles/rails-3.1.gemfile
CHANGED
data/gemfiles/rails-3.2.gemfile
CHANGED
data/gemfiles/rails-4.0.gemfile
CHANGED
data/gemfiles/rails-4.1.gemfile
CHANGED
data/gemfiles/rails-4.2.gemfile
CHANGED
data/gemfiles/rails-5.0.gemfile
CHANGED
data/gemfiles/rails-5.1.gemfile
CHANGED
data/gemfiles/rails-5.2.gemfile
CHANGED
data/gemfiles/rails-6.0.gemfile
CHANGED
data/lib/acts_as_tree.rb
CHANGED
@@ -79,18 +79,24 @@ module ActsAsTree
|
|
79
79
|
configuration[:counter_cache] = :children_count
|
80
80
|
end
|
81
81
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
82
|
+
if ActiveRecord::VERSION::MAJOR >= 5
|
83
|
+
belongs_to :parent,
|
84
|
+
class_name: name,
|
85
|
+
primary_key: configuration[:primary_key],
|
86
|
+
foreign_key: configuration[:foreign_key],
|
87
|
+
counter_cache: configuration[:counter_cache],
|
88
|
+
touch: configuration[:touch],
|
89
|
+
inverse_of: :children,
|
90
|
+
optional: true
|
91
|
+
else
|
92
|
+
belongs_to :parent,
|
93
|
+
class_name: name,
|
94
|
+
primary_key: configuration[:primary_key],
|
95
|
+
foreign_key: configuration[:foreign_key],
|
96
|
+
counter_cache: configuration[:counter_cache],
|
97
|
+
touch: configuration[:touch],
|
98
|
+
inverse_of: :children
|
99
|
+
end
|
94
100
|
|
95
101
|
if ActiveRecord::VERSION::MAJOR >= 4
|
96
102
|
has_many :children, lambda { order configuration[:order] },
|
@@ -100,7 +106,8 @@ module ActsAsTree
|
|
100
106
|
dependent: configuration[:dependent],
|
101
107
|
inverse_of: :parent
|
102
108
|
else
|
103
|
-
has_many :children,
|
109
|
+
has_many :children,
|
110
|
+
class_name: name,
|
104
111
|
primary_key: configuration[:primary_key],
|
105
112
|
foreign_key: configuration[:foreign_key],
|
106
113
|
order: configuration[:order],
|
data/lib/acts_as_tree/version.rb
CHANGED
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: 2.9.
|
4
|
+
version: 2.9.1
|
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: 2019-
|
15
|
+
date: 2019-12-28 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activerecord
|
@@ -32,16 +32,16 @@ dependencies:
|
|
32
32
|
name: sqlite3
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
34
34
|
requirements:
|
35
|
-
- - "
|
35
|
+
- - ">="
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
37
|
+
version: '0'
|
38
38
|
type: :development
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
requirements:
|
42
|
-
- - "
|
42
|
+
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
|
-
version:
|
44
|
+
version: '0'
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
46
|
name: rdoc
|
47
47
|
requirement: !ruby/object:Gem::Requirement
|
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
|
-
rubygems_version: 3.
|
124
|
+
rubygems_version: 3.1.2
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
127
|
summary: Provides a simple tree behaviour to active_record models.
|