Sha256: 69599afc0f2cec8566a6aa13a006dcc8d2fae33122bb741c4caaac77068ae85a
Contents?: true
Size: 1.04 KB
Versions: 4
Compression:
Stored size: 1.04 KB
Contents
# This file is merely for beginning the boot process, check dependencies.rb for more information RACK_ENV = ENV["RACK_ENV"] ||= "development" unless defined? RACK_ENV ROOT_DIR = File.dirname(__FILE__) + '/../' unless defined? ROOT_DIR # Helper method for file references. # # @param args [Array] Path components relative to ROOT_DIR. # @example Referencing a file in config called settings.yml: # root_path("config", "settings.yml") def root_path(*args) File.join(ROOT_DIR, *args) end # Returns the full path to the public folder along with any given additions # public_path("images") def public_path(*args) root_path('public', *args) end class <%= @class_name %> < Sinatra::Application # Defines basic application settings set :root, root_path set :views, root_path("app", "views") set :images_path, public_path("images") set :default_builder, 'StandardFormBuilder' set :environment, RACK_ENV if defined?(RACK_ENV) # Dependencies contains all required gems and core configuration require File.dirname(__FILE__) + '/dependencies.rb' end
Version data entries
4 entries across 4 versions & 1 rubygems