This module is based on Sequel 4.27.0 sequel-4.27.0/lib/sequel/model/default_inflections.rb
Modules: Admin, ApplicationSetup, Cache, Configuration, Flash, Generators, Helpers, Inflections, Loader, Mailer, Module, ParamsProtection, PathRouter, Performance, Reloader, Rendering, Routing, Tasks, Utils Classes: Application, AuthenticityToken, Filter, Logger, Mounter, Router, SafeBuffer, Server
List of callers in a Padrino application that should be ignored as part of a stack trace.
[ %r{lib/padrino-.*$}, %r{/padrino-.*/(lib|bin)}, %r{/bin/padrino$}, %r{/sinatra(/(base|main|show_?exceptions))?\.rb$}, %r{lib/tilt.*\.rb$}, %r{lib/rack.*\.rb$}, %r{lib/mongrel.*\.rb$}, %r{lib/shotgun.*\.rb$}, %r{bin/shotgun$}, %r{\(.*\)}, %r{shoulda/context\.rb$}, %r{mocha/integration}, %r{test/unit}, %r{rake_test_loader\.rb}, %r{custom_require\.rb$}, %r{active_support}, %r{/thor}, %r{/lib/bundler}, ]
The version constant for the current version of Padrino.
'0.14.1.1'
Proc that is instance evaled to create the default inflections for both the model inflector and the inflector extension.
proc do plural(/$/, 's') plural(/s$/i, 's') plural(/(alias|(?:stat|octop|vir|b)us)$/i, '\1es') plural(/(buffal|tomat)o$/i, '\1oes') plural(/([ti])um$/i, '\1a') plural(/sis$/i, 'ses') plural(/(?:([^f])fe|([lr])f)$/i, '\1\2ves') plural(/(hive)$/i, '\1s') plural(/([^aeiouy]|qu)y$/i, '\1ies') plural(/(x|ch|ss|sh)$/i, '\1es') plural(/(matr|vert|ind)ix|ex$/i, '\1ices') plural(/([m|l])ouse$/i, '\1ice') singular(/s$/i, '') singular(/([ti])a$/i, '\1um') singular(/(analy|ba|cri|diagno|parenthe|progno|synop|the)ses$/i, '\1sis') singular(/([^f])ves$/i, '\1fe') singular(/([h|t]ive)s$/i, '\1') singular(/([lr])ves$/i, '\1f') singular(/([^aeiouy]|qu)ies$/i, '\1y') singular(/(m)ovies$/i, '\1ovie') singular(/(x|ch|ss|sh)es$/i, '\1') singular(/([m|l])ice$/i, '\1ouse') singular(/buses$/i, 'bus') singular(/oes$/i, 'o') singular(/shoes$/i, 'shoe') singular(/(alias|(?:stat|octop|vir|b)us)es$/i, '\1') singular(/(vert|ind)ices$/i, '\1ex') singular(/matrices$/i, 'matrix') irregular('person', 'people') irregular('man', 'men') irregular('child', 'children') irregular('sex', 'sexes') irregular('move', 'moves') irregular('quiz', 'quizzes') irregular('testis', 'testes') uncountable(%w(equipment information rice money species series fish sheep news)) end
.mounted_root(*args) ⇒ String
The root to the mounted apps base directory. .add_middleware(router) ⇒ Object
Creates Rack stack with the router added to the middleware chain. .after_load(&block) ⇒ Object
.application ⇒ Padrino::Router
The resulting rack builder mapping each 'mounted' application. .before_load(&block) ⇒ Object
.bin(*args) ⇒ Boolean
This method return the correct location of padrino bin or exec it using Kernel#system with the given args. .bin_gen(*args) ⇒ Object
This method return the correct location of padrino-gen bin or exec it using Kernel#system with the given args. .cache ⇒ Object
Returns the caching engine. .cache=(value) ⇒ Object
Set the caching engine. .clear_middleware! ⇒ Array
Clears all previously configured middlewares. .configure_apps { ... } ⇒ Object
Configure Global Project Settings for mounted apps. .env ⇒ Symbol
Helper method that return RACK_ENV. .gem(name, main_module) ⇒ Object
Registers a gem with padrino. .gems ⇒ Object
.global_configurations ⇒ Object
Stores global configuration blocks. .insert_mounted_app(mounter) ⇒ Object
Inserts a Mounter object into the mounted applications (avoids duplicates). .logger ⇒ Padrino::Logger
.logger=(value) ⇒ Object
Set the padrino logger. .middleware ⇒ Array<Array<Class, Array, Proc>>
A Rack::Builder object that allows to add middlewares in front of all Padrino applications. .modules ⇒ Object
.mount(name, options = {}) ⇒ Object
Mounts a new sub-application onto Padrino project. .mounted_apps ⇒ Array
The mounted padrino applications (MountedApp objects). .perf_memusage_command ⇒ Object
.root(*args) ⇒ String
Helper method for file references. .ruby_command ⇒ String
Return the path to the ruby interpreter taking into account multiple installations and windows extensions. .run!(options = {}) ⇒ Object
Runs the Padrino apps as a self-hosted server using: thin, mongrel, or WEBrick in that order. .set_encoding ⇒ NilClass
Set Encoding.default_internal
and Encoding.default_external
to Encoding::UFT_8
. .use(mw, *args) { ... } ⇒ Object
Convenience method for adding a Middleware to the whole padrino app. .version ⇒ String
The current Padrino version. #RUBY_IGNORE_CALLERS ⇒ Object
Add rubinius (and hopefully other VM implementations) ignore patterns … after_load, before_load, called_from, clear!, dependency_paths, load!, loaded?, precompile_all_routes!, reload!, require_dependencies
Returns the root to the mounted apps base directory.
Creates Rack stack with the router added to the middleware chain.
The resulting rack builder mapping each 'mounted' application.
This method return the correct location of padrino bin or exec it using Kernel#system with the given args.
This method return the correct location of padrino-gen bin or exec it using Kernel#system with the given args.
Returns the caching engine.
Set the caching engine.
Clears all previously configured middlewares.
Configure Global Project Settings for mounted apps. These can be overloaded in each individual app's own personal configuration. This can be used like:
Helper method that return RACK_ENV.
Registers a gem with padrino. This relieves the caller from setting up loadpaths by itself and enables Padrino to look up apps in gem folder.
The name given has to be the proper gem name as given in the gemspec.
Stores global configuration blocks.
Inserts a Mounter object into the mounted applications (avoids duplicates).
Set the padrino logger.
A Rack::Builder object that allows to add middlewares in front of all Padrino applications.
Mounts a new sub-application onto Padrino project.
Returns the mounted padrino applications (MountedApp objects)
Helper method for file references.
Return the path to the ruby interpreter taking into account multiple installations and windows extensions.
Runs the Padrino apps as a self-hosted server using: thin, mongrel, or WEBrick in that order.
Set Encoding.default_internal
and Encoding.default_external
to Encoding::UFT_8
.
Please note that in 1.9.2
with some template engines like haml
you should turn off Encoding.default_internal to prevent problems.
Convenience method for adding a Middleware to the whole padrino app.
The current Padrino version.
Add rubinius (and hopefully other VM implementations) ignore patterns …
© 2010–2019 Padrino
Licensed under the MIT License.
https://www.rubydoc.info/github/padrino/padrino-framework/Padrino