awesome_nested_set 3.2.0 → 3.2.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: c3ecf7f786a6b917601a6818b9ea57db89a2ed41f74e5053455ce1cb7f121229
4
- data.tar.gz: 31ffd151ff36b304e8c89cdcb129bc52a63b8a500577adf775df4eb11ef216f5
3
+ metadata.gz: 70956fe8d08167ab96e67894222f423188919dcb05a5a607f33d3372b5c909db
4
+ data.tar.gz: cd34dc69edd00532c4cf8315263fb5f4b81c65ce02057600b514cf650bc5ff91
5
5
  SHA512:
6
- metadata.gz: b64fdc6283aa35df65896df891124c89d305eb38e47f02fe151ff698dc4653570497839464205c74300ec05821107b5c2a6f04c48c5cb103b4df598609d8b606
7
- data.tar.gz: 1f26c9f63c803266dbd07016a4bee0c3034af2b236b84a889dd9ee361e7f3bc3531dae49b7d474177e0fcc2cb782292d735625440d613b0f435506914a5ec227
6
+ metadata.gz: 60354ed14c223e08bdec1da6ed56c533d3247ffedc846bf11f5c54b6065e0f3ea886db0a19405eac0dfc30721dd417b8ae441e0a1432dea6eb5caa7dd45dab7f
7
+ data.tar.gz: 2ec0377f5fa405db532d6b7bb630d6225157d958e3cf868dabfcdec11536886ab83f809aa6443cfefa59c55f689cbe8ca123b78e845bd8cf233531a333f3bf31
Binary file
Binary file
data/CHANGELOG CHANGED
@@ -1,3 +1,11 @@
1
+ Unreleased version
2
+ * [Compare to 3.2.1](https://github.com/collectiveidea/awesome_nested_set/compare/v3.2.1...master)
3
+
4
+ 3.2.1
5
+ * Don't reload in after_save callback. [Petrik de Heus](https://github.com/p8)
6
+ * Fix deprecation warning "Passing a range to `#in` is deprecated". [Konstantin Mochalov](https://github.com/kolen)
7
+ * [Compare to 3.2.0](https://github.com/collectiveidea/awesome_nested_set/compare/v3.2.0...v3.2.1)
8
+
1
9
  3.2.0
2
10
  * 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
11
  * [Compare to 3.1.4](https://github.com/collectiveidea/awesome_nested_set/compare/v3.1.4...v3.2.0)
data/README.md CHANGED
@@ -65,6 +65,7 @@ Run `rake rdoc` to generate the API docs and see [CollectiveIdea::Acts::NestedSe
65
65
  You can pass various options to `acts_as_nested_set` macro. Configuration options are:
66
66
 
67
67
  * `parent_column`: specifies the column name to use for keeping the position integer (default: parent_id)
68
+ * `primary_column`: specifies the column name to use as the inverse of the parent column (default: id)
68
69
  * `left_column`: column name for left boundary data (default: lft)
69
70
  * `right_column`: column name for right boundary data (default: rgt)
70
71
  * `depth_column`: column name for the depth data default (default: depth)
@@ -25,8 +25,8 @@ module CollectiveIdea #:nodoc:
25
25
  #
26
26
  # * +:parent_column+ - specifies the column name to use for keeping the position integer (default: parent_id)
27
27
  # * +:primary_column+ - specifies the column name to use as the inverse of the parent column (default: id)
28
- # * +:left_column+ - column name for left boundry data, default "lft"
29
- # * +:right_column+ - column name for right boundry data, default "rgt"
28
+ # * +:left_column+ - column name for left boundary data, default "lft"
29
+ # * +:right_column+ - column name for right boundary data, default "rgt"
30
30
  # * +:depth_column+ - column name for the depth data, default "depth"
31
31
  # * +:scope+ - restricts what is to be considered a list. Given a symbol, it'll attach "_id"
32
32
  # (if it hasn't been already) and use that as the foreign key restriction. You
@@ -52,7 +52,7 @@ module CollectiveIdea #:nodoc:
52
52
 
53
53
  # Iterates over tree elements and determines the current level in the tree.
54
54
  # Only accepts default ordering, odering by an other column than lft
55
- # does not work. This method is much more efficent than calling level
55
+ # does not work. This method is much more efficient than calling level
56
56
  # because it doesn't require any additional database queries.
57
57
  #
58
58
  # Example:
@@ -200,7 +200,6 @@ module CollectiveIdea #:nodoc:
200
200
  return unless has_depth_column?
201
201
 
202
202
  in_tenacious_transaction do
203
- reload
204
203
  update_depth(level)
205
204
  end
206
205
  end
@@ -41,9 +41,21 @@ module CollectiveIdea #:nodoc:
41
41
  delegate :base_class, :to => :instance_class, :prefix => :instance
42
42
 
43
43
  def where_statement(left_bound, right_bound)
44
- instance_arel_table[left_column_name].in(left_bound..right_bound).
44
+ instance_arel_table[left_column_name].between(left_bound..right_bound).
45
+ or(instance_arel_table[right_column_name].between(left_bound..right_bound))
46
+ end
47
+
48
+ # Before Arel 6, there was 'in' method, which was replaced
49
+ # with 'between' in Arel 6 and now gives deprecation warnings
50
+ # in verbose mode. This is patch to support rails 4.0 (Arel 4)
51
+ # and 4.1 (Arel 5).
52
+ module LegacyWhereStatementExt
53
+ def where_statement(left_bound, right_bound)
54
+ instance_arel_table[left_column_name].in(left_bound..right_bound).
45
55
  or(instance_arel_table[right_column_name].in(left_bound..right_bound))
56
+ end
46
57
  end
58
+ prepend LegacyWhereStatementExt unless Arel::Predications.method_defined?(:between)
47
59
 
48
60
  def conditions(a, b, c, d)
49
61
  _conditions = case_condition_for_direction(:quoted_left_column_name) +
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AwesomeNestedSet
4
- VERSION = '3.2.0' unless defined?(::AwesomeNestedSet::VERSION)
4
+ VERSION = '3.2.1' unless defined?(::AwesomeNestedSet::VERSION)
5
5
  end
metadata CHANGED
@@ -1,16 +1,42 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awesome_nested_set
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Keepers
8
8
  - Daniel Morrison
9
9
  - Philip Arndt
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
- cert_chain: []
13
- date: 2019-08-21 00:00:00.000000000 Z
12
+ cert_chain:
13
+ - |
14
+ -----BEGIN CERTIFICATE-----
15
+ MIIEMjCCApqgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhnZW1z
16
+ L0RDPXAvREM9YXJuZHQvREM9aW8wHhcNMjAwN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Q93Tt
32
+ vYSHOnP35UB4QjsjNrOO7FBaQfy6O909PP+GnVcJ62s9c26voJz63RSolwY7Jydw
33
+ XUlG68jjJKSoDHRzVTmNB7sX8rs8P2kvYkpIUXPHyls3mWBWjBWbdEYWESZrxI2x
34
+ dS7jY3AnfqhvsWra2pSREb2IDqPnJrHVOejnEI/zuuufUxLwDx3AC6SMdsyWkZ7V
35
+ 9OmLt2rg75Sct6h2220lO5ySqYtqAXuOMBDGv5L0zLalx1g8LACA7uILTKVWh8B8
36
+ Hsej0MQ3drCB1eA4c9OXdCUQJnY2aLTq3uNvTbZvoTgWK55eq3KLBJ4zzoKZ4tBX
37
+ /HIFI/fEwYlI1Ji3oikUrHkc4rWgaQ==
38
+ -----END CERTIFICATE-----
39
+ date: 2020-06-23 00:00:00.000000000 Z
14
40
  dependencies:
15
41
  - !ruby/object:Gem::Dependency
16
42
  name: activerecord
@@ -166,7 +192,7 @@ homepage: http://github.com/collectiveidea/awesome_nested_set
166
192
  licenses:
167
193
  - MIT
168
194
  metadata: {}
169
- post_install_message:
195
+ post_install_message:
170
196
  rdoc_options:
171
197
  - "--main"
172
198
  - README.md
@@ -185,8 +211,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
211
  - !ruby/object:Gem::Version
186
212
  version: '0'
187
213
  requirements: []
188
- rubygems_version: 3.0.3
189
- signing_key:
214
+ rubygems_version: 3.1.2
215
+ signing_key:
190
216
  specification_version: 4
191
217
  summary: An awesome nested set implementation for Active Record
192
218
  test_files: []
Binary file