module Roda::RodaPlugins

  1. lib/roda.rb
  2. lib/roda/plugins/_after_hook.rb
  3. lib/roda/plugins/_before_hook.rb
  4. lib/roda/plugins/_symbol_regexp_matchers.rb
  5. lib/roda/plugins/all_verbs.rb
  6. lib/roda/plugins/assets.rb
  7. lib/roda/plugins/assets_preloading.rb
  8. lib/roda/plugins/backtracking_array.rb
  9. lib/roda/plugins/branch_locals.rb
  10. lib/roda/plugins/caching.rb
  11. lib/roda/plugins/chunked.rb
  12. lib/roda/plugins/class_level_routing.rb
  13. lib/roda/plugins/class_matchers.rb
  14. lib/roda/plugins/common_logger.rb
  15. lib/roda/plugins/content_for.rb
  16. lib/roda/plugins/content_security_policy.rb
  17. lib/roda/plugins/cookies.rb
  18. lib/roda/plugins/csrf.rb
  19. lib/roda/plugins/default_headers.rb
  20. lib/roda/plugins/default_status.rb
  21. lib/roda/plugins/delay_build.rb
  22. lib/roda/plugins/delegate.rb
  23. lib/roda/plugins/delete_empty_headers.rb
  24. lib/roda/plugins/disallow_file_uploads.rb
  25. lib/roda/plugins/drop_body.rb
  26. lib/roda/plugins/early_hints.rb
  27. lib/roda/plugins/empty_root.rb
  28. lib/roda/plugins/environments.rb
  29. lib/roda/plugins/error_email.rb
  30. lib/roda/plugins/error_handler.rb
  31. lib/roda/plugins/error_mail.rb
  32. lib/roda/plugins/exception_page.rb
  33. lib/roda/plugins/flash.rb
  34. lib/roda/plugins/h.rb
  35. lib/roda/plugins/halt.rb
  36. lib/roda/plugins/hash_matcher.rb
  37. lib/roda/plugins/head.rb
  38. lib/roda/plugins/header_matchers.rb
  39. lib/roda/plugins/heartbeat.rb
  40. lib/roda/plugins/hooks.rb
  41. lib/roda/plugins/indifferent_params.rb
  42. lib/roda/plugins/json.rb
  43. lib/roda/plugins/json_parser.rb
  44. lib/roda/plugins/mailer.rb
  45. lib/roda/plugins/match_affix.rb
  46. lib/roda/plugins/middleware.rb
  47. lib/roda/plugins/middleware_stack.rb
  48. lib/roda/plugins/module_include.rb
  49. lib/roda/plugins/multi_route.rb
  50. lib/roda/plugins/multi_run.rb
  51. lib/roda/plugins/multi_view.rb
  52. lib/roda/plugins/named_templates.rb
  53. lib/roda/plugins/not_allowed.rb
  54. lib/roda/plugins/not_found.rb
  55. lib/roda/plugins/optimized_string_matchers.rb
  56. lib/roda/plugins/padrino_render.rb
  57. lib/roda/plugins/param_matchers.rb
  58. lib/roda/plugins/params_capturing.rb
  59. lib/roda/plugins/partials.rb
  60. lib/roda/plugins/pass.rb
  61. lib/roda/plugins/path.rb
  62. lib/roda/plugins/path_matchers.rb
  63. lib/roda/plugins/path_rewriter.rb
  64. lib/roda/plugins/placeholder_string_matchers.rb
  65. lib/roda/plugins/precompile_templates.rb
  66. lib/roda/plugins/public.rb
  67. lib/roda/plugins/render.rb
  68. lib/roda/plugins/render_each.rb
  69. lib/roda/plugins/render_locals.rb
  70. lib/roda/plugins/request_aref.rb
  71. lib/roda/plugins/request_headers.rb
  72. lib/roda/plugins/response_request.rb
  73. lib/roda/plugins/route_csrf.rb
  74. lib/roda/plugins/run_append_slash.rb
  75. lib/roda/plugins/run_handler.rb
  76. lib/roda/plugins/sessions.rb
  77. lib/roda/plugins/shared_vars.rb
  78. lib/roda/plugins/sinatra_helpers.rb
  79. lib/roda/plugins/slash_path_empty.rb
  80. lib/roda/plugins/static.rb
  81. lib/roda/plugins/static_routing.rb
  82. lib/roda/plugins/status_303.rb
  83. lib/roda/plugins/status_handler.rb
  84. lib/roda/plugins/streaming.rb
  85. lib/roda/plugins/strip_path_prefix.rb
  86. lib/roda/plugins/symbol_matchers.rb
  87. lib/roda/plugins/symbol_status.rb
  88. lib/roda/plugins/symbol_views.rb
  89. lib/roda/plugins/timestamp_public.rb
  90. lib/roda/plugins/type_routing.rb
  91. lib/roda/plugins/typecast_params.rb
  92. lib/roda/plugins/unescape_path.rb
  93. lib/roda/plugins/view_options.rb
  94. show all

Module in which all Roda plugins should be stored. Also contains logic for registering and loading plugins.

Classes and Modules

  1. Roda::RodaPlugins::AfterHook
  2. Roda::RodaPlugins::AllVerbs
  3. Roda::RodaPlugins::Assets
  4. Roda::RodaPlugins::AssetsPreloading
  5. Roda::RodaPlugins::BacktrackingArray
  6. Roda::RodaPlugins::Base
  7. Roda::RodaPlugins::BeforeHook
  8. Roda::RodaPlugins::BranchLocals
  9. Roda::RodaPlugins::Caching
  10. Roda::RodaPlugins::Chunked
  11. Roda::RodaPlugins::ClassLevelRouting
  12. Roda::RodaPlugins::ClassMatchers
  13. Roda::RodaPlugins::CommonLogger
  14. Roda::RodaPlugins::ContentFor
  15. Roda::RodaPlugins::ContentSecurityPolicy
  16. Roda::RodaPlugins::Cookies
  17. Roda::RodaPlugins::Csrf
  18. Roda::RodaPlugins::DefaultHeaders
  19. Roda::RodaPlugins::DefaultStatus
  20. Roda::RodaPlugins::DelayBuild
  21. Roda::RodaPlugins::Delegate
  22. Roda::RodaPlugins::DeleteEmptyHeaders
  23. Roda::RodaPlugins::DisallowFileUploads
  24. Roda::RodaPlugins::DropBody
  25. Roda::RodaPlugins::EarlyHints
  26. Roda::RodaPlugins::EmptyRoot
  27. Roda::RodaPlugins::Environments
  28. Roda::RodaPlugins::ErrorEmail
  29. Roda::RodaPlugins::ErrorHandler
  30. Roda::RodaPlugins::ErrorMail
  31. Roda::RodaPlugins::ExceptionPage
  32. Roda::RodaPlugins::Flash
  33. Roda::RodaPlugins::H
  34. Roda::RodaPlugins::Halt
  35. Roda::RodaPlugins::HashMatcher
  36. Roda::RodaPlugins::Head
  37. Roda::RodaPlugins::HeaderMatchers
  38. Roda::RodaPlugins::Heartbeat
  39. Roda::RodaPlugins::Hooks
  40. Roda::RodaPlugins::IndifferentParams
  41. Roda::RodaPlugins::Json
  42. Roda::RodaPlugins::JsonParser
  43. Roda::RodaPlugins::Mailer
  44. Roda::RodaPlugins::MatchAffix
  45. Roda::RodaPlugins::Middleware
  46. Roda::RodaPlugins::MiddlewareStack
  47. Roda::RodaPlugins::ModuleInclude
  48. Roda::RodaPlugins::MultiRoute
  49. Roda::RodaPlugins::MultiRun
  50. Roda::RodaPlugins::MultiView
  51. Roda::RodaPlugins::NamedTemplates
  52. Roda::RodaPlugins::NotAllowed
  53. Roda::RodaPlugins::NotFound
  54. Roda::RodaPlugins::OptimizedStringMatchers
  55. Roda::RodaPlugins::PadrinoRender
  56. Roda::RodaPlugins::ParamMatchers
  57. Roda::RodaPlugins::ParamsCapturing
  58. Roda::RodaPlugins::Partials
  59. Roda::RodaPlugins::Pass
  60. Roda::RodaPlugins::Path
  61. Roda::RodaPlugins::PathMatchers
  62. Roda::RodaPlugins::PathRewriter
  63. Roda::RodaPlugins::PlaceholderStringMatchers
  64. Roda::RodaPlugins::PrecompileTemplates
  65. Roda::RodaPlugins::Public
  66. Roda::RodaPlugins::Render
  67. Roda::RodaPlugins::RenderEach
  68. Roda::RodaPlugins::RenderLocals
  69. Roda::RodaPlugins::RequestAref
  70. Roda::RodaPlugins::RequestHeaders
  71. Roda::RodaPlugins::ResponseRequest
  72. Roda::RodaPlugins::RouteCsrf
  73. Roda::RodaPlugins::RunAppendSlash
  74. Roda::RodaPlugins::RunHandler
  75. Roda::RodaPlugins::Sessions
  76. Roda::RodaPlugins::SharedVars
  77. Roda::RodaPlugins::SinatraHelpers
  78. Roda::RodaPlugins::SlashPathEmpty
  79. Roda::RodaPlugins::Static
  80. Roda::RodaPlugins::StaticRouting
  81. Roda::RodaPlugins::Status303
  82. Roda::RodaPlugins::StatusHandler
  83. Roda::RodaPlugins::Streaming
  84. Roda::RodaPlugins::StripPathPrefix
  85. Roda::RodaPlugins::SymbolMatchers
  86. Roda::RodaPlugins::SymbolRegexpMatchers
  87. Roda::RodaPlugins::SymbolStatus
  88. Roda::RodaPlugins::SymbolViews
  89. Roda::RodaPlugins::TimestampPublic
  90. Roda::RodaPlugins::TypeRouting
  91. Roda::RodaPlugins::TypecastParams
  92. Roda::RodaPlugins::UnescapePath
  93. Roda::RodaPlugins::ViewOptions

Constants

EMPTY_ARRAY = [].freeze  
OPTS = {}.freeze  

Public Class methods

deprecate_constant (mod, name)

Deprecate the constant with the given name in the given module, if the ruby version supports it.

[show source]
# File lib/roda.rb, line 103
def self.deprecate_constant(mod, name)
  # :nocov:
  if RUBY_VERSION >= '2.3'
    mod.deprecate_constant(name)
  end
  # :nocov:
end
load_plugin (name)

If the registered plugin already exists, use it. Otherwise, require it and return it. This raises a LoadError if such a plugin doesn't exist, or a RodaError if it exists but it does not register itself correctly.

[show source]
# File lib/roda.rb, line 84
def self.load_plugin(name)
  h = @plugins
  unless plugin = h[name]
    require "roda/plugins/#{name}"
    raise RodaError, "Plugin #{name} did not register itself correctly in Roda::RodaPlugins" unless plugin = h[name]
  end
  plugin
end
register_plugin (name, mod)

Register the given plugin with Roda, so that it can be loaded using plugin with a symbol. Should be used by plugin files. Example:

Roda::RodaPlugins.register_plugin(:plugin_name, PluginModule)
[show source]
# File lib/roda.rb, line 97
def self.register_plugin(name, mod)
  @plugins[name] = mod
end