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.
@@ -13,7 +13,7 @@ class Rapidshare
13
13
  @link = link
14
14
  @fileid = fileid
15
15
  @filename = filename
16
- @hostname = hostname
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.body[/DL:(.*).rapidshare.com/, 1] + ".rapidshare.com"
50
+ query.response.response["Location"][/https:\/\/(.*).rapidshare.com/, 1] + ".rapidshare.com"
51
51
  end
52
52
  end
@@ -1,3 +1,3 @@
1
1
  module Cherrypicker
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -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", "6160038", "PXVA62ZY")
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.0
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-16 00:00:00 +01:00
13
+ date: 2011-04-19 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency