Module: Padrino::ApplicationSetup::ClassMethods

### Home Classes Methods

### In Files

- lib/padrino-core/application/application_setup.rb

### Methods

- #default_configuration!
- #setup_application!

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- Padrino
- Padrino::Application
- Padrino::ApplicationLoadError
- Padrino::ApplicationSetup
- Padrino::ApplicationSetup::ClassMethods
- Padrino::AuthenticityToken
- Padrino::Cli
- Padrino::Cli::Adapter
- Padrino::Cli::Base
- Padrino::Cli::Launcher
- Padrino::Filter
- Padrino::Flash
- Padrino::Flash::Helpers
- Padrino::Flash::Storage
- Padrino::Loader
- Padrino::Logger
- Padrino::Logger::Colorize
- Padrino::Logger::Extensions
- Padrino::Logger::Rack
- Padrino::Module
- Padrino::Mounter
- Padrino::Mounter::ApplicationWrapper
- Padrino::Mounter::MounterException
- Padrino::ParamsProtection
- Padrino::ParamsProtection::ClassMethods
- Padrino::ParamsProtection::InstanceMethods
- Padrino::Reloader
- Padrino::Reloader::Rack
- Padrino::Reloader::Storage
- Padrino::Router
- Padrino::Routing
- Padrino::Routing::ClassMethods
- Padrino::Routing::InstanceMethods
- Padrino::Routing::Parent
- Padrino::Routing::UnrecognizedException
- Padrino::Server
- Padrino::ShowExceptions
- Padrino::Tasks
- HttpRouter
- HttpRouter::Node
- HttpRouter::Node::FreeRegex
- HttpRouter::Node::Glob
- HttpRouter::Node::Path
- HttpRouter::Node::SpanningRegex
- HttpRouter::Request
- HttpRouter::Route
- Sinatra
- Sinatra::Base
- Sinatra::Request
- Kernel
- Object
- PadrinoTasks

No matching classes.

# Padrino::ApplicationSetup::ClassMethods

### Public Instance Methods

default_configuration!() click to toggle source

Defines default settings for Padrino application.

    # File lib/padrino-core/application/application_setup.rb, line 14
    def default_configuration!
      set :app_file, File.expand_path(caller_files.first || $0)
      set :app_name, settings.to_s.underscore.to_sym

      set :environment, Padrino.env
      set :reload, proc { development? }
      set :logging, proc { development? }

      set :method_override, true
      set :default_builder, 'StandardFormBuilder'

      # TODO: Remove this hack after getting rid of thread-unsafe http_router:
      if RUBY_PLATFORM == "java"
        set :init_mutex, Mutex.new
      end

      default_paths
      default_security
      global_configuration
      setup_prerequisites
    end

setup_application!() click to toggle source

Setup the application by registering initializers, load paths and logger. Invoked automatically when an application is first instantiated.

@return [TrueClass]

    # File lib/padrino-core/application/application_setup.rb, line 42
    def setup_application!
      return if @_configured
      require_dependencies
      default_routes
      default_errors
      setup_locale
      @_configured = true
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.