module Escobar
Top-level module for Escobar
code
Constants
- UUID_REGEX
- VERSION
Public Class Methods
env_netrc()
click to toggle source
# File lib/escobar.rb, line 20 def self.env_netrc @env_netrc ||= begin if ENV["NETRC"] Netrc.read("#{ENV['NETRC']}/.netrc") end rescue Errno::ENOTDIR nil end end
github_api_token()
click to toggle source
# File lib/escobar.rb, line 44 def self.github_api_token netrc["api.github.com"]["password"] end
heroku_api_token()
click to toggle source
# File lib/escobar.rb, line 40 def self.heroku_api_token netrc["api.heroku.com"]["password"] end
home_netrc()
click to toggle source
# File lib/escobar.rb, line 30 def self.home_netrc @home_netrc ||= begin if ENV["HOME"] Netrc.read("#{ENV['HOME']}/.netrc") end rescue Errno::ENOTDIR nil end end
http_open_timeout()
click to toggle source
# File lib/escobar.rb, line 52 def self.http_open_timeout if http_open_timeout_from_environment http_open_timeout_from_environment.to_i else 3 end end
http_open_timeout_from_environment()
click to toggle source
# File lib/escobar.rb, line 68 def self.http_open_timeout_from_environment ENV["ESCOBAR_HTTP_OPEN_TIMEOUT"] end
http_timeout()
click to toggle source
# File lib/escobar.rb, line 60 def self.http_timeout if http_timeout_from_environment http_timeout_from_environment.to_i else 6 end end
http_timeout_from_environment()
click to toggle source
# File lib/escobar.rb, line 72 def self.http_timeout_from_environment ENV["ESCOBAR_HTTP_TIMEOUT"] end
netrc()
click to toggle source
# File lib/escobar.rb, line 10 def self.netrc @netrc ||= begin if env_netrc env_netrc else home_netrc end end end
zipkin_enabled?()
click to toggle source
# File lib/escobar.rb, line 48 def self.zipkin_enabled? !ENV["ZIPKIN_SERVICE_NAME"].nil? && !ENV["ZIPKIN_API_HOST"].nil? end