Module: Dolphin
- Defined in:
- lib/dolphin.rb,
lib/dolphin/util.rb,
lib/dolphin/mailer.rb,
lib/dolphin/sender.rb,
lib/dolphin/worker.rb,
lib/dolphin/manager.rb,
lib/dolphin/version.rb,
lib/dolphin/data_store.rb,
lib/dolphin/models/base.rb,
lib/dolphin/message_builder.rb,
lib/dolphin/query_processor.rb,
lib/dolphin/request_handler.rb,
lib/dolphin/data_stores/mysql.rb,
lib/dolphin/data_stores/base_rdb.rb,
lib/dolphin/data_stores/cassandra.rb,
lib/dolphin/models/cassandra/base.rb,
lib/dolphin/helpers/request_helper.rb,
lib/dolphin/models/cassandra/event.rb,
lib/dolphin/models/cassandra/notification.rb
Defined Under Namespace
Modules: DataStore, Helpers, MessageBuilder, Models, Sender, Util
Classes: EventObject, FailureObject, Mailer, Manager, NotificationObject, QueryProcessor, RequestApp, RequestHandler, ResponseObject, SuccessObject, TemplateBuilder, Worker
Constant Summary
collapse
- VERSION =
'0.0.5'
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
27
28
29
|
# File 'lib/dolphin.rb', line 27
def self.config
@config
end
|
.config_path ⇒ Object
39
40
41
|
# File 'lib/dolphin.rb', line 39
def self.config_path
File.join(root_path, '/config')
end
|
.db_path ⇒ Object
43
44
45
|
# File 'lib/dolphin.rb', line 43
def self.db_path
File.join(config_path, '/db')
end
|
.load_setting(path = nil) ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/dolphin.rb', line 10
def self.load_setting(path=nil)
path ||= ENV['CONFIG_FILE'] || File.join(Dolphin.config_path, 'dolphin.conf')
if !File.exists?(path)
STDERR.puts "Not found configuration file: #{path}"
exit!
end
@config = path
@settings = ParseConfig.new(path)
end
|
.root_path ⇒ Object
31
32
33
|
# File 'lib/dolphin.rb', line 31
def self.root_path
File.expand_path('../../', __FILE__)
end
|
.settings ⇒ Object
22
23
24
25
|
# File 'lib/dolphin.rb', line 22
def self.settings
raise "Configuration file is not loaded yet." if @settings.nil?
@settings
end
|
.templates_path ⇒ Object
35
36
37
|
# File 'lib/dolphin.rb', line 35
def self.templates_path
File.join(root_path, '/templates')
end
|