Sha256: 78541c29eb1eb0b0c4bcd05b1c8bd8fd576374a0cf32d4c0e8fbe7fc41a89d7e

Contents?: true

Size: 934 Bytes

Versions: 1

Compression:

Stored size: 934 Bytes

Contents

require "rubygems"
require "bundler"
require "yaml"

# require "bundle gems"
ENV["RACK_ENV"] ||= "development"
Bundler.require(:default, ENV["RACK_ENV"].to_sym)

# init database
DB = Sequel.connect(YAML.load_file("./config/database.yml")["default"]["url"])

# init sinatra
set :sessions, true
set :session_secret, "<%= @session_secret %>"
set :root, File.expand_path(".")
set :views, settings.root + "/app/views"

# sinatra reloader
if development?
  require "sinatra/reloader"
  also_reload "lib/**/*.rb", "app/{models,helpers}/**/*.rb"
end

# assetpack support
assets do
  serve "/js", :from => "app/assets/js"
  serve "/css", :from => "app/assets/css"
  serve "/img", :from => "app/assets/img"

  css_compression :sass
  js_compression  :uglify

  js :application, ["/js/*.js"]
  css :application, ["/css/*.css"]
end

# require project files
Dir.glob "./{lib,app/models,app/helpers,app/controllers}/**/*.rb" do |f|
  require f
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simba-0.0.5 lib/simba/base_app/config/boot.rb.tt