nested_array 2.3.0 → 3.0.0

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.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nested_array
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - zlatov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-18 00:00:00.000000000 Z
11
+ date: 2023-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -89,10 +89,13 @@ extra_rdoc_files: []
89
89
  files:
90
90
  - ".gitignore"
91
91
  - ".rspec"
92
+ - ".rubocop.yml"
92
93
  - ".ruby-version"
94
+ - CHANGELOG.md
93
95
  - Gemfile
94
96
  - Gemfile.lock
95
97
  - LICENSE.txt
98
+ - README-ru-old.md
96
99
  - README-ru.md
97
100
  - README.md
98
101
  - Rakefile
@@ -109,15 +112,27 @@ files:
109
112
  - bin/rspec
110
113
  - bin/setup
111
114
  - dev/nested_options.rb
115
+ - doc/images/2.1.3.1.png
116
+ - doc/images/2.1.3.2.png
117
+ - doc/images/2.2.1.1.png
118
+ - doc/images/2.2.1.2.png
119
+ - doc/images/2.2.1.3-1.png
120
+ - doc/images/2.2.1.3-2.png
121
+ - doc/images/2.2.1.4-1.png
122
+ - doc/images/2.2.1.4-2.png
123
+ - doc/images/2.2.1.5.png
124
+ - doc/images/2.2.2.1.png
125
+ - doc/images/2.2.2.2.png
126
+ - doc/images/2.2.2.3.png
127
+ - doc/images/2.2.2.4.png
128
+ - doc/images/2.2.3.1.png
129
+ - doc/images/2.2.3.2.png
130
+ - doc/images/2.2.3.3.png
112
131
  - lib/nested_array.rb
113
132
  - lib/nested_array/nested.rb
114
133
  - lib/nested_array/version.rb
115
134
  - nested_array.gemspec
116
- - test.old/Gemfile
117
- - test.old/Gemfile.lock
118
- - test.old/bash/run/bundle.sh
119
- - test.old/bash/run/test.sh
120
- - test.old/test.rb
135
+ - vendor/assets/stylesheets/nested_array.scss
121
136
  homepage: https://github.com/Zlatov/nested_array
122
137
  licenses:
123
138
  - MIT
@@ -140,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
155
  - !ruby/object:Gem::Version
141
156
  version: '0'
142
157
  requirements: []
143
- rubygems_version: 3.2.25
158
+ rubygems_version: 3.1.6
144
159
  signing_key:
145
160
  specification_version: 4
146
161
  summary: Convert a flat array into a nested one in 1 pass and another…
data/test.old/Gemfile DELETED
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem 'activesupport'
4
- gem 'awesome_print'
5
- gem 'nested_array', path: '../'
@@ -1,34 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- nested_array (1.0.1)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- activesupport (6.0.2.1)
10
- concurrent-ruby (~> 1.0, >= 1.0.2)
11
- i18n (>= 0.7, < 2)
12
- minitest (~> 5.1)
13
- tzinfo (~> 1.1)
14
- zeitwerk (~> 2.2)
15
- awesome_print (1.8.0)
16
- concurrent-ruby (1.1.6)
17
- i18n (1.8.2)
18
- concurrent-ruby (~> 1.0)
19
- minitest (5.14.0)
20
- thread_safe (0.3.6)
21
- tzinfo (1.2.6)
22
- thread_safe (~> 0.1)
23
- zeitwerk (2.2.2)
24
-
25
- PLATFORMS
26
- ruby
27
-
28
- DEPENDENCIES
29
- activesupport
30
- awesome_print
31
- nested_array!
32
-
33
- BUNDLED WITH
34
- 2.0.1
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -eu
4
-
5
- cd "$(dirname "${0}")"
6
-
7
- cd ../..
8
-
9
- bundle install
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -eu
4
-
5
- cd "$(dirname "${0}")"
6
-
7
- cd ../..
8
-
9
- bundle exec ruby test.rb
data/test.old/test.rb DELETED
@@ -1,42 +0,0 @@
1
- require 'active_support/all'
2
- require 'awesome_print'
3
- require 'nested_array'
4
-
5
- puts 'Начато тестирование.'.blue
6
- puts "Версия руби: #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
7
-
8
- def to_nested_1
9
- puts "Тестирование #{__method__}".blue
10
- a = [
11
- {'id' => 1, 'parent_id' => nil, 'name' => 'first'},
12
- {'id' => 2, 'parent_id' => 1, 'name' => 'second'},
13
- {'id' => 3, 'parent_id' => 1, 'name' => 'third'}
14
- ]
15
- a = NestedArray::Array.new a
16
- b = a.to_nested
17
- return false if b != [
18
- {'id' => 1, 'parent_id' => nil, 'name' => 'first', 'children' => [
19
- {'id' => 2, 'parent_id' => 1, 'name' => 'second'},
20
- {'id' => 3, 'parent_id' => 1, 'name' => 'third'}
21
- ]},
22
- ]
23
- b = a.to_nested add_level: true
24
- return false if b != [
25
- {'id' => 1, 'parent_id' => nil, 'name' => 'first', 'level' => 0, 'children' => [
26
- {'id' => 2, 'parent_id' => 1, 'name' => 'second', 'level' => 1},
27
- {'id' => 3, 'parent_id' => 1, 'name' => 'third', 'level' => 1}
28
- ]},
29
- ]
30
- return true
31
- end
32
-
33
-
34
-
35
-
36
- begin
37
- raise if !to_nested_1
38
- rescue => e
39
- puts 'Тестирование не пройдено.'.red
40
- exit 1
41
- end
42
- puts 'Тестирование пройдено.'.green