torrent_api 0.2.3 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -1
- data/Rakefile +1 -1
- data/lib/pirate_bay/base.rb +7 -1
- data/torrent_api.gemspec +2 -2
- metadata +4 -4
data/CHANGELOG
CHANGED
@@ -8,4 +8,6 @@
|
|
8
8
|
v0.2.0 Added some PirateBay analysis methods for comments and their video/audio ratings. Specs begin.
|
9
9
|
v0.2.1 Added more api methods to the video/audio ratings
|
10
10
|
v0.2.2 No more NaN's being returned by average methods
|
11
|
-
v0.2.3 Ruby 1.8.7 Support
|
11
|
+
v0.2.3 Ruby 1.8.7 Support
|
12
|
+
v0.2.4 Fixed an issue with bad filename creation in caching
|
13
|
+
v0.2.5 Seriously, fixed a fix.
|
data/Rakefile
CHANGED
data/lib/pirate_bay/base.rb
CHANGED
@@ -35,9 +35,15 @@ module PirateBay
|
|
35
35
|
next_page(doc)
|
36
36
|
|
37
37
|
end
|
38
|
+
|
39
|
+
def sanitize_filename(filename)
|
40
|
+
filename = filename.gsub(/[^0-9A-Za-z.\-]/, 'x')
|
41
|
+
filename = filename.gsub(/^.*(\\|\/)/, '')
|
42
|
+
filename.strip
|
43
|
+
end
|
38
44
|
|
39
45
|
def cached_filename
|
40
|
-
File.join("tmp", "searches", "#{search_string}_#{category_id}_#{page}.html")
|
46
|
+
File.join("tmp", "searches", "#{sanitize_filename(search_string)}_#{category_id}_#{page}.html")
|
41
47
|
end
|
42
48
|
|
43
49
|
def get_quality
|
data/torrent_api.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "torrent_api"
|
5
|
-
s.version = "0.2.
|
5
|
+
s.version = "0.2.5"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["James Hart"]
|
9
|
-
s.date = "
|
9
|
+
s.date = "2012-01-31"
|
10
10
|
s.description = "An API to query popular torrent websites"
|
11
11
|
s.email = "hjhart@gmail.com"
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG", "README.markdown", "lib/demonoid/base.rb", "lib/demonoid/result.rb", "lib/demonoid/result_set.rb", "lib/pirate_bay/base.rb", "lib/pirate_bay/categories.rb", "lib/pirate_bay/details.rb", "lib/pirate_bay/result.rb", "lib/pirate_bay/result_set.rb", "lib/torrent_api.rb", "lib/torrent_reactor/base.rb", "lib/torrent_reactor/result.rb", "lib/torrent_reactor/result_set.rb"]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: torrent_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 5
|
10
|
+
version: 0.2.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- James Hart
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-01-31 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: nokogiri
|