drum 0.1.12 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/deploy.yml +1 -1
- data/Gemfile +0 -2
- data/Gemfile.lock +23 -47
- data/lib/drum/service/spotify.rb +6 -2
- data/lib/drum/version.rb +1 -1
- data/lib/drum.rb +11 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da330d9d023cd2cab59a1e210a1363fa00569fed1c5edcf382424112ba2e5bc3
|
4
|
+
data.tar.gz: 7d339df36d5438a64ef33887ccfe084a350d8737cf0444fbe95adb901e1f6bd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f023760cc5107baf38d87c60cba3d404732d14552c50a904358abd8153d28861386e53f359f4ba3735e7e66b6566dac529706ed29b15853a18c7c3c10ba53302
|
7
|
+
data.tar.gz: fdd9371a7f21d5a879444f4d2c39552e5b15af27459c0126264171633a86b4c7f5c460405a9af63b3758aa130cf9cea919e9878c77b6b2d8726eccd2f3c1a439
|
@@ -26,7 +26,7 @@ jobs:
|
|
26
26
|
touch ~/.gem/credentials
|
27
27
|
chmod 600 ~/.gem/credentials
|
28
28
|
echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
|
29
|
-
echo ":rubygems:
|
29
|
+
echo ":rubygems: ${{ secrets.RUBYGEMS_TOKEN }}" >> ~/.gem/credentials
|
30
30
|
- name: Push gem to GitHub Packages
|
31
31
|
run: bundle exec gem push --key github --host "https://rubygems.pkg.github.com/fwcd" pkg/drum-*.gem
|
32
32
|
- name: Push gem to RubyGems.org
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
drum (0.1.
|
4
|
+
drum (0.1.14)
|
5
5
|
highline (~> 2.0)
|
6
6
|
jwt (~> 2.2)
|
7
7
|
launchy (~> 2.4)
|
@@ -15,68 +15,49 @@ PATH
|
|
15
15
|
GEM
|
16
16
|
remote: https://rubygems.org/
|
17
17
|
specs:
|
18
|
-
addressable (2.
|
19
|
-
public_suffix (>= 2.0.2, <
|
20
|
-
debase (0.2.4.1)
|
21
|
-
debase-ruby_core_source (>= 0.10.2)
|
22
|
-
debase-ruby_core_source (0.10.12)
|
18
|
+
addressable (2.8.0)
|
19
|
+
public_suffix (>= 2.0.2, < 5.0)
|
23
20
|
diff-lcs (1.4.4)
|
24
21
|
domain_name (0.5.20190701)
|
25
22
|
unf (>= 0.0.5, < 1.0.0)
|
26
|
-
faraday (
|
27
|
-
faraday-
|
28
|
-
faraday-em_synchrony (~> 1.0)
|
29
|
-
faraday-excon (~> 1.1)
|
30
|
-
faraday-httpclient (~> 1.0.1)
|
31
|
-
faraday-net_http (~> 1.0)
|
32
|
-
faraday-net_http_persistent (~> 1.1)
|
33
|
-
faraday-patron (~> 1.0)
|
34
|
-
faraday-rack (~> 1.0)
|
35
|
-
multipart-post (>= 1.2, < 3)
|
23
|
+
faraday (2.3.0)
|
24
|
+
faraday-net_http (~> 2.0)
|
36
25
|
ruby2_keywords (>= 0.0.4)
|
37
|
-
faraday-
|
38
|
-
|
39
|
-
|
40
|
-
faraday-httpclient (1.0.1)
|
41
|
-
faraday-net_http (1.0.1)
|
42
|
-
faraday-net_http_persistent (1.2.0)
|
43
|
-
faraday-patron (1.0.0)
|
44
|
-
faraday-rack (1.0.0)
|
45
|
-
ffi (1.15.4-x64-mingw32)
|
46
|
-
hashie (4.1.0)
|
26
|
+
faraday-net_http (2.0.2)
|
27
|
+
ffi (1.15.5-x64-mingw32)
|
28
|
+
hashie (5.0.0)
|
47
29
|
highline (2.0.3)
|
48
30
|
http-cookie (1.0.4)
|
49
31
|
domain_name (~> 0.5)
|
50
32
|
jwt (2.3.0)
|
51
|
-
launchy (2.
|
52
|
-
addressable (~> 2.
|
53
|
-
mime-types (3.
|
33
|
+
launchy (2.5.0)
|
34
|
+
addressable (~> 2.7)
|
35
|
+
mime-types (3.4.1)
|
54
36
|
mime-types-data (~> 3.2015)
|
55
|
-
mime-types-data (3.
|
37
|
+
mime-types-data (3.2022.0105)
|
56
38
|
multi_json (1.15.0)
|
57
39
|
multi_xml (0.6.0)
|
58
|
-
multipart-post (2.1.1)
|
59
40
|
netrc (0.11.0)
|
60
|
-
oauth2 (1.4.
|
61
|
-
faraday (>= 0.
|
41
|
+
oauth2 (1.4.9)
|
42
|
+
faraday (>= 0.17.3, < 3.0)
|
62
43
|
jwt (>= 1.0, < 3.0)
|
63
44
|
multi_json (~> 1.3)
|
64
45
|
multi_xml (~> 0.5)
|
65
46
|
rack (>= 1.2, < 3)
|
66
|
-
omniauth (2.0
|
47
|
+
omniauth (2.1.0)
|
67
48
|
hashie (>= 3.4.6)
|
68
|
-
rack (>=
|
49
|
+
rack (>= 2.2.3)
|
69
50
|
rack-protection
|
70
|
-
omniauth-oauth2 (1.7.
|
51
|
+
omniauth-oauth2 (1.7.2)
|
71
52
|
oauth2 (~> 1.4)
|
72
53
|
omniauth (>= 1.9, < 3)
|
73
54
|
options (2.3.2)
|
74
55
|
progress_bar (1.3.3)
|
75
56
|
highline (>= 1.6, < 3)
|
76
57
|
options (~> 2.3.0)
|
77
|
-
public_suffix (
|
58
|
+
public_suffix (4.0.7)
|
78
59
|
rack (2.2.3)
|
79
|
-
rack-protection (2.
|
60
|
+
rack-protection (2.2.0)
|
80
61
|
rack
|
81
62
|
rake (13.0.6)
|
82
63
|
rest-client (2.0.2)
|
@@ -101,19 +82,16 @@ GEM
|
|
101
82
|
diff-lcs (>= 1.2.0, < 2.0)
|
102
83
|
rspec-support (~> 3.10.0)
|
103
84
|
rspec-support (3.10.2)
|
104
|
-
rspotify (2.
|
105
|
-
addressable (~> 2.
|
85
|
+
rspotify (2.11.1)
|
86
|
+
addressable (~> 2.8.0)
|
106
87
|
omniauth-oauth2 (>= 1.6)
|
107
88
|
rest-client (~> 2.0.2)
|
108
|
-
ruby-
|
109
|
-
rake (>= 0.8.1)
|
110
|
-
ruby-limiter (2.1.0)
|
89
|
+
ruby-limiter (2.2.2)
|
111
90
|
ruby2_keywords (0.0.5)
|
112
91
|
thor (0.20.3)
|
113
92
|
unf (0.1.4)
|
114
93
|
unf_ext
|
115
|
-
unf_ext (0.0.8)
|
116
|
-
unf_ext (0.0.8-x64-mingw32)
|
94
|
+
unf_ext (0.0.8.1)
|
117
95
|
webrick (1.7.0)
|
118
96
|
yard (0.9.26)
|
119
97
|
|
@@ -123,11 +101,9 @@ PLATFORMS
|
|
123
101
|
x86_64-linux
|
124
102
|
|
125
103
|
DEPENDENCIES
|
126
|
-
debase (~> 0.2)
|
127
104
|
drum!
|
128
105
|
rake (~> 13.0)
|
129
106
|
rspec (~> 3.10)
|
130
|
-
ruby-debug-ide (~> 0.7)
|
131
107
|
yard (~> 0.9)
|
132
108
|
|
133
109
|
BUNDLED WITH
|
data/lib/drum/service/spotify.rb
CHANGED
@@ -555,8 +555,12 @@ module Drum
|
|
555
555
|
log.info 'Fetching playlists...'
|
556
556
|
Enumerator.new(sp_playlists.length) do |enum|
|
557
557
|
sp_playlists.each do |sp_playlist|
|
558
|
-
|
559
|
-
|
558
|
+
begin
|
559
|
+
new_playlist = self.from_sp_playlist(sp_playlist)
|
560
|
+
enum.yield new_playlist
|
561
|
+
rescue StandardError => e
|
562
|
+
log.info "Could not download playlist '#{sp_playlist.name}': #{e}"
|
563
|
+
end
|
560
564
|
end
|
561
565
|
end
|
562
566
|
when :tracks
|
data/lib/drum/version.rb
CHANGED
data/lib/drum.rb
CHANGED
@@ -125,13 +125,18 @@ module Drum
|
|
125
125
|
method_option :group_by_author,
|
126
126
|
type: :boolean,
|
127
127
|
default: false,
|
128
|
-
desc: "Prepend the author name to each playlist's path"
|
128
|
+
desc: "Prepend the author name to each playlist's path."
|
129
129
|
|
130
130
|
method_option :recase_paths,
|
131
131
|
type: :string,
|
132
132
|
enum: ['kebabcase', 'startcase', 'camelcase', 'pascalcase'],
|
133
133
|
default: false,
|
134
|
-
desc: "Convert each playlist's path segments to a specific case"
|
134
|
+
desc: "Convert each playlist's path segments to a specific case."
|
135
|
+
|
136
|
+
method_option :flatten,
|
137
|
+
type: :boolean,
|
138
|
+
default: false,
|
139
|
+
desc: 'Clear all playlist paths. Note that flags such as --group-by-author will still be applied.'
|
135
140
|
|
136
141
|
method_option :note_date,
|
137
142
|
type: :boolean,
|
@@ -176,6 +181,10 @@ module Drum
|
|
176
181
|
playlists = playlists.map do |playlist|
|
177
182
|
bar&.increment!
|
178
183
|
|
184
|
+
if options[:flatten]
|
185
|
+
playlist.path = []
|
186
|
+
end
|
187
|
+
|
179
188
|
if options[:group_by_author]
|
180
189
|
author_name = playlist.author_id.try { |id| playlist.users[id] }&.display_name || 'Other'
|
181
190
|
playlist.path.unshift(author_name)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fwcd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -200,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
200
|
- !ruby/object:Gem::Version
|
201
201
|
version: '0'
|
202
202
|
requirements: []
|
203
|
-
rubygems_version: 3.2
|
203
|
+
rubygems_version: 3.1.2
|
204
204
|
signing_key:
|
205
205
|
specification_version: 4
|
206
206
|
summary: Playlist manager
|