dubdubdub 0.2.2 → 0.2.3
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 +6 -0
- metadata +2 -2
data/dubdubdub.gemspec
CHANGED
data/lib/dubdubdub.rb
CHANGED
data/lib/dubdubdub/client.rb
CHANGED
|
@@ -20,7 +20,7 @@ class DubDubDub::Client
|
|
|
20
20
|
if DubDubDub.proxies and DubDubDub.proxies.is_a?(Array) and DubDubDub.proxies.any?
|
|
21
21
|
self.proxy = DubDubDub.proxies.sample
|
|
22
22
|
else
|
|
23
|
-
raise DubDubDub::Exception, "No proxies have been specified!"
|
|
23
|
+
raise DubDubDub::Exception, "No proxies have been specified!" unless DubDubDub.configuration.ignore_proxies
|
|
24
24
|
end
|
|
25
25
|
# Otherwise, it should be a proxy url
|
|
26
26
|
else
|
data/spec/dubdubdub_spec.rb
CHANGED
|
@@ -49,6 +49,12 @@ describe DubDubDub do
|
|
|
49
49
|
lambda { DubDubDub.new(proxy: true) }.should raise_error(DubDubDub::Exception)
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
+
it "doesn't raise an error if configured to ignore proxies and we have specified to use a proxy from the list but there are none" do
|
|
53
|
+
DubDubDub.configuration.ignore_proxies = true
|
|
54
|
+
DubDubDub.proxies = nil
|
|
55
|
+
lambda { DubDubDub.new(proxy: true) }.should_not raise_error(DubDubDub::Exception)
|
|
56
|
+
end
|
|
57
|
+
|
|
52
58
|
it "does not pass the method to client if that method doesn't exist within the client" do
|
|
53
59
|
www = DubDubDub.new
|
|
54
60
|
lambda { www.some_method_that_doesnt_exist }.should raise_error(NameError)
|
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.3
|
|
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: 4381431017542032233
|
|
211
211
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
212
212
|
none: false
|
|
213
213
|
requirements:
|