cherrypicker 0.2.0 → 0.2.1
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.
- data/lib/cherrypicker/rapidshare.rb +2 -2
- data/lib/cherrypicker/version.rb +1 -1
- data/test/unit/rapidshare_test.rb +1 -1
- metadata +2 -2
|
@@ -13,7 +13,7 @@ class Rapidshare
|
|
|
13
13
|
@link = link
|
|
14
14
|
@fileid = fileid
|
|
15
15
|
@filename = filename
|
|
16
|
-
|
|
16
|
+
# @hostname = hostname
|
|
17
17
|
@username = username
|
|
18
18
|
@password = password
|
|
19
19
|
@size = size
|
|
@@ -47,6 +47,6 @@ class Rapidshare
|
|
|
47
47
|
|
|
48
48
|
def hostname
|
|
49
49
|
query = remote_query("http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=download&" + create_url)
|
|
50
|
-
query.response.
|
|
50
|
+
query.response.response["Location"][/https:\/\/(.*).rapidshare.com/, 1] + ".rapidshare.com"
|
|
51
51
|
end
|
|
52
52
|
end
|
data/lib/cherrypicker/version.rb
CHANGED
|
@@ -5,7 +5,7 @@ class RapidshareTest < Test::Unit::TestCase
|
|
|
5
5
|
context "Information request" do
|
|
6
6
|
|
|
7
7
|
should "return response" do
|
|
8
|
-
response = Rapidshare.new("http://rapidshare.com/files/453165880/test_file.txt", "
|
|
8
|
+
response = Rapidshare.new("http://rapidshare.com/files/453165880/test_file.txt", "username", "password")
|
|
9
9
|
assert response.fileid =~ /\d*/
|
|
10
10
|
assert response.filename.length > 0
|
|
11
11
|
assert response.hostname.length > 0
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: cherrypicker
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.2.
|
|
5
|
+
version: 0.2.1
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Karl Entwistle
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2011-04-
|
|
13
|
+
date: 2011-04-19 00:00:00 +01:00
|
|
14
14
|
default_executable:
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|