download_tv 2.2.1 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -2
- data/Rakefile +8 -8
- data/bin/tv +76 -76
- data/download_tv.gemspec +18 -17
- data/lib/download_tv.rb +13 -13
- data/lib/download_tv/configuration.rb +64 -64
- data/lib/download_tv/downloader.rb +184 -191
- data/lib/download_tv/grabbers/addic7ed.rb +48 -53
- data/lib/download_tv/grabbers/eztv.rb +19 -22
- data/lib/download_tv/grabbers/kat.rb +21 -25
- data/lib/download_tv/grabbers/torrentapi.rb +60 -66
- data/lib/download_tv/grabbers/tpb.rb +22 -26
- data/lib/download_tv/linkgrabber.rb +25 -31
- data/lib/download_tv/myepisodes.rb +78 -86
- data/lib/download_tv/subtitles.rb +14 -19
- data/lib/download_tv/torrent.rb +69 -83
- data/lib/download_tv/version.rb +1 -1
- data/test/config_test.rb +168 -170
- data/test/downloader_test.rb +166 -182
- data/test/grabbers_test.rb +38 -44
- data/test/test_helper.rb +15 -15
- data/test/torrent_test.rb +22 -25
- metadata +2 -2
data/test/torrent_test.rb
CHANGED
@@ -1,31 +1,28 @@
|
|
1
|
-
require
|
1
|
+
require 'test_helper'
|
2
2
|
|
3
3
|
describe DownloadTV::Torrent do
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
before do
|
5
|
+
@t = DownloadTV::Torrent.new
|
6
|
+
end
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
describe 'when creating the object' do
|
9
|
+
it 'will have some grabbers' do
|
10
|
+
@t.g_names.empty?.must_equal false
|
11
|
+
@t.g_instances.empty?.must_equal false
|
12
|
+
@t.n_grabbers.must_be :>, 0
|
13
|
+
end
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
end
|
15
|
+
it 'will have the right amount of grabbers' do
|
16
|
+
# Initiakize calls change_grabbers
|
17
|
+
@t.n_grabbers.must_equal @t.g_names.size + 1
|
18
|
+
@t.g_instances.size.must_equal 1
|
19
|
+
end
|
21
20
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
end
|
21
|
+
it 'will populate the instances' do
|
22
|
+
@t.n_grabbers.times.each { @t.change_grabbers }
|
23
|
+
@t.g_names.empty?.must_equal true
|
24
|
+
@t.g_instances.empty?.must_equal false
|
25
|
+
@t.g_instances.size.must_equal @t.n_grabbers
|
26
|
+
end
|
27
|
+
end
|
31
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: download_tv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- guille
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|