dubdubdub 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "dubdubdub"
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
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"]
@@ -1,6 +1,6 @@
1
1
  class DubDubDub
2
2
  # Version
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
 
5
5
  attr_accessor :client
6
6
 
@@ -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
@@ -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.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: -2077159284295139736
210
+ hash: 4381431017542032233
211
211
  required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  none: false
213
213
  requirements: