dubdubdub 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/dubdubdub.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "dubdubdub"
8
- s.version = "0.2.3"
8
+ s.version = "0.2.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Hu"]
data/lib/dubdubdub.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  class DubDubDub
2
2
  # Version
3
- VERSION = "0.2.3"
3
+ VERSION = "0.2.4"
4
4
 
5
5
  attr_accessor :client
6
6
 
@@ -53,7 +53,7 @@ class DubDubDub::Client
53
53
 
54
54
  # Returns a Net::HTTP object
55
55
  def net_http(uri)
56
- raise ArgumentError unless uri.is_a? URI::HTTP
56
+ raise ArgumentError, "A URI must be provided!" unless uri.kind_of? URI::Generic
57
57
 
58
58
  net_http_class = if proxy?
59
59
  Net::HTTP.Proxy(proxy_host, proxy_port, proxy_user, proxy_password)
@@ -226,6 +226,10 @@ describe DubDubDub do
226
226
  www.follow_url("http://yfrog.us/evlb0z:medium").should == "http://img535.imageshack.us/img535/9845/lb0.mp4"
227
227
  end
228
228
 
229
+ it 'works for domains', vcr: { cassette_name: "follow_url/domains", record: :once } do
230
+ www.follow_url("google.com").should == "google.com"
231
+ end
232
+
229
233
  it "raises forbidden properly on a bad proxy", vcr: { cassette_name: "follow_url/proxy_forbidden", record: :once } do
230
234
  www.proxy = "190.202.116.101:3128"
231
235
  lambda { www.follow_url("http://yfrog.us/evlb0z:medium").should }.should raise_error(DubDubDub::Forbidden)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dubdubdub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -207,7 +207,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
207
207
  version: '0'
208
208
  segments:
209
209
  - 0
210
- hash: 4381431017542032233
210
+ hash: 3214768176018659868
211
211
  required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  none: false
213
213
  requirements: