Sha256: 7716011d0d083adcd08b0ba14f4b176d4eeddade9317ef548c6af677cab7f86b
Contents?: true
Size: 1.28 KB
Versions: 2
Compression:
Stored size: 1.28 KB
Contents
# This file is merely for beginning the boot process, check dependencies.rb for more information 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' # Dependencies contains all required gems and core configuration require File.dirname(__FILE__) + '/dependencies.rb' # Requires the initializer modules which configure specific components Dir[File.dirname(__FILE__) + '/initializers/*.rb'].each do |file| # Each initializer file contains a module called 'XxxxInitializer' (i.e HassleInitializer) require file file_class = File.basename(file, '.rb').classify register "#{file_class}Initializer".constantize end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sinatra_more-0.3.1 | generators/base_app/config/boot.rb.tt |
sinatra_more-0.3.0 | generators/base_app/config/boot.rb.tt |