ehbrs_ruby_utils 0.17.1 → 0.18.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: d18bf8f507c46f76400bf63a57e2309db8930cdde653e2967b63802455ea375b
4
- data.tar.gz: 60ca9d39a6e5ff6ec008925a218d7636b0c0045032b8a65a3921995c63936bd8
3
+ metadata.gz: 5acf6fe93e603883c1a2e9f816ffadcbd8d4a38bd20ccf813735e844f7b2e348
4
+ data.tar.gz: f497605aacb3b71e4e0b45faaac5bd3f9ead04fda51e6ffef3593ef88cfe09d7
5
5
  SHA512:
6
- metadata.gz: 20f0a8bd00ba051fabe2e3e0747c0a1e3f3844dc5ff7019c7051203cdaa86c3b0774d6e8869b0dc3a31d0dd1bee6fe69dbab6d409967be8a477b2a22cf251402
7
- data.tar.gz: 41c38422cc3aab6bc0af6d4bb09f5160d1f269cdd4d6acbe142b78eeb7d47432aff81ff0e22023d522b3d65f95309a725809d930ca74fcbdc9f7f525ef1849fc
6
+ metadata.gz: b4acafae07d720b20b8102e2757c39dee8a8ee629c68e05110440324a77850e147ac2a8954a0644c6b85a96cdb5b90db306f417b09be6b9c538a496387b6ad1a
7
+ data.tar.gz: b4b6437fb9ad509308540a7913d6021c378f1e5450d66a65871ae4f5356adc6222db771840b666d672c75bb18e7212673ef00a79e94da70c65a4fd2ecbbbf931
@@ -3,7 +3,7 @@
3
3
  require 'eac_ruby_utils/core_ext'
4
4
 
5
5
  module EhbrsRubyUtils
6
- class SpreaderT1
6
+ class CircularListSpreader
7
7
  module BaseLevel
8
8
  extend ::Comparable
9
9
 
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
- require 'ehbrs_ruby_utils/spreader_t1/base_level'
5
- require 'ehbrs_ruby_utils/spreader_t1/item_level'
4
+ require 'ehbrs_ruby_utils/circular_list_spreader/base_level'
5
+ require 'ehbrs_ruby_utils/circular_list_spreader/item_level'
6
6
 
7
7
  module EhbrsRubyUtils
8
- class SpreaderT1
8
+ class CircularListSpreader
9
9
  class GroupLevel
10
- include ::EhbrsRubyUtils::SpreaderT1::BaseLevel
10
+ include ::EhbrsRubyUtils::CircularListSpreader::BaseLevel
11
11
  enable_simple_cache
12
12
 
13
13
  common_constructor :label
@@ -56,7 +56,7 @@ module EhbrsRubyUtils
56
56
  def push_item_level(current, item)
57
57
  raise "Key \"#{current}\" already used" if children[current].present?
58
58
 
59
- children[current] = ::EhbrsRubyUtils::SpreaderT1::ItemLevel.new(item)
59
+ children[current] = ::EhbrsRubyUtils::CircularListSpreader::ItemLevel.new(item)
60
60
  end
61
61
  end
62
62
  end
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
- require 'ehbrs_ruby_utils/spreader_t1/base_level'
4
+ require 'ehbrs_ruby_utils/circular_list_spreader/base_level'
5
5
 
6
6
  module EhbrsRubyUtils
7
- class SpreaderT1
7
+ class CircularListSpreader
8
8
  class ItemLevel
9
- include ::EhbrsRubyUtils::SpreaderT1::BaseLevel
9
+ include ::EhbrsRubyUtils::CircularListSpreader::BaseLevel
10
10
 
11
11
  common_constructor :item do
12
12
  self.removed = false
@@ -20,7 +20,7 @@ module EhbrsRubyUtils
20
20
  raise 'Item already removed' if removed?
21
21
 
22
22
  self.removed = true
23
- item
23
+ self
24
24
  end
25
25
 
26
26
  def remaining_i
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module EhbrsRubyUtils
6
+ class CircularListSpreader
7
+ class List
8
+ class ItemPairSpreadness
9
+ enable_method_class
10
+ enable_simple_cache
11
+ common_constructor :list, :left_index, :right_index do
12
+ raise "Right is not greater than left (Left: #{left_index}, Right: #{right_index}" unless
13
+ left_index < right_index
14
+ end
15
+
16
+ # @return [Integer]
17
+ def distance
18
+ to_right_distance * to_left_distance
19
+ end
20
+
21
+ # @return [Array]
22
+ def left_path
23
+ list.items.fetch(left_index).item.to_circular_list_spreader_path
24
+ end
25
+
26
+ # @return [Array]
27
+ def right_path
28
+ item_on_index_path(right_index)
29
+ end
30
+
31
+ # @return [Integer]
32
+ def to_left_distance
33
+ right_index - left_index
34
+ end
35
+
36
+ # @return [Integer]
37
+ def to_right_distance
38
+ list.count - right_index + left_index
39
+ end
40
+
41
+ # @return [Integer]
42
+ def result
43
+ similarity * distance
44
+ end
45
+
46
+ private
47
+
48
+ # @return [Integer]
49
+ def difference_uncached
50
+ lpath = item_on_index_path(left_index).reverse
51
+ rpath = item_on_index_path(right_index).reverse
52
+ r = lpath.count - 1
53
+ while r >= 0
54
+ return r + 1 if lpath.fetch(r) != rpath.fetch(r)
55
+
56
+ r -= 1
57
+ end
58
+
59
+ 0
60
+ end
61
+
62
+ def similarity_uncached
63
+ item_on_index_path(left_index).count - 1 - difference
64
+ end
65
+
66
+ def item_on_index_path(index)
67
+ list.items.fetch(index).item.to_circular_list_spreader_path
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module EhbrsRubyUtils
6
+ class CircularListSpreader
7
+ class List
8
+ require_sub __FILE__, require_dependency: true
9
+
10
+ class << self
11
+ def empty
12
+ new([], 0)
13
+ end
14
+ end
15
+
16
+ enable_simple_cache
17
+ common_constructor :items, :inserted_at
18
+ compare_by :spreadness, :inserted_at
19
+ delegate :count, to: :items
20
+
21
+ def insert(position, item_level)
22
+ dup_items = items.dup
23
+ dup_items.insert(position, item_level)
24
+ self.class.new(dup_items, position)
25
+ end
26
+
27
+ def items_pair_enumerator
28
+ ::Enumerator.new do |enum|
29
+ (count - 1).times do |li|
30
+ ((li + 1)..(count - 1)).each do |ri|
31
+ enum.yield(li, ri)
32
+ end
33
+ end
34
+ end
35
+ end
36
+
37
+ def to_s
38
+ items.map { |i| i.item.to_s }.join(', ')
39
+ end
40
+
41
+ private
42
+
43
+ # @return [Integer]
44
+ def spreadness_uncached
45
+ items_pair_enumerator.inject(0) { |a, e| a + item_pair_spreadness(*e) }
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module EhbrsRubyUtils
6
+ class CircularListSpreader
7
+ require_sub __FILE__
8
+ common_constructor :items
9
+
10
+ # @return [EhbrsRubyUtils::SpreaderT1::GroupLevel]
11
+ def build_root
12
+ r = ::EhbrsRubyUtils::CircularListSpreader::GroupLevel.new('ROOT')
13
+ items.each { |item| r.push(item.to_circular_list_spreader_path, item) }
14
+ r
15
+ end
16
+
17
+ # @return [Array]
18
+ def result
19
+ base_list = ::EhbrsRubyUtils::CircularListSpreader::List.empty
20
+ build_root.pop_all.each do |item|
21
+ base_list = lists_with_item(base_list, item).max
22
+ end
23
+ base_list.items.map(&:item)
24
+ end
25
+
26
+ def lists_with_item(base_list, item)
27
+ (base_list.count + 1).times.map do |position|
28
+ base_list.insert(position, item)
29
+ end
30
+ end
31
+ end
32
+ end
@@ -26,16 +26,22 @@ module EhbrsRubyUtils
26
26
  end
27
27
 
28
28
  def artist
29
- songs.lazy.map { |v| v.tag.artist }.find(&:present?)
29
+ from_songs_tag(:artist)
30
30
  end
31
31
 
32
32
  def title
33
- songs.lazy.map { |v| v.tag.album }.find(&:present?)
33
+ from_songs_tag(:album)
34
34
  end
35
35
 
36
+ private
37
+
36
38
  def songs_uncached
37
39
  ::EhbrsRubyUtils::Music::LyricsBook::Song.create_list(self, path.children)
38
40
  end
41
+
42
+ def from_songs_tag(field)
43
+ songs.lazy.map { |v| v.tag.send(field) }.find(&:present?)
44
+ end
39
45
  end
40
46
  end
41
47
  end
@@ -11,7 +11,6 @@ module EhbrsRubyUtils
11
11
  r = files.sort.map { |path| new(parent, path) }.select(&:valid?)
12
12
  previous = parent.first_previous
13
13
  r.map do |e|
14
- e.reset_cache
15
14
  e.previous = previous
16
15
  previous = e
17
16
  end
@@ -12,10 +12,17 @@ module EhbrsRubyUtils
12
12
  delegate :provider, to: :book
13
13
  delegate :tag, :to_s, to: :container
14
14
 
15
+ DEFAULT_TITLE = 'Unknown title'
16
+
15
17
  def album
16
18
  parent
17
19
  end
18
20
 
21
+ # @return [Array<String>
22
+ def fs_object_id
23
+ %w[artist album title].map { |k| tag.send(k) }
24
+ end
25
+
19
26
  def lyrics
20
27
  fetch_lyrics unless lyrics_cached?
21
28
  cached_lyrics
@@ -37,7 +44,9 @@ module EhbrsRubyUtils
37
44
  "#{number} - #{title}"
38
45
  end
39
46
 
40
- delegate :title, to: :tag
47
+ def title
48
+ tag.if_present(DEFAULT_TITLE, &:title)
49
+ end
41
50
 
42
51
  private
43
52
 
@@ -55,8 +64,7 @@ module EhbrsRubyUtils
55
64
  end
56
65
 
57
66
  def lyrics_cache
58
- (%w[artist album title].map { |k| tag.send(k) } + [provider.identifier])
59
- .inject(fs_cache) { |a, e| a.child(e) }
67
+ fs_cache.child(provider.identifier)
60
68
  end
61
69
 
62
70
  def number_uncached
@@ -18,7 +18,7 @@ module EhbrsRubyUtils
18
18
  [language, category.name, artist.name, name]
19
19
  end
20
20
 
21
- def to_spreader_t1_path
21
+ def to_circular_list_spreader_path
22
22
  to_a
23
23
  end
24
24
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EhbrsRubyUtils
4
- VERSION = '0.17.1'
4
+ VERSION = '0.18.0'
5
5
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
- require 'ehbrs/executables'
4
+ require 'ehbrs_ruby_utils/executables'
5
5
  require 'fileutils'
6
6
 
7
7
  module EhbrsRubyUtils
@@ -44,7 +44,7 @@ module EhbrsRubyUtils
44
44
  infov 'Input', input
45
45
  infov 'Target', target
46
46
  infov 'Convert args', command_args.shelljoin
47
- ::Ehbrs::Executables.ffmpeg.command.append(command_args).system!
47
+ ::EhbrsRubyUtils::Executables.ffmpeg.command.append(command_args).system!
48
48
  end
49
49
 
50
50
  def format_by_args_uncached
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'ehbrs_ruby_utils/circular_list_spreader'
4
+
5
+ ::RSpec.describe ::EhbrsRubyUtils::CircularListSpreader do
6
+ let(:node_class) do
7
+ ::Class.new do
8
+ ::Kernel.const_set('NodeClass', self)
9
+
10
+ class << self
11
+ def from_file(file)
12
+ from_hash(nil, 'ROOT', ::EacRubyUtils::Yaml.load_file(file))
13
+ end
14
+
15
+ def from_hash(parent, label, hash)
16
+ new(parent, label).children_from_hash(hash)
17
+ end
18
+ end
19
+
20
+ common_constructor :parent, :label
21
+ attr_reader :children
22
+
23
+ def children_from_hash(hash)
24
+ @children = if hash.is_a?(::Hash)
25
+ hash.map { |k, v| self.class.from_hash(self, k, v) }
26
+ else
27
+ false
28
+ end
29
+
30
+ self
31
+ end
32
+
33
+ def id
34
+ to_circular_list_spreader_path.join(' | ')
35
+ end
36
+
37
+ def leaf?
38
+ !children.is_a?(::Enumerable)
39
+ end
40
+
41
+ def recursive_leafs
42
+ if leaf?
43
+ [self]
44
+ else
45
+ children.flat_map(&:recursive_leafs)
46
+ end
47
+ end
48
+
49
+ def to_circular_list_spreader_path
50
+ return [] if parent.blank?
51
+
52
+ parent.if_present([], &:to_circular_list_spreader_path) + [label]
53
+ end
54
+
55
+ def to_s
56
+ label
57
+ end
58
+ end
59
+ end
60
+
61
+ include_examples 'source_target_fixtures', __FILE__
62
+
63
+ def source_data(source_file)
64
+ described_class.new(node_class.from_file(source_file).recursive_leafs).result.map(&:id)
65
+ end
66
+ end
@@ -0,0 +1,124 @@
1
+ ---
2
+ en:
3
+ Pop anglofônico:
4
+ Adele:
5
+ 2011 - 21: true
6
+ 2015 - 25: true
7
+ 2021 - 30: true
8
+ Aurora:
9
+ 2016 - All My Demons Greeting Me as a Friend: true
10
+ 2018 - Infections Of A Different Kind – Step 1: true
11
+ Celine Dion:
12
+ 2008 - My Love (Essential Collection): true
13
+ Colbie Caillat:
14
+ 2011 - All Of You: true
15
+ Lana Del Rey:
16
+ 2012 - Born To Die - Disc 1: true
17
+ 2012 - Paradise: true
18
+ 2019 - Norman Fucking Rockwell: true
19
+ 2021 - Chemtrails Over The Country Club: true
20
+ Maroon 5:
21
+ 2018 - Essentials - P1: true
22
+ 2018 - Essentials - P2: true
23
+ Michael Jackson:
24
+ Michael Jackson P1: true
25
+ Michael Jackson P2: true
26
+ Michael Jackson P3: true
27
+ Olivia Rodrigo:
28
+ 2021 - Sour: true
29
+ Taylor Swift:
30
+ 2008 - Fearless: true
31
+ Rock anglofônico:
32
+ Alanis Morissette:
33
+ 2020 - Jagged Little Pill: true
34
+ Christopher Cross:
35
+ 1979 - Christopher Cross: true
36
+ Guns n' Roses:
37
+ 2004 - Greatest Hits: true
38
+ Michael Kiwanuka:
39
+ 2019 - Kiwanuka: true
40
+ Queen:
41
+ 2011 - The Ultimate Best Of Queen - P1: true
42
+ 2011 - The Ultimate Best Of Queen - P2: true
43
+ Sinead O'Connor:
44
+ 1990 - I Do Not Want What I Haven't Got: true
45
+ Weyes Blood:
46
+ 2019 - Titanic Rising: true
47
+ Anglofônico - Vários:
48
+ Aldous Harding:
49
+ 2019 - Designer: true
50
+ FKA Twigs:
51
+ 2019 - Magdalene: true
52
+ Jamila Woods:
53
+ 2019 - LEGACY! LEGACY!: true
54
+ Norah Jones:
55
+ "[2002] Come Away With Me": true
56
+ Vários:
57
+ 2021 - Cinema Selecionadas: true
58
+ Americana - Country:
59
+ Dixie Chicks:
60
+ 2006 - Taking The Long Way: true
61
+ Kacey Musgraves:
62
+ 2013 - Same Trailer Different Park: true
63
+ 2018 - Golden Hour: true
64
+ 2021 - Star-Crossed: true
65
+ pt:
66
+ Pop-rock brasileiro:
67
+ Anavitória:
68
+ 2016 - Anavitória: true
69
+ 2018 - O Tempo é Agora: true
70
+ Ira:
71
+ A26 2004 Ira! - Acústico MTV: true
72
+ Kiko Zambianchi:
73
+ 1985 - Choque: true
74
+ Nando Reis:
75
+ 2016 - Jardim-Pomar: true
76
+ Pitty:
77
+ 2003 - Admirável Chip Novo: true
78
+ Rita Lee:
79
+ 2003 - Balacobaco: true
80
+ Tiago Iorc:
81
+ 2015 - Troco Likes: true
82
+ MPB:
83
+ Belchior:
84
+ 2022 - Selecionadas - Parte 1: true
85
+ 2022 - Selecionadas - Parte 2: true
86
+ Beto Guedes:
87
+ 2004 - Em Algum Lugar: true
88
+ 2022 - Selecionadas - 1: true
89
+ 2022 - Selecionadas - 2: true
90
+ Chico Buarque:
91
+ "(1972) Quando O Carnaval Chegar": true
92
+ "(1983) Para Viver Um Grande Amor - Trilha Sonora": true
93
+ "(1988) Dança Da Meia-Lua": true
94
+ 2022 - Selecionadas - 1: true
95
+ Diana Pequeno:
96
+ 1978 - Diana Pequeno: true
97
+ 1979 - Eterno Como Areia: true
98
+ Elis Regina:
99
+ 1976. Falso Brilhante: true
100
+ Gilberto Gil:
101
+ 1972 - Expresso 2222: true
102
+ Lô Borges:
103
+ 2022 - Selecionadas: true
104
+ Maria Bethania:
105
+ 1977 - Pássaro da Manhã: true
106
+ Marina Machado:
107
+ 2002 - Marina 6 Horas da Tarde: true
108
+ 2008 - Tempo Quente: true
109
+ Marisa Monte:
110
+ "(2000) Memorias, Cronicas e Declaracoes de Amor": true
111
+ "(2002) - Tribalistas": true
112
+ "(2006) Infinito Particular": true
113
+ Milton Nascimento:
114
+ 1999 - Crooner: true
115
+ Os Mutantes:
116
+ 1971 - Jardim Elétrico: true
117
+ Trio Amaranto:
118
+ Brasilêro: true
119
+ Vários:
120
+ 1976 - Doces Bárbaros: true
121
+ Zeca Baleiro:
122
+ 2019 - O Amor no Caos, Vol. 1: true
123
+ Zé Ramalho:
124
+ 1978 - Zé Ramalho I: true
@@ -0,0 +1,70 @@
1
+ ---
2
+ - en | Pop anglofônico | Lana Del Rey | 2021 - Chemtrails Over The Country Club
3
+ - pt | MPB | Chico Buarque | 2022 - Selecionadas - 1
4
+ - en | Rock anglofônico | Queen | 2011 - The Ultimate Best Of Queen - P2
5
+ - pt | Pop-rock brasileiro | Anavitória | 2018 - O Tempo é Agora
6
+ - en | Anglofônico - Vários | Vários | 2021 - Cinema Selecionadas
7
+ - pt | MPB | Marisa Monte | (2006) Infinito Particular
8
+ - en | Pop anglofônico | Michael Jackson | Michael Jackson P3
9
+ - pt | MPB | Vários | 1976 - Doces Bárbaros
10
+ - en | Americana - Country | Dixie Chicks | 2006 - Taking The Long Way
11
+ - pt | MPB | Marina Machado | 2002 - Marina 6 Horas da Tarde
12
+ - en | Pop anglofônico | Adele | 2011 - 21
13
+ - en | Rock anglofônico | Alanis Morissette | 2020 - Jagged Little Pill
14
+ - pt | MPB | Chico Buarque | (1983) Para Viver Um Grande Amor - Trilha Sonora
15
+ - en | Pop anglofônico | Lana Del Rey | 2012 - Paradise
16
+ - pt | MPB | Diana Pequeno | 1979 - Eterno Como Areia
17
+ - en | Pop anglofônico | Aurora | 2018 - Infections Of A Different Kind – Step 1
18
+ - pt | Pop-rock brasileiro | Rita Lee | 2003 - Balacobaco
19
+ - en | Rock anglofônico | Weyes Blood | 2019 - Titanic Rising
20
+ - pt | MPB | Belchior | 2022 - Selecionadas - Parte 2
21
+ - en | Anglofônico - Vários | FKA Twigs | 2019 - Magdalene
22
+ - pt | MPB | Beto Guedes | 2022 - Selecionadas - 1
23
+ - en | Pop anglofônico | Maroon 5 | 2018 - Essentials - P2
24
+ - pt | MPB | Zé Ramalho | 1978 - Zé Ramalho I
25
+ - en | Americana - Country | Kacey Musgraves | 2018 - Golden Hour
26
+ - pt | MPB | Elis Regina | 1976. Falso Brilhante
27
+ - en | Pop anglofônico | Lana Del Rey | 2019 - Norman Fucking Rockwell
28
+ - pt | Pop-rock brasileiro | Nando Reis | 2016 - Jardim-Pomar
29
+ - en | Rock anglofônico | Michael Kiwanuka | 2019 - Kiwanuka
30
+ - pt | MPB | Lô Borges | 2022 - Selecionadas
31
+ - en | Pop anglofônico | Adele | 2015 - 25
32
+ - pt | MPB | Marisa Monte | (2002) - Tribalistas
33
+ - en | Anglofônico - Vários | Norah Jones | [2002] Come Away With Me
34
+ - pt | Pop-rock brasileiro | Ira | A26 2004 Ira! - Acústico MTV
35
+ - en | Americana - Country | Kacey Musgraves | 2013 - Same Trailer Different Park
36
+ - pt | MPB | Chico Buarque | (1988) Dança Da Meia-Lua
37
+ - en | Pop anglofônico | Michael Jackson | Michael Jackson P2
38
+ - pt | MPB | Trio Amaranto | Brasilêro
39
+ - en | Rock anglofônico | Christopher Cross | 1979 - Christopher Cross
40
+ - en | Pop anglofônico | Taylor Swift | 2008 - Fearless
41
+ - pt | Pop-rock brasileiro | Pitty | 2003 - Admirável Chip Novo
42
+ - pt | MPB | Zeca Baleiro | 2019 - O Amor no Caos, Vol. 1
43
+ - en | Pop anglofônico | Colbie Caillat | 2011 - All Of You
44
+ - pt | MPB | Milton Nascimento | 1999 - Crooner
45
+ - en | Rock anglofônico | Queen | 2011 - The Ultimate Best Of Queen - P1
46
+ - pt | MPB | Beto Guedes | 2004 - Em Algum Lugar
47
+ - en | Pop anglofônico | Aurora | 2016 - All My Demons Greeting Me as a Friend
48
+ - pt | MPB | Belchior | 2022 - Selecionadas - Parte 1
49
+ - en | Anglofônico - Vários | Jamila Woods | 2019 - LEGACY! LEGACY!
50
+ - pt | Pop-rock brasileiro | Anavitória | 2016 - Anavitória
51
+ - en | Pop anglofônico | Lana Del Rey | 2012 - Born To Die - Disc 1
52
+ - pt | MPB | Chico Buarque | (1972) Quando O Carnaval Chegar
53
+ - en | Pop anglofônico | Michael Jackson | Michael Jackson P1
54
+ - pt | MPB | Diana Pequeno | 1978 - Diana Pequeno
55
+ - en | Rock anglofônico | Sinead O'Connor | 1990 - I Do Not Want What I Haven't Got
56
+ - pt | MPB | Os Mutantes | 1971 - Jardim Elétrico
57
+ - en | Pop anglofônico | Olivia Rodrigo | 2021 - Sour
58
+ - pt | MPB | Marina Machado | 2008 - Tempo Quente
59
+ - en | Americana - Country | Kacey Musgraves | 2021 - Star-Crossed
60
+ - pt | Pop-rock brasileiro | Tiago Iorc | 2015 - Troco Likes
61
+ - en | Pop anglofônico | Celine Dion | 2008 - My Love (Essential Collection)
62
+ - pt | MPB | Maria Bethania | 1977 - Pássaro da Manhã
63
+ - en | Rock anglofônico | Guns n' Roses | 2004 - Greatest Hits
64
+ - pt | MPB | Marisa Monte | (2000) Memorias, Cronicas e Declaracoes de Amor
65
+ - en | Anglofônico - Vários | Aldous Harding | 2019 - Designer
66
+ - pt | MPB | Gilberto Gil | 1972 - Expresso 2222
67
+ - en | Pop anglofônico | Maroon 5 | 2018 - Essentials - P1
68
+ - pt | Pop-rock brasileiro | Kiko Zambianchi | 1985 - Choque
69
+ - en | Pop anglofônico | Adele | 2021 - 30
70
+ - pt | MPB | Beto Guedes | 2022 - Selecionadas - 2
@@ -0,0 +1,7 @@
1
+ ---
2
+ A:
3
+ A1: true
4
+ A2: true
5
+ B:
6
+ B1: true
7
+ B2: true
@@ -0,0 +1,5 @@
1
+ ---
2
+ - B | B2
3
+ - A | A2
4
+ - B | B1
5
+ - A | A1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ehbrs_ruby_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.1
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo H. Bogoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-04 00:00:00.000000000 Z
11
+ date: 2022-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers
@@ -16,88 +16,100 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.8'
19
+ version: '0.14'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 0.8.5
22
+ version: 0.14.2
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: '0.8'
29
+ version: '0.14'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.8.5
32
+ version: 0.14.2
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: avm
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.3'
39
+ version: '0.41'
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: 0.3.2
42
+ version: 0.41.1
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: '0.3'
49
+ version: '0.41'
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 0.3.2
52
+ version: 0.41.1
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: eac_fs
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
- version: '0.10'
59
+ version: '0.12'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 0.12.3
60
63
  type: :runtime
61
64
  prerelease: false
62
65
  version_requirements: !ruby/object:Gem::Requirement
63
66
  requirements:
64
67
  - - "~>"
65
68
  - !ruby/object:Gem::Version
66
- version: '0.10'
69
+ version: '0.12'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 0.12.3
67
73
  - !ruby/object:Gem::Dependency
68
74
  name: eac_ruby_utils
69
75
  requirement: !ruby/object:Gem::Requirement
70
76
  requirements:
71
77
  - - "~>"
72
78
  - !ruby/object:Gem::Version
73
- version: '0.70'
79
+ version: '0.102'
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 0.102.1
74
83
  type: :runtime
75
84
  prerelease: false
76
85
  version_requirements: !ruby/object:Gem::Requirement
77
86
  requirements:
78
87
  - - "~>"
79
88
  - !ruby/object:Gem::Version
80
- version: '0.70'
89
+ version: '0.102'
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 0.102.1
81
93
  - !ruby/object:Gem::Dependency
82
94
  name: eac_templates
83
95
  requirement: !ruby/object:Gem::Requirement
84
96
  requirements:
85
97
  - - "~>"
86
98
  - !ruby/object:Gem::Version
87
- version: '0.1'
99
+ version: '0.3'
88
100
  - - ">="
89
101
  - !ruby/object:Gem::Version
90
- version: 0.1.1
102
+ version: 0.3.2
91
103
  type: :runtime
92
104
  prerelease: false
93
105
  version_requirements: !ruby/object:Gem::Requirement
94
106
  requirements:
95
107
  - - "~>"
96
108
  - !ruby/object:Gem::Version
97
- version: '0.1'
109
+ version: '0.3'
98
110
  - - ">="
99
111
  - !ruby/object:Gem::Version
100
- version: 0.1.1
112
+ version: 0.3.2
101
113
  - !ruby/object:Gem::Dependency
102
114
  name: taglib-ruby
103
115
  requirement: !ruby/object:Gem::Requirement
@@ -105,6 +117,9 @@ dependencies:
105
117
  - - "~>"
106
118
  - !ruby/object:Gem::Version
107
119
  version: '1.1'
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: 1.1.2
108
123
  type: :runtime
109
124
  prerelease: false
110
125
  version_requirements: !ruby/object:Gem::Requirement
@@ -112,6 +127,9 @@ dependencies:
112
127
  - - "~>"
113
128
  - !ruby/object:Gem::Version
114
129
  version: '1.1'
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: 1.1.2
115
133
  - !ruby/object:Gem::Dependency
116
134
  name: ultimate_lyrics
117
135
  requirement: !ruby/object:Gem::Requirement
@@ -119,6 +137,9 @@ dependencies:
119
137
  - - "~>"
120
138
  - !ruby/object:Gem::Version
121
139
  version: '0.1'
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: 0.1.3
122
143
  type: :runtime
123
144
  prerelease: false
124
145
  version_requirements: !ruby/object:Gem::Requirement
@@ -126,6 +147,9 @@ dependencies:
126
147
  - - "~>"
127
148
  - !ruby/object:Gem::Version
128
149
  version: '0.1'
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: 0.1.3
129
153
  - !ruby/object:Gem::Dependency
130
154
  name: aranha-parsers
131
155
  requirement: !ruby/object:Gem::Requirement
@@ -163,6 +187,12 @@ files:
163
187
  - ".rspec"
164
188
  - ".rubocop.yml"
165
189
  - lib/ehbrs_ruby_utils.rb
190
+ - lib/ehbrs_ruby_utils/circular_list_spreader.rb
191
+ - lib/ehbrs_ruby_utils/circular_list_spreader/base_level.rb
192
+ - lib/ehbrs_ruby_utils/circular_list_spreader/group_level.rb
193
+ - lib/ehbrs_ruby_utils/circular_list_spreader/item_level.rb
194
+ - lib/ehbrs_ruby_utils/circular_list_spreader/list.rb
195
+ - lib/ehbrs_ruby_utils/circular_list_spreader/list/item_pair_spreadness.rb
166
196
  - lib/ehbrs_ruby_utils/core_ext.rb
167
197
  - lib/ehbrs_ruby_utils/executables.rb
168
198
  - lib/ehbrs_ruby_utils/finances/bb_browser/docker_image.rb
@@ -183,10 +213,6 @@ files:
183
213
  - lib/ehbrs_ruby_utils/patches.rb
184
214
  - lib/ehbrs_ruby_utils/patches/object.rb
185
215
  - lib/ehbrs_ruby_utils/patches/object/template.rb
186
- - lib/ehbrs_ruby_utils/spreader_t1.rb
187
- - lib/ehbrs_ruby_utils/spreader_t1/base_level.rb
188
- - lib/ehbrs_ruby_utils/spreader_t1/group_level.rb
189
- - lib/ehbrs_ruby_utils/spreader_t1/item_level.rb
190
216
  - lib/ehbrs_ruby_utils/version.rb
191
217
  - lib/ehbrs_ruby_utils/videos.rb
192
218
  - lib/ehbrs_ruby_utils/videos/container.rb
@@ -215,6 +241,11 @@ files:
215
241
  - lib/ehbrs_ruby_utils/web_utils/videos/file.rb
216
242
  - lib/ehbrs_ruby_utils/web_utils/videos/file/rename.rb
217
243
  - lib/ehbrs_ruby_utils/web_utils/videos/files_list.rb
244
+ - spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec.rb
245
+ - spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec_files/ehbrs_music1.source.yaml
246
+ - spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec_files/ehbrs_music1.target.yaml
247
+ - spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec_files/minimum.source.yaml
248
+ - spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec_files/minimum.target.yaml
218
249
  - spec/lib/ehbrs_ruby_utils/videos/resolution_spec.rb
219
250
  - spec/lib/ehbrs_ruby_utils/videos/stream_spec.rb
220
251
  - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_attachment.source.yaml
@@ -262,6 +293,11 @@ specification_version: 4
262
293
  summary: Utilities for EHB/RS's Ruby projects.
263
294
  test_files:
264
295
  - spec/rubocop_check_spec.rb
296
+ - spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec.rb
297
+ - spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec_files/minimum.target.yaml
298
+ - spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec_files/ehbrs_music1.source.yaml
299
+ - spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec_files/minimum.source.yaml
300
+ - spec/lib/ehbrs_ruby_utils/circular_list_spreader_spec_files/ehbrs_music1.target.yaml
265
301
  - spec/lib/ehbrs_ruby_utils/videos/stream_spec.rb
266
302
  - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_audio.target.yaml
267
303
  - spec/lib/ehbrs_ruby_utils/videos/stream_spec_files/menina_ovo_video.target.yaml
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module EhbrsRubyUtils
6
- class SpreaderT1
7
- require_sub __FILE__
8
- common_constructor :items
9
-
10
- # @return [Array]
11
- def result
12
- root_level = ::EhbrsRubyUtils::SpreaderT1::GroupLevel.new('ROOT')
13
- items.each { |item| root_level.push(item.to_spreader_t1_path, item) }
14
- root_level.pop_all
15
- end
16
- end
17
- end