Class: Buildr::Options::Proxies
- Defined in:
- lib/buildr/core/environment.rb
Overview
Wraps around the proxy environment variables:
-
:http – HTTP_PROXY
-
:exclude – NO_PROXY
Instance Method Summary collapse
-
#exclude ⇒ Object
Returns list of hosts to exclude from proxying (NO_PROXY).
-
#exclude=(url) ⇒ Object
Sets list of hosts to exclude from proxy (NO_PROXY).
-
#http ⇒ Object
Returns the HTTP_PROXY URL.
-
#http=(url) ⇒ Object
Sets the HTTP_PROXY URL.
Instance Method Details
#exclude ⇒ Object
Returns list of hosts to exclude from proxying (NO_PROXY).
64 65 66 |
# File 'lib/buildr/core/environment.rb', line 64 def exclude @exclude ||= EnvArray.new('NO_PROXY') end |
#exclude=(url) ⇒ Object
Sets list of hosts to exclude from proxy (NO_PROXY). Accepts host name, array of names, or nil to clear the list.
70 71 72 73 74 |
# File 'lib/buildr/core/environment.rb', line 70 def exclude=(url) exclude.clear exclude.concat [url].flatten if url exclude end |
#http ⇒ Object
Returns the HTTP_PROXY URL.
53 54 55 |
# File 'lib/buildr/core/environment.rb', line 53 def http ENV['HTTP_PROXY'] || ENV['http_proxy'] end |
#http=(url) ⇒ Object
Sets the HTTP_PROXY URL.
58 59 60 61 |
# File 'lib/buildr/core/environment.rb', line 58 def http=(url) ENV['http_proxy'] = nil ENV['HTTP_PROXY'] = url end |