Module: Hoth

Defined in:
lib/hoth.rb,
lib/hoth/modules.rb,
lib/hoth/service.rb,
lib/hoth/endpoint.rb,
lib/hoth/services.rb,
lib/hoth/transport.rb,
lib/hoth/exceptions.rb,
lib/hoth/util/logger.rb,
lib/hoth/encoding/json.rb,
lib/hoth/encoding/no_op.rb,
lib/hoth/service_module.rb,
lib/hoth/transport/base.rb,
lib/hoth/transport/bert.rb,
lib/hoth/transport/http.rb,
lib/hoth/transport/https.rb,
lib/hoth/service_registry.rb,
lib/hoth/service_definition.rb,
lib/hoth/transport/workling.rb,
lib/hoth/transport/http_hmac.rb,
lib/hoth/providers/rack_provider.rb,
lib/hoth/providers/bertrpc_provider.rb

Defined Under Namespace

Modules: Encoding, Providers, Transport Classes: Endpoint, HothException, Logger, Modules, Service, ServiceDefinition, ServiceModule, ServiceRegistry, Services, TransportError, TransportException

Class Method Summary collapse

Class Method Details

.config_pathObject



30
31
32
# File 'lib/hoth.rb', line 30

def config_path
  @config_path || "config/"
end

.config_path=(config_path) ⇒ Object



34
35
36
# File 'lib/hoth.rb', line 34

def config_path=(config_path)
  @config_path = config_path
end

.envObject



46
47
48
# File 'lib/hoth.rb', line 46

def env
  @env || ENV["HOTH_ENV"] || (Object.const_defined?("Rails") ? Rails.env.to_sym : :development)
end

.env=(env) ⇒ Object



50
51
52
# File 'lib/hoth.rb', line 50

def env=(env)
  @env = env.to_sym
end

.init!Object



24
25
26
27
28
# File 'lib/hoth.rb', line 24

def init!
  load_service_definition
  load_module_definition
  Logger.init_logging!
end

.load_module_definitionObject



42
43
44
# File 'lib/hoth.rb', line 42

def load_module_definition
  require File.join(config_path, "module_definition")
end

.load_service_definitionObject



38
39
40
# File 'lib/hoth.rb', line 38

def load_service_definition
  require File.join(config_path, "service_definition")
end