Module: Junebug

Includes:
Camping::Session
Defined in:
lib/junebug/version.rb,
lib/junebug.rb,
lib/junebug/config.rb,
lib/junebug/generator.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Config, Controllers, Generator, Models, VERSION, Views

Class Method Summary collapse

Class Method Details

.configObject



37
38
39
# File 'lib/junebug.rb', line 37

def self.config
  @config ||= YAML.load(File.read('config.yml'))
end

.connectObject



31
32
33
34
35
# File 'lib/junebug.rb', line 31

def self.connect
  Junebug::Models::Base.establish_connection(Junebug.config['dbconnection'])
  Junebug::Models::Base.logger = Logger.new('junebug.log')
  Junebug::Models::Base.threaded_connections=false
end

.createObject



26
27
28
29
# File 'lib/junebug.rb', line 26

def self.create
  Junebug::Models.create_schema :assume => (Junebug::Models::Page.table_exists? ? 1.0 : 0.0)
  Camping::Models::Session.create_schema
end

.startpageObject



41
42
43
# File 'lib/junebug.rb', line 41

def self.startpage
  "/#{Junebug.config['startpage']}"
end