Module: Refinery

Defined in:
lib/refinery.rb,
lib/refinery/config.rb,
lib/refinery/daemon.rb,
lib/refinery/server.rb,
lib/refinery/worker.rb,
lib/refinery/monitor.rb,
lib/refinery/loggable.rb,
lib/refinery/heartbeat.rb,
lib/refinery/publisher.rb,
lib/refinery/queueable.rb,
lib/refinery/utilities.rb,
lib/refinery/statistics.rb,
lib/refinery/validations.rb,
lib/refinery/configurable.rb,
lib/refinery/stats_server.rb,
lib/refinery/event_publisher.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Configurable, Loggable, Queueable, Utilities, Validations Classes: Config, Daemon, EventPublisher, Heartbeat, InvalidMessageError, Monitor, Publisher, Server, SourceFileNotFound, Statistics, StatsServer, Worker

Class Method Summary collapse

Class Method Details

.require_internalsObject

Require internal code files



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/refinery.rb', line 45

def self.require_internals
  require 'refinery/loggable'
  require 'refinery/configurable'
  require 'refinery/queueable'

  require 'refinery/utilities'
  
  require 'refinery/validations'

  require 'refinery/config'
  require 'refinery/heartbeat'
  require 'refinery/server'
  require 'refinery/daemon'
  require 'refinery/worker'
  require 'refinery/event_publisher'
  require 'refinery/publisher'
  require 'refinery/monitor'
  require 'refinery/statistics'
  require 'refinery/stats_server'
  
end

.require_librariesObject

Require all of the dependencies.



24
25
26
27
28
29
30
# File 'lib/refinery.rb', line 24

def self.require_libraries
  require_library('rubygems', 'Rubygems')
  require_library('right_aws', 'RightScale AWS gem')
  require_library('json', 'JSON gem')
  require_library('moneta', 'Moneta gem')
  require_library('moneta/s3', 'Moneta S3 implementation')
end

.require_library(short_name, display_name) ⇒ Object

Require the specified library.

The short name is the require path and the display_name will be shown if the library cannot be loaded.



14
15
16
17
18
19
20
21
# File 'lib/refinery.rb', line 14

def self.require_library(short_name, display_name)
  begin
    require short_name
  rescue LoadError
    puts "#{display_name} is required, please install it"
    exit
  end
end

.require_optional_librariesObject



39
40
41
42
# File 'lib/refinery.rb', line 39

def self.require_optional_libraries
  require_optional_library('sequel', 'Sequel gem')
  require_optional_library('ramaze', 'Ramaze')
end

.require_optional_library(short_name, display_name) ⇒ Object



32
33
34
35
36
37
# File 'lib/refinery.rb', line 32

def self.require_optional_library(short_name, display_name)
  begin
    require short_name
  rescue LoadError
  end
end