download_tv 2.6.5 → 2.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -1
- data/.rspec +1 -0
- data/CHANGELOG.md +17 -0
- data/Gemfile +2 -0
- data/README.md +9 -4
- data/bin/tv +9 -4
- data/lib/download_tv/configuration.rb +107 -81
- data/lib/download_tv/downloader.rb +21 -32
- data/lib/download_tv/filterer.rb +17 -17
- data/lib/download_tv/grabbers/eztv.rb +1 -1
- data/lib/download_tv/grabbers/torrentapi.rb +1 -1
- data/lib/download_tv/grabbers/torrentz.rb +25 -0
- data/lib/download_tv/grabbers/tpb.rb +1 -1
- data/lib/download_tv/linkgrabber.rb +6 -3
- data/lib/download_tv/myepisodes.rb +45 -38
- data/lib/download_tv/torrent.rb +37 -28
- data/lib/download_tv/version.rb +1 -1
- data/lib/download_tv.rb +0 -1
- data/spec/download_tv/configuration_spec.rb +199 -0
- data/spec/download_tv/filterer_spec.rb +107 -0
- data/spec/download_tv/linkgrabber_spec.rb +16 -0
- data/spec/download_tv/myepisodes_spec.rb +38 -0
- data/spec/download_tv/torrent_spec.rb +132 -0
- data/spec/spec_helper.rb +92 -0
- data/test/downloader_test.rb +5 -5
- metadata +11 -11
- data/lib/download_tv/grabbers/addic7ed.rb +0 -65
- data/lib/download_tv/grabbers/kat.rb +0 -49
- data/lib/download_tv/grabbers/torrentz2.rb +0 -27
- data/lib/download_tv/subtitles.rb +0 -17
- data/test/config_test.rb +0 -175
- data/test/torrent_test.rb +0 -41
data/test/torrent_test.rb
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'test_helper'
|
4
|
-
|
5
|
-
describe DownloadTV::Torrent do
|
6
|
-
grabber_names = DownloadTV::Torrent.new(nil).grabbers
|
7
|
-
describe 'when creating the object' do
|
8
|
-
before do
|
9
|
-
@t = DownloadTV::Torrent.new
|
10
|
-
end
|
11
|
-
|
12
|
-
it 'will populate the instances' do
|
13
|
-
_(@t.g_instances.size).must_equal grabber_names.size
|
14
|
-
end
|
15
|
-
|
16
|
-
it 'will start with all tries available' do
|
17
|
-
_(@t.tries).must_equal grabber_names.size - 1
|
18
|
-
end
|
19
|
-
|
20
|
-
it 'will call get_links on its grabber' do
|
21
|
-
@t.g_instances.first.stub :get_links, %w[test result] do
|
22
|
-
_(@t.get_links('test show')).must_equal %w[test result]
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
describe 'when giving it a default grabber' do
|
28
|
-
it 'has a default order' do
|
29
|
-
t = DownloadTV::Torrent.new(nil)
|
30
|
-
expected = grabber_names.map { |i| "DownloadTV::#{i}" }
|
31
|
-
_(t.g_instances.map { |i| i.class.name }).must_equal expected
|
32
|
-
end
|
33
|
-
|
34
|
-
grabber_names.each do |g|
|
35
|
-
it 'correctly uses the given grabber first' do
|
36
|
-
t = DownloadTV::Torrent.new(g)
|
37
|
-
_(t.g_instances.first.class.name).must_equal "DownloadTV::#{g}"
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|