awesome_nested_set 3.1.4 → 3.2.0

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
- SHA1:
3
- metadata.gz: 886dba55e5efcba602756917fdd82ae57c3e6942
4
- data.tar.gz: 0f17ad95fef44901498f7b21b2767b0b0e0d0259
2
+ SHA256:
3
+ metadata.gz: c3ecf7f786a6b917601a6818b9ea57db89a2ed41f74e5053455ce1cb7f121229
4
+ data.tar.gz: 31ffd151ff36b304e8c89cdcb129bc52a63b8a500577adf775df4eb11ef216f5
5
5
  SHA512:
6
- metadata.gz: e52c139d7f15f8a9428ec22967c50899e9f31cdcbb301b59cdc322f796b2ce6ad51fa30e28e16cd975c76e73bc48c32e869ba24df06bad0a8e2a6e87b58169f7
7
- data.tar.gz: 610280af1b3026696fd3980f7f6bb49d206ad255c770a9be9f0ab3372af455fa62c610cc8de3c68cfb6c8dcbd06431383a8082f8f9449157f668a7c13da8a6a9
6
+ metadata.gz: b64fdc6283aa35df65896df891124c89d305eb38e47f02fe151ff698dc4653570497839464205c74300ec05821107b5c2a6f04c48c5cb103b4df598609d8b606
7
+ data.tar.gz: 1f26c9f63c803266dbd07016a4bee0c3034af2b236b84a889dd9ee361e7f3bc3531dae49b7d474177e0fcc2cb782292d735625440d613b0f435506914a5ec227
data/CHANGELOG CHANGED
@@ -1,14 +1,22 @@
1
+ 3.2.0
2
+ * Add support for Rails 6.0 [Stefan Andersen](https://github.com/stfnndrsn) and [Damian Legawiec](https://github.com/damianlegawiec) and [Jonathan Tapia](https://github.com/jtapia) and [Alex](https://github.com/a-ta-ta)
3
+ * [Compare to 3.1.4](https://github.com/collectiveidea/awesome_nested_set/compare/v3.1.4...v3.2.0)
4
+
1
5
  3.1.4
2
6
  * Add support for Rails 5.2 [John Hawthorn](https://github.com/jhawthorn) and [marocchino](https://github.com/marocchino)
7
+ * [Compare to 3.1.3](https://github.com/collectiveidea/awesome_nested_set/compare/v3.1.3...v3.1.4)
3
8
 
4
9
  3.1.3
5
10
  * Add support for Rails 5.1 [John Hawthorn](https://github.com/jhawthorn)
11
+ * [Compare to 3.1.2](https://github.com/collectiveidea/awesome_nested_set/compare/v3.1.2...v3.1.3)
6
12
 
7
13
  3.1.2
8
14
  * Make belongs_to relation optional again [Jan Matusz](https://marahin.pl/)
15
+ * [Compare to 3.0.0](https://github.com/collectiveidea/awesome_nested_set/compare/v3.1.1...v3.1.2)
9
16
 
10
17
  3.1.1
11
18
  * Fix a reloading bug when using default scope [Krzysztof Rybka](https://github.com/krzysiek1507)
19
+ * [Compare to 3.1.0](https://github.com/collectiveidea/awesome_nested_set/compare/v3.1.0...v3.1.1)
12
20
 
13
21
  3.1.0
14
22
  * Ensure that nested_set queries respect the model's default_scope. [oesgalha](https://github.com/oesgalha)
@@ -16,10 +24,12 @@
16
24
  * Drop support for ruby 1.9.3 [Krzysztof Rybka](https://github.com/krzysiek1507)
17
25
  * Fix .all_roots_valid? method when model is ordered by default [Adam Hodowany](https://github.com/hodak)
18
26
  * Reuse the current model's connection when available [Tim Bugai] [#322](https://github.com/collectiveidea/awesome_nested_set/pull/322)
27
+ * [Compare to 3.0.3](https://github.com/collectiveidea/awesome_nested_set/compare/v3.0.3...v3.1.0)
19
28
 
20
29
  3.0.3
21
30
  * Add :nullify option to :dependent functionality to orphan children rather
22
31
  than destroy them.
32
+ * [Compare to 3.0.2](https://github.com/collectiveidea/awesome_nested_set/compare/v3.0.2...v3.0.3)
23
33
 
24
34
  3.0.2
25
35
  * Fix `dependent: :restrict_with_exception` not allowing a delete to occur. [Brendan Kilfoil]
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Awesome Nested Set
2
2
 
3
- [![Build Status](https://travis-ci.org/collectiveidea/awesome_nested_set.svg?branch=master)](https://travis-ci.org/collectiveidea/awesome_nested_set) [![Code Climate](https://codeclimate.com/github/collectiveidea/awesome_nested_set.svg)](https://codeclimate.com/github/collectiveidea/awesome_nested_set) [![Dependency Status](https://gemnasium.com/collectiveidea/awesome_nested_set.svg)](https://gemnasium.com/collectiveidea/awesome_nested_set) [![Security](https://hakiri.io/github/collectiveidea/awesome_nested_set/master.svg)](https://hakiri.io/github/collectiveidea/awesome_nested_set/master)
3
+ [![Build Status](https://travis-ci.org/collectiveidea/awesome_nested_set.svg?branch=master)](https://travis-ci.org/collectiveidea/awesome_nested_set) [![Code Climate](https://codeclimate.com/github/collectiveidea/awesome_nested_set.svg)](https://codeclimate.com/github/collectiveidea/awesome_nested_set) [![Security](https://hakiri.io/github/collectiveidea/awesome_nested_set/master.svg)](https://hakiri.io/github/collectiveidea/awesome_nested_set/master)
4
4
 
5
5
 
6
6
  Awesome Nested Set is an implementation of the nested set pattern for ActiveRecord models.
@@ -178,6 +178,7 @@ class AddNestedToCategories < ActiveRecord::Migration
178
178
  add_column :categories, :children_count, :integer
179
179
 
180
180
  # This is necessary to update :lft and :rgt columns
181
+ Category.reset_column_information
181
182
  Category.rebuild!
182
183
  end
183
184
 
@@ -87,7 +87,7 @@ module CollectiveIdea #:nodoc:
87
87
  ) if acts_as_nested_set_options[ar_callback]
88
88
  end
89
89
 
90
- has_many :children, -> { order(order_column => :asc) },
90
+ has_many :children, -> { order(order_column_name => :asc) },
91
91
  has_many_children_options
92
92
  end
93
93
 
@@ -23,7 +23,7 @@ module CollectiveIdea #:nodoc:
23
23
  acts_as_nested_set_options[:primary_column]
24
24
  end
25
25
 
26
- def order_column
26
+ def order_column_name
27
27
  acts_as_nested_set_options[:order_column] || left_column_name
28
28
  end
29
29
 
@@ -60,7 +60,7 @@ module CollectiveIdea #:nodoc:
60
60
  end
61
61
 
62
62
  def quoted_order_column_name
63
- model_connection.quote_column_name(order_column)
63
+ model_connection.quote_column_name(order_column_name)
64
64
  end
65
65
 
66
66
  def quoted_primary_key_column_full_name
@@ -79,7 +79,7 @@ module CollectiveIdea #:nodoc:
79
79
  end
80
80
 
81
81
  def nested_set_scope(options = {})
82
- options = {:order => { order_column => :asc }}.merge(options)
82
+ options = {:order => { order_column_name => :asc }}.merge(options)
83
83
 
84
84
  where(options[:conditions]).order(options.delete(:order))
85
85
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module AwesomeNestedSet
2
- VERSION = '3.1.4' unless defined?(::AwesomeNestedSet::VERSION)
4
+ VERSION = '3.2.0' unless defined?(::AwesomeNestedSet::VERSION)
3
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awesome_nested_set
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.4
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Keepers
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-02-03 00:00:00.000000000 Z
13
+ date: 2019-08-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 4.0.0
22
22
  - - "<"
23
23
  - !ruby/object:Gem::Version
24
- version: '5.3'
24
+ version: '7.0'
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
@@ -31,7 +31,7 @@ dependencies:
31
31
  version: 4.0.0
32
32
  - - "<"
33
33
  - !ruby/object:Gem::Version
34
- version: '5.3'
34
+ version: '7.0'
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: appraisal
37
37
  requirement: !ruby/object:Gem::Requirement
@@ -47,21 +47,27 @@ dependencies:
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  - !ruby/object:Gem::Dependency
50
- name: pry
50
+ name: combustion
51
51
  requirement: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: '0'
55
+ version: 0.5.2
56
+ - - "<"
57
+ - !ruby/object:Gem::Version
58
+ version: 0.5.5
56
59
  type: :development
57
60
  prerelease: false
58
61
  version_requirements: !ruby/object:Gem::Requirement
59
62
  requirements:
60
63
  - - ">="
61
64
  - !ruby/object:Gem::Version
62
- version: '0'
65
+ version: 0.5.2
66
+ - - "<"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.5.5
63
69
  - !ruby/object:Gem::Dependency
64
- name: pry-nav
70
+ name: database_cleaner
65
71
  requirement: !ruby/object:Gem::Requirement
66
72
  requirements:
67
73
  - - ">="
@@ -75,67 +81,61 @@ dependencies:
75
81
  - !ruby/object:Gem::Version
76
82
  version: '0'
77
83
  - !ruby/object:Gem::Dependency
78
- name: rspec-rails
84
+ name: pry
79
85
  requirement: !ruby/object:Gem::Requirement
80
86
  requirements:
81
- - - "~>"
87
+ - - ">="
82
88
  - !ruby/object:Gem::Version
83
- version: 3.5.0
89
+ version: '0'
84
90
  type: :development
85
91
  prerelease: false
86
92
  version_requirements: !ruby/object:Gem::Requirement
87
93
  requirements:
88
- - - "~>"
94
+ - - ">="
89
95
  - !ruby/object:Gem::Version
90
- version: 3.5.0
96
+ version: '0'
91
97
  - !ruby/object:Gem::Dependency
92
- name: rake
98
+ name: pry-nav
93
99
  requirement: !ruby/object:Gem::Requirement
94
100
  requirements:
95
- - - "~>"
101
+ - - ">="
96
102
  - !ruby/object:Gem::Version
97
- version: '10'
103
+ version: '0'
98
104
  type: :development
99
105
  prerelease: false
100
106
  version_requirements: !ruby/object:Gem::Requirement
101
107
  requirements:
102
- - - "~>"
108
+ - - ">="
103
109
  - !ruby/object:Gem::Version
104
- version: '10'
110
+ version: '0'
105
111
  - !ruby/object:Gem::Dependency
106
- name: combustion
112
+ name: rake
107
113
  requirement: !ruby/object:Gem::Requirement
108
114
  requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- version: 0.5.2
112
- - - "<"
115
+ - - "~>"
113
116
  - !ruby/object:Gem::Version
114
- version: 0.5.5
117
+ version: '10'
115
118
  type: :development
116
119
  prerelease: false
117
120
  version_requirements: !ruby/object:Gem::Requirement
118
121
  requirements:
119
- - - ">="
120
- - !ruby/object:Gem::Version
121
- version: 0.5.2
122
- - - "<"
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.5.5
124
+ version: '10'
125
125
  - !ruby/object:Gem::Dependency
126
- name: database_cleaner
126
+ name: rspec-rails
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: 3.8.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: 3.8.0
139
139
  description: An awesome nested set implementation for Active Record
140
140
  email: info@collectiveidea.com
141
141
  executables: []
@@ -185,8 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  - !ruby/object:Gem::Version
186
186
  version: '0'
187
187
  requirements: []
188
- rubyforge_project:
189
- rubygems_version: 2.6.13
188
+ rubygems_version: 3.0.3
190
189
  signing_key:
191
190
  specification_version: 4
192
191
  summary: An awesome nested set implementation for Active Record