acts_as_tree 2.9.0 → 2.9.1

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: 51b594e27b4911c9946f0219c57b664042839e2a7d61156f5b8140373020c7ff
4
- data.tar.gz: d34d0ff6809f01c44215181020f982aec0addc9fcfa642801e5eb2db471b6987
3
+ metadata.gz: 5b54406e889488d26198bfd828c4b7c4f5bbbd9591d72587383a54a98d3a4f2e
4
+ data.tar.gz: 4985d8855958455cbc3b5bf8ae9bae905f77f127b784b07a053ed46fc6b75ac3
5
5
  SHA512:
6
- metadata.gz: 7b0fb4d675a73bdacf06f97ac04df824024071e3b4ff385893aad83cec393ec2f9ffad0a1f73a6c5626d41ddd00aaf5f750468edd69292e6e9232cf833a179e3
7
- data.tar.gz: 82bed9b227d439fdd24761a96beb7cdc894617181a393189e378673b1d34c60514a6bf10c518f079fc9e013f412a15025162ff66e7337a21f085d9f6480c6a33
6
+ metadata.gz: b4a7588a2627dde7931dbfd61586e7d710893eb431f25c2972893cb66ff6f1c7f443b99ec6c361e6897ca660fbfd0d82e3cf5d4c01e158be76e607c006aa76ca
7
+ data.tar.gz: c3b54fa299a2fc63422e9fa302138a8fc3aef4e69965dae10223c911b2e25763ecb3021ad46a4ad60d18c4cc9bb2da7b9c341a3c6562a2c5103b4c533be7b9d6
@@ -7,11 +7,12 @@ before_install: gem install bundler -v '~> 1.15' --conservative --minimal-deps
7
7
 
8
8
  matrix:
9
9
  include:
10
- - rvm: 1.9.2
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.2
13
+ - rvm: 1.9.3
13
14
  gemfile: gemfiles/rails-3.1.gemfile
14
- - rvm: 1.9.2
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.3
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.6.1
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
- * 2.9.0 - March 7, 2019
78
- * Allow arel nodes in the `:order` option, see #78, #79 -- felixbuenemann, vladvinnikov
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. Make sure the Change log in the README includes a brief summary of the versions
163
- changes, with credit to the contributors.
164
- 4. Commit these changes in one "release-prep" commit (on the master branch).
165
- 5. Push that commit up to the repo.
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)
@@ -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", "~> 1.3.6"
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
@@ -3,5 +3,6 @@ source "https://rubygems.org"
3
3
  gem "rails", "~> 3.0.0"
4
4
  gem "i18n", "< 0.7"
5
5
  gem "rake", "< 11"
6
+ gem "sqlite3", "~> 1.3.4"
6
7
 
7
8
  gemspec path: "../"
@@ -4,5 +4,6 @@ gem "rails", "~> 3.1.0"
4
4
  gem "i18n", "< 0.7"
5
5
  gem "rack-cache", "< 1.3"
6
6
  gem "rake", "< 11"
7
+ gem "sqlite3", "~> 1.3.4"
7
8
 
8
9
  gemspec path: "../"
@@ -4,5 +4,6 @@ gem "rails", "~> 3.2.22"
4
4
  gem "i18n", "< 0.7"
5
5
  gem "rack-cache", "< 1.3"
6
6
  gem "rake", "< 11"
7
+ gem "sqlite3", "~> 1.3.5"
7
8
 
8
9
  gemspec path: "../"
@@ -2,5 +2,6 @@ source "https://rubygems.org"
2
2
 
3
3
  gem "rails", "~> 4.0.0"
4
4
  gem "mime-types", "< 3"
5
+ gem "sqlite3", "~> 1.3.6"
5
6
 
6
7
  gemspec path: "../"
@@ -2,5 +2,6 @@ source "https://rubygems.org"
2
2
 
3
3
  gem "rails", "~> 4.1.0"
4
4
  gem "mime-types", "< 3"
5
+ gem "sqlite3", "~> 1.3.6"
5
6
 
6
7
  gemspec path: "../"
@@ -3,5 +3,6 @@ source "https://rubygems.org"
3
3
  gem "rails", "~> 4.2.0"
4
4
  gem "mime-types", "< 3"
5
5
  gem "nokogiri", "< 1.7"
6
+ gem "sqlite3", "~> 1.3.6"
6
7
 
7
8
  gemspec path: "../"
@@ -1,5 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "rails", "~> 5.0.0"
4
+ gem "sqlite3", "~> 1.3.6"
4
5
 
5
6
  gemspec path: "../"
@@ -1,5 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "rails", "~> 5.1.0"
4
+ gem "sqlite3", "~> 1.3", ">= 1.3.6"
4
5
 
5
6
  gemspec path: "../"
@@ -1,5 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "rails", "~> 5.2.0"
4
+ gem "sqlite3", "~> 1.3", ">= 1.3.6"
4
5
 
5
6
  gemspec path: "../"
@@ -1,5 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "rails", "~> 6.0.0.beta"
3
+ gem "rails", "~> 6.0.0"
4
+ gem "sqlite3", "~> 1.4"
4
5
 
5
6
  gemspec path: "../"
@@ -79,18 +79,24 @@ module ActsAsTree
79
79
  configuration[:counter_cache] = :children_count
80
80
  end
81
81
 
82
- belongs_to_opts = {
83
- class_name: name,
84
- primary_key: configuration[:primary_key],
85
- foreign_key: configuration[:foreign_key],
86
- counter_cache: configuration[:counter_cache],
87
- touch: configuration[:touch],
88
- inverse_of: :children
89
- }
90
-
91
- belongs_to_opts[:optional] = true if ActiveRecord::VERSION::MAJOR >= 5
92
-
93
- belongs_to :parent, belongs_to_opts
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, class_name: name,
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],
@@ -1,3 +1,3 @@
1
1
  module ActsAsTree
2
- VERSION = "2.9.0"
2
+ VERSION = "2.9.1"
3
3
  end
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.0
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-03-07 00:00:00.000000000 Z
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: 1.3.6
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: 1.3.6
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.0.2
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.