dubdubdub 0.2.3 → 0.2.4
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/dubdubdub.gemspec +1 -1
- data/lib/dubdubdub.rb +1 -1
- data/lib/dubdubdub/client.rb +1 -1
- data/spec/dubdubdub_spec.rb +4 -0
- metadata +2 -2
data/dubdubdub.gemspec
CHANGED
data/lib/dubdubdub.rb
CHANGED
data/lib/dubdubdub/client.rb
CHANGED
|
@@ -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.
|
|
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)
|
data/spec/dubdubdub_spec.rb
CHANGED
|
@@ -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.
|
|
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:
|
|
210
|
+
hash: 3214768176018659868
|
|
211
211
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
212
212
|
none: false
|
|
213
213
|
requirements:
|