hanami-controller 1.3.3 → 2.0.0.alpha4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +82 -0
- data/LICENSE.md +1 -1
- data/README.md +299 -537
- data/hanami-controller.gemspec +4 -3
- data/lib/hanami/action/application_action.rb +131 -0
- data/lib/hanami/action/application_configuration/content_security_policy.rb +118 -0
- data/lib/hanami/action/application_configuration/cookies.rb +29 -0
- data/lib/hanami/action/application_configuration/sessions.rb +46 -0
- data/lib/hanami/action/application_configuration.rb +90 -0
- data/lib/hanami/action/base_params.rb +2 -2
- data/lib/hanami/action/cache/cache_control.rb +4 -4
- data/lib/hanami/action/cache/conditional_get.rb +3 -1
- data/lib/hanami/action/cache/directives.rb +1 -1
- data/lib/hanami/action/cache/expires.rb +3 -3
- data/lib/hanami/action/cache.rb +1 -139
- data/lib/hanami/action/configuration.rb +428 -0
- data/lib/hanami/action/cookie_jar.rb +3 -3
- data/lib/hanami/action/cookies.rb +3 -62
- data/lib/hanami/action/csrf_protection.rb +214 -0
- data/lib/hanami/action/flash.rb +102 -207
- data/lib/hanami/action/glue.rb +5 -31
- data/lib/hanami/action/halt.rb +12 -0
- data/lib/hanami/action/mime.rb +78 -485
- data/lib/hanami/action/params.rb +2 -2
- data/lib/hanami/action/rack/file.rb +1 -1
- data/lib/hanami/action/request.rb +30 -20
- data/lib/hanami/action/response.rb +193 -0
- data/lib/hanami/action/session.rb +11 -128
- data/lib/hanami/action/standalone_action.rb +578 -0
- data/lib/hanami/action/validatable.rb +1 -1
- data/lib/hanami/action/view_name_inferrer.rb +46 -0
- data/lib/hanami/action.rb +129 -73
- data/lib/hanami/controller/version.rb +1 -1
- data/lib/hanami/controller.rb +0 -227
- data/lib/hanami/http/status.rb +2 -2
- metadata +44 -26
- data/lib/hanami/action/callable.rb +0 -92
- data/lib/hanami/action/callbacks.rb +0 -214
- data/lib/hanami/action/configurable.rb +0 -50
- data/lib/hanami/action/exposable/guard.rb +0 -104
- data/lib/hanami/action/exposable.rb +0 -126
- data/lib/hanami/action/head.rb +0 -121
- data/lib/hanami/action/rack/callable.rb +0 -47
- data/lib/hanami/action/rack/errors.rb +0 -53
- data/lib/hanami/action/rack.rb +0 -411
- data/lib/hanami/action/redirect.rb +0 -59
- data/lib/hanami/action/throwable.rb +0 -169
- data/lib/hanami/controller/configuration.rb +0 -763
- data/lib/hanami-controller.rb +0 -1
data/lib/hanami/action.rb
CHANGED
@@ -1,17 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require 'hanami/action/mime'
|
4
|
-
require 'hanami/action/redirect'
|
5
|
-
require 'hanami/action/exposable'
|
6
|
-
require 'hanami/action/throwable'
|
7
|
-
require 'hanami/action/callbacks'
|
8
|
-
begin
|
9
|
-
require 'hanami/validations'
|
10
|
-
require 'hanami/action/validatable'
|
11
|
-
rescue LoadError
|
12
|
-
end
|
13
|
-
require 'hanami/action/head'
|
14
|
-
require 'hanami/action/callable'
|
1
|
+
require_relative 'action/application_action'
|
2
|
+
require_relative 'action/standalone_action'
|
15
3
|
|
16
4
|
module Hanami
|
17
5
|
# An HTTP endpoint
|
@@ -28,84 +16,152 @@ module Hanami
|
|
28
16
|
# # ...
|
29
17
|
# end
|
30
18
|
# end
|
31
|
-
|
32
|
-
#
|
33
|
-
# It includes basic Hanami::Action modules to the given class.
|
19
|
+
class Action
|
20
|
+
# Rack SPEC response code
|
34
21
|
#
|
35
|
-
# @
|
22
|
+
# @since 1.0.0
|
23
|
+
# @api private
|
24
|
+
RESPONSE_CODE = 0
|
25
|
+
|
26
|
+
# Rack SPEC response headers
|
36
27
|
#
|
37
|
-
# @since
|
28
|
+
# @since 1.0.0
|
38
29
|
# @api private
|
30
|
+
RESPONSE_HEADERS = 1
|
31
|
+
|
32
|
+
# Rack SPEC response body
|
39
33
|
#
|
40
|
-
# @
|
41
|
-
#
|
42
|
-
|
43
|
-
# @see Hanami::Action::Mime
|
44
|
-
# @see Hanami::Action::Http
|
45
|
-
# @see Hanami::Action::Redirect
|
46
|
-
# @see Hanami::Action::Exposable
|
47
|
-
# @see Hanami::Action::Throwable
|
48
|
-
# @see Hanami::Action::Callbacks
|
49
|
-
# @see Hanami::Action::Validatable
|
50
|
-
# @see Hanami::Action::Configurable
|
51
|
-
# @see Hanami::Action::Callable
|
52
|
-
def self.included(base)
|
53
|
-
base.class_eval do
|
54
|
-
include Rack
|
55
|
-
include Mime
|
56
|
-
include Redirect
|
57
|
-
include Exposable
|
58
|
-
include Throwable
|
59
|
-
include Callbacks
|
60
|
-
include Validatable if defined?(Validatable)
|
61
|
-
include Configurable
|
62
|
-
include Head
|
63
|
-
prepend Callable
|
64
|
-
end
|
65
|
-
end
|
34
|
+
# @since 1.0.0
|
35
|
+
# @api private
|
36
|
+
RESPONSE_BODY = 2
|
66
37
|
|
67
|
-
|
38
|
+
DEFAULT_ERROR_CODE = 500
|
68
39
|
|
69
|
-
#
|
40
|
+
# Status codes that by RFC must not include a message body
|
70
41
|
#
|
71
|
-
#
|
42
|
+
# @since 0.3.2
|
43
|
+
# @api private
|
44
|
+
HTTP_STATUSES_WITHOUT_BODY = Set.new((100..199).to_a << 204 << 205 << 304).freeze
|
45
|
+
|
46
|
+
# Not Found
|
72
47
|
#
|
73
|
-
# @
|
48
|
+
# @since 1.0.0
|
49
|
+
# @api private
|
50
|
+
NOT_FOUND = 404
|
51
|
+
|
52
|
+
# Entity headers allowed in blank body responses, according to
|
53
|
+
# RFC 2616 - Section 10 (HTTP 1.1).
|
74
54
|
#
|
75
|
-
#
|
76
|
-
|
77
|
-
|
78
|
-
|
55
|
+
# "The response MAY include new or updated metainformation in the form
|
56
|
+
# of entity-headers".
|
57
|
+
#
|
58
|
+
# @since 0.4.0
|
59
|
+
# @api private
|
60
|
+
#
|
61
|
+
# @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.5
|
62
|
+
# @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html
|
63
|
+
ENTITY_HEADERS = {
|
64
|
+
'Allow' => true,
|
65
|
+
'Content-Encoding' => true,
|
66
|
+
'Content-Language' => true,
|
67
|
+
'Content-Location' => true,
|
68
|
+
'Content-MD5' => true,
|
69
|
+
'Content-Range' => true,
|
70
|
+
'Expires' => true,
|
71
|
+
'Last-Modified' => true,
|
72
|
+
'extension-header' => true
|
73
|
+
}.freeze
|
79
74
|
|
80
|
-
#
|
75
|
+
# The request method
|
81
76
|
#
|
82
|
-
#
|
77
|
+
# @since 0.3.2
|
78
|
+
# @api private
|
79
|
+
REQUEST_METHOD = 'REQUEST_METHOD'.freeze
|
80
|
+
|
81
|
+
# The Content-Length HTTP header
|
83
82
|
#
|
84
|
-
# @
|
83
|
+
# @since 1.0.0
|
84
|
+
# @api private
|
85
|
+
CONTENT_LENGTH = 'Content-Length'.freeze
|
86
|
+
|
87
|
+
# The non-standard HTTP header to pass the control over when a resource
|
88
|
+
# cannot be found by the current endpoint
|
85
89
|
#
|
86
|
-
# @since 1.
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
+
# @since 1.0.0
|
91
|
+
# @api private
|
92
|
+
X_CASCADE = 'X-Cascade'.freeze
|
93
|
+
|
94
|
+
# HEAD request
|
95
|
+
#
|
96
|
+
# @since 0.3.2
|
97
|
+
# @api private
|
98
|
+
HEAD = 'HEAD'.freeze
|
99
|
+
|
100
|
+
# The key that returns accepted mime types from the Rack env
|
101
|
+
#
|
102
|
+
# @since 0.1.0
|
103
|
+
# @api private
|
104
|
+
HTTP_ACCEPT = 'HTTP_ACCEPT'.freeze
|
90
105
|
|
91
|
-
#
|
106
|
+
# The header key to set the mime type of the response
|
92
107
|
#
|
93
|
-
#
|
94
|
-
#
|
95
|
-
|
108
|
+
# @since 0.1.0
|
109
|
+
# @api private
|
110
|
+
CONTENT_TYPE = 'Content-Type'.freeze
|
111
|
+
|
112
|
+
# The default mime type for an incoming HTTP request
|
96
113
|
#
|
97
114
|
# @since 0.1.0
|
98
115
|
# @api private
|
99
|
-
|
116
|
+
DEFAULT_ACCEPT = '*/*'.freeze
|
117
|
+
|
118
|
+
# The default mime type that is returned in the response
|
119
|
+
#
|
120
|
+
# @since 0.1.0
|
121
|
+
# @api private
|
122
|
+
DEFAULT_CONTENT_TYPE = 'application/octet-stream'.freeze
|
123
|
+
|
124
|
+
# @since 0.2.0
|
125
|
+
# @api private
|
126
|
+
RACK_ERRORS = 'rack.errors'.freeze
|
127
|
+
|
128
|
+
# This isn't part of Rack SPEC
|
129
|
+
#
|
130
|
+
# Exception notifiers use <tt>rack.exception</tt> instead of
|
131
|
+
# <tt>rack.errors</tt>, so we need to support it.
|
132
|
+
#
|
133
|
+
# @since 0.5.0
|
134
|
+
# @api private
|
100
135
|
#
|
101
|
-
# @see Hanami::Action::
|
102
|
-
# @see
|
103
|
-
# @see
|
104
|
-
|
105
|
-
|
106
|
-
#
|
107
|
-
#
|
108
|
-
|
136
|
+
# @see Hanami::Action::Throwable::RACK_ERRORS
|
137
|
+
# @see http://www.rubydoc.info/github/rack/rack/file/SPEC#The_Error_Stream
|
138
|
+
# @see https://github.com/hanami/controller/issues/133
|
139
|
+
RACK_EXCEPTION = 'rack.exception'.freeze
|
140
|
+
|
141
|
+
# The HTTP header for redirects
|
142
|
+
#
|
143
|
+
# @since 0.2.0
|
144
|
+
# @api private
|
145
|
+
LOCATION = 'Location'.freeze
|
146
|
+
|
147
|
+
include StandaloneAction
|
148
|
+
|
149
|
+
def self.inherited(subclass)
|
150
|
+
super
|
151
|
+
|
152
|
+
# When inheriting within an Hanami app, and the application provider has
|
153
|
+
# changed from the superclass, (re-)configure the action for the provider,
|
154
|
+
# i.e. for the slice and/or the application itself
|
155
|
+
if (provider = application_provider(subclass)) && provider != application_provider(subclass.superclass)
|
156
|
+
subclass.include ApplicationAction.new(provider)
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
def self.application_provider(subclass)
|
161
|
+
if Hanami.respond_to?(:application?) && Hanami.application?
|
162
|
+
Hanami.application.component_provider(subclass)
|
163
|
+
end
|
109
164
|
end
|
165
|
+
private_class_method :application_provider
|
110
166
|
end
|
111
167
|
end
|
data/lib/hanami/controller.rb
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
require 'hanami/utils/class_attribute'
|
2
1
|
require 'hanami/action'
|
3
|
-
require 'hanami/controller/configuration'
|
4
2
|
require 'hanami/controller/version'
|
5
3
|
require 'hanami/controller/error'
|
6
4
|
|
@@ -46,230 +44,5 @@ module Hanami
|
|
46
44
|
super("Cannot find a corresponding Mime type for '#{ format }'. Please configure it with Hanami::Controller::Configuration#format.")
|
47
45
|
end
|
48
46
|
end
|
49
|
-
|
50
|
-
# Missing session error
|
51
|
-
#
|
52
|
-
# This error is raised when an action sends either `session` or `flash` to
|
53
|
-
# itself and it does not include `Hanami::Action::Session`.
|
54
|
-
#
|
55
|
-
# @since 1.2.0
|
56
|
-
#
|
57
|
-
# @see Hanami::Action::Session
|
58
|
-
# @see Hanami::Action#session
|
59
|
-
# @see Hanami::Action#flash
|
60
|
-
class MissingSessionError < Hanami::Controller::Error
|
61
|
-
def initialize(session_method)
|
62
|
-
super("To use `#{session_method}', add `include Hanami::Action::Session`.")
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
include Utils::ClassAttribute
|
67
|
-
|
68
|
-
# Framework configuration
|
69
|
-
#
|
70
|
-
# @since 0.2.0
|
71
|
-
# @api private
|
72
|
-
class_attribute :configuration
|
73
|
-
self.configuration = Configuration.new
|
74
|
-
|
75
|
-
# Configure the framework.
|
76
|
-
# It yields the given block in the context of the configuration
|
77
|
-
#
|
78
|
-
# @param blk [Proc] the configuration block
|
79
|
-
#
|
80
|
-
# @since 0.2.0
|
81
|
-
#
|
82
|
-
# @see Hanami::Controller::Configuration
|
83
|
-
#
|
84
|
-
# @example
|
85
|
-
# require 'hanami/controller'
|
86
|
-
#
|
87
|
-
# Hanami::Controller.configure do
|
88
|
-
# handle_exceptions false
|
89
|
-
# end
|
90
|
-
def self.configure(&blk)
|
91
|
-
configuration.instance_eval(&blk)
|
92
|
-
end
|
93
|
-
|
94
|
-
# Duplicate Hanami::Controller in order to create a new separated instance
|
95
|
-
# of the framework.
|
96
|
-
#
|
97
|
-
# The new instance of the framework will be completely decoupled from the
|
98
|
-
# original. It will inherit the configuration, but all the changes that
|
99
|
-
# happen after the duplication, won't be reflected on the other copies.
|
100
|
-
#
|
101
|
-
# @return [Module] a copy of Hanami::Controller
|
102
|
-
#
|
103
|
-
# @since 0.2.0
|
104
|
-
# @api private
|
105
|
-
#
|
106
|
-
# @example Basic usage
|
107
|
-
# require 'hanami/controller'
|
108
|
-
#
|
109
|
-
# module MyApp
|
110
|
-
# Controller = Hanami::Controller.dupe
|
111
|
-
# end
|
112
|
-
#
|
113
|
-
# MyApp::Controller == Hanami::Controller # => false
|
114
|
-
#
|
115
|
-
# MyApp::Controller.configuration ==
|
116
|
-
# Hanami::Controller.configuration # => false
|
117
|
-
#
|
118
|
-
# @example Inheriting configuration
|
119
|
-
# require 'hanami/controller'
|
120
|
-
#
|
121
|
-
# Hanami::Controller.configure do
|
122
|
-
# handle_exceptions false
|
123
|
-
# end
|
124
|
-
#
|
125
|
-
# module MyApp
|
126
|
-
# Controller = Hanami::Controller.dupe
|
127
|
-
# end
|
128
|
-
#
|
129
|
-
# module MyApi
|
130
|
-
# Controller = Hanami::Controller.dupe
|
131
|
-
# Controller.configure do
|
132
|
-
# handle_exceptions true
|
133
|
-
# end
|
134
|
-
# end
|
135
|
-
#
|
136
|
-
# Hanami::Controller.configuration.handle_exceptions # => false
|
137
|
-
# MyApp::Controller.configuration.handle_exceptions # => false
|
138
|
-
# MyApi::Controller.configuration.handle_exceptions # => true
|
139
|
-
def self.dupe
|
140
|
-
dup.tap do |duplicated|
|
141
|
-
duplicated.configuration = configuration.duplicate
|
142
|
-
end
|
143
|
-
end
|
144
|
-
|
145
|
-
# Duplicate the framework and generate modules for the target application
|
146
|
-
#
|
147
|
-
# @param mod [Module] the Ruby namespace of the application
|
148
|
-
# @param controllers [String] the optional namespace where the application's
|
149
|
-
# controllers will live
|
150
|
-
# @param blk [Proc] an optional block to configure the framework
|
151
|
-
#
|
152
|
-
# @return [Module] a copy of Hanami::Controller
|
153
|
-
#
|
154
|
-
# @since 0.2.0
|
155
|
-
#
|
156
|
-
# @see Hanami::Controller#dupe
|
157
|
-
# @see Hanami::Controller::Configuration
|
158
|
-
# @see Hanami::Controller::Configuration#action_module
|
159
|
-
#
|
160
|
-
# @example Basic usage
|
161
|
-
# require 'hanami/controller'
|
162
|
-
#
|
163
|
-
# module MyApp
|
164
|
-
# Controller = Hanami::Controller.duplicate(self)
|
165
|
-
# end
|
166
|
-
#
|
167
|
-
# # It will:
|
168
|
-
# #
|
169
|
-
# # 1. Generate MyApp::Controller
|
170
|
-
# # 2. Generate MyApp::Action
|
171
|
-
# # 3. Generate MyApp::Controllers
|
172
|
-
# # 4. Configure MyApp::Action as the default module for actions
|
173
|
-
#
|
174
|
-
# module MyApp::Controllers::Dashboard
|
175
|
-
# include MyApp::Controller
|
176
|
-
#
|
177
|
-
# action 'Index' do # this will inject MyApp::Action
|
178
|
-
# def call(params)
|
179
|
-
# # ...
|
180
|
-
# end
|
181
|
-
# end
|
182
|
-
# end
|
183
|
-
#
|
184
|
-
# @example Compare code
|
185
|
-
# require 'hanami/controller'
|
186
|
-
#
|
187
|
-
# module MyApp
|
188
|
-
# Controller = Hanami::Controller.duplicate(self) do
|
189
|
-
# # ...
|
190
|
-
# end
|
191
|
-
# end
|
192
|
-
#
|
193
|
-
# # it's equivalent to:
|
194
|
-
#
|
195
|
-
# module MyApp
|
196
|
-
# Controller = Hanami::Controller.dupe
|
197
|
-
# Action = Hanami::Action.dup
|
198
|
-
#
|
199
|
-
# module Controllers
|
200
|
-
# end
|
201
|
-
#
|
202
|
-
# Controller.configure do
|
203
|
-
# action_module MyApp::Action
|
204
|
-
# end
|
205
|
-
#
|
206
|
-
# Controller.configure do
|
207
|
-
# # ...
|
208
|
-
# end
|
209
|
-
# end
|
210
|
-
#
|
211
|
-
# @example Custom controllers module
|
212
|
-
# require 'hanami/controller'
|
213
|
-
#
|
214
|
-
# module MyApp
|
215
|
-
# Controller = Hanami::Controller.duplicate(self, 'Ctrls')
|
216
|
-
# end
|
217
|
-
#
|
218
|
-
# defined?(MyApp::Controllers) # => nil
|
219
|
-
# defined?(MyApp::Ctrls) # => "constant"
|
220
|
-
#
|
221
|
-
# # Developers can namespace controllers under Ctrls
|
222
|
-
# module MyApp::Ctrls::Dashboard
|
223
|
-
# # ...
|
224
|
-
# end
|
225
|
-
#
|
226
|
-
# @example Nil controllers module
|
227
|
-
# require 'hanami/controller'
|
228
|
-
#
|
229
|
-
# module MyApp
|
230
|
-
# Controller = Hanami::Controller.duplicate(self, nil)
|
231
|
-
# end
|
232
|
-
#
|
233
|
-
# defined?(MyApp::Controllers) # => nil
|
234
|
-
#
|
235
|
-
# # Developers can namespace controllers under MyApp
|
236
|
-
# module MyApp::DashboardController
|
237
|
-
# # ...
|
238
|
-
# end
|
239
|
-
#
|
240
|
-
# @example Block usage
|
241
|
-
# require 'hanami/controller'
|
242
|
-
#
|
243
|
-
# module MyApp
|
244
|
-
# Controller = Hanami::Controller.duplicate(self) do
|
245
|
-
# handle_exceptions false
|
246
|
-
# end
|
247
|
-
# end
|
248
|
-
#
|
249
|
-
# Hanami::Controller.configuration.handle_exceptions # => true
|
250
|
-
# MyApp::Controller.configuration.handle_exceptions # => false
|
251
|
-
def self.duplicate(mod, controllers = 'Controllers', &blk)
|
252
|
-
dupe.tap do |duplicated|
|
253
|
-
mod.module_eval %{ module #{ controllers }; end } if controllers
|
254
|
-
mod.module_eval %{ Action = Hanami::Action.dup }
|
255
|
-
|
256
|
-
duplicated.module_eval %{
|
257
|
-
configure do
|
258
|
-
action_module #{ mod }::Action
|
259
|
-
end
|
260
|
-
}
|
261
|
-
|
262
|
-
duplicated.configure(&blk) if block_given?
|
263
|
-
end
|
264
|
-
end
|
265
|
-
|
266
|
-
# Framework loading entry point
|
267
|
-
#
|
268
|
-
# @return [void]
|
269
|
-
#
|
270
|
-
# @since 0.3.0
|
271
|
-
def self.load!
|
272
|
-
configuration.load!
|
273
|
-
end
|
274
47
|
end
|
275
48
|
end
|
data/lib/hanami/http/status.rb
CHANGED
@@ -31,7 +31,7 @@ module Hanami
|
|
31
31
|
|
32
32
|
# Return a status for the given code
|
33
33
|
#
|
34
|
-
# @param code [
|
34
|
+
# @param code [Integer] a valid HTTP code
|
35
35
|
#
|
36
36
|
# @return [Array] a pair of code and message for an HTTP status
|
37
37
|
#
|
@@ -48,7 +48,7 @@ module Hanami
|
|
48
48
|
|
49
49
|
# Return a message for the given status code
|
50
50
|
#
|
51
|
-
# @param code [
|
51
|
+
# @param code [Integer] a valid HTTP code
|
52
52
|
#
|
53
53
|
# @return [String] a message for the given status code
|
54
54
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanami-controller
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0.alpha4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -30,14 +30,34 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 2.0.alpha
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 2.0.alpha
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: dry-configurable
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.13'
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 0.13.0
|
51
|
+
type: :runtime
|
52
|
+
prerelease: false
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - "~>"
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '0.13'
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 0.13.0
|
41
61
|
- !ruby/object:Gem::Dependency
|
42
62
|
name: bundler
|
43
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,14 +112,14 @@ dependencies:
|
|
92
112
|
requirements:
|
93
113
|
- - "~>"
|
94
114
|
- !ruby/object:Gem::Version
|
95
|
-
version: '3.
|
115
|
+
version: '3.9'
|
96
116
|
type: :development
|
97
117
|
prerelease: false
|
98
118
|
version_requirements: !ruby/object:Gem::Requirement
|
99
119
|
requirements:
|
100
120
|
- - "~>"
|
101
121
|
- !ruby/object:Gem::Version
|
102
|
-
version: '3.
|
122
|
+
version: '3.9'
|
103
123
|
description: Complete, fast and testable actions for Rack
|
104
124
|
email:
|
105
125
|
- me@lucaguidi.com
|
@@ -111,37 +131,35 @@ files:
|
|
111
131
|
- LICENSE.md
|
112
132
|
- README.md
|
113
133
|
- hanami-controller.gemspec
|
114
|
-
- lib/hanami-controller.rb
|
115
134
|
- lib/hanami/action.rb
|
135
|
+
- lib/hanami/action/application_action.rb
|
136
|
+
- lib/hanami/action/application_configuration.rb
|
137
|
+
- lib/hanami/action/application_configuration/content_security_policy.rb
|
138
|
+
- lib/hanami/action/application_configuration/cookies.rb
|
139
|
+
- lib/hanami/action/application_configuration/sessions.rb
|
116
140
|
- lib/hanami/action/base_params.rb
|
117
141
|
- lib/hanami/action/cache.rb
|
118
142
|
- lib/hanami/action/cache/cache_control.rb
|
119
143
|
- lib/hanami/action/cache/conditional_get.rb
|
120
144
|
- lib/hanami/action/cache/directives.rb
|
121
145
|
- lib/hanami/action/cache/expires.rb
|
122
|
-
- lib/hanami/action/
|
123
|
-
- lib/hanami/action/callbacks.rb
|
124
|
-
- lib/hanami/action/configurable.rb
|
146
|
+
- lib/hanami/action/configuration.rb
|
125
147
|
- lib/hanami/action/cookie_jar.rb
|
126
148
|
- lib/hanami/action/cookies.rb
|
127
|
-
- lib/hanami/action/
|
128
|
-
- lib/hanami/action/exposable/guard.rb
|
149
|
+
- lib/hanami/action/csrf_protection.rb
|
129
150
|
- lib/hanami/action/flash.rb
|
130
151
|
- lib/hanami/action/glue.rb
|
131
|
-
- lib/hanami/action/
|
152
|
+
- lib/hanami/action/halt.rb
|
132
153
|
- lib/hanami/action/mime.rb
|
133
154
|
- lib/hanami/action/params.rb
|
134
|
-
- lib/hanami/action/rack.rb
|
135
|
-
- lib/hanami/action/rack/callable.rb
|
136
|
-
- lib/hanami/action/rack/errors.rb
|
137
155
|
- lib/hanami/action/rack/file.rb
|
138
|
-
- lib/hanami/action/redirect.rb
|
139
156
|
- lib/hanami/action/request.rb
|
157
|
+
- lib/hanami/action/response.rb
|
140
158
|
- lib/hanami/action/session.rb
|
141
|
-
- lib/hanami/action/
|
159
|
+
- lib/hanami/action/standalone_action.rb
|
142
160
|
- lib/hanami/action/validatable.rb
|
161
|
+
- lib/hanami/action/view_name_inferrer.rb
|
143
162
|
- lib/hanami/controller.rb
|
144
|
-
- lib/hanami/controller/configuration.rb
|
145
163
|
- lib/hanami/controller/error.rb
|
146
164
|
- lib/hanami/controller/version.rb
|
147
165
|
- lib/hanami/http/status.rb
|
@@ -149,7 +167,7 @@ homepage: http://hanamirb.org
|
|
149
167
|
licenses:
|
150
168
|
- MIT
|
151
169
|
metadata: {}
|
152
|
-
post_install_message:
|
170
|
+
post_install_message:
|
153
171
|
rdoc_options: []
|
154
172
|
require_paths:
|
155
173
|
- lib
|
@@ -157,15 +175,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
157
175
|
requirements:
|
158
176
|
- - ">="
|
159
177
|
- !ruby/object:Gem::Version
|
160
|
-
version: 2.
|
178
|
+
version: 2.6.0
|
161
179
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
180
|
requirements:
|
163
|
-
- - "
|
181
|
+
- - ">"
|
164
182
|
- !ruby/object:Gem::Version
|
165
|
-
version:
|
183
|
+
version: 1.3.1
|
166
184
|
requirements: []
|
167
|
-
rubygems_version: 3.
|
168
|
-
signing_key:
|
185
|
+
rubygems_version: 3.2.29
|
186
|
+
signing_key:
|
169
187
|
specification_version: 4
|
170
188
|
summary: Complete, fast and testable actions for Rack and Hanami
|
171
189
|
test_files: []
|