Showing /app/release/20240328215603/app/views/layouts/application.html.haml where line #25 raised:
ReferenceError: window is not defined
Extracted source (around line #223):
221
222
223
224
225
226
|
@current_exception = nil
timeout do
eval_unsafe(str, filename)
end
end
ensure
|
Extracted source (around line #223):
221
222
223
224
225
226
|
@current_exception = nil
timeout do
eval_unsafe(str, filename)
end
end
ensure
|
Extracted source (around line #343):
341
342
343
344
345
346
|
def timeout(&blk)
return blk.call unless @timeout
mutex = Mutex.new
done = false
|
Extracted source (around line #222):
220
221
222
223
224
225
|
isolate_mutex.synchronize do
@current_exception = nil
timeout do
eval_unsafe(str, filename)
end
end
|
Extracted source (around line #220):
218
219
220
221
222
223
|
@eval_thread = Thread.current
isolate_mutex.synchronize do
@current_exception = nil
timeout do
eval_unsafe(str, filename)
|
Extracted source (around line #220):
218
219
220
221
222
223
|
@eval_thread = Thread.current
isolate_mutex.synchronize do
@current_exception = nil
timeout do
eval_unsafe(str, filename)
|
Extracted source (around line #10):
8
9
10
11
12
13
|
@context = ::MiniRacer::Context.new
translate do
@context.eval(source)
end
end
|
Extracted source (around line #66):
64
65
66
67
68
69
|
def translate
begin
strip_functions! yield
rescue MiniRacer::RuntimeError => e
ex = ProgramError.new e.message
if backtrace = e.backtrace
|
Extracted source (around line #9):
7
8
9
10
11
12
|
source = encode(source)
@context = ::MiniRacer::Context.new
translate do
@context.eval(source)
end
end
|
Extracted source (around line #57):
55
56
57
58
59
60
|
context_class.new(self, source)
else
context_class.new(self, source, options)
end
end
|
Extracted source (around line #57):
55
56
57
58
59
60
|
context_class.new(self, source)
else
context_class.new(self, source, options)
end
end
|
Extracted source (around line #27):
25
26
27
28
29
30
|
def compile(source, options = {})
runtime.compile(source, options)
end
def root
|
Extracted source (around line #13):
11
12
13
14
15
16
|
def initialize(options={})
js_code = options[:code] || raise('Pass `code:` option to instantiate a JS context!')
@context = ExecJS.compile(GLOBAL_WRAPPER + js_code)
end
def render(component_name, props, prerender_options)
|
Extracted source (around line #30):
28
29
30
31
32
33
|
end
super(options.merge(code: js_code))
end
# Prerender options are expected to be a Hash however might also be a symbol.
|
Extracted source (around line #17):
15
16
17
18
19
20
|
def self.reset_pool
options = { size: pool_size, timeout: pool_timeout }
@@pool = ConnectionPool.new(options) { self.renderer.new(self.renderer_options) }
end
# Check a renderer out of the pool and use it to render the component.
|
Extracted source (around line #17):
15
16
17
18
19
20
|
def self.reset_pool
options = { size: pool_size, timeout: pool_timeout }
@@pool = ConnectionPool.new(options) { self.renderer.new(self.renderer_options) }
end
# Check a renderer out of the pool and use it to render the component.
|
Extracted source (around line #165):
163
164
165
166
167
168
|
def try_create(options = nil)
unless @created == @max
object = @create_block.call
@created += 1
object
end
|
Extracted source (around line #73):
71
72
73
74
75
76
|
return fetch_connection(options) if connection_stored?(options)
connection = try_create(options)
return connection if connection
to_wait = deadline - current_time
|
Extracted source (around line #69):
67
68
69
70
71
72
|
deadline = current_time + timeout
@mutex.synchronize do
loop do
raise ConnectionPool::PoolShuttingDownError if @shutdown_block
return fetch_connection(options) if connection_stored?(options)
|
Extracted source (around line #69):
67
68
69
70
71
72
|
deadline = current_time + timeout
@mutex.synchronize do
loop do
raise ConnectionPool::PoolShuttingDownError if @shutdown_block
return fetch_connection(options) if connection_stored?(options)
|
Extracted source (around line #68):
66
67
68
69
70
71
|
deadline = current_time + timeout
@mutex.synchronize do
loop do
raise ConnectionPool::PoolShuttingDownError if @shutdown_block
return fetch_connection(options) if connection_stored?(options)
|
Extracted source (around line #68):
66
67
68
69
70
71
|
deadline = current_time + timeout
@mutex.synchronize do
loop do
raise ConnectionPool::PoolShuttingDownError if @shutdown_block
return fetch_connection(options) if connection_stored?(options)
|
Extracted source (around line #77):
75
76
77
78
79
80
|
else
::Thread.current[@key_count] = 1
::Thread.current[@key] = @available.pop(options[:timeout] || @timeout)
end
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def with(options = {})
Thread.handle_interrupt(Exception => :never) do
conn = checkout(options)
begin
Thread.handle_interrupt(Exception => :immediate) do
yield conn
|
Extracted source (around line #59):
57
58
59
60
61
62
|
def with(options = {})
Thread.handle_interrupt(Exception => :never) do
conn = checkout(options)
begin
Thread.handle_interrupt(Exception => :immediate) do
|
Extracted source (around line #59):
57
58
59
60
61
62
|
def with(options = {})
Thread.handle_interrupt(Exception => :never) do
conn = checkout(options)
begin
Thread.handle_interrupt(Exception => :immediate) do
|
Extracted source (around line #26):
24
25
26
27
28
29
|
# @return [String] Prerendered HTML from `component_name`
def self.render(component_name, props, prerender_options)
@@pool.with do |renderer|
renderer.render(component_name, props, prerender_options)
end
end
|
Extracted source (around line #74):
72
73
74
75
76
77
|
def prerender_component(component_name, props, prerender_options)
renderer = @controller.try(:react_rails_prerenderer) || React::ServerRendering
renderer.render(component_name, props, prerender_options)
end
end
end
|
Extracted source (around line #38):
36
37
38
39
40
41
|
prerender_options = options[:prerender]
if prerender_options
block = Proc.new{ concat(prerender_component(name, props, prerender_options)) }
end
html_options = options.reverse_merge(:data => {})
|
Extracted source (around line #45):
43
44
45
46
47
48
|
def capture(*args)
value = nil
buffer = with_output_buffer { value = yield(*args) }
if (string = buffer.presence || value) && string.is_a?(String)
ERB::Util.html_escape string
end
|
Extracted source (around line #209):
207
208
209
210
211
212
|
end
self.output_buffer, old_buffer = buf, output_buffer
yield
output_buffer
ensure
self.output_buffer = old_buffer
|
Extracted source (around line #7):
5
6
7
8
9
10
|
module CaptureHelper
def with_output_buffer_with_haml_xss(*args, &block)
res = with_output_buffer_without_haml_xss(*args, &block)
case res
when Array; res.map {|s| Haml::Util.html_safe(s)}
when String; Haml::Util.html_safe(res)
|
Extracted source (around line #45):
43
44
45
46
47
48
|
def capture(*args)
value = nil
buffer = with_output_buffer { value = yield(*args) }
if (string = buffer.presence || value) && string.is_a?(String)
ERB::Util.html_escape string
end
|
Extracted source (around line #48):
46
47
48
49
50
51
|
capture_haml(*args, &block)
else
capture_without_haml(*args, &block)
end
end
alias_method :capture_without_haml, :capture
|
Extracted source (around line #342):
340
341
342
343
344
345
|
if block_given?
options = content_or_options_with_block if content_or_options_with_block.is_a?(Hash)
tag_builder.content_tag_string(name, capture(&block), options, escape)
else
tag_builder.content_tag_string(name, content_or_options_with_block, options, escape)
end
|
Extracted source (around line #59):
57
58
59
60
61
62
|
def content_tag_with_haml(name, *args, &block)
return content_tag_without_haml(name, *args, &block) unless is_haml?
preserve = haml_buffer.options.fetch(:preserve, DEFAULT_PRESERVE_OPTIONS).include?(name.to_s)
|
Extracted source (around line #57):
55
56
57
58
59
60
|
html_options.except!(:tag, :prerender, :camelize_props)
rendered_tag = content_tag(html_tag, '', html_options, &block)
if React::ServerRendering.renderer_options[:replay_console]
# Grab the server-rendered console replay script
# and move it _outside_ the container div
|
Extracted source (around line #21):
19
20
21
22
23
24
|
def react_component(*args, &block)
helper_obj = @__react_component_helper ||= helper_implementation_class.new
helper_obj.react_component(*args) { capture &block if block_given? }
end
end
end
|
Extracted source (around line #25):
23
24
25
26
27
28
|
%body{class: "#{body_class} #{body_offset_class}"}
= react_component('lib/bypass_button', { copy: 'Skip to Main Content', content_id: '#main-content' }.to_camelback_keys, prerender: !Rails.env.development?)
- if header_partial
= render :partial => header_partial
|
Extracted source (around line #247):
245
246
247
248
249
250
|
@current_template = template if add_to_stack
@output_buffer = buffer
public_send(method, locals, buffer, &block)
ensure
@output_buffer, @virtual_path, @current_template = _old_output_buffer, _old_virtual_path, _old_template
end
|
Extracted source (around line #247):
245
246
247
248
249
250
|
@current_template = template if add_to_stack
@output_buffer = buffer
public_send(method, locals, buffer, &block)
ensure
@output_buffer, @virtual_path, @current_template = _old_output_buffer, _old_virtual_path, _old_template
end
|
Extracted source (around line #154):
152
153
154
155
156
157
|
instrument_render_template do
compile!(view)
view._run(method_name, self, locals, buffer, add_to_stack: add_to_stack, &block)
end
rescue => e
handle_render_error(view, e)
|
Extracted source (around line #205):
203
204
205
206
207
208
|
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
end
|
Extracted source (around line #345):
343
344
345
346
347
348
|
def instrument_render_template(&block)
ActiveSupport::Notifications.instrument("!render_template.action_view", instrument_payload, &block)
end
def instrument_payload
|
Extracted source (around line #152):
150
151
152
153
154
155
|
# consume this in production. This is only slow if it's being listened to.
def render(view, locals, buffer = ActionView::OutputBuffer.new, add_to_stack: true, &block)
instrument_render_template do
compile!(view)
view._run(method_name, self, locals, buffer, add_to_stack: add_to_stack, &block)
end
|
Extracted source (around line #72):
70
71
72
73
74
75
|
ActiveSupport::Notifications.instrument("render_layout.action_view", identifier: layout.identifier) do
view.view_flow.set(:layout, yield(layout))
layout.render(view, locals) { |*name| view._layout_for(*name) }
end
else
yield
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #70):
68
69
70
71
72
73
|
body = if layout
ActiveSupport::Notifications.instrument("render_layout.action_view", identifier: layout.identifier) do
view.view_flow.set(:layout, yield(layout))
layout.render(view, locals) { |*name| view._layout_for(*name) }
end
|
Extracted source (around line #55):
53
54
55
56
57
58
|
# supplied as well.
def render_template(view, template, layout_name, locals)
render_with_layout(view, template, layout_name, locals) do |layout|
ActiveSupport::Notifications.instrument(
"render_template.action_view",
identifier: template.identifier,
|
Extracted source (around line #11):
9
10
11
12
13
14
|
prepend_formats(template.format)
render_template(context, template, options[:layout], options[:locals] || {})
end
private
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def render_template_to_object(context, options) #:nodoc:
TemplateRenderer.new(@lookup_context).render(context, options)
end
def render_partial_to_object(context, options, &block) #:nodoc:
|
Extracted source (around line #29):
27
28
29
30
31
32
|
render_partial_to_object(context, options)
else
render_template_to_object(context, options)
end
end
|
Extracted source (around line #117):
115
116
117
118
119
120
|
rendered_template = context.in_rendering_context(options) do |renderer|
renderer.render_to_object(context, options)
end
rendered_format = rendered_template.format || lookup_context.formats.first
|
Extracted source (around line #273):
271
272
273
274
275
276
|
end
yield @view_renderer
ensure
@view_renderer = old_view_renderer
@lookup_context = old_lookup_context
|
Extracted source (around line #116):
114
115
116
117
118
119
|
lookup_context.variants = variant if variant
rendered_template = context.in_rendering_context(options) do |renderer|
renderer.render_to_object(context, options)
end
|
Extracted source (around line #218):
216
217
218
219
220
221
|
Rack::Chunked::Body.new view_renderer.render_body(view_context, options)
else
super
end
end
end
|
Extracted source (around line #103):
101
102
103
104
105
106
|
def render_to_body(options = {})
_process_options(options)
_render_template(options)
end
private
|
Extracted source (around line #52):
50
51
52
53
54
55
|
def render_to_body(options = {})
super || _render_in_priorities(options) || " "
end
private
|
Extracted source (around line #142):
140
141
142
143
144
145
|
# <tt>ActionView::Rendering.render_to_body</tt>, if present.
def render_to_body(options)
_render_to_body_with_renderer(options) || super
end
def _render_to_body_with_renderer(options)
|
Extracted source (around line #25):
23
24
25
26
27
28
|
def render(*args, &block)
options = _normalize_render(*args, &block)
rendered_body = render_to_body(options)
if options[:html]
_set_html_content_type
else
|
Extracted source (around line #36):
34
35
36
37
38
39
|
def render(*args) #:nodoc:
raise ::AbstractController::DoubleRenderError if response_body
super
end
# Overwrite render_to_string because body can now be set to a Rack body.
|
Extracted source (around line #46):
44
45
46
47
48
49
|
render_output = nil
self.view_runtime = cleanup_view_runtime do
Benchmark.ms { render_output = super }
end
render_output
end
|
Extracted source (around line #308):
306
307
308
309
310
311
|
def realtime # :yield:
r0 = Process.clock_gettime(Process::CLOCK_MONOTONIC)
yield
Process.clock_gettime(Process::CLOCK_MONOTONIC) - r0
end
|
Extracted source (around line #14):
12
13
14
15
16
|
# # => 0.074
def ms(&block)
1000 * realtime(&block)
end
end
|
Extracted source (around line #46):
44
45
46
47
48
49
|
render_output = nil
self.view_runtime = cleanup_view_runtime do
Benchmark.ms { render_output = super }
end
render_output
end
|
Extracted source (around line #86):
84
85
86
87
88
89
|
# end
def cleanup_view_runtime # :doc:
yield
end
# Every time after an action is processed, this method is invoked
|
Extracted source (around line #34):
32
33
34
35
36
37
|
db_rt_before_render = ActiveRecord::LogSubscriber.reset_runtime
self.db_runtime = (db_runtime || 0) + db_rt_before_render
runtime = super
db_rt_after_render = ActiveRecord::LogSubscriber.reset_runtime
self.db_runtime += db_rt_after_render
runtime - db_rt_after_render
|
Extracted source (around line #45):
43
44
45
46
47
48
|
def render(*)
render_output = nil
self.view_runtime = cleanup_view_runtime do
Benchmark.ms { render_output = super }
end
render_output
|
Extracted source (around line #19):
17
18
19
20
21
22
|
if current_branding.is? Branding::GRE
render template: 'gre/testimonials/index'
else
render :index
end
|
Extracted source (around line #6):
4
5
6
7
8
9
|
module BasicImplicitRender # :nodoc:
def send_action(method, *args)
super.tap { default_render unless performed? }
end
def default_render
|
Extracted source (around line #228):
226
227
228
229
230
231
|
# which is *not* necessarily the same as the action name.
def process_action(method_name, *args)
send_action(method_name, *args)
end
# Actually call the method associated with the action. Override
|
Extracted source (around line #30):
28
29
30
31
32
33
|
def process_action(*) #:nodoc:
self.formats = request.formats.map(&:ref).compact
super
end
# Check for double render errors and set the content_type after rendering.
|
Extracted source (around line #42):
40
41
42
43
44
45
|
def process_action(*)
run_callbacks(:process_action) do
super
end
end
|
Extracted source (around line #117):
115
116
117
118
119
120
|
current.invoke_before(env)
if current.final?
env.value = !env.halted && (!block_given? || yield)
elsif current.skip?(env)
(skipped ||= []) << current
next_sequence = next_sequence.nested
|
Extracted source (around line #20):
18
19
20
21
22
23
|
previous_renderer = self.renderer
self.renderer = renderer
yield
ensure
self.renderer = previous_renderer
end
|
Extracted source (around line #59):
57
58
59
60
61
62
|
ActiveSupport.on_load(abstract_controller) do
around_action do |controller, action|
ActionText::Content.with_renderer(controller, &action)
end
end
end
|
Extracted source (around line #126):
124
125
126
127
128
129
|
begin
target, block, method, *arguments = current.expand_call_template(env, invoke_sequence)
target.send(method, *arguments, &block)
ensure
next_sequence = current
end
|
Extracted source (around line #126):
124
125
126
127
128
129
|
begin
target, block, method, *arguments = current.expand_call_template(env, invoke_sequence)
target.send(method, *arguments, &block)
ensure
next_sequence = current
end
|
Extracted source (around line #31):
29
30
31
32
33
34
|
new_helper.setup(self)
@__react_component_helper = new_helper
yield
@__react_component_helper.teardown(self)
end
|
Extracted source (around line #126):
124
125
126
127
128
129
|
begin
target, block, method, *arguments = current.expand_call_template(env, invoke_sequence)
target.send(method, *arguments, &block)
ensure
next_sequence = current
end
|
Extracted source (around line #137):
135
136
137
138
139
140
|
end
invoke_sequence.call
end
end
end
|
Extracted source (around line #41):
39
40
41
42
43
44
|
# <tt>process_action</tt> callbacks around the normal behavior.
def process_action(*)
run_callbacks(:process_action) do
super
end
end
|
Extracted source (around line #22):
20
21
22
23
24
25
|
private
def process_action(*)
super
rescue Exception => exception
request.env["action_dispatch.show_detailed_exceptions"] ||= show_detailed_exceptions?
rescue_with_handler(exception) || raise
|
Extracted source (around line #34):
32
33
34
35
36
37
|
ActiveSupport::Notifications.instrument("process_action.action_controller", raw_payload) do |payload|
result = super
payload[:response] = response
payload[:status] = response.status
result
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #33):
31
32
33
34
35
36
|
ActiveSupport::Notifications.instrument("start_processing.action_controller", raw_payload)
ActiveSupport::Notifications.instrument("process_action.action_controller", raw_payload) do |payload|
result = super
payload[:response] = response
payload[:status] = response.status
|
Extracted source (around line #249):
247
248
249
250
251
252
|
def process_action(*)
_perform_parameter_wrapping if _wrapper_enabled?
super
end
private
|
Extracted source (around line #27):
25
26
27
28
29
30
|
# and it won't be cleaned up by the method below.
ActiveRecord::LogSubscriber.reset_runtime
super
end
def cleanup_view_runtime
|
Extracted source (around line #165):
163
164
165
166
167
168
|
@_response_body = nil
process_action(action_name, *args)
end
# Delegates to the class' ::controller_path
|
Extracted source (around line #39):
37
38
39
40
41
42
|
def process(*) #:nodoc:
old_config, I18n.config = I18n.config, I18nProxy.new(I18n.config, lookup_context)
super
ensure
I18n.config = old_config
end
|
Extracted source (around line #190):
188
189
190
191
192
193
|
set_request!(request)
set_response!(response)
process(name)
request.commit_flash
to_a
end
|
Extracted source (around line #254):
252
253
254
255
256
257
|
middleware_stack.build(name) { |env| new.dispatch(name, req, res) }.call req.env
else
new.dispatch(name, req, res)
end
end
end
|
Extracted source (around line #50):
48
49
50
51
52
53
|
def dispatch(controller, action, req, res)
controller.dispatch(action, req, res)
end
end
|
Extracted source (around line #33):
31
32
33
34
35
36
|
controller = controller req
res = controller.make_response! req
dispatch(controller, params[:action], req, res)
rescue ActionController::RoutingError
if @raise_on_name_error
raise
|
Extracted source (around line #50):
48
49
50
51
52
53
|
req.path_parameters = tmp_params
status, headers, body = route.app.serve(req)
if "pass" == headers["X-Cascade"]
req.script_name = script_name
|
Extracted source (around line #32):
30
31
32
33
34
35
|
def serve(req)
find_routes(req).each do |match, parameters, route|
set_params = req.path_parameters
path_info = req.path_info
script_name = req.script_name
|
Extracted source (around line #32):
30
31
32
33
34
35
|
def serve(req)
find_routes(req).each do |match, parameters, route|
set_params = req.path_parameters
path_info = req.path_info
script_name = req.script_name
|
Extracted source (around line #842):
840
841
842
843
844
845
|
req = make_request(env)
req.path_info = Journey::Router::Utils.normalize_path(req.path_info)
@router.serve(req)
end
def recognize_path(path, environment = {})
|
Extracted source (around line #10):
8
9
10
11
12
13
|
module Instrumentation
def call(env)
ActiveSupport::Notifications.instrument("route_set.action_dispatch") { super }
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #10):
8
9
10
11
12
13
|
module Instrumentation
def call(env)
ActiveSupport::Notifications.instrument("route_set.action_dispatch") { super }
end
end
|
Extracted source (around line #420):
418
419
420
421
422
423
|
def call_app!(env = @env)
@app.call(env)
end
def full_host
|
Extracted source (around line #155):
153
154
155
156
157
158
|
return redirect(end_session_uri) if end_session_uri
end
call_app!
end
def authorization_code
|
Extracted source (around line #190):
188
189
190
191
192
193
|
return request_call if on_request_path? && OmniAuth.config.allowed_request_methods.include?(request.request_method.downcase.to_sym)
return callback_call if on_callback_path?
return other_phase if respond_to?(:other_phase)
@app.call(env)
end
|
Extracted source (around line #169):
167
168
169
170
171
172
|
# @param [Hash] The Rack environment.
def call(env)
dup.call!(env)
end
# The logic for dispatching any additional actions that need
|
Extracted source (around line #420):
418
419
420
421
422
423
|
def call_app!(env = @env)
@app.call(env)
end
def full_host
|
Extracted source (around line #155):
153
154
155
156
157
158
|
return redirect(end_session_uri) if end_session_uri
end
call_app!
end
def authorization_code
|
Extracted source (around line #190):
188
189
190
191
192
193
|
return request_call if on_request_path? && OmniAuth.config.allowed_request_methods.include?(request.request_method.downcase.to_sym)
return callback_call if on_callback_path?
return other_phase if respond_to?(:other_phase)
@app.call(env)
end
|
Extracted source (around line #169):
167
168
169
170
171
172
|
# @param [Hash] The Rack environment.
def call(env)
dup.call!(env)
end
# The logic for dispatching any additional actions that need
|
Extracted source (around line #420):
418
419
420
421
422
423
|
def call_app!(env = @env)
@app.call(env)
end
def full_host
|
Extracted source (around line #155):
153
154
155
156
157
158
|
return redirect(end_session_uri) if end_session_uri
end
call_app!
end
def authorization_code
|
Extracted source (around line #190):
188
189
190
191
192
193
|
return request_call if on_request_path? && OmniAuth.config.allowed_request_methods.include?(request.request_method.downcase.to_sym)
return callback_call if on_callback_path?
return other_phase if respond_to?(:other_phase)
@app.call(env)
end
|
Extracted source (around line #169):
167
168
169
170
171
172
|
# @param [Hash] The Rack environment.
def call(env)
dup.call!(env)
end
# The logic for dispatching any additional actions that need
|
Extracted source (around line #192):
190
191
192
193
194
195
|
return other_phase if respond_to?(:other_phase)
@app.call(env)
end
# Responds to an OPTIONS request.
|
Extracted source (around line #169):
167
168
169
170
171
172
|
# @param [Hash] The Rack environment.
def call(env)
dup.call!(env)
end
# The logic for dispatching any additional actions that need
|
Extracted source (around line #192):
190
191
192
193
194
195
|
return other_phase if respond_to?(:other_phase)
@app.call(env)
end
# Responds to an OPTIONS request.
|
Extracted source (around line #169):
167
168
169
170
171
172
|
# @param [Hash] The Rack environment.
def call(env)
dup.call!(env)
end
# The logic for dispatching any additional actions that need
|
Extracted source (around line #192):
190
191
192
193
194
195
|
return other_phase if respond_to?(:other_phase)
@app.call(env)
end
# Responds to an OPTIONS request.
|
Extracted source (around line #169):
167
168
169
170
171
172
|
# @param [Hash] The Rack environment.
def call(env)
dup.call!(env)
end
# The logic for dispatching any additional actions that need
|
Extracted source (around line #192):
190
191
192
193
194
195
|
return other_phase if respond_to?(:other_phase)
@app.call(env)
end
# Responds to an OPTIONS request.
|
Extracted source (around line #169):
167
168
169
170
171
172
|
# @param [Hash] The Rack environment.
def call(env)
dup.call!(env)
end
# The logic for dispatching any additional actions that need
|
Extracted source (around line #192):
190
191
192
193
194
195
|
return other_phase if respond_to?(:other_phase)
@app.call(env)
end
# Responds to an OPTIONS request.
|
Extracted source (around line #169):
167
168
169
170
171
172
|
# @param [Hash] The Rack environment.
def call(env)
dup.call!(env)
end
# The logic for dispatching any additional actions that need
|
Extracted source (around line #45):
43
44
45
46
47
48
|
def call(env)
to_app.call(env)
end
end
end
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #100):
98
99
100
101
102
103
|
vary_resource = resource_for_path(path)
status, headers, body = @app.call env
if add_headers
headers = add_headers.merge(headers)
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #107):
105
106
107
108
109
110
|
else
tracked?(req)
@app.call(env)
end
end
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #62):
60
61
62
63
64
65
|
def call(env)
Transformations.underscore_params(env) unless exclude_params?(env)
status, headers, response = @app.call(env)
return [status, headers, response] if exclude_response?(env, headers)
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #44):
42
43
44
45
46
47
|
def call(env)
status, headers, body = @app.call(env)
headers = Utils::HeaderHash[headers]
unless should_deflate?(env, status, headers, body)
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #15):
13
14
15
16
17
18
|
def call(env)
env[RACK_TEMPFILES] ||= []
status, headers, body = @app.call(env)
body_proxy = BodyProxy.new(body) do
env[RACK_TEMPFILES].each(&:close!) unless env[RACK_TEMPFILES].nil?
end
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #27):
25
26
27
28
29
30
|
def call(env)
status, headers, body = @app.call(env)
headers = Utils::HeaderHash[headers]
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #27):
25
26
27
28
29
30
|
case env[REQUEST_METHOD]
when "GET", "HEAD"
status, headers, body = @app.call(env)
headers = Utils::HeaderHash[headers]
if status == 200 && fresh?(env, headers)
status = 304
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #12):
10
11
12
13
14
15
|
def call(env)
status, headers, body = @app.call(env)
if env[REQUEST_METHOD] == HEAD
[
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #22):
20
21
22
23
24
25
|
def call(env)
request = ActionDispatch::Request.new(env)
_, headers, _ = response = @app.call(env)
return response unless html_response?(headers)
return response if policy_present?(headers)
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #19):
17
18
19
20
21
22
|
def call(env)
request = ActionDispatch::Request.new env
_, headers, _ = response = @app.call(env)
return response if policy_present?(headers)
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #266):
264
265
266
267
268
269
|
req = make_request env
prepare_session(req)
status, headers, body = app.call(req.env)
res = Rack::Response::Raw.new status, headers
commit_session(req, res)
[status, headers, body]
|
Extracted source (around line #260):
258
259
260
261
262
263
|
def call(env)
context(env)
end
def context(env, app = @app)
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #689):
687
688
689
690
691
692
|
request = ActionDispatch::Request.new env
status, headers, body = @app.call(env)
if request.have_cookie_jar?
cookie_jar = request.cookie_jar
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #27):
25
26
27
28
29
30
|
error = nil
result = run_callbacks :call do
@app.call(env)
rescue => error
end
raise error if error
|
Extracted source (around line #98):
96
97
98
99
100
101
|
if callbacks.empty?
yield if block_given?
else
env = Filters::Environment.new(self, false, nil)
next_sequence = callbacks.compile
|
Extracted source (around line #26):
24
25
26
27
28
29
|
def call(env)
error = nil
result = run_callbacks :call do
@app.call(env)
rescue => error
end
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #18):
16
17
18
19
20
21
|
def call(env)
request = ActionDispatch::Request.new(env)
return @app.call(env) unless actionable_request?(request)
ActiveSupport::ActionableError.dispatch(request.params[:error].to_s.safe_constantize, request.params[:action])
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #51):
49
50
51
52
53
54
|
begin
response = @app.call(env)
rescue Exception => raised
# Notify bugsnag of rack exceptions
Bugsnag.notify(raised, true) do |report|
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #29):
27
28
29
30
31
32
|
def call(env)
request = ActionDispatch::Request.new env
_, headers, body = response = @app.call(env)
if headers["X-Cascade"] == "pass"
body.close if body.respond_to?(:close)
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #33):
31
32
33
34
35
36
|
def call(env)
request = ActionDispatch::Request.new env
@app.call(env)
rescue Exception => exception
if request.show_exceptions?
render_exception(request, exception)
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #15):
13
14
15
16
17
18
|
def call_app(*args)
env = args.last
@app.call(env)
ensure
ActiveSupport::LogSubscriber.flush_all!
end
|
Extracted source (around line #28):
26
27
28
29
30
31
|
logger.tagged(compute_tags(request)) { call_app(request, env) }
else
call_app(request, env)
end
end
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #81):
79
80
81
82
83
84
|
req = ActionDispatch::Request.new env
req.remote_ip = GetIp.new(req, check_ip, proxies)
@app.call(req.env)
end
# The GetIp class exists as a way to defer processing of the request data
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #19):
17
18
19
20
21
22
|
RequestStore.begin!
status, headers, body = @app.call(env)
body = Rack::BodyProxy.new(body) do
RequestStore.end!
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #151):
149
150
151
152
153
154
|
response = timeout.timeout(info.timeout) do # perform request with timeout
begin @app.call(env) # boom, send request down the middleware chain
rescue RequestTimeoutException => e # will actually hardly ever get to this point because frameworks tend to catch this. see README for more
raise RequestTimeoutError.new(env), e.message, e.backtrace # but in case it does get here, re-raise RequestTimeoutException as RequestTimeoutError
ensure
|
Extracted source (around line #19):
17
18
19
20
21
22
|
thr = Thread.current # reference to current thread to be used in timeout thread
job = @scheduler.run_in(secs) { @on_timeout.call thr } # schedule this thread to be timed out; should get cancelled if block completes on time
return block.call # do what you gotta do
ensure #
job.cancel! if job # cancel the scheduled timeout job; if the block completed on time, this
end # will get called before the timeout code's had a chance to run.
|
Extracted source (around line #150):
148
149
150
151
152
153
|
end
response = timeout.timeout(info.timeout) do # perform request with timeout
begin @app.call(env) # boom, send request down the middleware chain
rescue RequestTimeoutException => e # will actually hardly ever get to this point because frameworks tend to catch this. see README for more
raise RequestTimeoutError.new(env), e.message, e.backtrace # but in case it does get here, re-raise RequestTimeoutException as RequestTimeoutError
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #26):
24
25
26
27
28
29
|
req = ActionDispatch::Request.new env
req.request_id = make_request_id(req.headers[@header])
@app.call(env).tap { |_status, headers, _body| headers[@header] = req.request_id }
end
private
|
Extracted source (around line #8):
6
7
8
9
10
11
|
def call(env)
@skylight_request_id = env["skylight.request_id"]
super
end
private
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
end
@app.call(env)
end
def method_override(env)
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #22):
20
21
22
23
24
25
|
def call(env)
start_time = Utils.clock_time
status, headers, body = @app.call(env)
headers = Utils::HeaderHash[headers]
request_time = Utils.clock_time - start_time
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #29):
27
28
29
30
31
32
|
def call(env)
LocalCacheRegistry.set_cache_for(local_cache_key, LocalStore.new)
response = @app.call(env)
response[2] = ::Rack::BodyProxy.new(response[2]) do
LocalCacheRegistry.set_cache_for(local_cache_key, nil)
end
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
return rack_response unless rack_response === true
end
@app.call(env)
end
private
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #14):
12
13
14
15
16
17
|
state = @executor.run!(reset: true)
begin
response = @app.call(env)
returned = response << ::Rack::BodyProxy.new(response.pop) { state.complete! }
ensure
state.complete! unless returned
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #110):
108
109
110
111
112
113
|
def call(env)
status, headers, body = @app.call(env)
if body.respond_to?(:to_path)
case type = variation(env)
when 'X-Accel-Redirect'
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #77):
75
76
77
78
79
80
|
if request.ssl?
@app.call(env).tap do |status, headers, body|
set_hsts_header! headers
flag_cookies_as_secure! headers if @secure_cookies && !@exclude.call(request)
end
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #142):
140
141
142
143
144
145
|
def call(env)
return @app.call(env) if @permissions.empty?
request = Request.new(env)
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #21):
19
20
21
22
23
24
|
def call(env)
@app.call(sanitize_env(env))
end
private
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #96):
94
95
96
97
98
99
|
t { "middleware began trace=#{trace ? trace.uuid : nil}" }
resp = @app.call(env)
trace ? Middleware.with_after_close(resp, debug_identifier: "Rack App: #{@app.class}") { trace.submit } : resp
rescue Exception => e
|
Extracted source (around line #61):
59
60
61
62
63
64
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
end
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #24):
22
23
24
25
26
27
|
listeners_state = start name, payload
begin
yield payload if block_given?
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
payload[:exception_object] = e
|
Extracted source (around line #203):
201
202
203
204
205
206
|
def instrument(name, payload = {})
if notifier.listening?(name)
instrumenter.instrument(name, payload) { yield payload if block_given? }
else
yield payload if block_given?
end
|
Extracted source (around line #60):
58
59
60
61
62
63
|
def call(env)
ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
@middleware.call(env)
end
end
|
Extracted source (around line #539):
537
538
539
540
541
542
|
def call(env)
req = build_request env
app.call req.env
end
# Defines additional Rack env configuration that is added on each call.
|
Extracted source (around line #207):
205
206
207
208
209
210
|
def method_missing(name, *args, &block)
if instance.respond_to?(name)
instance.public_send(name, *args, &block)
else
super
end
|
Extracted source (around line #207):
205
206
207
208
209
210
|
def method_missing(name, *args, &block)
if instance.respond_to?(name)
instance.public_send(name, *args, &block)
else
super
end
|
Extracted source (around line #634):
632
633
634
635
636
637
|
env["rack.after_reply"] = []
status, headers, body = @app.call(env)
begin
return if @request.hijacked?
|
Extracted source (around line #52):
50
51
52
53
54
55
|
def process_client(client)
super(client) # Unicorn::HttpServer#process_client
return if @_worker_memory_limit_min == 0 && @_worker_memory_limit_max == 0
@_worker_process_start ||= Time.now
|
Extracted source (around line #92):
90
91
92
93
94
95
|
def process_client(client)
super(client) # Unicorn::HttpServer#process_client
return if @_worker_max_requests_min == 0 && @_worker_max_requests_max == 0
@_worker_process_start ||= Time.now
|
Extracted source (around line #732):
730
731
732
733
734
735
|
# but that will return false
if client = sock.kgio_tryaccept
process_client(client)
nr += 1
worker.tick = time_now.to_i
end
|
Extracted source (around line #548):
546
547
548
549
550
551
|
unless pid
after_fork_internal
worker_loop(worker)
exit
end
|
Extracted source (around line #144):
142
143
144
145
146
147
|
bind_new_listeners!
spawn_missing_workers
self
end
|
Extracted source (around line #128):
126
127
128
|
Unicorn::Launcher.daemonize!(options) if rackup_opts[:daemonize]
Unicorn::HttpServer.new(app, options).start.join
|
Extracted source (around line #17):
15
16
17
|
require "bundler/setup"
load Gem.bin_path("unicorn", "unicorn")
|
Extracted source (around line #17):
15
16
17
|
require "bundler/setup"
load Gem.bin_path("unicorn", "unicorn")
|
Extracted source (around line #58):
56
57
58
59
60
61
|
require_relative "../setup"
TRAPPED_SIGNALS.each {|s| trap(s, "DEFAULT") }
Kernel.load(file)
rescue SystemExit, SignalException
raise
rescue Exception # rubocop:disable Lint/RescueException
|
Extracted source (around line #58):
56
57
58
59
60
61
|
require_relative "../setup"
TRAPPED_SIGNALS.each {|s| trap(s, "DEFAULT") }
Kernel.load(file)
rescue SystemExit, SignalException
raise
rescue Exception # rubocop:disable Lint/RescueException
|
Extracted source (around line #23):
21
22
23
24
25
26
|
if bin_path = Bundler.which(cmd)
if !Bundler.settings[:disable_exec_load] && ruby_shebang?(bin_path)
return kernel_load(bin_path, *args)
end
kernel_exec(bin_path, *args)
else
|
Extracted source (around line #491):
489
490
491
492
493
494
|
require_relative "cli/exec"
Exec.new(options, args).run
end
map aliases_for("exec")
|
Extracted source (around line #27):
25
26
27
28
29
30
|
elsif public_method?(instance)
arity = instance.method(name).arity
instance.__send__(name, *args)
elsif local_method?(instance, :method_missing)
instance.__send__(:method_missing, name.to_sym, *args)
else
|
Extracted source (around line #127):
125
126
127
128
129
130
|
unless current.include?(command.name)
current << command.name
command.run(self, *args)
end
end
alias_method :invoke_task, :invoke_command
|
Extracted source (around line #392):
390
391
392
393
394
395
|
args = instance.args
trailing = args[Range.new(arguments.size, -1)]
instance.invoke_command(command, trailing || [])
end
# The banner for this class. You can customize it if you are invoking the
|
Extracted source (around line #34):
32
33
34
35
36
37
|
def self.dispatch(*)
super do |i|
i.send(:print_command)
i.send(:warn_on_outdated_bundler)
end
|
Extracted source (around line #485):
483
484
485
486
487
488
|
def start(given_args = ARGV, config = {})
config[:shell] ||= Bundler::Thor::Base.shell.new
dispatch(nil, given_args.dup, nil, config)
rescue Bundler::Thor::Error => e
config[:debug] || ENV["THOR_DEBUG"] == "1" ? (raise e) : config[:shell].error(e.message)
exit(false) if exit_on_failure?
|
Extracted source (around line #28):
26
27
28
29
30
31
|
check_deprecated_ext_option(ARGV) if ARGV.include?("--ext")
super
ensure
Bundler::SharedHelpers.print_major_deprecations!
end
|
Extracted source (around line #45):
43
44
45
46
|
args = help_flag_used ? Bundler::CLI.reformatted_help_args(ARGV) : ARGV
Bundler::CLI.start(args, :debug => true)
end
|
Extracted source (around line #117):
115
116
117
118
119
120
|
def self.with_friendly_errors
FriendlyErrors.enable!
yield
rescue SignalException
raise
rescue Exception => e # rubocop:disable Lint/RescueException
|
Extracted source (around line #33):
31
32
33
34
35
36
|
end
Bundler.with_friendly_errors do
if File.exist?(base_path)
require_relative "../lib/bundler/cli"
else
|
Extracted source (around line #23):
21
22
23
24
25
26
|
if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('bundler', 'bundle', version)
else
gem "bundler", version
load Gem.bin_path("bundler", "bundle", version)
|
Extracted source (around line #23):
21
22
23
24
25
26
|
if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('bundler', 'bundle', version)
else
gem "bundler", version
load Gem.bin_path("bundler", "bundle", version)
|
Rails.root: /app/release/20240328215603
Request
Parameters:
{"page"=>"5"}
_csrf_token: "Wz3GkTei9OpijApkoLmMp+VnsKeMoPSjcqLXHcRIYUo="
session_id: "9b9d3b686795781323fc2e22753e8b53"
HTTP_ACCEPT: "*/*"
HTTP_VERSION: "HTTP/1.1"
HTTP_X_FORWARDED_FOR: "54.173.214.79, 54.173.214.79"
ORIGINAL_SCRIPT_NAME: ""
REMOTE_ADDR: "127.0.0.1"
SERVER_NAME: "gre.preview.magoosh.com"
SERVER_PROTOCOL: "HTTP/1.1"
Response
Headers:
None