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



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

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

.connectObject



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

def self.connect
  Junebug::Models::Base.establish_connection :adapter => 'sqlite3', :database => 'junebug.db'
  Junebug::Models::Base.logger = Logger.new('junebug.log')
  Junebug::Models::Base.threaded_connections=false
end

.createObject



22
23
24
25
# File 'lib/junebug.rb', line 22

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

.startpageObject



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

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