awesome_nested_set 3.5.0 → 3.6.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
2
  SHA256:
3
- metadata.gz: d92b8d417bb5cd8a6d5ad86ffef5578d49d402e2b5ea8659d0ceaa45f6673332
4
- data.tar.gz: 2f59330b23a407dafdae7841e0b6fea0f48bc5ef23eda037c9d5daac3019a57d
3
+ metadata.gz: 2c26151d6850942daadf3035ba6cbb20399efbe348ae4522cf897bb319e6f0de
4
+ data.tar.gz: 667d9b0cbd91b90b7b7e8075481ba400c4ecbbd344b204908b2301d2daf690d7
5
5
  SHA512:
6
- metadata.gz: c94cd745e5647381531ade5e39c89ebae55a580204718f26dc09ee81776f0e173d57d60ad4a407f4ee72f38560ba76250de0cf89bed139c522ca1afbfe8a0aeb
7
- data.tar.gz: 6f375e32110ceddf81c3fff4a6cb5c398392da8380d61457de0a8cb1fd0dae92009bbe939cefbaf1f65fd646b3b62ae1cc2fc39311e4650d1094bc4061b3cc6d
6
+ metadata.gz: 38de65793aacc7b68c542b16018a36bcfa9d65af9158d4126bc4ff25c0759531f8b9af605b2bf31894097935be97c15c6eee7ae72616ab56c6388844138558a3
7
+ data.tar.gz: 319065889f794e1eec94cb8b1e0113dce515da6430401a20910479e1dd763bce238a31ae36cd957f690564bd42458877367b2dd45c3dbe2c2689c2ae550187df
data/CHANGELOG CHANGED
@@ -1,5 +1,9 @@
1
1
  Unreleased version
2
2
 
3
+ 3.6.0
4
+ * Support Rails 7.1 [Harshal Bhakta](https://github.com/harshalbhakta)
5
+ * Improve ImpossibleMove error message [AlejandroFernandesAntunes](https://github.com/AlejandroFernandesAntunes)
6
+
3
7
  3.5.0
4
8
  * Support Rails 7.0.0 [Peter Berkenbosch](https://github.com/peterberkenbosch) and [Andrew Hampton](https://github.com/andrewhampton)
5
9
  * Make `order_column` option more flexible by removing explicit `=> :asc` [Regis Millet](https://github.com/Kulgar)
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # Awesome Nested Set
2
2
 
3
- [![CI](https://github.com/collectiveidea/awesome_nested_set/actions/workflows/ci.yml/badge.svg)](https://github.com/collectiveidea/awesome_nested_set/actions/workflows/ci.yml) [![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)
3
+ [![CI](https://github.com/collectiveidea/awesome_nested_set/actions/workflows/ci.yml/badge.svg)](https://github.com/collectiveidea/awesome_nested_set/actions/workflows/ci.yml) [![Code Climate](https://codeclimate.com/github/collectiveidea/awesome_nested_set.svg)](https://codeclimate.com/github/collectiveidea/awesome_nested_set)
4
4
 
5
5
 
6
6
  Awesome Nested Set is an implementation of the nested set pattern for ActiveRecord models.
7
7
  It is a replacement for acts_as_nested_set and BetterNestedSet, but more awesome.
8
8
 
9
- Version 3.2 supports Rails 6, 3.1 supports Rails 5 & 4. Version 2 supports Rails 3.
9
+ Older versions: Version 3.2 supports Rails 6, 3.1 supports Rails 5 & 4. Version 2 supports Rails 3.
10
10
  Gem versions prior to 2.0 support Rails 2.
11
11
 
12
12
  ## What makes this so awesome?
@@ -47,8 +47,13 @@ module CollectiveIdea #:nodoc:
47
47
  elsif acts_as_nested_set_options[:dependent] == :restrict_with_error
48
48
  unless leaf?
49
49
  record = self.class.human_attribute_name(:children).downcase
50
- errors.add(:base, :"restrict_dependent_destroy.#{Rails::VERSION::MAJOR < 5 ? 'many' : 'has_many'}", record: record)
51
- return false
50
+ if Rails::VERSION::MAJOR < 5
51
+ errors.add(:base, :"restrict_dependent_destroy.many", record: record)
52
+ return false
53
+ else
54
+ errors.add(:base, :"restrict_dependent_destroy.has_many", record: record)
55
+ throw :abort
56
+ end
52
57
  end
53
58
  return true
54
59
  elsif acts_as_nested_set_options[:dependent] == :nullify
@@ -129,7 +129,9 @@ module CollectiveIdea #:nodoc:
129
129
 
130
130
  def prevent_impossible_move
131
131
  if !root && !instance.move_possible?(target)
132
- raise ImpossibleMove, "Impossible move, target node cannot be inside moved tree."
132
+ error_msg = "Impossible move, target node (#{target.class.name},ID: #{target.id})
133
+ cannot be inside moved tree (#{instance.class.name},ID: #{instance.id})."
134
+ raise ImpossibleMove, error_msg
133
135
  end
134
136
  end
135
137
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AwesomeNestedSet
4
- VERSION = '3.5.0' unless defined?(::AwesomeNestedSet::VERSION)
4
+ VERSION = '3.6.0' unless defined?(::AwesomeNestedSet::VERSION)
5
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.5.0
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Keepers
@@ -9,34 +9,8 @@ authors:
9
9
  - Philip Arndt
10
10
  autorequire:
11
11
  bindir: bin
12
- cert_chain:
13
- - |
14
- -----BEGIN CERTIFICATE-----
15
- MIIEMjCCApqgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhnZW1z
16
- L0RDPXAvREM9YXJuZHQvREM9aW8wHhcNMjEwNjIzMDkyNzU2WhcNMjIwNjIzMDky
17
- NzU2WjAjMSEwHwYDVQQDDBhnZW1zL0RDPXAvREM9YXJuZHQvREM9aW8wggGiMA0G
18
- CSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQD0CYnD37uLlJ3Urla2EnnUQ8S6s16k
19
- AGMpAzpmARo8YwSqtYMJVGyBzUeI7y93Fk9ncswhIFSH/hnh/Ouat/ki9flHlZ+w
20
- anv0M+9v3wCLyZSC5BQIWpoduFM/fuvLoDUJDWxL50RjwMS0qo2x2LvfQdHN8gn3
21
- JdSIV5WLJKIvlmIl9S3pw0JO5KRUGn1PcBO7C0S0SlbhVjRHtlao1ycWUULsX109
22
- hCh39MPGtnZpdCcxheh0TH/UA/jV0/du9/rQdoidkNHkaC24pPfBJ3nS+rAbWaHP
23
- WmP+0rjfk/XnGBu/HZpKvlnwQjP3QdK4UMtWl8zewqFMNcIiBRALQugnL/SfrP/4
24
- CSlha9LwkiE6ByeY4WGnNjNqpi5J3IzjEkZRAxG7u9gCB3FzTaBTyXZYI6jplYNw
25
- TcCJIBHuoPaa+m9brpjb3Uv94nfM97ZP+OmpGYCCAMq4TT7OOV+t8wJc0w8bb0FO
26
- ROhmVNTxrBaNcl6MkZn88EMRCsGgoWklOG0CAwEAAaNxMG8wCQYDVR0TBAIwADAL
27
- BgNVHQ8EBAMCBLAwHQYDVR0OBBYEFGu7pbmeILyHnBmannuaNRfdN8MsMBoGA1Ud
28
- EQQTMBGBD2dlbXNAcC5hcm5kdC5pbzAaBgNVHRIEEzARgQ9nZW1zQHAuYXJuZHQu
29
- aW8wDQYJKoZIhvcNAQELBQADggGBANlxc4uAnkPC3zbztG7uZfBfn4HSuvv655Pa
30
- UaYZ6hNETFrqg78mGs3PkFe2Ru7cVWwckbmH46aq50QoNnx4ClxT03vr03n76Jg1
31
- 8WWHkf0+rcINFlbtIFcmcFrois5Ow3n7pH+xstDtzoWcbh41WwuZStNhrIYsnjAK
32
- /ovz8D5JlboxceOpVLB/0NiqNEWltK+EMQHmX25Sqf/r5o5rAL9zwEKPFp1Y5X+z
33
- t2jBjYt2ymr1eMWxux6e+N2uKZL4MblHawxvKlI8UHsIiV9xrc4BwlwlbitcvNIL
34
- ZykdSlpTJd0Guy92iYjCJMC09tMRUNxiVBwD3jRGSeW9YAPIZGXIcVlm6srIRDjJ
35
- o8wB6oOvHAkRXnntOo/4bBDH+ehmgvhh/O/mI+au6C0M430fv+ooH0w08LEXLx1k
36
- e17ZNASZffbQRP09MH2GZ2AOlkildTX6looWRforZEZi+qamognrozd3MI5QHi1W
37
- UAZUzHLrrFu7gnkFvLVpxOUf4ItOkA==
38
- -----END CERTIFICATE-----
39
- date: 2022-02-08 00:00:00.000000000 Z
12
+ cert_chain: []
13
+ date: 2023-10-05 00:00:00.000000000 Z
40
14
  dependencies:
41
15
  - !ruby/object:Gem::Dependency
42
16
  name: activerecord
@@ -47,7 +21,7 @@ dependencies:
47
21
  version: 4.0.0
48
22
  - - "<"
49
23
  - !ruby/object:Gem::Version
50
- version: '7.1'
24
+ version: '7.2'
51
25
  type: :runtime
52
26
  prerelease: false
53
27
  version_requirements: !ruby/object:Gem::Requirement
@@ -57,7 +31,7 @@ dependencies:
57
31
  version: 4.0.0
58
32
  - - "<"
59
33
  - !ruby/object:Gem::Version
60
- version: '7.1'
34
+ version: '7.2'
61
35
  - !ruby/object:Gem::Dependency
62
36
  name: appraisal
63
37
  requirement: !ruby/object:Gem::Requirement
@@ -120,14 +94,14 @@ dependencies:
120
94
  requirements:
121
95
  - - "~>"
122
96
  - !ruby/object:Gem::Version
123
- version: '12'
97
+ version: '13'
124
98
  type: :development
125
99
  prerelease: false
126
100
  version_requirements: !ruby/object:Gem::Requirement
127
101
  requirements:
128
102
  - - "~>"
129
103
  - !ruby/object:Gem::Version
130
- version: '12'
104
+ version: '13'
131
105
  - !ruby/object:Gem::Dependency
132
106
  name: rspec-rails
133
107
  requirement: !ruby/object:Gem::Requirement
@@ -191,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
165
  - !ruby/object:Gem::Version
192
166
  version: '0'
193
167
  requirements: []
194
- rubygems_version: 3.2.32
168
+ rubygems_version: 3.4.13
195
169
  signing_key:
196
170
  specification_version: 4
197
171
  summary: An awesome nested set implementation for Active Record
checksums.yaml.gz.sig DELETED
@@ -1,2 +0,0 @@
1
-
2
- M�7kAlz�ឞ ��d�֛"L��6� {� `�X�f��$ay�<4���o,MjN��F�D3�2�`a�����WB g�F����E��Q�-B'�����_��s6�@%s5� ���9�dN�<��[X7lH�C�Ck7��B{�-����=
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
@@ -1,2 +0,0 @@
1
- �7��@������9�#�u���5�NK��y'5/9|���8�Uj�)$֦(�w�qZ
2
- �����n�}�؀I�h�0�ދD ��|_����⯕1�$Z�4y��S�:\衋Ui��磡/� �3��yF��ͣ�Ӄ,z5�-و��R�0���ɀ��=n��c