Closed bitmaybewise closed 1 year ago
Hey @bitmaybewise, thanks for sending this in.
Could you give us the specific error you get with newer versions of Rack? I tested with 3.0 for #268, so it should be working. I'd prefer to make us compatible with Rack 3.0 than pin ourselves to an old version.
Hey @bitmaybewise, thanks for sending this in.
Could you give us the specific error you get with newer versions of Rack? I tested with 3.0 for #268, so it should be working. I'd prefer to make us compatible with Rack 3.0 than pin ourselves to an old version.
Yeah, that makes sense!
It's the same error though, from https://github.com/prometheus/client_ruby/pull/268. I did a rebase from main to make sure I have the latest commits.
The curl output:
Whole HTML file:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="NONE,NOARCHIVE" />
<title>Rack::Lint::LintError at /metrics</title>
<style type="text/css">
html * { padding:0; margin:0; }
body * { padding:10px 20px; }
body * * { padding:0; }
body { font:small sans-serif; }
body>div { border-bottom:1px solid #ddd; }
h1 { font-weight:normal; }
h2 { margin-bottom:.8em; }
h2 span { font-size:80%; color:#666; font-weight:normal; }
h3 { margin:1em 0 .5em 0; }
h4 { margin:0 0 .5em 0; font-weight: normal; }
table {
border:1px solid #ccc; border-collapse: collapse; background:white; }
tbody td, tbody th { vertical-align:top; padding:2px 3px; }
thead th {
padding:1px 6px 1px 3px; background:#fefefe; text-align:left;
font-weight:normal; font-size:11px; border:1px solid #ddd; }
tbody th { text-align:right; color:#666; padding-right:.5em; }
table.vars { margin:5px 0 2px 40px; }
table.vars td, table.req td { font-family:monospace; }
table td.code { width:100%;}
table td.code div { overflow:hidden; }
table.source th { color:#666; }
table.source td {
font-family:monospace; white-space:pre; border-bottom:1px solid #eee; }
ul.traceback { list-style-type:none; }
ul.traceback li.frame { margin-bottom:1em; }
div.context { margin: 10px 0; }
div.context ol {
padding-left:30px; margin:0 10px; list-style-position: inside; }
div.context ol li {
font-family:monospace; white-space:pre; color:#666; cursor:pointer; }
div.context ol.context-line li { color:black; background-color:#ccc; }
div.context ol.context-line li span { float: right; }
div.commands { margin-left: 40px; }
div.commands a { color:black; text-decoration:none; }
#summary { background: #ffc; }
#summary h2 { font-family: monospace; font-weight: normal; color: #666; white-space: pre-wrap; }
#summary ul#quicklinks { list-style-type: none; margin-bottom: 2em; }
#summary ul#quicklinks li { float: left; padding: 0 1em; }
#summary ul#quicklinks>li+li { border-left: 1px #666 solid; }
#explanation { background:#eee; }
#template, #template-not-exist { background:#f6f6f6; }
#template-not-exist ul { margin: 0 0 0 20px; }
#traceback { background:#eee; }
#requestinfo { background:#f6f6f6; padding-left:120px; }
#summary table { border:none; background:transparent; }
#requestinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; }
#requestinfo h3 { margin-bottom:-1em; }
.error { background: #ffc; }
.specific { color:#cc3300; font-weight:bold; }
</style>
<script type="text/javascript">
//<!--
function getElementsByClassName(oElm, strTagName, strClassName){
// Written by Jonathan Snook, http://www.snook.ca/jon;
// Add-ons by Robert Nyman, http://www.robertnyman.com
var arrElements = (strTagName == "*" && document.all)? document.all :
oElm.getElementsByTagName(strTagName);
var arrReturnElements = new Array();
strClassName = strClassName.replace(/\-/g, "\\-");
var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$$)");
var oElement;
for(var i=0; i<arrElements.length; i++){
oElement = arrElements[i];
if(oRegExp.test(oElement.className)){
arrReturnElements.push(oElement);
}
}
return (arrReturnElements)
}
function hideAll(elems) {
for (var e = 0; e < elems.length; e++) {
elems[e].style.display = 'none';
}
}
window.onload = function() {
hideAll(getElementsByClassName(document, 'table', 'vars'));
hideAll(getElementsByClassName(document, 'ol', 'pre-context'));
hideAll(getElementsByClassName(document, 'ol', 'post-context'));
}
function toggle() {
for (var i = 0; i < arguments.length; i++) {
var e = document.getElementById(arguments[i]);
if (e) {
e.style.display = e.style.display == 'none' ? 'block' : 'none';
}
}
return false;
}
function varToggle(link, id) {
toggle('v' + id);
var s = link.getElementsByTagName('span')[0];
var uarr = String.fromCharCode(0x25b6);
var darr = String.fromCharCode(0x25bc);
s.innerHTML = s.innerHTML == uarr ? darr : uarr;
return false;
}
//-->
</script>
</head>
<body>
<div id="summary">
<h1>Rack::Lint::LintError at /metrics</h1>
<h2>uppercase character in header name: Content-Type</h2>
<table><tr>
<th>Ruby</th>
<td>
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/rack-3.0.2/lib/rack/lint.rb</code>: in <code>block in check_headers</code>, line 653
</td>
</tr><tr>
<th>Web</th>
<td><code>GET 127.0.0.1/metrics</code></td>
</tr></table>
<h3>Jump to:</h3>
<ul id="quicklinks">
<li><a href="#get-info">GET</a></li>
<li><a href="#post-info">POST</a></li>
<li><a href="#cookie-info">Cookies</a></li>
<li><a href="#env-info">ENV</a></li>
</ul>
</div>
<div id="traceback">
<h2>Traceback <span>(innermost first)</span></h2>
<ul class="traceback">
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/rack-3.0.2/lib/rack/lint.rb</code>: in <code>block in check_headers</code>
<div class="context" id="c1440">
<ol start="646" class="pre-context" id="pre1440">
<li onclick="toggle('pre1440', 'post1440')">
</li>
<li onclick="toggle('pre1440', 'post1440')"> ## The header must not contain a +Status+ key.
</li>
<li onclick="toggle('pre1440', 'post1440')"> raise LintError, "header must not contain status" if key == "status"
</li>
<li onclick="toggle('pre1440', 'post1440')"> ## Header keys must conform to RFC7230 token specification, i.e. cannot
</li>
<li onclick="toggle('pre1440', 'post1440')"> ## contain non-printable ASCII, DQUOTE or "(),/:;<=>?@[\]{}".
</li>
<li onclick="toggle('pre1440', 'post1440')"> raise LintError, "invalid header name: #{key}" if key =~ /[\(\),\/:;<=>\?@\[\\\]{}[:cntrl:]]/
</li>
<li onclick="toggle('pre1440', 'post1440')"> ## Header keys must not contain uppercase ASCII characters (A-Z).
</li>
</ol>
<ol start="653" class="context-line">
<li onclick="toggle('pre1440', 'post1440')"> raise LintError, "uppercase character in header name: #{key}" if key =~ /[A-Z]/<span>...</span></li></ol>
<ol start='654' class="post-context" id="post1440">
<li onclick="toggle('pre1440', 'post1440')">
</li>
<li onclick="toggle('pre1440', 'post1440')"> ## Header values must be either a String instance,
</li>
<li onclick="toggle('pre1440', 'post1440')"> if value.kind_of?(String)
</li>
<li onclick="toggle('pre1440', 'post1440')"> check_header_value(key, value)
</li>
<li onclick="toggle('pre1440', 'post1440')"> elsif value.kind_of?(Array)
</li>
<li onclick="toggle('pre1440', 'post1440')"> ## or an Array of String instances,
</li>
<li onclick="toggle('pre1440', 'post1440')"> value.each{|value| check_header_value(key, value)}
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/rack-3.0.2/lib/rack/lint.rb</code>: in <code>each</code>
<div class="context" id="c1460">
<ol start="630" class="pre-context" id="pre1460">
<li onclick="toggle('pre1460', 'post1460')"> raise LintError, "headers object should be a hash, but isn't (got #{headers.class} as headers)"
</li>
<li onclick="toggle('pre1460', 'post1460')"> end
</li>
<li onclick="toggle('pre1460', 'post1460')">
</li>
<li onclick="toggle('pre1460', 'post1460')"> if headers.frozen?
</li>
<li onclick="toggle('pre1460', 'post1460')"> raise LintError, "headers object should not be frozen, but is"
</li>
<li onclick="toggle('pre1460', 'post1460')"> end
</li>
<li onclick="toggle('pre1460', 'post1460')">
</li>
</ol>
<ol start="637" class="context-line">
<li onclick="toggle('pre1460', 'post1460')"> headers.each do |key, value|<span>...</span></li></ol>
<ol start='638' class="post-context" id="post1460">
<li onclick="toggle('pre1460', 'post1460')"> ## The header keys must be Strings.
</li>
<li onclick="toggle('pre1460', 'post1460')"> unless key.kind_of? String
</li>
<li onclick="toggle('pre1460', 'post1460')"> raise LintError, "header key must be a string, was #{key.class}"
</li>
<li onclick="toggle('pre1460', 'post1460')"> end
</li>
<li onclick="toggle('pre1460', 'post1460')">
</li>
<li onclick="toggle('pre1460', 'post1460')"> ## Special headers starting "rack." are for communicating with the
</li>
<li onclick="toggle('pre1460', 'post1460')"> ## server, and must not be sent back to the client.
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/rack-3.0.2/lib/rack/lint.rb</code>: in <code>check_headers</code>
<div class="context" id="c1480">
<ol start="630" class="pre-context" id="pre1480">
<li onclick="toggle('pre1480', 'post1480')"> raise LintError, "headers object should be a hash, but isn't (got #{headers.class} as headers)"
</li>
<li onclick="toggle('pre1480', 'post1480')"> end
</li>
<li onclick="toggle('pre1480', 'post1480')">
</li>
<li onclick="toggle('pre1480', 'post1480')"> if headers.frozen?
</li>
<li onclick="toggle('pre1480', 'post1480')"> raise LintError, "headers object should not be frozen, but is"
</li>
<li onclick="toggle('pre1480', 'post1480')"> end
</li>
<li onclick="toggle('pre1480', 'post1480')">
</li>
</ol>
<ol start="637" class="context-line">
<li onclick="toggle('pre1480', 'post1480')"> headers.each do |key, value|<span>...</span></li></ol>
<ol start='638' class="post-context" id="post1480">
<li onclick="toggle('pre1480', 'post1480')"> ## The header keys must be Strings.
</li>
<li onclick="toggle('pre1480', 'post1480')"> unless key.kind_of? String
</li>
<li onclick="toggle('pre1480', 'post1480')"> raise LintError, "header key must be a string, was #{key.class}"
</li>
<li onclick="toggle('pre1480', 'post1480')"> end
</li>
<li onclick="toggle('pre1480', 'post1480')">
</li>
<li onclick="toggle('pre1480', 'post1480')"> ## Special headers starting "rack." are for communicating with the
</li>
<li onclick="toggle('pre1480', 'post1480')"> ## server, and must not be sent back to the client.
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/rack-3.0.2/lib/rack/lint.rb</code>: in <code>response</code>
<div class="context" id="c1500">
<ol start="66" class="pre-context" id="pre1500">
<li onclick="toggle('pre1500', 'post1500')"> raise LintError, "response array has #{@response.size} elements instead of 3" unless @response.size == 3
</li>
<li onclick="toggle('pre1500', 'post1500')">
</li>
<li onclick="toggle('pre1500', 'post1500')"> @status, @headers, @body = @response
</li>
<li onclick="toggle('pre1500', 'post1500')"> ## The *status*,
</li>
<li onclick="toggle('pre1500', 'post1500')"> check_status(@status)
</li>
<li onclick="toggle('pre1500', 'post1500')">
</li>
<li onclick="toggle('pre1500', 'post1500')"> ## the *headers*,
</li>
</ol>
<ol start="73" class="context-line">
<li onclick="toggle('pre1500', 'post1500')"> check_headers(@headers)<span>...</span></li></ol>
<ol start='74' class="post-context" id="post1500">
<li onclick="toggle('pre1500', 'post1500')">
</li>
<li onclick="toggle('pre1500', 'post1500')"> hijack_proc = check_hijack_response(@headers, @env)
</li>
<li onclick="toggle('pre1500', 'post1500')"> if hijack_proc
</li>
<li onclick="toggle('pre1500', 'post1500')"> @headers[RACK_HIJACK] = hijack_proc
</li>
<li onclick="toggle('pre1500', 'post1500')"> end
</li>
<li onclick="toggle('pre1500', 'post1500')">
</li>
<li onclick="toggle('pre1500', 'post1500')"> ## and the *body*.
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/rack-3.0.2/lib/rack/lint.rb</code>: in <code>call</code>
<div class="context" id="c1520">
<ol start="28" class="pre-context" id="pre1520">
<li onclick="toggle('pre1520', 'post1520')"> ## after to catch all mistakes.
</li>
<li onclick="toggle('pre1520', 'post1520')"> ##
</li>
<li onclick="toggle('pre1520', 'post1520')"> ## = Rack applications
</li>
<li onclick="toggle('pre1520', 'post1520')"> ##
</li>
<li onclick="toggle('pre1520', 'post1520')"> ## A Rack application is a Ruby object (not a class) that
</li>
<li onclick="toggle('pre1520', 'post1520')"> ## responds to +call+.
</li>
<li onclick="toggle('pre1520', 'post1520')"> def call(env = nil)
</li>
</ol>
<ol start="35" class="context-line">
<li onclick="toggle('pre1520', 'post1520')"> Wrapper.new(@app, env).response<span>...</span></li></ol>
<ol start='36' class="post-context" id="post1520">
<li onclick="toggle('pre1520', 'post1520')"> end
</li>
<li onclick="toggle('pre1520', 'post1520')">
</li>
<li onclick="toggle('pre1520', 'post1520')"> class Wrapper
</li>
<li onclick="toggle('pre1520', 'post1520')"> def initialize(app, env)
</li>
<li onclick="toggle('pre1520', 'post1520')"> @app = app
</li>
<li onclick="toggle('pre1520', 'post1520')"> @env = env
</li>
<li onclick="toggle('pre1520', 'post1520')"> @response = nil
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/rack-3.0.2/lib/rack/show_exceptions.rb</code>: in <code>call</code>
<div class="context" id="c1540">
<ol start="20" class="pre-context" id="pre1540">
<li onclick="toggle('pre1540', 'post1540')"> CONTEXT = 7
</li>
<li onclick="toggle('pre1540', 'post1540')">
</li>
<li onclick="toggle('pre1540', 'post1540')"> def initialize(app)
</li>
<li onclick="toggle('pre1540', 'post1540')"> @app = app
</li>
<li onclick="toggle('pre1540', 'post1540')"> end
</li>
<li onclick="toggle('pre1540', 'post1540')">
</li>
<li onclick="toggle('pre1540', 'post1540')"> def call(env)
</li>
</ol>
<ol start="27" class="context-line">
<li onclick="toggle('pre1540', 'post1540')"> @app.call(env)<span>...</span></li></ol>
<ol start='28' class="post-context" id="post1540">
<li onclick="toggle('pre1540', 'post1540')"> rescue StandardError, LoadError, SyntaxError => e
</li>
<li onclick="toggle('pre1540', 'post1540')"> exception_string = dump_exception(e)
</li>
<li onclick="toggle('pre1540', 'post1540')">
</li>
<li onclick="toggle('pre1540', 'post1540')"> env[RACK_ERRORS].puts(exception_string)
</li>
<li onclick="toggle('pre1540', 'post1540')"> env[RACK_ERRORS].flush
</li>
<li onclick="toggle('pre1540', 'post1540')">
</li>
<li onclick="toggle('pre1540', 'post1540')"> if accepts_html?(env)
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/rack-3.0.2/lib/rack/common_logger.rb</code>: in <code>call</code>
<div class="context" id="c1560">
<ol start="36" class="pre-context" id="pre1560">
<li onclick="toggle('pre1560', 'post1560')"> # will not be logged, so if exception handling middleware are used,
</li>
<li onclick="toggle('pre1560', 'post1560')"> # they should be loaded after this middleware. Additionally, because
</li>
<li onclick="toggle('pre1560', 'post1560')"> # the logging happens after the request body has been fully sent, any
</li>
<li onclick="toggle('pre1560', 'post1560')"> # exceptions raised during the sending of the response body will
</li>
<li onclick="toggle('pre1560', 'post1560')"> # cause the request not to be logged.
</li>
<li onclick="toggle('pre1560', 'post1560')"> def call(env)
</li>
<li onclick="toggle('pre1560', 'post1560')"> began_at = Utils.clock_time
</li>
</ol>
<ol start="43" class="context-line">
<li onclick="toggle('pre1560', 'post1560')"> status, headers, body = response = @app.call(env)<span>...</span></li></ol>
<ol start='44' class="post-context" id="post1560">
<li onclick="toggle('pre1560', 'post1560')">
</li>
<li onclick="toggle('pre1560', 'post1560')"> response[2] = BodyProxy.new(body) { log(env, status, headers, began_at) }
</li>
<li onclick="toggle('pre1560', 'post1560')"> response
</li>
<li onclick="toggle('pre1560', 'post1560')"> end
</li>
<li onclick="toggle('pre1560', 'post1560')">
</li>
<li onclick="toggle('pre1560', 'post1560')"> private
</li>
<li onclick="toggle('pre1560', 'post1560')">
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/rack-3.0.2/lib/rack/chunked.rb</code>: in <code>call</code>
<div class="context" id="c1580">
<ol start="95" class="pre-context" id="pre1580">
<li onclick="toggle('pre1580', 'post1580')"> end
</li>
<li onclick="toggle('pre1580', 'post1580')"> end
</li>
<li onclick="toggle('pre1580', 'post1580')">
</li>
<li onclick="toggle('pre1580', 'post1580')"> # If the rack app returns a response that should have a body,
</li>
<li onclick="toggle('pre1580', 'post1580')"> # but does not have content-length or transfer-encoding headers,
</li>
<li onclick="toggle('pre1580', 'post1580')"> # modify the response to use chunked transfer-encoding.
</li>
<li onclick="toggle('pre1580', 'post1580')"> def call(env)
</li>
</ol>
<ol start="102" class="context-line">
<li onclick="toggle('pre1580', 'post1580')"> status, headers, body = response = @app.call(env)<span>...</span></li></ol>
<ol start='103' class="post-context" id="post1580">
<li onclick="toggle('pre1580', 'post1580')">
</li>
<li onclick="toggle('pre1580', 'post1580')"> if chunkable_version?(env[SERVER_PROTOCOL]) &&
</li>
<li onclick="toggle('pre1580', 'post1580')"> !STATUS_WITH_NO_ENTITY_BODY.key?(status.to_i) &&
</li>
<li onclick="toggle('pre1580', 'post1580')"> !headers[CONTENT_LENGTH] &&
</li>
<li onclick="toggle('pre1580', 'post1580')"> !headers[TRANSFER_ENCODING]
</li>
<li onclick="toggle('pre1580', 'post1580')">
</li>
<li onclick="toggle('pre1580', 'post1580')"> headers[TRANSFER_ENCODING] = 'chunked'
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/rack-3.0.2/lib/rack/content_length.rb</code>: in <code>call</code>
<div class="context" id="c1600">
<ol start="13" class="pre-context" id="pre1600">
<li onclick="toggle('pre1600', 'post1600')"> include Rack::Utils
</li>
<li onclick="toggle('pre1600', 'post1600')">
</li>
<li onclick="toggle('pre1600', 'post1600')"> def initialize(app)
</li>
<li onclick="toggle('pre1600', 'post1600')"> @app = app
</li>
<li onclick="toggle('pre1600', 'post1600')"> end
</li>
<li onclick="toggle('pre1600', 'post1600')">
</li>
<li onclick="toggle('pre1600', 'post1600')"> def call(env)
</li>
</ol>
<ol start="20" class="context-line">
<li onclick="toggle('pre1600', 'post1600')"> status, headers, body = response = @app.call(env)<span>...</span></li></ol>
<ol start='21' class="post-context" id="post1600">
<li onclick="toggle('pre1600', 'post1600')">
</li>
<li onclick="toggle('pre1600', 'post1600')"> if !STATUS_WITH_NO_ENTITY_BODY.key?(status.to_i) &&
</li>
<li onclick="toggle('pre1600', 'post1600')"> !headers[CONTENT_LENGTH] &&
</li>
<li onclick="toggle('pre1600', 'post1600')"> !headers[TRANSFER_ENCODING] &&
</li>
<li onclick="toggle('pre1600', 'post1600')"> body.respond_to?(:to_ary)
</li>
<li onclick="toggle('pre1600', 'post1600')">
</li>
<li onclick="toggle('pre1600', 'post1600')"> response[2] = body = body.to_ary
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb</code>: in <code>process_client</code>
<div class="context" id="c1620">
<ol start="627" class="pre-context" id="pre1620">
<li onclick="toggle('pre1620', 'post1620')"> env["rack.early_hints"] = lambda do |headers|
</li>
<li onclick="toggle('pre1620', 'post1620')"> e103_response_write(client, headers)
</li>
<li onclick="toggle('pre1620', 'post1620')"> end
</li>
<li onclick="toggle('pre1620', 'post1620')"> end
</li>
<li onclick="toggle('pre1620', 'post1620')">
</li>
<li onclick="toggle('pre1620', 'post1620')"> env["rack.after_reply"] = []
</li>
<li onclick="toggle('pre1620', 'post1620')">
</li>
</ol>
<ol start="634" class="context-line">
<li onclick="toggle('pre1620', 'post1620')"> status, headers, body = @app.call(env)<span>...</span></li></ol>
<ol start='635' class="post-context" id="post1620">
<li onclick="toggle('pre1620', 'post1620')">
</li>
<li onclick="toggle('pre1620', 'post1620')"> begin
</li>
<li onclick="toggle('pre1620', 'post1620')"> return if @request.hijacked?
</li>
<li onclick="toggle('pre1620', 'post1620')">
</li>
<li onclick="toggle('pre1620', 'post1620')"> if 100 == status.to_i
</li>
<li onclick="toggle('pre1620', 'post1620')"> e100_response_write(client, env)
</li>
<li onclick="toggle('pre1620', 'post1620')"> status, headers, body = @app.call(env)
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb</code>: in <code>worker_loop</code>
<div class="context" id="c1640">
<ol start="732" class="pre-context" id="pre1640">
<li onclick="toggle('pre1640', 'post1640')"> begin
</li>
<li onclick="toggle('pre1640', 'post1640')"> reopen = reopen_worker_logs(worker.nr) if reopen
</li>
<li onclick="toggle('pre1640', 'post1640')"> worker.tick = time_now.to_i
</li>
<li onclick="toggle('pre1640', 'post1640')"> while sock = ready.shift
</li>
<li onclick="toggle('pre1640', 'post1640')"> # Unicorn::Worker#kgio_tryaccept is not like accept(2) at all,
</li>
<li onclick="toggle('pre1640', 'post1640')"> # but that will return false
</li>
<li onclick="toggle('pre1640', 'post1640')"> if client = sock.kgio_tryaccept
</li>
</ol>
<ol start="739" class="context-line">
<li onclick="toggle('pre1640', 'post1640')"> process_client(client)<span>...</span></li></ol>
<ol start='740' class="post-context" id="post1640">
<li onclick="toggle('pre1640', 'post1640')"> worker.tick = time_now.to_i
</li>
<li onclick="toggle('pre1640', 'post1640')"> end
</li>
<li onclick="toggle('pre1640', 'post1640')"> break if reopen
</li>
<li onclick="toggle('pre1640', 'post1640')"> end
</li>
<li onclick="toggle('pre1640', 'post1640')">
</li>
<li onclick="toggle('pre1640', 'post1640')"> # timeout so we can .tick and keep parent from SIGKILL-ing us
</li>
<li onclick="toggle('pre1640', 'post1640')"> worker.tick = time_now.to_i
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb</code>: in <code>spawn_missing_workers</code>
<div class="context" id="c1660">
<ol start="540" class="pre-context" id="pre1660">
<li onclick="toggle('pre1660', 'post1660')"> worker = Unicorn::Worker.new(worker_nr)
</li>
<li onclick="toggle('pre1660', 'post1660')"> before_fork.call(self, worker)
</li>
<li onclick="toggle('pre1660', 'post1660')">
</li>
<li onclick="toggle('pre1660', 'post1660')"> pid = @worker_exec ? worker_spawn(worker) : fork
</li>
<li onclick="toggle('pre1660', 'post1660')">
</li>
<li onclick="toggle('pre1660', 'post1660')"> unless pid
</li>
<li onclick="toggle('pre1660', 'post1660')"> after_fork_internal
</li>
</ol>
<ol start="547" class="context-line">
<li onclick="toggle('pre1660', 'post1660')"> worker_loop(worker)<span>...</span></li></ol>
<ol start='548' class="post-context" id="post1660">
<li onclick="toggle('pre1660', 'post1660')"> exit
</li>
<li onclick="toggle('pre1660', 'post1660')"> end
</li>
<li onclick="toggle('pre1660', 'post1660')">
</li>
<li onclick="toggle('pre1660', 'post1660')"> @workers[pid] = worker
</li>
<li onclick="toggle('pre1660', 'post1660')"> worker.atfork_parent
</li>
<li onclick="toggle('pre1660', 'post1660')"> end
</li>
<li onclick="toggle('pre1660', 'post1660')"> rescue => e
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb</code>: in <code>start</code>
<div class="context" id="c1680">
<ol start="136" class="pre-context" id="pre1680">
<li onclick="toggle('pre1680', 'post1680')"> # This unfortunately has the side effect of clobbering valid PID if
</li>
<li onclick="toggle('pre1680', 'post1680')"> # we upgrade and the upgrade breaks during preload_app==true && build_app!
</li>
<li onclick="toggle('pre1680', 'post1680')"> self.pid = config[:pid]
</li>
<li onclick="toggle('pre1680', 'post1680')">
</li>
<li onclick="toggle('pre1680', 'post1680')"> build_app! if preload_app
</li>
<li onclick="toggle('pre1680', 'post1680')"> bind_new_listeners!
</li>
<li onclick="toggle('pre1680', 'post1680')">
</li>
</ol>
<ol start="143" class="context-line">
<li onclick="toggle('pre1680', 'post1680')"> spawn_missing_workers<span>...</span></li></ol>
<ol start='144' class="post-context" id="post1680">
<li onclick="toggle('pre1680', 'post1680')"> self
</li>
<li onclick="toggle('pre1680', 'post1680')"> end
</li>
<li onclick="toggle('pre1680', 'post1680')">
</li>
<li onclick="toggle('pre1680', 'post1680')"> # replaces current listener set with +listeners+. This will
</li>
<li onclick="toggle('pre1680', 'post1680')"> # close the socket if it will not exist in the new listener set
</li>
<li onclick="toggle('pre1680', 'post1680')"> def listeners=(listeners)
</li>
<li onclick="toggle('pre1680', 'post1680')"> cur_names, dead_names = [], []
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/unicorn-6.1.0/bin/unicorn</code>: in <code><top (required)></code>
<div class="context" id="c1700">
<ol start="121" class="pre-context" id="pre1700">
<li onclick="toggle('pre1700', 'post1700')"> :unicorn_options => options,
</li>
<li onclick="toggle('pre1700', 'post1700')"> :app => app,
</li>
<li onclick="toggle('pre1700', 'post1700')"> :daemonize => rackup_opts[:daemonize],
</li>
<li onclick="toggle('pre1700', 'post1700')"> })
</li>
<li onclick="toggle('pre1700', 'post1700')">end
</li>
<li onclick="toggle('pre1700', 'post1700')">
</li>
<li onclick="toggle('pre1700', 'post1700')">Unicorn::Launcher.daemonize!(options) if rackup_opts[:daemonize]
</li>
</ol>
<ol start="128" class="context-line">
<li onclick="toggle('pre1700', 'post1700')">Unicorn::HttpServer.new(app, options).start.join<span>...</span></li></ol>
<ol start='129' class="post-context" id="post1700">
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/bin/unicorn</code>: in <code>load</code>
<div class="context" id="c1720">
<ol start="18" class="pre-context" id="pre1720">
<li onclick="toggle('pre1720', 'post1720')"> if str and Gem::Version.correct?(str)
</li>
<li onclick="toggle('pre1720', 'post1720')"> version = str
</li>
<li onclick="toggle('pre1720', 'post1720')"> ARGV.shift
</li>
<li onclick="toggle('pre1720', 'post1720')"> end
</li>
<li onclick="toggle('pre1720', 'post1720')">end
</li>
<li onclick="toggle('pre1720', 'post1720')">
</li>
<li onclick="toggle('pre1720', 'post1720')">if Gem.respond_to?(:activate_bin_path)
</li>
</ol>
<ol start="25" class="context-line">
<li onclick="toggle('pre1720', 'post1720')">load Gem.activate_bin_path('unicorn', 'unicorn', version)<span>...</span></li></ol>
<ol start='26' class="post-context" id="post1720">
<li onclick="toggle('pre1720', 'post1720')">else
</li>
<li onclick="toggle('pre1720', 'post1720')">gem "unicorn", version
</li>
<li onclick="toggle('pre1720', 'post1720')">load Gem.bin_path("unicorn", "unicorn", version)
</li>
<li onclick="toggle('pre1720', 'post1720')">end
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/bin/unicorn</code>: in <code><top (required)></code>
<div class="context" id="c1740">
<ol start="18" class="pre-context" id="pre1740">
<li onclick="toggle('pre1740', 'post1740')"> if str and Gem::Version.correct?(str)
</li>
<li onclick="toggle('pre1740', 'post1740')"> version = str
</li>
<li onclick="toggle('pre1740', 'post1740')"> ARGV.shift
</li>
<li onclick="toggle('pre1740', 'post1740')"> end
</li>
<li onclick="toggle('pre1740', 'post1740')">end
</li>
<li onclick="toggle('pre1740', 'post1740')">
</li>
<li onclick="toggle('pre1740', 'post1740')">if Gem.respond_to?(:activate_bin_path)
</li>
</ol>
<ol start="25" class="context-line">
<li onclick="toggle('pre1740', 'post1740')">load Gem.activate_bin_path('unicorn', 'unicorn', version)<span>...</span></li></ol>
<ol start='26' class="post-context" id="post1740">
<li onclick="toggle('pre1740', 'post1740')">else
</li>
<li onclick="toggle('pre1740', 'post1740')">gem "unicorn", version
</li>
<li onclick="toggle('pre1740', 'post1740')">load Gem.bin_path("unicorn", "unicorn", version)
</li>
<li onclick="toggle('pre1740', 'post1740')">end
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/bundler-2.3.26/lib/bundler/cli/exec.rb</code>: in <code>load</code>
<div class="context" id="c1760">
<ol start="51" class="pre-context" id="pre1760">
<li onclick="toggle('pre1760', 'post1760')"> def kernel_load(file, *args)
</li>
<li onclick="toggle('pre1760', 'post1760')"> args.pop if args.last.is_a?(Hash)
</li>
<li onclick="toggle('pre1760', 'post1760')"> ARGV.replace(args)
</li>
<li onclick="toggle('pre1760', 'post1760')"> $0 = file
</li>
<li onclick="toggle('pre1760', 'post1760')"> Process.setproctitle(process_title(file, args)) if Process.respond_to?(:setproctitle)
</li>
<li onclick="toggle('pre1760', 'post1760')"> require_relative "../setup"
</li>
<li onclick="toggle('pre1760', 'post1760')"> TRAPPED_SIGNALS.each {|s| trap(s, "DEFAULT") }
</li>
</ol>
<ol start="58" class="context-line">
<li onclick="toggle('pre1760', 'post1760')"> Kernel.load(file)<span>...</span></li></ol>
<ol start='59' class="post-context" id="post1760">
<li onclick="toggle('pre1760', 'post1760')"> rescue SystemExit, SignalException
</li>
<li onclick="toggle('pre1760', 'post1760')"> raise
</li>
<li onclick="toggle('pre1760', 'post1760')"> rescue Exception # rubocop:disable Lint/RescueException
</li>
<li onclick="toggle('pre1760', 'post1760')"> Bundler.ui.error "bundler: failed to load command: #{cmd} (#{file})"
</li>
<li onclick="toggle('pre1760', 'post1760')"> Bundler::FriendlyErrors.disable!
</li>
<li onclick="toggle('pre1760', 'post1760')"> raise
</li>
<li onclick="toggle('pre1760', 'post1760')"> end
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/bundler-2.3.26/lib/bundler/cli/exec.rb</code>: in <code>kernel_load</code>
<div class="context" id="c1780">
<ol start="51" class="pre-context" id="pre1780">
<li onclick="toggle('pre1780', 'post1780')"> def kernel_load(file, *args)
</li>
<li onclick="toggle('pre1780', 'post1780')"> args.pop if args.last.is_a?(Hash)
</li>
<li onclick="toggle('pre1780', 'post1780')"> ARGV.replace(args)
</li>
<li onclick="toggle('pre1780', 'post1780')"> $0 = file
</li>
<li onclick="toggle('pre1780', 'post1780')"> Process.setproctitle(process_title(file, args)) if Process.respond_to?(:setproctitle)
</li>
<li onclick="toggle('pre1780', 'post1780')"> require_relative "../setup"
</li>
<li onclick="toggle('pre1780', 'post1780')"> TRAPPED_SIGNALS.each {|s| trap(s, "DEFAULT") }
</li>
</ol>
<ol start="58" class="context-line">
<li onclick="toggle('pre1780', 'post1780')"> Kernel.load(file)<span>...</span></li></ol>
<ol start='59' class="post-context" id="post1780">
<li onclick="toggle('pre1780', 'post1780')"> rescue SystemExit, SignalException
</li>
<li onclick="toggle('pre1780', 'post1780')"> raise
</li>
<li onclick="toggle('pre1780', 'post1780')"> rescue Exception # rubocop:disable Lint/RescueException
</li>
<li onclick="toggle('pre1780', 'post1780')"> Bundler.ui.error "bundler: failed to load command: #{cmd} (#{file})"
</li>
<li onclick="toggle('pre1780', 'post1780')"> Bundler::FriendlyErrors.disable!
</li>
<li onclick="toggle('pre1780', 'post1780')"> raise
</li>
<li onclick="toggle('pre1780', 'post1780')"> end
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/bundler-2.3.26/lib/bundler/cli/exec.rb</code>: in <code>run</code>
<div class="context" id="c1800">
<ol start="16" class="pre-context" id="pre1800">
<li onclick="toggle('pre1800', 'post1800')"> end
</li>
<li onclick="toggle('pre1800', 'post1800')">
</li>
<li onclick="toggle('pre1800', 'post1800')"> def run
</li>
<li onclick="toggle('pre1800', 'post1800')"> validate_cmd!
</li>
<li onclick="toggle('pre1800', 'post1800')"> SharedHelpers.set_bundle_environment
</li>
<li onclick="toggle('pre1800', 'post1800')"> if bin_path = Bundler.which(cmd)
</li>
<li onclick="toggle('pre1800', 'post1800')"> if !Bundler.settings[:disable_exec_load] && ruby_shebang?(bin_path)
</li>
</ol>
<ol start="23" class="context-line">
<li onclick="toggle('pre1800', 'post1800')"> return kernel_load(bin_path, *args)<span>...</span></li></ol>
<ol start='24' class="post-context" id="post1800">
<li onclick="toggle('pre1800', 'post1800')"> end
</li>
<li onclick="toggle('pre1800', 'post1800')"> kernel_exec(bin_path, *args)
</li>
<li onclick="toggle('pre1800', 'post1800')"> else
</li>
<li onclick="toggle('pre1800', 'post1800')"> # exec using the given command
</li>
<li onclick="toggle('pre1800', 'post1800')"> kernel_exec(cmd, *args)
</li>
<li onclick="toggle('pre1800', 'post1800')"> end
</li>
<li onclick="toggle('pre1800', 'post1800')"> end
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/bundler-2.3.26/lib/bundler/cli.rb</code>: in <code>exec</code>
<div class="context" id="c1820">
<ol start="479" class="pre-context" id="pre1820">
<li onclick="toggle('pre1820', 'post1820')"> D
</li>
<li onclick="toggle('pre1820', 'post1820')"> def exec(*args)
</li>
<li onclick="toggle('pre1820', 'post1820')"> if ARGV.include?("--no-keep-file-descriptors")
</li>
<li onclick="toggle('pre1820', 'post1820')"> SharedHelpers.major_deprecation(2, "The `--no-keep-file-descriptors` has been deprecated. `bundle exec` no longer mess with your file descriptors. Close them in the exec'd script if you need to")
</li>
<li onclick="toggle('pre1820', 'post1820')"> end
</li>
<li onclick="toggle('pre1820', 'post1820')">
</li>
<li onclick="toggle('pre1820', 'post1820')"> require_relative "cli/exec"
</li>
</ol>
<ol start="486" class="context-line">
<li onclick="toggle('pre1820', 'post1820')"> Exec.new(options, args).run<span>...</span></li></ol>
<ol start='487' class="post-context" id="post1820">
<li onclick="toggle('pre1820', 'post1820')"> end
</li>
<li onclick="toggle('pre1820', 'post1820')">
</li>
<li onclick="toggle('pre1820', 'post1820')"> map aliases_for("exec")
</li>
<li onclick="toggle('pre1820', 'post1820')">
</li>
<li onclick="toggle('pre1820', 'post1820')"> desc "config NAME [VALUE]", "Retrieve or set a configuration value"
</li>
<li onclick="toggle('pre1820', 'post1820')"> long_desc <<-D
</li>
<li onclick="toggle('pre1820', 'post1820')"> Retrieves or sets a configuration value. If only one parameter is provided, retrieve the value. If two parameters are provided, replace the
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor/command.rb</code>: in <code>run</code>
<div class="context" id="c1840">
<ol start="20" class="pre-context" id="pre1840">
<li onclick="toggle('pre1840', 'post1840')"> def run(instance, args = [])
</li>
<li onclick="toggle('pre1840', 'post1840')"> arity = nil
</li>
<li onclick="toggle('pre1840', 'post1840')">
</li>
<li onclick="toggle('pre1840', 'post1840')"> if private_method?(instance)
</li>
<li onclick="toggle('pre1840', 'post1840')"> instance.class.handle_no_command_error(name)
</li>
<li onclick="toggle('pre1840', 'post1840')"> elsif public_method?(instance)
</li>
<li onclick="toggle('pre1840', 'post1840')"> arity = instance.method(name).arity
</li>
</ol>
<ol start="27" class="context-line">
<li onclick="toggle('pre1840', 'post1840')"> instance.__send__(name, *args)<span>...</span></li></ol>
<ol start='28' class="post-context" id="post1840">
<li onclick="toggle('pre1840', 'post1840')"> elsif local_method?(instance, :method_missing)
</li>
<li onclick="toggle('pre1840', 'post1840')"> instance.__send__(:method_missing, name.to_sym, *args)
</li>
<li onclick="toggle('pre1840', 'post1840')"> else
</li>
<li onclick="toggle('pre1840', 'post1840')"> instance.class.handle_no_command_error(name)
</li>
<li onclick="toggle('pre1840', 'post1840')"> end
</li>
<li onclick="toggle('pre1840', 'post1840')"> rescue ArgumentError => e
</li>
<li onclick="toggle('pre1840', 'post1840')"> handle_argument_error?(instance, e, caller) ? instance.class.handle_argument_error(self, e, args, arity) : (raise e)
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor/invocation.rb</code>: in <code>invoke_command</code>
<div class="context" id="c1860">
<ol start="120" class="pre-context" id="pre1860">
<li onclick="toggle('pre1860', 'post1860')">
</li>
<li onclick="toggle('pre1860', 'post1860')"> # Invoke the given command if the given args.
</li>
<li onclick="toggle('pre1860', 'post1860')"> def invoke_command(command, *args) #:nodoc:
</li>
<li onclick="toggle('pre1860', 'post1860')"> current = @_invocations[self.class]
</li>
<li onclick="toggle('pre1860', 'post1860')">
</li>
<li onclick="toggle('pre1860', 'post1860')"> unless current.include?(command.name)
</li>
<li onclick="toggle('pre1860', 'post1860')"> current << command.name
</li>
</ol>
<ol start="127" class="context-line">
<li onclick="toggle('pre1860', 'post1860')"> command.run(self, *args)<span>...</span></li></ol>
<ol start='128' class="post-context" id="post1860">
<li onclick="toggle('pre1860', 'post1860')"> end
</li>
<li onclick="toggle('pre1860', 'post1860')"> end
</li>
<li onclick="toggle('pre1860', 'post1860')"> alias_method :invoke_task, :invoke_command
</li>
<li onclick="toggle('pre1860', 'post1860')">
</li>
<li onclick="toggle('pre1860', 'post1860')"> # Invoke all commands for the current instance.
</li>
<li onclick="toggle('pre1860', 'post1860')"> def invoke_all #:nodoc:
</li>
<li onclick="toggle('pre1860', 'post1860')"> self.class.all_commands.map { |_, command| invoke_command(command) }
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor.rb</code>: in <code>dispatch</code>
<div class="context" id="c1880">
<ol start="385" class="pre-context" id="pre1880">
<li onclick="toggle('pre1880', 'post1880')"> config[:current_command] = command
</li>
<li onclick="toggle('pre1880', 'post1880')"> config[:command_options] = command.options
</li>
<li onclick="toggle('pre1880', 'post1880')">
</li>
<li onclick="toggle('pre1880', 'post1880')"> instance = new(args, opts, config)
</li>
<li onclick="toggle('pre1880', 'post1880')"> yield instance if block_given?
</li>
<li onclick="toggle('pre1880', 'post1880')"> args = instance.args
</li>
<li onclick="toggle('pre1880', 'post1880')"> trailing = args[Range.new(arguments.size, -1)]
</li>
</ol>
<ol start="392" class="context-line">
<li onclick="toggle('pre1880', 'post1880')"> instance.invoke_command(command, trailing || [])<span>...</span></li></ol>
<ol start='393' class="post-context" id="post1880">
<li onclick="toggle('pre1880', 'post1880')"> end
</li>
<li onclick="toggle('pre1880', 'post1880')">
</li>
<li onclick="toggle('pre1880', 'post1880')"> # The banner for this class. You can customize it if you are invoking the
</li>
<li onclick="toggle('pre1880', 'post1880')"> # thor class by another ways which is not the Bundler::Thor::Runner. It receives
</li>
<li onclick="toggle('pre1880', 'post1880')"> # the command that is going to be invoked and a boolean which indicates if
</li>
<li onclick="toggle('pre1880', 'post1880')"> # the namespace should be displayed as arguments.
</li>
<li onclick="toggle('pre1880', 'post1880')"> #
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/bundler-2.3.26/lib/bundler/cli.rb</code>: in <code>dispatch</code>
<div class="context" id="c1900">
<ol start="24" class="pre-context" id="pre1900">
<li onclick="toggle('pre1900', 'post1900')"> def self.start(*)
</li>
<li onclick="toggle('pre1900', 'post1900')"> super
</li>
<li onclick="toggle('pre1900', 'post1900')"> ensure
</li>
<li onclick="toggle('pre1900', 'post1900')"> Bundler::SharedHelpers.print_major_deprecations!
</li>
<li onclick="toggle('pre1900', 'post1900')"> end
</li>
<li onclick="toggle('pre1900', 'post1900')">
</li>
<li onclick="toggle('pre1900', 'post1900')"> def self.dispatch(*)
</li>
</ol>
<ol start="31" class="context-line">
<li onclick="toggle('pre1900', 'post1900')"> super do |i|<span>...</span></li></ol>
<ol start='32' class="post-context" id="post1900">
<li onclick="toggle('pre1900', 'post1900')"> i.send(:print_command)
</li>
<li onclick="toggle('pre1900', 'post1900')"> i.send(:warn_on_outdated_bundler)
</li>
<li onclick="toggle('pre1900', 'post1900')"> end
</li>
<li onclick="toggle('pre1900', 'post1900')"> end
</li>
<li onclick="toggle('pre1900', 'post1900')">
</li>
<li onclick="toggle('pre1900', 'post1900')"> def self.all_aliases
</li>
<li onclick="toggle('pre1900', 'post1900')"> @all_aliases ||= begin
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor/base.rb</code>: in <code>start</code>
<div class="context" id="c1920">
<ol start="478" class="pre-context" id="pre1920">
<li onclick="toggle('pre1920', 'post1920')"> # can simply initialize it:
</li>
<li onclick="toggle('pre1920', 'post1920')"> #
</li>
<li onclick="toggle('pre1920', 'post1920')"> # script = MyScript.new(args, options, config)
</li>
<li onclick="toggle('pre1920', 'post1920')"> # script.invoke(:command, first_arg, second_arg, third_arg)
</li>
<li onclick="toggle('pre1920', 'post1920')"> #
</li>
<li onclick="toggle('pre1920', 'post1920')"> def start(given_args = ARGV, config = {})
</li>
<li onclick="toggle('pre1920', 'post1920')"> config[:shell] ||= Bundler::Thor::Base.shell.new
</li>
</ol>
<ol start="485" class="context-line">
<li onclick="toggle('pre1920', 'post1920')"> dispatch(nil, given_args.dup, nil, config)<span>...</span></li></ol>
<ol start='486' class="post-context" id="post1920">
<li onclick="toggle('pre1920', 'post1920')"> rescue Bundler::Thor::Error => e
</li>
<li onclick="toggle('pre1920', 'post1920')"> config[:debug] || ENV["THOR_DEBUG"] == "1" ? (raise e) : config[:shell].error(e.message)
</li>
<li onclick="toggle('pre1920', 'post1920')"> exit(false) if exit_on_failure?
</li>
<li onclick="toggle('pre1920', 'post1920')"> rescue Errno::EPIPE
</li>
<li onclick="toggle('pre1920', 'post1920')"> # This happens if a thor command is piped to something like `head`,
</li>
<li onclick="toggle('pre1920', 'post1920')"> # which closes the pipe when it's done reading. This will also
</li>
<li onclick="toggle('pre1920', 'post1920')"> # mean that if the pipe is closed, further unnecessary
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/bundler-2.3.26/lib/bundler/cli.rb</code>: in <code>start</code>
<div class="context" id="c1940">
<ol start="18" class="pre-context" id="pre1940">
<li onclick="toggle('pre1940', 'post1940')"> "list" => "ls",
</li>
<li onclick="toggle('pre1940', 'post1940')"> "exec" => ["e", "ex", "exe"],
</li>
<li onclick="toggle('pre1940', 'post1940')"> "cache" => ["package", "pack"],
</li>
<li onclick="toggle('pre1940', 'post1940')"> "version" => ["-v", "--version"],
</li>
<li onclick="toggle('pre1940', 'post1940')"> }.freeze
</li>
<li onclick="toggle('pre1940', 'post1940')">
</li>
<li onclick="toggle('pre1940', 'post1940')"> def self.start(*)
</li>
</ol>
<ol start="25" class="context-line">
<li onclick="toggle('pre1940', 'post1940')"> super<span>...</span></li></ol>
<ol start='26' class="post-context" id="post1940">
<li onclick="toggle('pre1940', 'post1940')"> ensure
</li>
<li onclick="toggle('pre1940', 'post1940')"> Bundler::SharedHelpers.print_major_deprecations!
</li>
<li onclick="toggle('pre1940', 'post1940')"> end
</li>
<li onclick="toggle('pre1940', 'post1940')">
</li>
<li onclick="toggle('pre1940', 'post1940')"> def self.dispatch(*)
</li>
<li onclick="toggle('pre1940', 'post1940')"> super do |i|
</li>
<li onclick="toggle('pre1940', 'post1940')"> i.send(:print_command)
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/bundler-2.3.26/exe/bundle</code>: in <code>block in <top (required)></code>
<div class="context" id="c1960">
<ol start="41" class="pre-context" id="pre1960">
<li onclick="toggle('pre1960', 'post1960')"> end
</li>
<li onclick="toggle('pre1960', 'post1960')">
</li>
<li onclick="toggle('pre1960', 'post1960')"> # Allow any command to use --help flag to show help for that command
</li>
<li onclick="toggle('pre1960', 'post1960')"> help_flags = %w[--help -h]
</li>
<li onclick="toggle('pre1960', 'post1960')"> help_flag_used = ARGV.any? {|a| help_flags.include? a }
</li>
<li onclick="toggle('pre1960', 'post1960')"> args = help_flag_used ? Bundler::CLI.reformatted_help_args(ARGV) : ARGV
</li>
<li onclick="toggle('pre1960', 'post1960')">
</li>
</ol>
<ol start="48" class="context-line">
<li onclick="toggle('pre1960', 'post1960')"> Bundler::CLI.start(args, :debug => true)<span>...</span></li></ol>
<ol start='49' class="post-context" id="post1960">
<li onclick="toggle('pre1960', 'post1960')">end
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/bundler-2.3.26/lib/bundler/friendly_errors.rb</code>: in <code>with_friendly_errors</code>
<div class="context" id="c1980">
<ol start="113" class="pre-context" id="pre1980">
<li onclick="toggle('pre1980', 'post1980')"> def new_issue_url
</li>
<li onclick="toggle('pre1980', 'post1980')"> "https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md"
</li>
<li onclick="toggle('pre1980', 'post1980')"> end
</li>
<li onclick="toggle('pre1980', 'post1980')"> end
</li>
<li onclick="toggle('pre1980', 'post1980')">
</li>
<li onclick="toggle('pre1980', 'post1980')"> def self.with_friendly_errors
</li>
<li onclick="toggle('pre1980', 'post1980')"> FriendlyErrors.enable!
</li>
</ol>
<ol start="120" class="context-line">
<li onclick="toggle('pre1980', 'post1980')"> yield<span>...</span></li></ol>
<ol start='121' class="post-context" id="post1980">
<li onclick="toggle('pre1980', 'post1980')"> rescue SignalException
</li>
<li onclick="toggle('pre1980', 'post1980')"> raise
</li>
<li onclick="toggle('pre1980', 'post1980')"> rescue Exception => e # rubocop:disable Lint/RescueException
</li>
<li onclick="toggle('pre1980', 'post1980')"> raise if FriendlyErrors.disabled?
</li>
<li onclick="toggle('pre1980', 'post1980')">
</li>
<li onclick="toggle('pre1980', 'post1980')"> FriendlyErrors.log_error(e)
</li>
<li onclick="toggle('pre1980', 'post1980')"> exit FriendlyErrors.exit_status(e)
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/bundler-2.3.26/exe/bundle</code>: in <code><top (required)></code>
<div class="context" id="c2000">
<ol start="29" class="pre-context" id="pre2000">
<li onclick="toggle('pre2000', 'post2000')">
</li>
<li onclick="toggle('pre2000', 'post2000')">if File.exist?(base_path)
</li>
<li onclick="toggle('pre2000', 'post2000')"> require_relative "../lib/bundler/friendly_errors"
</li>
<li onclick="toggle('pre2000', 'post2000')">else
</li>
<li onclick="toggle('pre2000', 'post2000')"> require "bundler/friendly_errors"
</li>
<li onclick="toggle('pre2000', 'post2000')">end
</li>
<li onclick="toggle('pre2000', 'post2000')">
</li>
</ol>
<ol start="36" class="context-line">
<li onclick="toggle('pre2000', 'post2000')">Bundler.with_friendly_errors do<span>...</span></li></ol>
<ol start='37' class="post-context" id="post2000">
<li onclick="toggle('pre2000', 'post2000')"> if File.exist?(base_path)
</li>
<li onclick="toggle('pre2000', 'post2000')"> require_relative "../lib/bundler/cli"
</li>
<li onclick="toggle('pre2000', 'post2000')"> else
</li>
<li onclick="toggle('pre2000', 'post2000')"> require "bundler/cli"
</li>
<li onclick="toggle('pre2000', 'post2000')"> end
</li>
<li onclick="toggle('pre2000', 'post2000')">
</li>
<li onclick="toggle('pre2000', 'post2000')"> # Allow any command to use --help flag to show help for that command
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/bin/bundle</code>: in <code>load</code>
<div class="context" id="c2020">
<ol start="16" class="pre-context" id="pre2020">
<li onclick="toggle('pre2020', 'post2020')"> if str and Gem::Version.correct?(str)
</li>
<li onclick="toggle('pre2020', 'post2020')"> version = str
</li>
<li onclick="toggle('pre2020', 'post2020')"> ARGV.shift
</li>
<li onclick="toggle('pre2020', 'post2020')"> end
</li>
<li onclick="toggle('pre2020', 'post2020')">end
</li>
<li onclick="toggle('pre2020', 'post2020')">
</li>
<li onclick="toggle('pre2020', 'post2020')">if Gem.respond_to?(:activate_bin_path)
</li>
</ol>
<ol start="23" class="context-line">
<li onclick="toggle('pre2020', 'post2020')">load Gem.activate_bin_path('bundler', 'bundle', version)<span>...</span></li></ol>
<ol start='24' class="post-context" id="post2020">
<li onclick="toggle('pre2020', 'post2020')">else
</li>
<li onclick="toggle('pre2020', 'post2020')">gem "bundler", version
</li>
<li onclick="toggle('pre2020', 'post2020')">load Gem.bin_path("bundler", "bundle", version)
</li>
<li onclick="toggle('pre2020', 'post2020')">end
</li>
</ol>
</div>
</li>
<li class="frame">
<code>/Users/hercules/.asdf/installs/ruby/3.0.4/bin/bundle</code>: in <code><main></code>
<div class="context" id="c2040">
<ol start="16" class="pre-context" id="pre2040">
<li onclick="toggle('pre2040', 'post2040')"> if str and Gem::Version.correct?(str)
</li>
<li onclick="toggle('pre2040', 'post2040')"> version = str
</li>
<li onclick="toggle('pre2040', 'post2040')"> ARGV.shift
</li>
<li onclick="toggle('pre2040', 'post2040')"> end
</li>
<li onclick="toggle('pre2040', 'post2040')">end
</li>
<li onclick="toggle('pre2040', 'post2040')">
</li>
<li onclick="toggle('pre2040', 'post2040')">if Gem.respond_to?(:activate_bin_path)
</li>
</ol>
<ol start="23" class="context-line">
<li onclick="toggle('pre2040', 'post2040')">load Gem.activate_bin_path('bundler', 'bundle', version)<span>...</span></li></ol>
<ol start='24' class="post-context" id="post2040">
<li onclick="toggle('pre2040', 'post2040')">else
</li>
<li onclick="toggle('pre2040', 'post2040')">gem "bundler", version
</li>
<li onclick="toggle('pre2040', 'post2040')">load Gem.bin_path("bundler", "bundle", version)
</li>
<li onclick="toggle('pre2040', 'post2040')">end
</li>
</ol>
</div>
</li>
</ul>
</div>
<div id="requestinfo">
<h2>Request information</h2>
<h3 id="get-info">GET</h3>
<p>No GET data.</p>
<h3 id="post-info">POST</h3>
<p>No POST data.</p>
<h3 id="cookie-info">COOKIES</h3>
<p>No cookie data.</p>
<h3 id="env-info">Rack ENV</h3>
<table class="req">
<thead>
<tr>
<th>Variable</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>HTTP_ACCEPT</td>
<td class="code"><div>"*/*"</div></td>
</tr>
<tr>
<td>HTTP_HOST</td>
<td class="code"><div>"127.0.0.1:5123"</div></td>
</tr>
<tr>
<td>HTTP_USER_AGENT</td>
<td class="code"><div>"curl/7.85.0"</div></td>
</tr>
<tr>
<td>HTTP_VERSION</td>
<td class="code"><div>"HTTP/1.1"</div></td>
</tr>
<tr>
<td>PATH_INFO</td>
<td class="code"><div>"/metrics"</div></td>
</tr>
<tr>
<td>QUERY_STRING</td>
<td class="code"><div>""</div></td>
</tr>
<tr>
<td>REMOTE_ADDR</td>
<td class="code"><div>"127.0.0.1"</div></td>
</tr>
<tr>
<td>REQUEST_METHOD</td>
<td class="code"><div>"GET"</div></td>
</tr>
<tr>
<td>REQUEST_PATH</td>
<td class="code"><div>"/metrics"</div></td>
</tr>
<tr>
<td>REQUEST_URI</td>
<td class="code"><div>"/metrics"</div></td>
</tr>
<tr>
<td>SCRIPT_NAME</td>
<td class="code"><div>""</div></td>
</tr>
<tr>
<td>SERVER_NAME</td>
<td class="code"><div>"127.0.0.1"</div></td>
</tr>
<tr>
<td>SERVER_PORT</td>
<td class="code"><div>"5123"</div></td>
</tr>
<tr>
<td>SERVER_PROTOCOL</td>
<td class="code"><div>"HTTP/1.1"</div></td>
</tr>
<tr>
<td>SERVER_SOFTWARE</td>
<td class="code"><div>"Unicorn 6.1.0"</div></td>
</tr>
<tr>
<td>rack.after_reply</td>
<td class="code"><div>[]</div></td>
</tr>
<tr>
<td>rack.errors</td>
<td class="code"><div>#<Rack::Lint::Wrapper::ErrorWrapper:0x0000000135901a38 @error=#<IO:<STDERR>>></div></td>
</tr>
<tr>
<td>rack.hijack</td>
<td class="code"><div>#<Proc:0x0000000135902500 /Users/hercules/.asdf/installs/ruby/3.0.4/lib/ruby/gems/3.0.0/gems/rack-3.0.2/lib/rack/lint.rb:556></div></td>
</tr>
<tr>
<td>rack.hijack?</td>
<td class="code"><div>true</div></td>
</tr>
<tr>
<td>rack.input</td>
<td class="code"><div>#<Rack::Lint::Wrapper::InputWrapper:0x0000000135901d30 @input=#<StringIO:0x0000000135a83cf8>></div></td>
</tr>
<tr>
<td>rack.logger</td>
<td class="code"><div>#<Logger:0x0000000135aa9728 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x0000000135aa95e8 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x0000000135aa9408 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @binmode=false, @mon_data=#<Monitor:0x0000000135aa9340>, @mon_data_owner_object_id=860>></div></td>
</tr>
<tr>
<td>rack.multiprocess</td>
<td class="code"><div>true</div></td>
</tr>
<tr>
<td>rack.multithread</td>
<td class="code"><div>false</div></td>
</tr>
<tr>
<td>rack.request.cookie_hash</td>
<td class="code"><div>{}</div></td>
</tr>
<tr>
<td>rack.request.form_hash</td>
<td class="code"><div>{}</div></td>
</tr>
<tr>
<td>rack.request.form_input</td>
<td class="code"><div>#<Rack::Lint::Wrapper::InputWrapper:0x0000000135901d30 @input=#<StringIO:0x0000000135a83cf8>></div></td>
</tr>
<tr>
<td>rack.request.query_hash</td>
<td class="code"><div>{}</div></td>
</tr>
<tr>
<td>rack.request.query_string</td>
<td class="code"><div>""</div></td>
</tr>
<tr>
<td>rack.run_once</td>
<td class="code"><div>false</div></td>
</tr>
<tr>
<td>rack.tempfiles</td>
<td class="code"><div>[]</div></td>
</tr>
<tr>
<td>rack.url_scheme</td>
<td class="code"><div>"http"</div></td>
</tr>
<tr>
<td>rack.version</td>
<td class="code"><div>[1, 2]</div></td>
</tr>
<tr>
<td>unicorn.socket</td>
<td class="code"><div>#<Unicorn::TCPClient:fd 10></div></td>
</tr>
</tbody>
</table>
</div>
<div id="explanation">
<p>
You're seeing this error because you use <code>Rack::ShowExceptions</code>.
</p>
</div>
</body>
</html>
I guess it's because the exporter still has capitalized headers, I guess: https://github.com/prometheus/client_ruby/blob/main/lib/prometheus/middleware/exporter.rb#L69
I guess it's because the exporter still has capitalized headers, I guess: https://github.com/prometheus/client_ruby/blob/main/lib/prometheus/middleware/exporter.rb#L69
@sinjo yep, that's the culprit! I'm pushing the fix in a different PR: https://github.com/prometheus/client_ruby/pull/271
Okay, these JRuby failures are unrelated, and are because rubygems-update
just had a new version pushed that breaks compatibility with those versions.
I'm gonna get this merged, and figure out what we do with CI in a separate PR. I'm inclined to detect those JRuby versions and pin them to the last version of rubygems-update
that works for them. We'll deprecate them eventually, but I think 9.2 is very much still receiving support.
The example seems to be broken for some time. Here are the list of things fixed:
go install
rather thango get
to install binaries