Sha256: 7fbddb4e35591f0d2bff1bda2f124675ee7849773b74585036d937de0ea5b6a4

Contents?: true

Size: 966 Bytes

Versions: 15

Compression:

Stored size: 966 Bytes

Contents

##
# Initializers can be used to configure information about your padrino app
# The following format is used because initializers are applied as plugins into the application
# 
module ExampleInitializer
  def self.registered(app)
    ##
    # Simple Redmine Issue
    # 
    #   app.error 500 do
    #     # Delivery error to our server
    #     boom = env['sinatra.error']
    #     body = ["#{boom.class} - #{boom.message}:", *boom.backtrace].join("\n  ")
    #     redmine = ["project: foo", "tracker: Bug", "priority: high"].join("\n")
    #     logger.error body
    #     Padrino::Mailer::MailObject.new(
    #       :subject => "[PROJECT] #{boom.class} - #{boom.message}",
    #       :to => "exceptions@foo.com", 
    #       :from => "help@foo.com", 
    #       :body => [body, redmine].join("\n\n")
    #     ).deliver
    #     response.status = 500
    #     content_type 'text/html', :charset => "utf-8"
    #     render "errors"
    #   end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
padrino-gen-0.8.5 lib/padrino-gen/generators/project/config/initializers/example.rb
padrino-gen-0.8.4 lib/padrino-gen/generators/project/config/initializers/example.rb
padrino-gen-0.8.3 lib/padrino-gen/generators/project/config/initializers/example.rb
padrino-gen-0.8.2 lib/padrino-gen/generators/project/config/initializers/example.rb
padrino-gen-0.8.1 lib/padrino-gen/generators/project/config/initializers/example.rb
padrino-gen-0.8.0 lib/padrino-gen/generators/project/config/initializers/example.rb
padrino-gen-0.7.9 lib/padrino-gen/generators/app/config/initializers/example.rb
padrino-gen-0.7.8 lib/padrino-gen/generators/app/config/initializers/example.rb
padrino-gen-0.7.7 lib/padrino-gen/generators/app/config/initializers/example.rb
padrino-gen-0.7.6 lib/padrino-gen/generators/app/config/initializers/example.rb
padrino-gen-0.7.5 lib/padrino-gen/generators/app/config/initializers/example.rb
padrino-gen-0.7.4 lib/padrino-gen/generators/app/config/initializers/example.rb
padrino-gen-0.7.3 lib/padrino-gen/generators/app/config/initializers/example.rb
padrino-gen-0.7.2 lib/padrino-gen/generators/app/config/initializers/example.rb
padrino-gen-0.7.1 lib/padrino-gen/generators/app/config/initializers/example.rb