class Puzzle::Configuration

Class used to store configuration information

Attributes

ca_file[RW]

@return [String] The path to the certificate

ca_path[RW]

@return [String] The path to the certificate

format[RW]

@return [String] The return format (XML/JSON)

host[RW]

@return [String] The host to connect to (defaults to api.openbeerdatabase.com).

port[RW]

@return [Integer] The port used to communicate

token[RW]

@return [String] The API token for your user.

verify_mode[RW]

@return [String] The verification method used by ssl

Public Class Methods

new() click to toggle source

Instantiated from {Puzzle.configuration}. Sets defaults.

# File lib/puzzle/configuration.rb, line 26
def initialize
  self.host = "www.jigsaw.com"
  self.port = 443
  self.format = "json"
  self.verify_mode = OpenSSL::SSL::VERIFY_PEER
  self.ca_path = '/etc/ssl/certs' if File.exists?('/etc/ssl/certs') # Ubuntu
  self.ca_file = '/opt/local/share/curl/curl-ca-bundle.crt' if File.exists?('/opt/local/share/curl/curl-ca-bundle.crt') # Mac OS X
end