torrents 1.0.8 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  module Trackers
2
2
  class Tti
3
3
  def details(tr)
4
- "http://tti.nu" + tr.to_s.match(/(details\.php\?id=\d+)/i).to_a[1]
4
+ "http://tti.nu/" + tr.to_s.match(/(details\.php\?id=\d+)/i).to_a[1]
5
5
  end
6
6
 
7
7
  def torrent(tr)
@@ -41,6 +41,13 @@ describe Trackers::ThePirateBay do
41
41
  Torrents.the_pirate_bay.page(5).category(:movies).should have(30).results
42
42
  end
43
43
 
44
+ it "should return the right details link when trying to fetch recent torrents" do
45
+ rest_client("http://www.torrentleech.org/torrents/browse/index/page/1", "recent")
46
+ Torrents.the_pirate_bay.results.each do |torrent|
47
+ torrent.details.should match(/http:\/\/thepiratebay\.org\/torrent\/\d+/)
48
+ end
49
+ end
50
+
44
51
  it "should have a working find_by_details method" do
45
52
  rest_client("http://thepiratebay.org/torrent/6173093/", "details")
46
53
  torrent = Torrents.the_pirate_bay.find_by_details("http://thepiratebay.org/torrent/6173093/")
@@ -50,6 +50,13 @@ describe Trackers::Torrentleech do
50
50
  Torrents.torrentleech.cookies(cookies).category(:movies).should have(100).results
51
51
  end
52
52
 
53
+ it "should return the right details link when trying to fetch recent torrents" do
54
+ rest_client("http://www.torrentleech.org/torrents/browse/index/page/1", "recent")
55
+ Torrents.torrentleech.cookies(cookies).results.each do |torrent|
56
+ torrent.details.should match(/http:\/\/torrentleech\.org\/torrent\/\d+/)
57
+ end
58
+ end
59
+
53
60
  it "should have a working find_by_details method" do
54
61
  rest_client("http://www.torrentleech.org/torrent/281171", "details")
55
62
  torrent = Torrents.torrentleech.cookies(cookies).find_by_details("http://www.torrentleech.org/torrent/281171")
@@ -46,6 +46,13 @@ describe Trackers::Tti do
46
46
  Torrents.tti.cookies(cookies).should have(50).results
47
47
  end
48
48
 
49
+ it "should return the right details link when trying to fetch recent torrents" do
50
+ rest_client("http://tti.nu/browse.php?page=0&incldead=0", "recent")
51
+ Torrents.tti.cookies(cookies).results.each do |torrent|
52
+ torrent.details.should match(/http:\/\/tti\.nu\/details\.php\?id=\d+/)
53
+ end
54
+ end
55
+
49
56
  it "should found 50 recent movies" do
50
57
  rest_client("http://tti.nu/browse.php?c47=1&c65=1&c59=1&c48=1&page=0&incldead=0", "movies")
51
58
  Torrents.tti.cookies(cookies).category(:movies).should have(50).results
data/torrents.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "torrents"
6
- s.version = "1.0.8"
6
+ s.version = "1.0.10"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Linus Oleander"]
9
9
  s.email = ["linus@oleander.nu"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: torrents
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.8
5
+ version: 1.0.10
6
6
  platform: ruby
7
7
  authors:
8
8
  - Linus Oleander