download_tv 2.9.4 → 2.9.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a13f9bf7aae9a08591b947af1071eed6ad50687b37cb85f4d4ebbc46307bb8cb
4
- data.tar.gz: 11654c9fd13e6e59d3c9bfa55484ef7f0967e4f7141b36fbdc0b8375c1e0e30a
3
+ metadata.gz: ee826d952bd48f18ba67c39b5609a48fc4db61aaf75a9c1c4a984d81d160f792
4
+ data.tar.gz: ed486d2e165fef470207db059909186dd9e6d30b186218d5995bf95935a3cbe5
5
5
  SHA512:
6
- metadata.gz: 7f816ce659da37db0fe32b0b937007ef6dc2320a3d3863a49529940f4696838f6c5d4b745ea03afa44b62e65c5eba0962c074e0ca6fd46b0948f4df1b9187408
7
- data.tar.gz: d94fbc3d1713bd808a69be6ccdbf4cea3e482c2b9cd73295a957e8ef199a2532083262c17aaa188dedd72b618509d3555cb73e568a490283c81aeb560d479cf3
6
+ metadata.gz: 48f8a649060fe71f0cce0f89b67923c24bf617165898e41690a63dc36753ef4036b2bec7ef49efcf31a81970e2b2c4ab396b55dedef2087f162a1c71bb5a1c69
7
+ data.tar.gz: 75578d7f6c0c9ab4430983d4d0e17d48b2403d8f41390fdf9fb3eceb09d44761e8d5abf8cce75a3120f0cfb5587f6582d2b8cb8e08dd6bfee9da0fc83f26f5ea
@@ -1,31 +1,36 @@
1
- # This workflow uses actions that are not certified by GitHub.
2
- # They are provided by a third-party and are governed by
3
- # separate terms of service, privacy policy, and support
4
- # documentation.
5
- # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
- # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
-
8
1
  name: Ruby
9
2
 
10
3
  on:
11
4
  push:
12
- branches: [ master ]
5
+ branches: [master]
13
6
  pull_request:
14
- branches: [ master ]
7
+ branches: [master]
15
8
 
16
9
  jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v6
14
+ - name: Set up Ruby
15
+ uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: head
18
+ bundler-cache: true
19
+ - name: Run linter
20
+ run: bundle exec rubocop
21
+
17
22
  test:
18
23
  runs-on: ubuntu-latest
19
24
  strategy:
20
25
  matrix:
21
- ruby-version: ['2.7', '3.0']
26
+ ruby-version: ["3.4", "4.0", head]
22
27
 
23
28
  steps:
24
- - uses: actions/checkout@v2
25
- - name: Set up Ruby
26
- uses: ruby/setup-ruby@v1
27
- with:
28
- ruby-version: ${{ matrix.ruby-version }}
29
- bundler-cache: true # runs 'bundle install' and caches installed gems automatically
30
- - name: Run tests
31
- run: bundle exec rspec
29
+ - uses: actions/checkout@v6
30
+ - name: Set up Ruby
31
+ uses: ruby/setup-ruby@v1
32
+ with:
33
+ ruby-version: ${{ matrix.ruby-version }}
34
+ bundler-cache: true
35
+ - name: Run tests
36
+ run: bundle exec rspec
data/.gitignore CHANGED
@@ -1,5 +1,3 @@
1
- /Gemfile.lock
2
1
  /pkg/
3
- .rubocop.yml
4
- .byebug_history
5
2
  *.sublime-*
3
+ coverage/
data/.rubocop.yml ADDED
@@ -0,0 +1,12 @@
1
+ # TODO: Deal with the mess at some point
2
+ inherit_from: .rubocop_todo.yml
3
+
4
+ AllCops:
5
+ NewCops: enable
6
+ SuggestExtensions: false
7
+
8
+ plugins:
9
+ - rubocop-rspec
10
+
11
+ RSpec/SpecFilePathFormat:
12
+ Enabled: false
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,129 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2026-05-08 20:13:16 UTC using RuboCop version 1.86.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ Gemspec/RequiredRubyVersion:
11
+ Exclude:
12
+ - 'download_tv.gemspec'
13
+
14
+ # Offense count: 1
15
+ # This cop supports safe autocorrection (--autocorrect).
16
+ Lint/RedundantCopDisableDirective:
17
+ Exclude:
18
+ - 'spec/download_tv/myepisodes_spec.rb'
19
+
20
+ # Offense count: 5
21
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
22
+ Metrics/AbcSize:
23
+ Max: 27
24
+
25
+ # Offense count: 1
26
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
27
+ # AllowedMethods: refine
28
+ Metrics/BlockLength:
29
+ Max: 67
30
+
31
+ # Offense count: 2
32
+ # Configuration parameters: CountComments, CountAsOne.
33
+ Metrics/ClassLength:
34
+ Max: 151
35
+
36
+ # Offense count: 1
37
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
38
+ Metrics/CyclomaticComplexity:
39
+ Max: 8
40
+
41
+ # Offense count: 2
42
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
43
+ Metrics/MethodLength:
44
+ Max: 24
45
+
46
+ # Offense count: 1
47
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
48
+ Metrics/PerceivedComplexity:
49
+ Max: 10
50
+
51
+ # Offense count: 19
52
+ RSpec/AnyInstance:
53
+ Exclude:
54
+ - 'spec/download_tv/configuration_spec.rb'
55
+ - 'spec/download_tv/downloader_spec.rb'
56
+ - 'spec/download_tv/myepisodes_spec.rb'
57
+ - 'spec/download_tv/torrent_spec.rb'
58
+
59
+ # Offense count: 1
60
+ # Configuration parameters: Prefixes, AllowedPatterns.
61
+ # Prefixes: when, with, without
62
+ RSpec/ContextWording:
63
+ Exclude:
64
+ - 'spec/download_tv/configuration_spec.rb'
65
+
66
+ # Offense count: 1
67
+ # This cop supports unsafe autocorrection (--autocorrect-all).
68
+ RSpec/EmptyExampleGroup:
69
+ Exclude:
70
+ - 'spec/download_tv/myepisodes_spec.rb'
71
+
72
+ # Offense count: 4
73
+ # Configuration parameters: CountAsOne.
74
+ RSpec/ExampleLength:
75
+ Max: 9
76
+
77
+ # Offense count: 18
78
+ # Configuration parameters: .
79
+ # SupportedStyles: have_received, receive
80
+ RSpec/MessageSpies:
81
+ EnforcedStyle: receive
82
+
83
+ # Offense count: 21
84
+ RSpec/MultipleExpectations:
85
+ Max: 9
86
+
87
+ # Offense count: 1
88
+ # Configuration parameters: AllowSubject.
89
+ RSpec/MultipleMemoizedHelpers:
90
+ Max: 6
91
+
92
+ # Offense count: 55
93
+ # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
94
+ # SupportedStyles: always, named_only
95
+ RSpec/NamedSubject:
96
+ Exclude:
97
+ - 'spec/download_tv/configuration_spec.rb'
98
+ - 'spec/download_tv/filterer_spec.rb'
99
+ - 'spec/download_tv/myepisodes_spec.rb'
100
+ - 'spec/download_tv/torrent_spec.rb'
101
+
102
+ # Offense count: 9
103
+ # Configuration parameters: AllowedGroups.
104
+ RSpec/NestedGroups:
105
+ Max: 4
106
+
107
+ # Offense count: 4
108
+ # This cop supports unsafe autocorrection (--autocorrect-all).
109
+ RSpec/ReceiveMessages:
110
+ Exclude:
111
+ - 'spec/download_tv/configuration_spec.rb'
112
+
113
+ # Offense count: 2
114
+ RSpec/StubbedMock:
115
+ Exclude:
116
+ - 'spec/download_tv/configuration_spec.rb'
117
+ - 'spec/download_tv/torrent_spec.rb'
118
+
119
+ # Offense count: 2
120
+ RSpec/SubjectStub:
121
+ Exclude:
122
+ - 'spec/download_tv/configuration_spec.rb'
123
+
124
+ # Offense count: 5
125
+ # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
126
+ RSpec/VerifiedDoubles:
127
+ Exclude:
128
+ - 'spec/download_tv/configuration_spec.rb'
129
+ - 'spec/download_tv/myepisodes_spec.rb'
data/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  ## Next (unreleased)
4
4
 
5
+
6
+ ## 2.9.5 (2026-05-31)
7
+
8
+ * Fixes
9
+ * Escape show names to avoid issues with some special characters
10
+
11
+ * Grabbers
12
+ * Eztv: disabled (Cloudflare challenge)
13
+
14
+ * Improvements
15
+ * Now respects `XDG_CONFIG_HOME` when set (falls back to `~/.config/download_tv`)
16
+
5
17
  ## 2.9.4 (2025-08-14)
6
18
 
7
19
  * Grabbers
data/Gemfile CHANGED
@@ -4,4 +4,10 @@ source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
6
 
7
- gem "rspec", "~> 3.11"
7
+ gem 'rake'
8
+
9
+ gem 'debug'
10
+ gem 'rspec'
11
+ gem 'rubocop', require: false
12
+ gem 'rubocop-rspec', require: false
13
+ gem 'simplecov', require: false
data/Gemfile.lock ADDED
@@ -0,0 +1,224 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ download_tv (2.9.5)
5
+ json
6
+ mechanize
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ addressable (2.9.0)
12
+ public_suffix (>= 2.0.2, < 8.0)
13
+ ast (2.4.3)
14
+ base64 (0.3.0)
15
+ connection_pool (3.0.2)
16
+ date (3.5.1)
17
+ debug (1.11.1)
18
+ irb (~> 1.10)
19
+ reline (>= 0.3.8)
20
+ diff-lcs (1.6.2)
21
+ docile (1.4.1)
22
+ domain_name (0.6.20240107)
23
+ erb (6.0.4)
24
+ http-cookie (1.1.6)
25
+ domain_name (~> 0.5)
26
+ io-console (0.8.2)
27
+ irb (1.18.0)
28
+ pp (>= 0.6.0)
29
+ prism (>= 1.3.0)
30
+ rdoc (>= 4.0.0)
31
+ reline (>= 0.4.2)
32
+ json (2.19.7)
33
+ language_server-protocol (3.17.0.5)
34
+ lint_roller (1.1.0)
35
+ logger (1.7.0)
36
+ mechanize (2.14.0)
37
+ addressable (~> 2.8)
38
+ base64
39
+ domain_name (~> 0.5, >= 0.5.20190701)
40
+ http-cookie (~> 1.0, >= 1.0.3)
41
+ mime-types (~> 3.3)
42
+ net-http-digest_auth (~> 1.4, >= 1.4.1)
43
+ net-http-persistent (>= 2.5.2, < 5.0.dev)
44
+ nkf
45
+ nokogiri (~> 1.11, >= 1.11.2)
46
+ rubyntlm (~> 0.6, >= 0.6.3)
47
+ webrick (~> 1.7)
48
+ webrobots (~> 0.1.2)
49
+ mime-types (3.7.0)
50
+ logger
51
+ mime-types-data (~> 3.2025, >= 3.2025.0507)
52
+ mime-types-data (3.2026.0414)
53
+ mini_portile2 (2.8.9)
54
+ net-http-digest_auth (1.4.1)
55
+ net-http-persistent (4.0.8)
56
+ connection_pool (>= 2.2.4, < 4)
57
+ nkf (0.2.0)
58
+ nokogiri (1.19.3)
59
+ mini_portile2 (~> 2.8.2)
60
+ racc (~> 1.4)
61
+ nokogiri (1.19.3-aarch64-linux-gnu)
62
+ racc (~> 1.4)
63
+ nokogiri (1.19.3-arm-linux-gnu)
64
+ racc (~> 1.4)
65
+ nokogiri (1.19.3-arm64-darwin)
66
+ racc (~> 1.4)
67
+ nokogiri (1.19.3-x86_64-darwin)
68
+ racc (~> 1.4)
69
+ nokogiri (1.19.3-x86_64-linux-gnu)
70
+ racc (~> 1.4)
71
+ parallel (2.1.0)
72
+ parser (3.3.11.1)
73
+ ast (~> 2.4.1)
74
+ racc
75
+ pp (0.6.3)
76
+ prettyprint
77
+ prettyprint (0.2.0)
78
+ prism (1.9.0)
79
+ psych (5.3.1)
80
+ date
81
+ stringio
82
+ public_suffix (7.0.5)
83
+ racc (1.8.1)
84
+ rainbow (3.1.1)
85
+ rake (13.4.2)
86
+ rdoc (7.2.0)
87
+ erb
88
+ psych (>= 4.0.0)
89
+ tsort
90
+ regexp_parser (2.12.0)
91
+ reline (0.6.3)
92
+ io-console (~> 0.5)
93
+ rspec (3.13.2)
94
+ rspec-core (~> 3.13.0)
95
+ rspec-expectations (~> 3.13.0)
96
+ rspec-mocks (~> 3.13.0)
97
+ rspec-core (3.13.6)
98
+ rspec-support (~> 3.13.0)
99
+ rspec-expectations (3.13.5)
100
+ diff-lcs (>= 1.2.0, < 2.0)
101
+ rspec-support (~> 3.13.0)
102
+ rspec-mocks (3.13.8)
103
+ diff-lcs (>= 1.2.0, < 2.0)
104
+ rspec-support (~> 3.13.0)
105
+ rspec-support (3.13.7)
106
+ rubocop (1.87.0)
107
+ json (~> 2.3)
108
+ language_server-protocol (~> 3.17.0.2)
109
+ lint_roller (~> 1.1.0)
110
+ parallel (>= 1.10)
111
+ parser (>= 3.3.0.2)
112
+ rainbow (>= 2.2.2, < 4.0)
113
+ regexp_parser (>= 2.9.3, < 3.0)
114
+ rubocop-ast (>= 1.49.0, < 2.0)
115
+ ruby-progressbar (~> 1.7)
116
+ unicode-display_width (>= 2.4.0, < 4.0)
117
+ rubocop-ast (1.49.1)
118
+ parser (>= 3.3.7.2)
119
+ prism (~> 1.7)
120
+ rubocop-rspec (3.9.0)
121
+ lint_roller (~> 1.1)
122
+ rubocop (~> 1.81)
123
+ ruby-progressbar (1.13.0)
124
+ rubyntlm (0.6.5)
125
+ base64
126
+ simplecov (0.22.0)
127
+ docile (~> 1.1)
128
+ simplecov-html (~> 0.11)
129
+ simplecov_json_formatter (~> 0.1)
130
+ simplecov-html (0.13.2)
131
+ simplecov_json_formatter (0.1.4)
132
+ stringio (3.2.0)
133
+ tsort (0.2.0)
134
+ unicode-display_width (3.2.0)
135
+ unicode-emoji (~> 4.1)
136
+ unicode-emoji (4.2.0)
137
+ webrick (1.9.2)
138
+ webrobots (0.1.2)
139
+
140
+ PLATFORMS
141
+ aarch64-linux
142
+ arm-linux
143
+ arm64-darwin
144
+ x86-linux
145
+ x86_64-darwin
146
+ x86_64-linux
147
+
148
+ DEPENDENCIES
149
+ debug
150
+ download_tv!
151
+ rake
152
+ rspec
153
+ rubocop
154
+ rubocop-rspec
155
+ simplecov
156
+
157
+ CHECKSUMS
158
+ addressable (2.9.0) sha256=7fdf6ac3660f7f4e867a0838be3f6cf722ace541dd97767fa42bc6cfa980c7af
159
+ ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
160
+ base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
161
+ bundler (4.0.11) sha256=5bcec0fb78302e48d02ee46f10ee6e6942be647ba5b44a6d1ddfda9a240ce785
162
+ connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
163
+ date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
164
+ debug (1.11.1) sha256=2e0b0ac6119f2207a6f8ac7d4a73ca8eb4e440f64da0a3136c30343146e952b6
165
+ diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
166
+ docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
167
+ domain_name (0.6.20240107) sha256=5f693b2215708476517479bf2b3802e49068ad82167bcd2286f899536a17d933
168
+ download_tv (2.9.5)
169
+ erb (6.0.4) sha256=38e3803694be357fe2bfe312487c74beaf9fb4e5beb3e22498952fe1645b95d9
170
+ http-cookie (1.1.6) sha256=ba4b82be64de61dc281243dac70e3c382c45142f20268ed9276a3670c93feaa9
171
+ io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
172
+ irb (1.18.0) sha256=de9454a0703a54704b9811a5ef31a60c86949fbf4013fcf244fabc7c775248e3
173
+ json (2.19.7) sha256=fe432c8639f6efff69f9d73b518a3705d9581ab93156f981ea72806e1e5bcc3e
174
+ language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
175
+ lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
176
+ logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
177
+ mechanize (2.14.0) sha256=33e76b7639d0181a46eaf1136b05f0e9043dfc5fc4b1a7b9fd8ae8bd437dd5e4
178
+ mime-types (3.7.0) sha256=dcebf61c246f08e15a4de34e386ebe8233791e868564a470c3fe77c00eed5e56
179
+ mime-types-data (3.2026.0414) sha256=461c4c655373a44bd6c5fe54bcf5b7776026ea96e808144b1ec465c4b99148cc
180
+ mini_portile2 (2.8.9) sha256=0cd7c7f824e010c072e33f68bc02d85a00aeb6fce05bb4819c03dfd3c140c289
181
+ net-http-digest_auth (1.4.1) sha256=4b8ad50ed8d180a58db5d6c49449b987dd0466fe01e24037945bc007562a08db
182
+ net-http-persistent (4.0.8) sha256=ef3de8319d691537b329053fae3a33195f8b070bbbfae8bf1a58c796081960e6
183
+ nkf (0.2.0) sha256=fbc151bda025451f627fafdfcb3f4f13d0b22ae11f58c6d3a2939c76c5f5f126
184
+ nokogiri (1.19.3) sha256=78312cbac32a40c812780d9678221b79d51288eec00054c1a8d15f7ce05960e8
185
+ nokogiri (1.19.3-aarch64-linux-gnu) sha256=46b89e5d7b9e844c2ee360794240c6ea2a4e6fa0c5892a4ed487db621224b639
186
+ nokogiri (1.19.3-arm-linux-gnu) sha256=3919d5ffc334ad778a4a9eb88fda7dcb8b1fb58c8a52ac640c6dcd2f038e774f
187
+ nokogiri (1.19.3-arm64-darwin) sha256=71b9bd424b1b7abc18b05052a1a3cfd3627abdca62be280854cc411791357e42
188
+ nokogiri (1.19.3-x86_64-darwin) sha256=77f3fba57d46c53ab31e62fc6c28f705109d1bf6264356c76f132b2be5728d4d
189
+ nokogiri (1.19.3-x86_64-linux-gnu) sha256=2f5078620fe12e83669b5b17311b32532a8153d02eee7ad06948b926d6080976
190
+ parallel (2.1.0) sha256=b35258865c2e31134c5ecb708beaaf6772adf9d5efae28e93e99260877b09356
191
+ parser (3.3.11.1) sha256=d17ace7aabe3e72c3cc94043714be27cc6f852f104d81aa284c2281aecc65d54
192
+ pp (0.6.3) sha256=2951d514450b93ccfeb1df7d021cae0da16e0a7f95ee1e2273719669d0ab9df6
193
+ prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
194
+ prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
195
+ psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974
196
+ public_suffix (7.0.5) sha256=1a8bb08f1bbea19228d3bed6e5ed908d1cb4f7c2726d18bd9cadf60bc676f623
197
+ racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
198
+ rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
199
+ rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
200
+ rdoc (7.2.0) sha256=8650f76cd4009c3b54955eb5d7e3a075c60a57276766ebf36f9085e8c9f23192
201
+ regexp_parser (2.12.0) sha256=35a916a1d63190ab5c9009457136ae5f3c0c7512d60291d0d1378ba18ce08ebb
202
+ reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835
203
+ rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
204
+ rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
205
+ rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
206
+ rspec-mocks (3.13.8) sha256=086ad3d3d17533f4237643de0b5c42f04b66348c28bf6b9c2d3f4a3b01af1d47
207
+ rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c
208
+ rubocop (1.87.0) sha256=b9d9ddf55116a513f8ef2c7ae660662d8b49301f118d3f0df61865b33a5c188d
209
+ rubocop-ast (1.49.1) sha256=4412f3ee70f6fe4546cc489548e0f6fcf76cafcfa80fa03af67098ffed755035
210
+ rubocop-rspec (3.9.0) sha256=8fa70a3619408237d789aeecfb9beef40576acc855173e60939d63332fdb55e2
211
+ ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
212
+ rubyntlm (0.6.5) sha256=47013402b99ae29ee93f930af51edaec8c6008556f4be25705a422b4430314f5
213
+ simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5
214
+ simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246
215
+ simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428
216
+ stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1
217
+ tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
218
+ unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
219
+ unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
220
+ webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131
221
+ webrobots (0.1.2) sha256=ebbcaa2cb4930fa1b83206f432c5cb64746507b2dcf50ea1301569a4d662cda6
222
+
223
+ BUNDLED WITH
224
+ 4.0.11
data/README.md CHANGED
@@ -1,8 +1,7 @@
1
1
  # download_tv
2
2
 
3
- [![Ruby](https://github.com/guille/download_tv/actions/workflows/ruby.yml/badge.svg?branch=master)](https://github.com/guille/download_tv/actions/workflows/ruby.yml)
3
+ [![Specs](https://github.com/guille/download_tv/actions/workflows/ruby.yml/badge.svg?branch=master)](https://github.com/guille/download_tv/actions/workflows/ruby.yml)
4
4
  [![Gem Version](https://badge.fury.io/rb/download_tv.svg)](https://badge.fury.io/rb/download_tv)
5
- [![Code Climate](https://codeclimate.com/github/guille/download_tv.svg)](https://codeclimate.com/github/guille/download_tv)
6
5
 
7
6
  **download_tv** is a tool that allows the user to find magnet links for TV show episodes. It accepts shows as arguments, from a file or it can integrate with your MyEpisodes account.
8
7
 
data/Rakefile CHANGED
@@ -1,13 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'bundler/gem_tasks'
4
- require 'rake/testtask'
5
-
6
- task default: :test
7
-
8
- Rake::TestTask.new do |t|
9
- t.libs << 'lib'
10
- t.libs << 'test'
11
- t.test_files = FileList['test/**/*_test.rb']
12
- t.verbose = false
13
- end
data/bin/tv CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env ruby
1
+ #!/usr/bin/env -S ruby
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'optparse'
@@ -35,7 +35,7 @@ opt_parser = OptionParser.new do |opts|
35
35
  options[:season] = s
36
36
  end
37
37
 
38
- opts.on('-t', '--tomorrow', 'Download shows airing today') do |s|
38
+ opts.on('-t', '--tomorrow', 'Download shows airing today') do |_|
39
39
  options[:cmd] = 'tomorrow'
40
40
  end
41
41
 
@@ -111,7 +111,7 @@ begin
111
111
  case options[:cmd]
112
112
  when 'run'
113
113
  dl = DownloadTV::Downloader.new(config)
114
- dl.run(options[:dry], options[:offset].abs)
114
+ dl.run(options[:offset].abs, dry_run: options[:dry])
115
115
  when 'dl'
116
116
  if options[:arg]
117
117
  dl = DownloadTV::Downloader.new(config)
@@ -124,7 +124,7 @@ begin
124
124
  dl.download_from_file(options[:arg])
125
125
  when 'tomorrow'
126
126
  dl = DownloadTV::Downloader.new(config)
127
- dl.run(options[:dry], options[:offset].abs, include_tomorrow: true)
127
+ dl.run(options[:offset].abs, dry_run: options[:dry], include_tomorrow: true)
128
128
  when 'config'
129
129
  DownloadTV::Configuration.new(config).change_configuration
130
130
  when 'showconfig'
data/download_tv.gemspec CHANGED
@@ -9,26 +9,21 @@ Gem::Specification.new do |s|
9
9
  s.version = DownloadTV::VERSION
10
10
  s.authors = ['guille']
11
11
 
12
- s.summary = 'DownloadTV is a tool that allows the user to find magnet links for tv show episodes. It accepts shows as arguments, from a file or it can integrate with your MyEpisodes account.'
12
+ s.summary = 'DownloadTV is a tool that allows the user to find magnet links for tv show episodes.' \
13
+ 'It accepts shows as arguments, from a file or it can integrate with your MyEpisodes account.'
13
14
  s.homepage = 'https://github.com/guille/download_tv'
14
15
 
15
16
  s.files = `git ls-files -z`.split("\x0").reject do |f|
16
- f.match(%r{^(test)/})
17
+ f.match(%r{^(spec)/})
17
18
  end
18
19
 
19
- s.test_files = `git ls-files -- test/*`.split($/)
20
20
  s.require_paths = ['lib']
21
21
 
22
22
  s.executables = ['tv']
23
23
 
24
- s.add_development_dependency 'bundler', '~> 2.0'
25
- s.add_development_dependency 'byebug', '~> 11.1'
26
- s.add_development_dependency 'minitest', '~> 5.0'
27
- s.add_development_dependency 'pry', '~> 0.13'
28
- s.add_development_dependency 'rake', '>= 12.3.3'
29
-
30
- s.add_dependency('json')
31
- s.add_dependency('mechanize')
24
+ s.add_dependency 'json'
25
+ s.add_dependency 'mechanize'
32
26
 
33
27
  s.license = 'MIT'
28
+ s.metadata['rubygems_mfa_required'] = 'true'
34
29
  end
@@ -45,7 +45,7 @@ module DownloadTV
45
45
  end
46
46
 
47
47
  def config_path
48
- (content[:path] || default_config_path)
48
+ content[:path] || default_config_path
49
49
  end
50
50
 
51
51
  private
@@ -132,7 +132,8 @@ module DownloadTV
132
132
  end
133
133
 
134
134
  def default_config_path
135
- File.join(ENV['HOME'], '.config', 'download_tv', 'config')
135
+ base = ENV.fetch('XDG_CONFIG_HOME') { File.join(Dir.home, '.config') }
136
+ File.join(base, 'download_tv', 'config')
136
137
  end
137
138
 
138
139
  ##
@@ -62,20 +62,21 @@ module DownloadTV
62
62
  end
63
63
 
64
64
  ##
65
- # Finds download links for all new episodes aired since
66
- # the last run of the program
67
- # It connects to MyEpisodes in order to find which shows
68
- # to track and which new episodes aired.
69
- # The param +dry_run+ prevents changing the persisted configuration
65
+ # Finds download links for all new episodes aired since the last run of the program
66
+ # It connects to MyEpisodes in order to find which shows to track and which new episodes aired.
70
67
  # The param +offset+ can be used to move the date back that many days in the check
68
+ # The param +dry_run+ prevents changing the persisted configuration
71
69
  # The param +include_tomorrow+ will add the current day to the list of dates to search
72
- def run(dry_run = false, offset = 0, include_tomorrow: false)
70
+ def run(offset = 0, dry_run: false, include_tomorrow: false)
73
71
  pending = @config[:pending].clone
74
72
  @config[:pending].clear
75
73
  pending ||= []
76
74
  date = date_to_check_from(offset)
77
75
 
78
- pending.concat shows_to_download(date, include_tomorrow) if date < (include_tomorrow ? Date.today.next : Date.today)
76
+ if date < (include_tomorrow ? Date.today.next : Date.today)
77
+ pending.concat shows_to_download(date,
78
+ include_tomorrow)
79
+ end
79
80
 
80
81
  if pending.empty?
81
82
  puts 'Nothing to download'
@@ -86,10 +87,10 @@ module DownloadTV
86
87
 
87
88
  unless dry_run
88
89
  @config[:date] = if include_tomorrow
89
- Date.today.next
90
- else
91
- [Date.today, @config[:date]].max
92
- end
90
+ Date.today.next
91
+ else
92
+ [Date.today, @config[:date]].max
93
+ end
93
94
  @config.serialize
94
95
  end
95
96
  rescue InvalidLoginError
@@ -167,7 +168,7 @@ module DownloadTV
167
168
  end
168
169
 
169
170
  def prompt_links(links)
170
- links.each_with_index { |data, i| puts "#{i}\t\t#{data[0]}" }
171
+ links.each_with_index { |data, i| puts " #{i}\t\t#{data[0]}" }
171
172
 
172
173
  puts
173
174
  print 'Select the torrent you want to download [-1 to skip]: '
@@ -181,7 +182,7 @@ module DownloadTV
181
182
  shows.reject do |i|
182
183
  # Remove season+episode
183
184
  @config[:ignored].include?(
184
- i.split(' ')[0..-2].join(' ').downcase
185
+ i.split[0..-2].join(' ').downcase
185
186
  )
186
187
  end
187
188
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module DownloadTV
4
4
  ##
5
- # EZTV.ag grabber
5
+ # EZTV grabber
6
6
  class Eztv < LinkGrabber
7
7
  def initialize
8
8
  super('https://eztvx.to/search/%s')
@@ -14,7 +14,7 @@ module DownloadTV
14
14
  raw_seeders = raw_data.search('td.forum_thread_post_end').map { |e| e.children[0].text.to_i }
15
15
  raw_links = raw_data.search('a.magnet').sort_by.with_index { |_, index| raw_seeders[index] }.reverse
16
16
 
17
- raise NoTorrentsError if raw_links.size == 0
17
+ raise NoTorrentsError if raw_links.empty?
18
18
 
19
19
  raw_links.collect do |i|
20
20
  [i.attribute('title').text.chomp(' Magnet Link'),
@@ -12,7 +12,7 @@ module DownloadTV
12
12
  raw_data = agent.get(format(@url, show))
13
13
  rows = raw_data.search('div.tgxtablerow')
14
14
 
15
- raise NoTorrentsError if rows.size.zero?
15
+ raise NoTorrentsError if rows.empty?
16
16
 
17
17
  rows.map do |row|
18
18
  [row.children[4].text.strip,