ultra-max-sys 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ultra-max-sys might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/roda-3.106.0/MIT-LICENSE +21 -0
- data/roda-3.106.0/lib/roda/cache.rb +42 -0
- data/roda-3.106.0/lib/roda/plugins/Integer_matcher_max.rb +55 -0
- data/roda-3.106.0/lib/roda/plugins/_after_hook.rb +11 -0
- data/roda-3.106.0/lib/roda/plugins/_base64.rb +34 -0
- data/roda-3.106.0/lib/roda/plugins/_before_hook.rb +41 -0
- data/roda-3.106.0/lib/roda/plugins/_optimized_matching.rb +227 -0
- data/roda-3.106.0/lib/roda/plugins/_symbol_class_matchers.rb +108 -0
- data/roda-3.106.0/lib/roda/plugins/_symbol_regexp_matchers.rb +24 -0
- data/roda-3.106.0/lib/roda/plugins/additional_render_engines.rb +61 -0
- data/roda-3.106.0/lib/roda/plugins/additional_view_directories.rb +66 -0
- data/roda-3.106.0/lib/roda/plugins/all_verbs.rb +50 -0
- data/roda-3.106.0/lib/roda/plugins/assets.rb +902 -0
- data/roda-3.106.0/lib/roda/plugins/assets_preloading.rb +89 -0
- data/roda-3.106.0/lib/roda/plugins/assume_ssl.rb +28 -0
- data/roda-3.106.0/lib/roda/plugins/autoload_hash_branches.rb +79 -0
- data/roda-3.106.0/lib/roda/plugins/autoload_named_routes.rb +65 -0
- data/roda-3.106.0/lib/roda/plugins/backtracking_array.rb +88 -0
- data/roda-3.106.0/lib/roda/plugins/bearer_token.rb +28 -0
- data/roda-3.106.0/lib/roda/plugins/branch_locals.rb +76 -0
- data/roda-3.106.0/lib/roda/plugins/break.rb +43 -0
- data/roda-3.106.0/lib/roda/plugins/caching.rb +206 -0
- data/roda-3.106.0/lib/roda/plugins/capture_erb.rb +94 -0
- data/roda-3.106.0/lib/roda/plugins/chunked.rb +333 -0
- data/roda-3.106.0/lib/roda/plugins/class_level_routing.rb +111 -0
- data/roda-3.106.0/lib/roda/plugins/class_matchers.rb +155 -0
- data/roda-3.106.0/lib/roda/plugins/common_logger.rb +82 -0
- data/roda-3.106.0/lib/roda/plugins/conditional_sessions.rb +67 -0
- data/roda-3.106.0/lib/roda/plugins/content_for.rb +105 -0
- data/roda-3.106.0/lib/roda/plugins/content_security_policy.rb +333 -0
- data/roda-3.106.0/lib/roda/plugins/cookie_flags.rb +157 -0
- data/roda-3.106.0/lib/roda/plugins/cookies.rb +51 -0
- data/roda-3.106.0/lib/roda/plugins/csrf.rb +81 -0
- data/roda-3.106.0/lib/roda/plugins/custom_block_results.rb +85 -0
- data/roda-3.106.0/lib/roda/plugins/custom_matchers.rb +89 -0
- data/roda-3.106.0/lib/roda/plugins/default_headers.rb +64 -0
- data/roda-3.106.0/lib/roda/plugins/default_status.rb +35 -0
- data/roda-3.106.0/lib/roda/plugins/delay_build.rb +18 -0
- data/roda-3.106.0/lib/roda/plugins/delegate.rb +77 -0
- data/roda-3.106.0/lib/roda/plugins/delete_empty_headers.rb +36 -0
- data/roda-3.106.0/lib/roda/plugins/direct_call.rb +38 -0
- data/roda-3.106.0/lib/roda/plugins/disallow_file_uploads.rb +38 -0
- data/roda-3.106.0/lib/roda/plugins/drop_body.rb +43 -0
- data/roda-3.106.0/lib/roda/plugins/each_part.rb +87 -0
- data/roda-3.106.0/lib/roda/plugins/early_hints.rb +25 -0
- data/roda-3.106.0/lib/roda/plugins/empty_root.rb +49 -0
- data/roda-3.106.0/lib/roda/plugins/environments.rb +79 -0
- data/roda-3.106.0/lib/roda/plugins/erb_h.rb +43 -0
- data/roda-3.106.0/lib/roda/plugins/error_email.rb +152 -0
- data/roda-3.106.0/lib/roda/plugins/error_handler.rb +133 -0
- data/roda-3.106.0/lib/roda/plugins/error_mail.rb +149 -0
- data/roda-3.106.0/lib/roda/plugins/exception_page.rb +445 -0
- data/roda-3.106.0/lib/roda/plugins/filter_common_logger.rb +46 -0
- data/roda-3.106.0/lib/roda/plugins/flash.rb +119 -0
- data/roda-3.106.0/lib/roda/plugins/h.rb +59 -0
- data/roda-3.106.0/lib/roda/plugins/halt.rb +108 -0
- data/roda-3.106.0/lib/roda/plugins/hash_branch_view_subdir.rb +76 -0
- data/roda-3.106.0/lib/roda/plugins/hash_branches.rb +145 -0
- data/roda-3.106.0/lib/roda/plugins/hash_matcher.rb +39 -0
- data/roda-3.106.0/lib/roda/plugins/hash_paths.rb +128 -0
- data/roda-3.106.0/lib/roda/plugins/hash_public.rb +125 -0
- data/roda-3.106.0/lib/roda/plugins/hash_public_cache.rb +91 -0
- data/roda-3.106.0/lib/roda/plugins/hash_routes.rb +304 -0
- data/roda-3.106.0/lib/roda/plugins/head.rb +99 -0
- data/roda-3.106.0/lib/roda/plugins/header_matchers.rb +88 -0
- data/roda-3.106.0/lib/roda/plugins/heartbeat.rb +41 -0
- data/roda-3.106.0/lib/roda/plugins/hmac_paths.rb +413 -0
- data/roda-3.106.0/lib/roda/plugins/hooks.rb +92 -0
- data/roda-3.106.0/lib/roda/plugins/host_authorization.rb +155 -0
- data/roda-3.106.0/lib/roda/plugins/host_routing.rb +194 -0
- data/roda-3.106.0/lib/roda/plugins/hsts.rb +35 -0
- data/roda-3.106.0/lib/roda/plugins/indifferent_params.rb +126 -0
- data/roda-3.106.0/lib/roda/plugins/inject_erb.rb +33 -0
- data/roda-3.106.0/lib/roda/plugins/invalid_request_body.rb +107 -0
- data/roda-3.106.0/lib/roda/plugins/ip_from_header.rb +34 -0
- data/roda-3.106.0/lib/roda/plugins/json.rb +119 -0
- data/roda-3.106.0/lib/roda/plugins/json_parser.rb +107 -0
- data/roda-3.106.0/lib/roda/plugins/link_to.rb +83 -0
- data/roda-3.106.0/lib/roda/plugins/mail_processor.rb +629 -0
- data/roda-3.106.0/lib/roda/plugins/mailer.rb +285 -0
- data/roda-3.106.0/lib/roda/plugins/map_matcher.rb +48 -0
- data/roda-3.106.0/lib/roda/plugins/match_affix.rb +64 -0
- data/roda-3.106.0/lib/roda/plugins/match_hook.rb +34 -0
- data/roda-3.106.0/lib/roda/plugins/match_hook_args.rb +93 -0
- data/roda-3.106.0/lib/roda/plugins/middleware.rb +225 -0
- data/roda-3.106.0/lib/roda/plugins/middleware_stack.rb +101 -0
- data/roda-3.106.0/lib/roda/plugins/module_include.rb +96 -0
- data/roda-3.106.0/lib/roda/plugins/multi_public.rb +95 -0
- data/roda-3.106.0/lib/roda/plugins/multi_route.rb +156 -0
- data/roda-3.106.0/lib/roda/plugins/multi_run.rb +144 -0
- data/roda-3.106.0/lib/roda/plugins/multi_view.rb +83 -0
- data/roda-3.106.0/lib/roda/plugins/multibyte_string_matcher.rb +57 -0
- data/roda-3.106.0/lib/roda/plugins/named_routes.rb +167 -0
- data/roda-3.106.0/lib/roda/plugins/named_templates.rb +102 -0
- data/roda-3.106.0/lib/roda/plugins/not_allowed.rb +151 -0
- data/roda-3.106.0/lib/roda/plugins/not_found.rb +55 -0
- data/roda-3.106.0/lib/roda/plugins/optimized_segment_matchers.rb +53 -0
- data/roda-3.106.0/lib/roda/plugins/optimized_string_matchers.rb +50 -0
- data/roda-3.106.0/lib/roda/plugins/padrino_render.rb +42 -0
- data/roda-3.106.0/lib/roda/plugins/param_matchers.rb +83 -0
- data/roda-3.106.0/lib/roda/plugins/params_capturing.rb +118 -0
- data/roda-3.106.0/lib/roda/plugins/part.rb +76 -0
- data/roda-3.106.0/lib/roda/plugins/partials.rb +74 -0
- data/roda-3.106.0/lib/roda/plugins/pass.rb +47 -0
- data/roda-3.106.0/lib/roda/plugins/path.rb +255 -0
- data/roda-3.106.0/lib/roda/plugins/path_matchers.rb +54 -0
- data/roda-3.106.0/lib/roda/plugins/path_rewriter.rb +111 -0
- data/roda-3.106.0/lib/roda/plugins/permissions_policy.rb +340 -0
- data/roda-3.106.0/lib/roda/plugins/placeholder_string_matchers.rb +48 -0
- data/roda-3.106.0/lib/roda/plugins/plain_hash_response_headers.rb +32 -0
- data/roda-3.106.0/lib/roda/plugins/precompile_templates.rb +156 -0
- data/roda-3.106.0/lib/roda/plugins/public.rb +182 -0
- data/roda-3.106.0/lib/roda/plugins/r.rb +35 -0
- data/roda-3.106.0/lib/roda/plugins/recheck_precompiled_assets.rb +107 -0
- data/roda-3.106.0/lib/roda/plugins/redirect_http_to_https.rb +99 -0
- data/roda-3.106.0/lib/roda/plugins/redirect_path.rb +59 -0
- data/roda-3.106.0/lib/roda/plugins/relative_path.rb +76 -0
- data/roda-3.106.0/lib/roda/plugins/render.rb +998 -0
- data/roda-3.106.0/lib/roda/plugins/render_coverage.rb +105 -0
- data/roda-3.106.0/lib/roda/plugins/render_each.rb +224 -0
- data/roda-3.106.0/lib/roda/plugins/render_locals.rb +102 -0
- data/roda-3.106.0/lib/roda/plugins/request_aref.rb +77 -0
- data/roda-3.106.0/lib/roda/plugins/request_headers.rb +83 -0
- data/roda-3.106.0/lib/roda/plugins/response_attachment.rb +94 -0
- data/roda-3.106.0/lib/roda/plugins/response_content_type.rb +79 -0
- data/roda-3.106.0/lib/roda/plugins/response_request.rb +36 -0
- data/roda-3.106.0/lib/roda/plugins/route_block_args.rb +50 -0
- data/roda-3.106.0/lib/roda/plugins/route_csrf.rb +388 -0
- data/roda-3.106.0/lib/roda/plugins/run_append_slash.rb +51 -0
- data/roda-3.106.0/lib/roda/plugins/run_handler.rb +51 -0
- data/roda-3.106.0/lib/roda/plugins/run_require_slash.rb +46 -0
- data/roda-3.106.0/lib/roda/plugins/sec_fetch_site_csrf.rb +131 -0
- data/roda-3.106.0/lib/roda/plugins/send_file.rb +127 -0
- data/roda-3.106.0/lib/roda/plugins/sessions.rb +537 -0
- data/roda-3.106.0/lib/roda/plugins/shape_friendly.rb +232 -0
- data/roda-3.106.0/lib/roda/plugins/shared_vars.rb +86 -0
- data/roda-3.106.0/lib/roda/plugins/sinatra_helpers.rb +444 -0
- data/roda-3.106.0/lib/roda/plugins/slash_path_empty.rb +26 -0
- data/roda-3.106.0/lib/roda/plugins/static.rb +42 -0
- data/roda-3.106.0/lib/roda/plugins/static_routing.rb +89 -0
- data/roda-3.106.0/lib/roda/plugins/status_303.rb +34 -0
- data/roda-3.106.0/lib/roda/plugins/status_handler.rb +86 -0
- data/roda-3.106.0/lib/roda/plugins/streaming.rb +170 -0
- data/roda-3.106.0/lib/roda/plugins/strip_path_prefix.rb +33 -0
- data/roda-3.106.0/lib/roda/plugins/symbol_matchers.rb +188 -0
- data/roda-3.106.0/lib/roda/plugins/symbol_status.rb +32 -0
- data/roda-3.106.0/lib/roda/plugins/symbol_views.rb +37 -0
- data/roda-3.106.0/lib/roda/plugins/timestamp_public.rb +78 -0
- data/roda-3.106.0/lib/roda/plugins/type_routing.rb +217 -0
- data/roda-3.106.0/lib/roda/plugins/typecast_params.rb +1185 -0
- data/roda-3.106.0/lib/roda/plugins/typecast_params_sized_integers.rb +108 -0
- data/roda-3.106.0/lib/roda/plugins/unescape_path.rb +41 -0
- data/roda-3.106.0/lib/roda/plugins/view_options.rb +203 -0
- data/roda-3.106.0/lib/roda/plugins/view_subdir_leading_slash.rb +49 -0
- data/roda-3.106.0/lib/roda/plugins.rb +68 -0
- data/roda-3.106.0/lib/roda/request.rb +722 -0
- data/roda-3.106.0/lib/roda/response.rb +221 -0
- data/roda-3.106.0/lib/roda/session_middleware.rb +184 -0
- data/roda-3.106.0/lib/roda/version.rb +18 -0
- data/roda-3.106.0/lib/roda.rb +741 -0
- data/ultra-max-sys.gemspec +12 -0
- metadata +202 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
#
|
|
4
|
+
class Roda
|
|
5
|
+
module RodaPlugins
|
|
6
|
+
# This plugin makes it easier to to respond to specific request data types. User agents can request
|
|
7
|
+
# specific data types by either supplying an appropriate +Accept+ request header
|
|
8
|
+
# or by appending it as file extension to the path.
|
|
9
|
+
#
|
|
10
|
+
# Example:
|
|
11
|
+
#
|
|
12
|
+
# plugin :type_routing
|
|
13
|
+
#
|
|
14
|
+
# route do |r|
|
|
15
|
+
# r.get 'a' do
|
|
16
|
+
# r.html{ "<h1>This is the HTML response</h1>" }
|
|
17
|
+
# r.json{ '{"json": "ok"}' }
|
|
18
|
+
# r.xml{ "<root>This is the XML response</root>" }
|
|
19
|
+
# "Unsupported data type"
|
|
20
|
+
# end
|
|
21
|
+
# end
|
|
22
|
+
#
|
|
23
|
+
# This application will handle the following paths:
|
|
24
|
+
# /a.html :: HTML response
|
|
25
|
+
# /a.json :: JSON response
|
|
26
|
+
# /a.xml :: XML response
|
|
27
|
+
# /a :: HTML, JSON, or XML response, depending on the Accept header
|
|
28
|
+
#
|
|
29
|
+
# The response +Content-Type+ header will be set to a suitable value when
|
|
30
|
+
# the +r.html+, +r.json+, or +r.xml+ block is matched.
|
|
31
|
+
#
|
|
32
|
+
# Note that if no match is found, code will continue to execute, which can
|
|
33
|
+
# result in unexpected behaviour. This should only happen if you do not
|
|
34
|
+
# handle all supported/configured types. If you want to simplify handling,
|
|
35
|
+
# you can just place the html handling after the other types, without using
|
|
36
|
+
# a separate block:
|
|
37
|
+
#
|
|
38
|
+
# route do |r|
|
|
39
|
+
# r.get 'a' do
|
|
40
|
+
# r.json{ '{"json": "ok"}' }
|
|
41
|
+
# r.xml{ "<root>This is the XML response</root>" }
|
|
42
|
+
#
|
|
43
|
+
# "<h1>This is the HTML response</h1>"
|
|
44
|
+
# end
|
|
45
|
+
# end
|
|
46
|
+
#
|
|
47
|
+
# This works correctly because Roda's default Content-Type is text/html. Note that
|
|
48
|
+
# if you use this approach, the type_routing plugin's :html content type will not be
|
|
49
|
+
# used for html responses, since you aren't using an +r.html+ block. Instead, the
|
|
50
|
+
# Content-Type header will be set to Roda's default (which you can override via
|
|
51
|
+
# the default_headers plugin).
|
|
52
|
+
#
|
|
53
|
+
# If the type routing is based on the +Accept+ request header and not the file extension,
|
|
54
|
+
# then an appropriate +Vary+ header will be set or appended to, so that HTTP caches do
|
|
55
|
+
# not serve the same result for requests with different +Accept+ headers.
|
|
56
|
+
#
|
|
57
|
+
# To match custom extensions, use the :types option:
|
|
58
|
+
#
|
|
59
|
+
# plugin :type_routing, types: {
|
|
60
|
+
# yaml: 'application/x-yaml',
|
|
61
|
+
# js: 'application/javascript; charset=utf-8'
|
|
62
|
+
# }
|
|
63
|
+
#
|
|
64
|
+
# route do |r|
|
|
65
|
+
# r.get 'a' do
|
|
66
|
+
# r.yaml{ YAML.dump "YAML data" }
|
|
67
|
+
# r.js{ "JavaScript code" }
|
|
68
|
+
# # or:
|
|
69
|
+
# r.on_type(:js){ "JavaScript code" }
|
|
70
|
+
# "Unsupported data type"
|
|
71
|
+
# end
|
|
72
|
+
# end
|
|
73
|
+
#
|
|
74
|
+
# = Plugin options
|
|
75
|
+
#
|
|
76
|
+
# The following plugin options are supported:
|
|
77
|
+
#
|
|
78
|
+
# :default_type :: The default data type to assume if the client did not
|
|
79
|
+
# provide one. Defaults to +:html+.
|
|
80
|
+
# :exclude :: Exclude one or more types from the default set (default set
|
|
81
|
+
# is :html, :xml, :json).
|
|
82
|
+
# :types :: Mapping from a data type to its MIME-Type. Used both to match
|
|
83
|
+
# incoming requests and to provide +Content-Type+ values. If the
|
|
84
|
+
# value is +nil+, no +Content-Type+ will be set. The type may
|
|
85
|
+
# contain media type parameters, which will be sent to the client
|
|
86
|
+
# but ignored for request matching.
|
|
87
|
+
# :use_extension :: Whether to take the path extension into account.
|
|
88
|
+
# Default is +true+.
|
|
89
|
+
# :use_header :: Whether to take the +Accept+ header into account.
|
|
90
|
+
# Default is +true+.
|
|
91
|
+
module TypeRouting
|
|
92
|
+
REQUEST_INSTANCE_VARIABLES = [:@requested_type, :@type_routing_extension].freeze
|
|
93
|
+
|
|
94
|
+
CONFIGURATION = {
|
|
95
|
+
:mimes => {
|
|
96
|
+
'text/json' => :json,
|
|
97
|
+
'application/json' => :json,
|
|
98
|
+
'text/xml' => :xml,
|
|
99
|
+
'application/xml' => :xml,
|
|
100
|
+
'text/html' => :html,
|
|
101
|
+
}.freeze,
|
|
102
|
+
:types => {
|
|
103
|
+
:json => 'application/json'.freeze,
|
|
104
|
+
:xml => 'application/xml'.freeze,
|
|
105
|
+
:html => 'text/html'.freeze,
|
|
106
|
+
}.freeze,
|
|
107
|
+
:use_extension => true,
|
|
108
|
+
:use_header => true,
|
|
109
|
+
:default_type => :html
|
|
110
|
+
}.freeze
|
|
111
|
+
|
|
112
|
+
def self.configure(app, opts = {})
|
|
113
|
+
config = (app.opts[:type_routing] || CONFIGURATION).dup
|
|
114
|
+
[:use_extension, :use_header, :default_type].each do |key|
|
|
115
|
+
config[key] = opts[key] if opts.has_key?(key)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
types = config[:types] = config[:types].dup
|
|
119
|
+
mimes = config[:mimes] = config[:mimes].dup
|
|
120
|
+
|
|
121
|
+
Array(opts[:exclude]).each do |type|
|
|
122
|
+
types.delete(type)
|
|
123
|
+
mimes.reject!{|_, v| v == type}
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if mapping = opts[:types]
|
|
127
|
+
types.merge!(mapping)
|
|
128
|
+
|
|
129
|
+
mapping.each do |k, v|
|
|
130
|
+
if v
|
|
131
|
+
mimes[v.split(';', 2).first] = k
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
types.freeze
|
|
137
|
+
mimes.freeze
|
|
138
|
+
|
|
139
|
+
type_keys = config[:types].keys
|
|
140
|
+
config[:extension_regexp] = /(.*?)\.(#{Regexp.union(type_keys.map(&:to_s))})\z/
|
|
141
|
+
|
|
142
|
+
type_keys.each do |type|
|
|
143
|
+
app::RodaRequest.send(:define_method, type) do |&block|
|
|
144
|
+
on_type(type, &block)
|
|
145
|
+
end
|
|
146
|
+
app::RodaRequest.send(:alias_method, type, type)
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
app.opts[:type_routing] = config.freeze
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
module RequestMethods
|
|
153
|
+
# Yields if the given +type+ matches the requested data type and halts
|
|
154
|
+
# the request afterwards, returning the result of the block.
|
|
155
|
+
def on_type(type, &block)
|
|
156
|
+
return unless type == requested_type
|
|
157
|
+
response[RodaResponseHeaders::CONTENT_TYPE] ||= @scope.opts[:type_routing][:types][type]
|
|
158
|
+
always(&block)
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Returns the data type the client requests.
|
|
162
|
+
def requested_type
|
|
163
|
+
return @requested_type if @requested_type
|
|
164
|
+
|
|
165
|
+
opts = @scope.opts[:type_routing]
|
|
166
|
+
@requested_type = accept_response_type if opts[:use_header]
|
|
167
|
+
@requested_type ||= opts[:default_type]
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Append the type routing extension back to the path if it was
|
|
171
|
+
# removed before routing.
|
|
172
|
+
def real_remaining_path
|
|
173
|
+
if @type_routing_extension
|
|
174
|
+
"#{super}.#{@type_routing_extension}"
|
|
175
|
+
else
|
|
176
|
+
super
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
private
|
|
181
|
+
|
|
182
|
+
# Removes a trailing file extension from the path, and sets
|
|
183
|
+
# the requested type if so.
|
|
184
|
+
def _remaining_path(env)
|
|
185
|
+
opts = scope.opts[:type_routing]
|
|
186
|
+
path = super
|
|
187
|
+
|
|
188
|
+
if opts[:use_extension]
|
|
189
|
+
if m = opts[:extension_regexp].match(path)
|
|
190
|
+
@type_routing_extension = @requested_type = m[2].to_sym
|
|
191
|
+
path = m[1]
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
path
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# The response type indicated by the Accept request header.
|
|
199
|
+
def accept_response_type
|
|
200
|
+
mimes = @scope.opts[:type_routing][:mimes]
|
|
201
|
+
|
|
202
|
+
@env['HTTP_ACCEPT'].to_s.split(/\s*,\s*/).map do |part|
|
|
203
|
+
mime, _= part.split(/\s*;\s*/, 2)
|
|
204
|
+
if sym = mimes[mime]
|
|
205
|
+
response[RodaResponseHeaders::VARY] = (vary = response[RodaResponseHeaders::VARY]) ? "#{vary}, Accept" : 'Accept'
|
|
206
|
+
return sym
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
nil
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
register_plugin(:type_routing, TypeRouting)
|
|
216
|
+
end
|
|
217
|
+
end
|