dubdubdub 0.2.6 → 0.2.7
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 +5 -5
- data/lib/dubdubdub/configuration.rb +2 -0
- data/spec/dubdubdub_spec.rb +10 -0
- metadata +2 -2
data/dubdubdub.gemspec
CHANGED
data/lib/dubdubdub.rb
CHANGED
data/lib/dubdubdub/client.rb
CHANGED
|
@@ -16,13 +16,13 @@ class DubDubDub::Client
|
|
|
16
16
|
if options[:proxy]
|
|
17
17
|
# If true, refer to global proxy config
|
|
18
18
|
if options[:proxy] == true
|
|
19
|
-
|
|
19
|
+
unless DubDubDub.configuration.ignore_proxy?
|
|
20
|
+
proxy = DubDubDub.configuration.proxy
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
raise DubDubDub::Exception, "No proxy has been configured or provided!"
|
|
23
|
-
end
|
|
22
|
+
raise DubDubDub::Exception, "No proxy has been configured or provided!" if proxy.nil?
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
self.proxy = proxy
|
|
25
|
+
end
|
|
26
26
|
# Otherwise, it should be a proxy url
|
|
27
27
|
else
|
|
28
28
|
self.proxy = options[:proxy]
|
data/spec/dubdubdub_spec.rb
CHANGED
|
@@ -41,6 +41,16 @@ describe DubDubDub do
|
|
|
41
41
|
www.proxy.should == "localhost:8000"
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
+
it "ignores proxy if configured to and it's set to nil" do
|
|
45
|
+
DubDubDub.configure do |config|
|
|
46
|
+
config.ignore_proxy = true
|
|
47
|
+
config.proxy = nil
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
www = DubDubDub.new(proxy: true)
|
|
51
|
+
www.should_not be_proxy
|
|
52
|
+
end
|
|
53
|
+
|
|
44
54
|
it "raises an error if we have specified to use a proxy but none has been set globally" do
|
|
45
55
|
DubDubDub.configure do |config|
|
|
46
56
|
config.ignore_proxy = false
|
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.7
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -208,7 +208,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
208
208
|
version: '0'
|
|
209
209
|
segments:
|
|
210
210
|
- 0
|
|
211
|
-
hash:
|
|
211
|
+
hash: 4395775456282320006
|
|
212
212
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
213
|
none: false
|
|
214
214
|
requirements:
|