module Roda::RodaPlugins

  1. lib/roda.rb
  2. lib/roda/plugins.rb
  3. lib/roda/plugins/Integer_matcher_max.rb
  4. lib/roda/plugins/_after_hook.rb
  5. lib/roda/plugins/_base64.rb
  6. lib/roda/plugins/_before_hook.rb
  7. lib/roda/plugins/_optimized_matching.rb
  8. lib/roda/plugins/_symbol_class_matchers.rb
  9. lib/roda/plugins/_symbol_regexp_matchers.rb
  10. lib/roda/plugins/additional_render_engines.rb
  11. lib/roda/plugins/additional_view_directories.rb
  12. lib/roda/plugins/all_verbs.rb
  13. lib/roda/plugins/assets.rb
  14. lib/roda/plugins/assets_preloading.rb
  15. lib/roda/plugins/assume_ssl.rb
  16. lib/roda/plugins/autoload_hash_branches.rb
  17. lib/roda/plugins/autoload_named_routes.rb
  18. lib/roda/plugins/backtracking_array.rb
  19. lib/roda/plugins/branch_locals.rb
  20. lib/roda/plugins/break.rb
  21. lib/roda/plugins/caching.rb
  22. lib/roda/plugins/capture_erb.rb
  23. lib/roda/plugins/chunked.rb
  24. lib/roda/plugins/class_level_routing.rb
  25. lib/roda/plugins/class_matchers.rb
  26. lib/roda/plugins/common_logger.rb
  27. lib/roda/plugins/conditional_sessions.rb
  28. lib/roda/plugins/content_for.rb
  29. lib/roda/plugins/content_security_policy.rb
  30. lib/roda/plugins/cookie_flags.rb
  31. lib/roda/plugins/cookies.rb
  32. lib/roda/plugins/csrf.rb
  33. lib/roda/plugins/custom_block_results.rb
  34. lib/roda/plugins/custom_matchers.rb
  35. lib/roda/plugins/default_headers.rb
  36. lib/roda/plugins/default_status.rb
  37. lib/roda/plugins/delay_build.rb
  38. lib/roda/plugins/delegate.rb
  39. lib/roda/plugins/delete_empty_headers.rb
  40. lib/roda/plugins/direct_call.rb
  41. lib/roda/plugins/disallow_file_uploads.rb
  42. lib/roda/plugins/drop_body.rb
  43. lib/roda/plugins/early_hints.rb
  44. lib/roda/plugins/empty_root.rb
  45. lib/roda/plugins/environments.rb
  46. lib/roda/plugins/erb_h.rb
  47. lib/roda/plugins/error_email.rb
  48. lib/roda/plugins/error_handler.rb
  49. lib/roda/plugins/error_mail.rb
  50. lib/roda/plugins/exception_page.rb
  51. lib/roda/plugins/filter_common_logger.rb
  52. lib/roda/plugins/flash.rb
  53. lib/roda/plugins/h.rb
  54. lib/roda/plugins/halt.rb
  55. lib/roda/plugins/hash_branch_view_subdir.rb
  56. lib/roda/plugins/hash_branches.rb
  57. lib/roda/plugins/hash_matcher.rb
  58. lib/roda/plugins/hash_paths.rb
  59. lib/roda/plugins/hash_routes.rb
  60. lib/roda/plugins/head.rb
  61. lib/roda/plugins/header_matchers.rb
  62. lib/roda/plugins/heartbeat.rb
  63. lib/roda/plugins/hmac_paths.rb
  64. lib/roda/plugins/hooks.rb
  65. lib/roda/plugins/host_authorization.rb
  66. lib/roda/plugins/host_routing.rb
  67. lib/roda/plugins/hsts.rb
  68. lib/roda/plugins/indifferent_params.rb
  69. lib/roda/plugins/inject_erb.rb
  70. lib/roda/plugins/invalid_request_body.rb
  71. lib/roda/plugins/json.rb
  72. lib/roda/plugins/json_parser.rb
  73. lib/roda/plugins/link_to.rb
  74. lib/roda/plugins/mail_processor.rb
  75. lib/roda/plugins/mailer.rb
  76. lib/roda/plugins/match_affix.rb
  77. lib/roda/plugins/match_hook.rb
  78. lib/roda/plugins/match_hook_args.rb
  79. lib/roda/plugins/middleware.rb
  80. lib/roda/plugins/middleware_stack.rb
  81. lib/roda/plugins/module_include.rb
  82. lib/roda/plugins/multi_public.rb
  83. lib/roda/plugins/multi_route.rb
  84. lib/roda/plugins/multi_run.rb
  85. lib/roda/plugins/multi_view.rb
  86. lib/roda/plugins/multibyte_string_matcher.rb
  87. lib/roda/plugins/named_routes.rb
  88. lib/roda/plugins/named_templates.rb
  89. lib/roda/plugins/not_allowed.rb
  90. lib/roda/plugins/not_found.rb
  91. lib/roda/plugins/optimized_segment_matchers.rb
  92. lib/roda/plugins/optimized_string_matchers.rb
  93. lib/roda/plugins/padrino_render.rb
  94. lib/roda/plugins/param_matchers.rb
  95. lib/roda/plugins/params_capturing.rb
  96. lib/roda/plugins/partials.rb
  97. lib/roda/plugins/pass.rb
  98. lib/roda/plugins/path.rb
  99. lib/roda/plugins/path_matchers.rb
  100. lib/roda/plugins/path_rewriter.rb
  101. lib/roda/plugins/permissions_policy.rb
  102. lib/roda/plugins/placeholder_string_matchers.rb
  103. lib/roda/plugins/plain_hash_response_headers.rb
  104. lib/roda/plugins/precompile_templates.rb
  105. lib/roda/plugins/public.rb
  106. lib/roda/plugins/r.rb
  107. lib/roda/plugins/recheck_precompiled_assets.rb
  108. lib/roda/plugins/redirect_http_to_https.rb
  109. lib/roda/plugins/relative_path.rb
  110. lib/roda/plugins/render.rb
  111. lib/roda/plugins/render_coverage.rb
  112. lib/roda/plugins/render_each.rb
  113. lib/roda/plugins/render_locals.rb
  114. lib/roda/plugins/request_aref.rb
  115. lib/roda/plugins/request_headers.rb
  116. lib/roda/plugins/response_request.rb
  117. lib/roda/plugins/route_block_args.rb
  118. lib/roda/plugins/route_csrf.rb
  119. lib/roda/plugins/run_append_slash.rb
  120. lib/roda/plugins/run_handler.rb
  121. lib/roda/plugins/run_require_slash.rb
  122. lib/roda/plugins/sessions.rb
  123. lib/roda/plugins/shared_vars.rb
  124. lib/roda/plugins/sinatra_helpers.rb
  125. lib/roda/plugins/slash_path_empty.rb
  126. lib/roda/plugins/static.rb
  127. lib/roda/plugins/static_routing.rb
  128. lib/roda/plugins/status_303.rb
  129. lib/roda/plugins/status_handler.rb
  130. lib/roda/plugins/streaming.rb
  131. lib/roda/plugins/strip_path_prefix.rb
  132. lib/roda/plugins/symbol_matchers.rb
  133. lib/roda/plugins/symbol_status.rb
  134. lib/roda/plugins/symbol_views.rb
  135. lib/roda/plugins/timestamp_public.rb
  136. lib/roda/plugins/type_routing.rb
  137. lib/roda/plugins/typecast_params.rb
  138. lib/roda/plugins/typecast_params_sized_integers.rb
  139. lib/roda/plugins/unescape_path.rb
  140. lib/roda/plugins/view_options.rb
  141. lib/roda/request.rb
  142. lib/roda/response.rb
  143. 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::AdditionalRenderEngines
  2. Roda::RodaPlugins::AdditionalViewDirectories
  3. Roda::RodaPlugins::AllVerbs
  4. Roda::RodaPlugins::Assets
  5. Roda::RodaPlugins::AssetsPreloading
  6. Roda::RodaPlugins::AssumeSSL
  7. Roda::RodaPlugins::AutoloadHashBranches
  8. Roda::RodaPlugins::AutoloadNamedRoutes
  9. Roda::RodaPlugins::BacktrackingArray
  10. Roda::RodaPlugins::Base
  11. Roda::RodaPlugins::Base64_
  12. Roda::RodaPlugins::BeforeHook
  13. Roda::RodaPlugins::BranchLocals
  14. Roda::RodaPlugins::Break
  15. Roda::RodaPlugins::Caching
  16. Roda::RodaPlugins::CaptureERB
  17. Roda::RodaPlugins::Chunked
  18. Roda::RodaPlugins::ClassLevelRouting
  19. Roda::RodaPlugins::ClassMatchers
  20. Roda::RodaPlugins::CommonLogger
  21. Roda::RodaPlugins::ConditionalSessions
  22. Roda::RodaPlugins::ContentFor
  23. Roda::RodaPlugins::ContentSecurityPolicy
  24. Roda::RodaPlugins::CookieFlags
  25. Roda::RodaPlugins::Cookies
  26. Roda::RodaPlugins::Csrf
  27. Roda::RodaPlugins::CustomBlockResults
  28. Roda::RodaPlugins::CustomMatchers
  29. Roda::RodaPlugins::DefaultHeaders
  30. Roda::RodaPlugins::DefaultStatus
  31. Roda::RodaPlugins::DelayBuild
  32. Roda::RodaPlugins::Delegate
  33. Roda::RodaPlugins::DeleteEmptyHeaders
  34. Roda::RodaPlugins::DirectCall
  35. Roda::RodaPlugins::DisallowFileUploads
  36. Roda::RodaPlugins::DropBody
  37. Roda::RodaPlugins::EarlyHints
  38. Roda::RodaPlugins::EmptyRoot
  39. Roda::RodaPlugins::Environments
  40. Roda::RodaPlugins::ErbH
  41. Roda::RodaPlugins::ErrorEmail
  42. Roda::RodaPlugins::ErrorHandler
  43. Roda::RodaPlugins::ErrorMail
  44. Roda::RodaPlugins::ExceptionPage
  45. Roda::RodaPlugins::FilterCommonLogger
  46. Roda::RodaPlugins::Flash
  47. Roda::RodaPlugins::H
  48. Roda::RodaPlugins::Halt
  49. Roda::RodaPlugins::HashBranchViewSubdir
  50. Roda::RodaPlugins::HashBranches
  51. Roda::RodaPlugins::HashMatcher
  52. Roda::RodaPlugins::HashPaths
  53. Roda::RodaPlugins::HashRoutes
  54. Roda::RodaPlugins::Head
  55. Roda::RodaPlugins::HeaderMatchers
  56. Roda::RodaPlugins::Heartbeat
  57. Roda::RodaPlugins::HmacPaths
  58. Roda::RodaPlugins::Hooks
  59. Roda::RodaPlugins::HostAuthorization
  60. Roda::RodaPlugins::HostRouting
  61. Roda::RodaPlugins::Hsts
  62. Roda::RodaPlugins::IndifferentParams
  63. Roda::RodaPlugins::InjectERB
  64. Roda::RodaPlugins::IntegerMatcherMax
  65. Roda::RodaPlugins::InvalidRequestBody
  66. Roda::RodaPlugins::Json
  67. Roda::RodaPlugins::JsonParser
  68. Roda::RodaPlugins::LinkTo
  69. Roda::RodaPlugins::MailProcessor
  70. Roda::RodaPlugins::Mailer
  71. Roda::RodaPlugins::MatchAffix
  72. Roda::RodaPlugins::MatchHook
  73. Roda::RodaPlugins::MatchHookArgs
  74. Roda::RodaPlugins::Middleware
  75. Roda::RodaPlugins::MiddlewareStack
  76. Roda::RodaPlugins::ModuleInclude
  77. Roda::RodaPlugins::MultiPublic
  78. Roda::RodaPlugins::MultiRoute
  79. Roda::RodaPlugins::MultiRun
  80. Roda::RodaPlugins::MultiView
  81. Roda::RodaPlugins::MultibyteStringMatcher
  82. Roda::RodaPlugins::NamedRoutes
  83. Roda::RodaPlugins::NamedTemplates
  84. Roda::RodaPlugins::NotAllowed
  85. Roda::RodaPlugins::NotFound
  86. Roda::RodaPlugins::OptimizedMatching
  87. Roda::RodaPlugins::OptimizedSegmentMatchers
  88. Roda::RodaPlugins::OptimizedStringMatchers
  89. Roda::RodaPlugins::PadrinoRender
  90. Roda::RodaPlugins::ParamMatchers
  91. Roda::RodaPlugins::ParamsCapturing
  92. Roda::RodaPlugins::Partials
  93. Roda::RodaPlugins::Pass
  94. Roda::RodaPlugins::Path
  95. Roda::RodaPlugins::PathMatchers
  96. Roda::RodaPlugins::PathRewriter
  97. Roda::RodaPlugins::PermissionsPolicy
  98. Roda::RodaPlugins::PlaceholderStringMatchers
  99. Roda::RodaPlugins::PlainHashResponseHeaders
  100. Roda::RodaPlugins::PrecompileTemplates
  101. Roda::RodaPlugins::Public
  102. Roda::RodaPlugins::R
  103. Roda::RodaPlugins::RecheckPrecompiledAssets
  104. Roda::RodaPlugins::RedirectHttpToHttps
  105. Roda::RodaPlugins::RelativePath
  106. Roda::RodaPlugins::Render
  107. Roda::RodaPlugins::RenderCoverage
  108. Roda::RodaPlugins::RenderEach
  109. Roda::RodaPlugins::RenderLocals
  110. Roda::RodaPlugins::RequestAref
  111. Roda::RodaPlugins::RequestHeaders
  112. Roda::RodaPlugins::ResponseRequest
  113. Roda::RodaPlugins::RouteBlockArgs
  114. Roda::RodaPlugins::RouteCsrf
  115. Roda::RodaPlugins::RunAppendSlash
  116. Roda::RodaPlugins::RunHandler
  117. Roda::RodaPlugins::RunRequireSlash
  118. Roda::RodaPlugins::Sessions
  119. Roda::RodaPlugins::SharedVars
  120. Roda::RodaPlugins::SinatraHelpers
  121. Roda::RodaPlugins::SlashPathEmpty
  122. Roda::RodaPlugins::Static
  123. Roda::RodaPlugins::StaticRouting
  124. Roda::RodaPlugins::Status303
  125. Roda::RodaPlugins::StatusHandler
  126. Roda::RodaPlugins::Streaming
  127. Roda::RodaPlugins::StripPathPrefix
  128. Roda::RodaPlugins::SymbolClassMatchers_
  129. Roda::RodaPlugins::SymbolMatchers
  130. Roda::RodaPlugins::SymbolRegexpMatchers
  131. Roda::RodaPlugins::SymbolStatus
  132. Roda::RodaPlugins::SymbolViews
  133. Roda::RodaPlugins::TimestampPublic
  134. Roda::RodaPlugins::TypeRouting
  135. Roda::RodaPlugins::TypecastParams
  136. Roda::RodaPlugins::TypecastParamsSizedIntegers
  137. Roda::RodaPlugins::UnescapePath
  138. 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/plugins.rb
45 def self.deprecate_constant(mod, name)
46   # :nocov:
47   if RUBY_VERSION >= '2.3'
48     mod.deprecate_constant(name)
49   end
50   # :nocov:
51 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/plugins.rb
26 def self.load_plugin(name)
27   h = @plugins
28   unless plugin = h[name]
29     require "roda/plugins/#{name}"
30     raise RodaError, "Plugin #{name} did not register itself correctly in Roda::RodaPlugins" unless plugin = h[name]
31   end
32   plugin
33 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/plugins.rb
39 def self.register_plugin(name, mod)
40   @plugins[name] = mod
41 end