file.rb
stat
/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/lib/file.rb
in
stat
# ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
# ............................................................... File utilities
class File
class << self
def date(filename)
FormatDate.call(stat(filename).mtime)
end
def save_timestamp(filename)
system(%[touch -r "#{filename}" "#{filename}.touch"])
end
def restore_timestamp(filename)
/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/lib/file.rb
in
date
# ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
# ............................................................... File utilities
class File
class << self
def date(filename)
FormatDate.call(stat(filename).mtime)
end
def save_timestamp(filename)
system(%[touch -r "#{filename}" "#{filename}.touch"])
end
def restore_timestamp(filename)
/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/lib/wiki.rb
in
initialize
LOG.debug("Wiki => #{uri}")
@uri = uri.sub(/&.*/, '')
@title = File.title(@uri)
@secret = uri.sub(/.*&/, '').to_i == @title.to_i(36)
link_next = options.find_index(:link_next)
@show_comments = options.find_index(:show_comments)
if thread_exist?
@publishing = DayMonthYear.call(File.date(@filename))
@content = WikiContent.call(read_vimwiki(@filename))
else
@content = WikiContent.call(not_found)
end
@href = %[<a href="/#{@uri}">#{TOC.call([@title, @draft, @lock, @homepage])}</a>]
unless (HideArticle.call(@homepage) and not @secret)
unless @secret
/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/thedarnedestthing.rb
in
new
@wiki = Wiki.new("#{@uri}", :link_next, :show_comments)
else
@wiki = Wiki.new(@uri, :link_next)
end
@title = THREADS[@thread]
else
@title = THREADS[params[:splat][0]]
@wiki = Wiki.new("#{params[:splat][0]}/#{params[:name]}", :link_next)
end
@css = 'default'
@publishing = @wiki.publishing
@content = @wiki.content
slim :thedarnedestthing
end
/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/thedarnedestthing.rb
in
block in <class:TheDarnedestThing>
@wiki = Wiki.new("#{@uri}", :link_next, :show_comments)
else
@wiki = Wiki.new(@uri, :link_next)
end
@title = THREADS[@thread]
else
@title = THREADS[params[:splat][0]]
@wiki = Wiki.new("#{params[:splat][0]}/#{params[:name]}", :link_next)
end
@css = 'default'
@publishing = @wiki.publishing
@content = @wiki.content
slim :thedarnedestthing
end
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
call
pattern = compile(path, route_mustermann_opts)
method_name = "#{verb} #{path}"
unbound_method = generate_method(method_name, &block)
conditions = @conditions
@conditions = []
wrapper = block.arity.zero? ?
proc { |a, _p| unbound_method.bind(a).call } :
proc { |a, p| unbound_method.bind(a).call(*p) }
[pattern, conditions, wrapper]
end
def compile(path, route_mustermann_opts = {})
Mustermann.new(path, **mustermann_opts.merge(route_mustermann_opts))
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
block in compile!
pattern = compile(path, route_mustermann_opts)
method_name = "#{verb} #{path}"
unbound_method = generate_method(method_name, &block)
conditions = @conditions
@conditions = []
wrapper = block.arity.zero? ?
proc { |a, _p| unbound_method.bind(a).call } :
proc { |a, p| unbound_method.bind(a).call(*p) }
[pattern, conditions, wrapper]
end
def compile(path, route_mustermann_opts = {})
Mustermann.new(path, **mustermann_opts.merge(route_mustermann_opts))
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
block (3 levels) in route!
routes = base.routes[@request.request_method]
routes&.each do |pattern, conditions, block|
response.delete_header('Content-Type') unless @pinned_response
returned_pass_block = process_route(pattern, conditions) do |*args|
env['sinatra.route'] = "#{@request.request_method} #{pattern}"
route_eval { block[*args] }
end
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
end
# Run routes defined in superclass.
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
route_eval
route_eval(&pass_block) if pass_block
route_missing
end
# Run a route block and throw :halt with the result.
def route_eval
throw :halt, yield
end
# If the current request matches pattern and conditions, fill params
# with keys and call the given block.
# Revert params afterwards.
#
# Returns pass block.
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
block (2 levels) in route!
routes = base.routes[@request.request_method]
routes&.each do |pattern, conditions, block|
response.delete_header('Content-Type') unless @pinned_response
returned_pass_block = process_route(pattern, conditions) do |*args|
env['sinatra.route'] = "#{@request.request_method} #{pattern}"
route_eval { block[*args] }
end
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
end
# Run routes defined in superclass.
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
block in process_route
@params[:captures] = force_encoding(captures) unless captures.nil? || captures.empty?
else
values += params.values.flatten
end
catch(:pass) do
conditions.each { |c| throw :pass if c.bind(self).call == false }
block ? block[self, values] : yield(self, values)
end
rescue StandardError
@env['sinatra.error.params'] = @params
raise
ensure
params ||= {}
params.each { |k, _| @params.delete(k) } unless @env['sinatra.error.params']
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
catch
captures = pattern.match(route).captures.map { |c| URI_INSTANCE.unescape(c) if c }
values += captures
@params[:captures] = force_encoding(captures) unless captures.nil? || captures.empty?
else
values += params.values.flatten
end
catch(:pass) do
conditions.each { |c| throw :pass if c.bind(self).call == false }
block ? block[self, values] : yield(self, values)
end
rescue StandardError
@env['sinatra.error.params'] = @params
raise
ensure
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
process_route
captures = pattern.match(route).captures.map { |c| URI_INSTANCE.unescape(c) if c }
values += captures
@params[:captures] = force_encoding(captures) unless captures.nil? || captures.empty?
else
values += params.values.flatten
end
catch(:pass) do
conditions.each { |c| throw :pass if c.bind(self).call == false }
block ? block[self, values] : yield(self, values)
end
rescue StandardError
@env['sinatra.error.params'] = @params
raise
ensure
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
block in route!
# Run routes defined on the class and all superclasses.
def route!(base = settings, pass_block = nil)
routes = base.routes[@request.request_method]
routes&.each do |pattern, conditions, block|
response.delete_header('Content-Type') unless @pinned_response
returned_pass_block = process_route(pattern, conditions) do |*args|
env['sinatra.route'] = "#{@request.request_method} #{pattern}"
route_eval { block[*args] }
end
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
end
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
each
end
end
# Run routes defined on the class and all superclasses.
def route!(base = settings, pass_block = nil)
routes = base.routes[@request.request_method]
routes&.each do |pattern, conditions, block|
response.delete_header('Content-Type') unless @pinned_response
returned_pass_block = process_route(pattern, conditions) do |*args|
env['sinatra.route'] = "#{@request.request_method} #{pattern}"
route_eval { block[*args] }
end
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
route!
end
end
# Run routes defined on the class and all superclasses.
def route!(base = settings, pass_block = nil)
routes = base.routes[@request.request_method]
routes&.each do |pattern, conditions, block|
response.delete_header('Content-Type') unless @pinned_response
returned_pass_block = process_route(pattern, conditions) do |*args|
env['sinatra.route'] = "#{@request.request_method} #{pattern}"
route_eval { block[*args] }
end
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
block in dispatch!
end
invoke do
static! if settings.static? && (request.get? || request.head?)
filter! :before do
@pinned_response = !response['Content-Type'].nil?
end
route!
end
rescue ::Exception => e
invoke { handle_exception!(e) }
ensure
begin
filter! :after unless env['sinatra.static_file']
rescue ::Exception => e
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
catch
env['sinatra.static_file'] = path
cache_control(*settings.static_cache_control) if settings.static_cache_control?
send_file path, options.merge(disposition: nil)
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke(&block)
res = catch(:halt, &block)
res = [res] if (Integer === res) || (String === res)
if (Array === res) && (Integer === res.first)
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
invoke
env['sinatra.static_file'] = path
cache_control(*settings.static_cache_control) if settings.static_cache_control?
send_file path, options.merge(disposition: nil)
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke(&block)
res = catch(:halt, &block)
res = [res] if (Integer === res) || (String === res)
if (Array === res) && (Integer === res.first)
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
dispatch!
@params.merge!(@request.params).each do |key, val|
next unless val.respond_to?(:force_encoding)
val = val.dup if val.frozen?
@params[key] = force_encoding(val)
end
invoke do
static! if settings.static? && (request.get? || request.head?)
filter! :before do
@pinned_response = !response['Content-Type'].nil?
end
route!
end
rescue ::Exception => e
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
block in call!
@env = env
@params = IndifferentHash.new
@request = Request.new(env)
@response = Response.new
@pinned_response = nil
template_cache.clear if settings.reload_templates
invoke { dispatch! }
invoke { error_block!(response.status) } unless @env['sinatra.error']
unless @response['Content-Type']
if Array === body && body[0].respond_to?(:content_type)
content_type body[0].content_type
elsif (default = settings.default_content_type)
content_type default
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
catch
env['sinatra.static_file'] = path
cache_control(*settings.static_cache_control) if settings.static_cache_control?
send_file path, options.merge(disposition: nil)
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke(&block)
res = catch(:halt, &block)
res = [res] if (Integer === res) || (String === res)
if (Array === res) && (Integer === res.first)
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
invoke
env['sinatra.static_file'] = path
cache_control(*settings.static_cache_control) if settings.static_cache_control?
send_file path, options.merge(disposition: nil)
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke(&block)
res = catch(:halt, &block)
res = [res] if (Integer === res) || (String === res)
if (Array === res) && (Integer === res.first)
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
call!
@env = env
@params = IndifferentHash.new
@request = Request.new(env)
@response = Response.new
@pinned_response = nil
template_cache.clear if settings.reload_templates
invoke { dispatch! }
invoke { error_block!(response.status) } unless @env['sinatra.error']
unless @response['Content-Type']
if Array === body && body[0].respond_to?(:content_type)
content_type body[0].content_type
elsif (default = settings.default_content_type)
content_type default
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
call
@template_cache = Tilt::Cache.new
@pinned_response = nil # whether a before! filter pinned the content-type
yield self if block_given?
end
# Rack call interface.
def call(env)
dup.call!(env)
end
def call!(env) # :nodoc:
@env = env
@params = IndifferentHash.new
@request = Request.new(env)
@response = Response.new
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/rack-protection-3.0.5/lib/rack/protection/xss_header.rb
in
call
#
# Options:
# xss_mode:: How the browser should prevent the attack (default: :block)
class XSSHeader < Base
default_options xss_mode: :block, nosniff: true
def call(env)
status, headers, body = @app.call(env)
headers['X-XSS-Protection'] ||= "1; mode=#{options[:xss_mode]}" if html? headers
headers['X-Content-Type-Options'] ||= 'nosniff' if options[:nosniff]
[status, headers, body]
end
end
end
end
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/rack-protection-3.0.5/lib/rack/protection/path_traversal.rb
in
call
#
# Unescapes '/' and '.', expands +path_info+.
# Thus <tt>GET /foo/%2e%2e%2fbar</tt> becomes <tt>GET /bar</tt>.
class PathTraversal < Base
def call(env)
path_was = env['PATH_INFO']
env['PATH_INFO'] = cleanup path_was if path_was && !path_was.empty?
app.call env
ensure
env['PATH_INFO'] = path_was
end
def cleanup(path)
encoding = path.encoding
dot = '.'.encode(encoding)
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/rack-protection-3.0.5/lib/rack/protection/json_csrf.rb
in
call
class JsonCsrf < Base
default_options allow_if: nil
alias react deny
def call(env)
request = Request.new(env)
status, headers, body = app.call(env)
if has_vector?(request, headers)
warn env, "attack prevented by #{self.class}"
react_and_close(env, body) or [status, headers, body]
else
[status, headers, body]
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/rack-protection-3.0.5/lib/rack/protection/base.rb
in
call
end
def call(env)
unless accepts? env
instrument env
result = react env
end
result or app.call(env)
end
def react(env)
result = send(options[:reaction], env)
result if (Array === result) && (result.size == 3)
end
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/rack-protection-3.0.5/lib/rack/protection/base.rb
in
call
end
def call(env)
unless accepts? env
instrument env
result = react env
end
result or app.call(env)
end
def react(env)
result = send(options[:reaction], env)
result if (Array === result) && (result.size == 3)
end
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/rack-protection-3.0.5/lib/rack/protection/frame_options.rb
in
call
frame_options = options[:frame_options]
frame_options = options[:frame_options].to_s.upcase unless frame_options.respond_to? :to_str
frame_options.to_str
end
end
def call(env)
status, headers, body = @app.call(env)
headers['X-Frame-Options'] ||= frame_options if html? headers
[status, headers, body]
end
end
end
end
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/rack-2.2.6.2/lib/rack/null_logger.rb
in
call
class NullLogger
def initialize(app)
@app = app
end
def call(env)
env[RACK_LOGGER] = self
@app.call(env)
end
def info(progname = nil, &block); end
def debug(progname = nil, &block); end
def warn(progname = nil, &block); end
def error(progname = nil, &block); end
def fatal(progname = nil, &block); end
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/rack-2.2.6.2/lib/rack/head.rb
in
call
# all other requests unchanged.
class Head
def initialize(app)
@app = app
end
def call(env)
status, headers, body = @app.call(env)
if env[REQUEST_METHOD] == HEAD
[
status, headers, Rack::BodyProxy.new([]) do
body.close if body.respond_to? :close
end
]
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/show_exceptions.rb
in
call
def @@eats_errors.puts(*) end
def initialize(app)
@app = app
end
def call(env)
@app.call(env)
rescue Exception => e
errors = env['rack.errors']
env['rack.errors'] = @@eats_errors
if prefers_plain_text?(env)
content_type = 'text/plain'
body = dump_exception(e)
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
call
# Some Rack handlers (Rainbows!) implement an extended body object protocol, however,
# some middleware (namely Rack::Lint) will break it by not mirroring the methods in question.
# This middleware will detect an extended body object and will make sure it reaches the
# handler directly. We do this here, so our middleware and middleware set up by the app will
# still be able to run.
class ExtendedRack < Struct.new(:app)
def call(env)
result = app.call(env)
callback = env['async.callback']
return result unless callback && async?(*result)
after_response { callback.call result }
setup_close(env, *result)
throw :async
end
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
call
end
def helpers
@instance
end
def call(env)
@stack.call(env)
end
def inspect
"#<#{@instance.class} app_file=#{settings.app_file.inspect}>"
end
end
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
block in call
setup_default_middleware builder
setup_middleware builder
builder.run app
builder
end
def call(env)
synchronize { prototype.call(env) }
end
# Like Kernel#caller but excluding certain magic entries and without
# line / method information; the resulting array contains filenames only.
def caller_files
cleaned_caller(1).flatten
end
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
synchronize
end
@@mutex = Mutex.new
def synchronize(&block)
if lock?
@@mutex.synchronize(&block)
else
yield
end
end
# used for deprecation warnings
def warn_for_deprecation(message)
warn message + "\n\tfrom #{cleaned_caller.first.join(':')}"
end
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/sinatra-3.0.5/lib/sinatra/base.rb
in
call
setup_default_middleware builder
setup_middleware builder
builder.run app
builder
end
def call(env)
synchronize { prototype.call(env) }
end
# Like Kernel#caller but excluding certain magic entries and without
# line / method information; the resulting array contains filenames only.
def caller_files
cleaned_caller(1).flatten
end
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/puma-6.0.2/lib/puma/configuration.rb
in
call
def initialize(config, app)
@config = config
@app = app
end
def call(env)
env[Const::PUMA_CONFIG] = @config
@app.call(env)
end
end
# Indicate if there is a properly configured app
#
def app_configured?
@options[:app] || File.exist?(rackup)
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/puma-6.0.2/lib/puma/request.rb
in
block in handle_request
# array, we will invoke them when the request is done.
#
env[RACK_AFTER_REPLY] ||= []
begin
if SUPPORTED_HTTP_METHODS.include?(env[REQUEST_METHOD])
status, headers, app_body = @thread_pool.with_force_shutdown do
@app.call(env)
end
else
@log_writer.log "Unsupported HTTP method used: #{env[REQUEST_METHOD]}"
status, headers, app_body = [501, {}, ["#{env[REQUEST_METHOD]} method is not supported"]]
end
# app_body needs to always be closed, hold value in case lowlevel_error
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/puma-6.0.2/lib/puma/thread_pool.rb
in
with_force_shutdown
# provided block if the thread is forced to shutdown during execution.
def with_force_shutdown
t = Thread.current
@shutdown_mutex.synchronize do
raise ForceShutdown if @force_shutdown
t[:with_force_shutdown] = true
end
yield
ensure
t[:with_force_shutdown] = false
end
# Tell all threads in the pool to exit and wait for them to finish.
# Wait +timeout+ seconds then raise +ForceShutdown+ in remaining threads.
# Next, wait an extra +grace+ seconds then force-kill remaining threads.
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/puma-6.0.2/lib/puma/request.rb
in
handle_request
# A rack extension. If the app writes #call'ables to this
# array, we will invoke them when the request is done.
#
env[RACK_AFTER_REPLY] ||= []
begin
if SUPPORTED_HTTP_METHODS.include?(env[REQUEST_METHOD])
status, headers, app_body = @thread_pool.with_force_shutdown do
@app.call(env)
end
else
@log_writer.log "Unsupported HTTP method used: #{env[REQUEST_METHOD]}"
status, headers, app_body = [501, {}, ["#{env[REQUEST_METHOD]} method is not supported"]]
end
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/puma-6.0.2/lib/puma/server.rb
in
process_client
with_force_shutdown(client) do
client.finish(@first_data_timeout)
end
while true
@requests_count += 1
case handle_request(client, requests + 1)
when false
break
when :async
close_socket = false
break
when true
ThreadPool.clean_thread_locals if clean_thread_locals
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/puma-6.0.2/lib/puma/server.rb
in
block in run
def run(background=true, thread_name: 'srv')
BasicSocket.do_not_reverse_lookup = true
@events.fire :state, :booting
@status = :run
@thread_pool = ThreadPool.new(thread_name, @options) { |client| process_client client }
if @queue_requests
@reactor = Reactor.new(@io_selector_backend) { |c| reactor_wakeup c }
@reactor.run
end
/home/shum/.frum/versions/2.7.7/lib/ruby/gems/2.7.0/gems/puma-6.0.2/lib/puma/thread_pool.rb
in
block in spawn_thread
end
if @clean_thread_locals
ThreadPool.clean_thread_locals
end
begin
@out_of_band_pending = true if block.call(work)
rescue Exception => e
STDERR.puts "Error reached top of thread-pool: #{e.message} (#{e.class})"
end
end
end
@workers << th
No GET data.
No POST data.
Variable | Value |
---|---|
GATEWAY_INTERFACE | CGI/1.2 |
HTTP_ACCEPT | */* |
HTTP_ACCEPT_ENCODING | gzip |
HTTP_HOST | thedarnedestthing.com |
HTTP_USER_AGENT | claudebot |
HTTP_VERSION | HTTP/1.1 |
HTTP_X_FORWARDED_FOR | 44.221.83.121 |
HTTP_X_FORWARDED_HOST | thedarnedestthing.com |
HTTP_X_FORWARDED_PROTO | http |
PATH_INFO | /gallery/gallery/varanasi |
QUERY_STRING | |
REMOTE_ADDR | 127.0.0.1 |
REQUEST_METHOD | GET |
REQUEST_PATH | /gallery/gallery/varanasi |
REQUEST_URI | /gallery/gallery/varanasi |
SCRIPT_NAME | |
SERVER_NAME | thedarnedestthing.com |
SERVER_PORT | 80 |
SERVER_PROTOCOL | HTTP/1.1 |
SERVER_SOFTWARE | puma 6.0.2 Sunflower |
puma.config | #<Puma::Configuration:0x00007f0ef0961b48 @options=#<Puma::UserFileDefaultOptions:0x00007f0ef0961990 @user_options={:state=>"/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/tmp/pids/puma.state", :pidfile=>"/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/tmp/pids/puma.pid", :control_url=>"unix:///tmp/puma-status-1709219521711-16246", :control_auth_token=>"1ee385aeaf358894bbcbc61b7ad0002d", :log_writer=>#<Puma::LogWriter:0x00007f0ef0961ff8 @formatter=#<Puma::LogWriter::PidFormatter:0x00007f0ef0c9de38>, @stdout=#<IO:/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stdout.log>, @stderr=#<IO:/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stderr.log>, @debug=false, @error_logger=#<Puma::ErrorLogger:0x00007f0ef0961f80 @ioerr=#<IO:/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stderr.log>, @debug=false>>, :environment=>"development", :logger=>#<Puma::LogWriter:0x00007f0ef0961ff8 @formatter=#<Puma::LogWriter::PidFormatter:0x00007f0ef0c9de38>, @stdout=#<IO:/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stdout.log>, @stderr=#<IO:/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stderr.log>, @debug=false, @error_logger=#<Puma::ErrorLogger:0x00007f0ef0961f80 @ioerr=#<IO:/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stderr.log>, @debug=false>>}, @file_options={:config_files=>["puma.rb"], :workers=>2, :min_threads=>1, :max_threads=>6, :binds=>["unix:///home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/tmp/puma.sock"], :pidfile=>"/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/tmp/pids/puma.pid", :rackup=>"/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/config.ru", :state=>"/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/tmp/pids/puma.state", :redirect_stdout=>"/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stdout.log", :redirect_stderr=>"/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stderr.log", :redirect_append=>true, :control_url=>"unix:///tmp/puma-status-1709219521771-16246", :control_url_temp=>"/tmp/puma-status-1709219521771-16246", :control_auth_token=>"96faeb7732480e9f2d65ebc0e97cf74c"}, @default_options={:auto_trim_time=>30, :binds=>["tcp://0.0.0.0:9292"], :clean_thread_locals=>false, :debug=>false, :early_hints=>nil, :environment=>"development", :first_data_timeout=>30, :io_selector_backend=>:auto, :log_requests=>false, :logger=>#<IO:/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stdout.log>, :max_fast_inline=>10, :max_threads=>5, :min_threads=>0, :mode=>:http, :mutate_stdout_and_stderr_to_sync_on_write=>true, :out_of_band=>[], :persistent_timeout=>20, :queue_requests=>true, :rackup=>"config.ru", :raise_exception_on_sigterm=>true, :reaping_time=>1, :remote_address=>:socket, :silence_single_worker_warning=>false, :tag=>"application", :tcp_host=>"0.0.0.0", :tcp_port=>9292, :wait_for_less_busy_worker=>0.005, :worker_boot_timeout=>60, :worker_check_interval=>5, :worker_culling_strategy=>:youngest, :worker_shutdown_timeout=>30, :worker_timeout=>60, :workers=>0, :preload_app=>false}>, @plugins=#<Puma::PluginLoader:0x00007f0ef09618c8 @instances=[]>, @user_dsl=#<Puma::DSL:0x00007f0ef0961828 @config=#<Puma::Configuration:0x00007f0ef0961b48 ...>, @options={:state=>"/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/tmp/pids/puma.state", :pidfile=>"/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/tmp/pids/puma.pid", :control_url=>"unix:///tmp/puma-status-1709219521711-16246", :control_auth_token=>"1ee385aeaf358894bbcbc61b7ad0002d", :log_writer=>#<Puma::LogWriter:0x00007f0ef0961ff8 @formatter=#<Puma::LogWriter::PidFormatter:0x00007f0ef0c9de38>, @stdout=#<IO:/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stdout.log>, @stderr=#<IO:/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stderr.log>, @debug=false, @error_logger=#<Puma::ErrorLogger:0x00007f0ef0961f80 @ioerr=#<IO:/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stderr.log>, @debug=false>>, :environment=>"development", :logger=>#<Puma::LogWriter:0x00007f0ef0961ff8 @formatter=#<Puma::LogWriter::PidFormatter:0x00007f0ef0c9de38>, @stdout=#<IO:/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stdout.log>, @stderr=#<IO:/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stderr.log>, @debug=false, @error_logger=#<Puma::ErrorLogger:0x00007f0ef0961f80 @ioerr=#<IO:/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stderr.log>, @debug=false>>}, @plugins=[]>, @file_dsl=#<Puma::DSL:0x00007f0ef09617d8 @config=#<Puma::Configuration:0x00007f0ef0961b48 ...>, @options={:config_files=>["puma.rb"], :workers=>2, :min_threads=>1, :max_threads=>6, :binds=>["unix:///home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/tmp/puma.sock"], :pidfile=>"/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/tmp/pids/puma.pid", :rackup=>"/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/config.ru", :state=>"/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/tmp/pids/puma.state", :redirect_stdout=>"/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stdout.log", :redirect_stderr=>"/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stderr.log", :redirect_append=>true, :control_url=>"unix:///tmp/puma-status-1709219521771-16246", :control_url_temp=>"/tmp/puma-status-1709219521771-16246", :control_auth_token=>"96faeb7732480e9f2d65ebc0e97cf74c"}, @plugins=[], @path="puma.rb">, @default_dsl=#<Puma::DSL:0x00007f0ef0961788 @config=#<Puma::Configuration:0x00007f0ef0961b48 ...>, @options={:auto_trim_time=>30, :binds=>["tcp://0.0.0.0:9292"], :clean_thread_locals=>false, :debug=>false, :early_hints=>nil, :environment=>"development", :first_data_timeout=>30, :io_selector_backend=>:auto, :log_requests=>false, :logger=>#<IO:/home/shum/stow/thedarnedestthing/thedarnedestthing.com/application/log/puma.stdout.log>, :max_fast_inline=>10, :max_threads=>5, :min_threads=>0, :mode=>:http, :mutate_stdout_and_stderr_to_sync_on_write=>true, :out_of_band=>[], :persistent_timeout=>20, :queue_requests=>true, :rackup=>"config.ru", :raise_exception_on_sigterm=>true, :reaping_time=>1, :remote_address=>:socket, :silence_single_worker_warning=>false, :tag=>"application", :tcp_host=>"0.0.0.0", :tcp_port=>9292, :wait_for_less_busy_worker=>0.005, :worker_boot_timeout=>60, :worker_check_interval=>5, :worker_culling_strategy=>:youngest, :worker_shutdown_timeout=>30, :worker_timeout=>60, :workers=>0, :preload_app=>false}, @plugins=[]>> |
puma.request_body_wait | 0.007725715637207031 |
puma.socket | #<UNIXSocket:fd 9> |
rack.after_reply | [] |
rack.errors | #<Object:0x00007f0ef08a16e0> |
rack.hijack | #<Puma::Client:0xa89a8 @ready=true> |
rack.hijack? | true |
rack.input | #<Puma::NullIO:0x00007f0ef084bfb0> |
rack.logger | #<Rack::NullLogger:0x00007f0eedb4b808 @app=#<Rack::Protection::FrameOptions:0x00007f0eedb4b8a8 @app=#<Rack::Protection::HttpOrigin:0x00007f0eedb4b948 @app=#<Rack::Protection::IPSpoofing:0x00007f0eedb4b9c0 @app=#<Rack::Protection::JsonCsrf:0x00007f0eedb4ba60 @app=#<Rack::Protection::PathTraversal:0x00007f0eedb4bad8 @app=#<Rack::Protection::XSSHeader:0x00007f0eedb4bb78 @app=#<TheDarnedestThing:0x00007f0eebc0de28 @default_layout=:layout, @preferred_extension=nil, @app=nil, @template_cache=#<Tilt::Cache:0x00007f0eebc0e490 @cache={}>, @pinned_response=nil>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :xss_mode=>:block, :nosniff=>true, :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :allow_if=>nil, :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :allow_if=>nil, :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :frame_options=>:sameorigin, :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}, @frame_options="SAMEORIGIN">> |
rack.multiprocess | true |
rack.multithread | true |
rack.request.cookie_hash | {} |
rack.request.query_hash | {} |
rack.request.query_string | |
rack.run_once | false |
rack.url_scheme | http |
rack.version | [1, 6] |
sinatra.accept | [#<Sinatra::Request::AcceptEntry:0x00007f0eedb2b620 @entry="*/*", @type="*/*", @params={}, @q=1.0>] |
sinatra.error | #<Errno::ENOENT: No such file or directory @ rb_file_s_stat - /srv/http/thedarnedestthing.com/application/public/vimwiki/gallery/gallery/diary/varanasi.wiki> |
sinatra.error.params | {"splat"=>["gallery/gallery"], "name"=>"varanasi"} |
sinatra.route | GET /*/:name |
You're seeing this error because you have
enabled the show_exceptions
setting.