Created
October 18, 2013 23:54
-
-
Save scottcorgan/7049984 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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>PublicSuffix::DomainInvalid at /apps</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-weight: normal; color: #666; } | |
#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>PublicSuffix::DomainInvalid at /apps</h1> | |
<h2>`tryingagains.' is not a valid domain</h2> | |
<table><tr> | |
<th>Ruby</th> | |
<td> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/public_suffix-1.3.1/lib/public_suffix.rb</code>: in <code>parse</code>, line 68 | |
</td> | |
</tr><tr> | |
<th>Web</th> | |
<td><code>POST api.dev.divshot.com/apps</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/scott/.rvm/gems/ruby-2.0.0-p195/gems/public_suffix-1.3.1/lib/public_suffix.rb</code>: in <code>parse</code> | |
<div class="context" id="c70294002712920"> | |
<ol start="61" class="pre-context" id="pre70294002712920"> | |
<li onclick="toggle('pre70294002712920', 'post70294002712920')"> # If a rule for +domain+ is found, but the rule | |
</li> | |
<li onclick="toggle('pre70294002712920', 'post70294002712920')"> # doesn't allow +domain+. | |
</li> | |
<li onclick="toggle('pre70294002712920', 'post70294002712920')"> # | |
</li> | |
<li onclick="toggle('pre70294002712920', 'post70294002712920')"> def self.parse(domain, list = List.default) | |
</li> | |
<li onclick="toggle('pre70294002712920', 'post70294002712920')"> rule = list.find(domain) | |
</li> | |
<li onclick="toggle('pre70294002712920', 'post70294002712920')"> | |
</li> | |
<li onclick="toggle('pre70294002712920', 'post70294002712920')"> if rule.nil? | |
</li> | |
</ol> | |
<ol start="68" class="context-line"> | |
<li onclick="toggle('pre70294002712920', 'post70294002712920')"> raise DomainInvalid, "`#{domain}' is not a valid domain"<span>...</span></li></ol> | |
<ol start='69' class="post-context" id="post70294002712920"> | |
<li onclick="toggle('pre70294002712920', 'post70294002712920')"> end | |
</li> | |
<li onclick="toggle('pre70294002712920', 'post70294002712920')"> if !rule.allow?(domain) | |
</li> | |
<li onclick="toggle('pre70294002712920', 'post70294002712920')"> raise DomainNotAllowed, "`#{domain}' is not allowed according to Registry policy" | |
</li> | |
<li onclick="toggle('pre70294002712920', 'post70294002712920')"> end | |
</li> | |
<li onclick="toggle('pre70294002712920', 'post70294002712920')"> | |
</li> | |
<li onclick="toggle('pre70294002712920', 'post70294002712920')"> left, right = rule.decompose(domain) | |
</li> | |
<li onclick="toggle('pre70294002712920', 'post70294002712920')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/www/divshot/api/app/models/hosting/custom_domain.rb</code>: in <code>name_is_subdomain</code> | |
<div class="context" id="c70294002730400"> | |
<ol start="12" class="pre-context" id="pre70294002730400"> | |
<li onclick="toggle('pre70294002730400', 'post70294002730400')"> validate :name_is_subdomain | |
</li> | |
<li onclick="toggle('pre70294002730400', 'post70294002730400')"> | |
</li> | |
<li onclick="toggle('pre70294002730400', 'post70294002730400')"> after_create :provision! | |
</li> | |
<li onclick="toggle('pre70294002730400', 'post70294002730400')"> after_destroy :redact! | |
</li> | |
<li onclick="toggle('pre70294002730400', 'post70294002730400')"> | |
</li> | |
<li onclick="toggle('pre70294002730400', 'post70294002730400')"> def name_is_subdomain | |
</li> | |
<li onclick="toggle('pre70294002730400', 'post70294002730400')"> return unless name | |
</li> | |
</ol> | |
<ol start="19" class="context-line"> | |
<li onclick="toggle('pre70294002730400', 'post70294002730400')"> domain = PublicSuffix.parse(name)<span>...</span></li></ol> | |
<ol start='20' class="post-context" id="post70294002730400"> | |
<li onclick="toggle('pre70294002730400', 'post70294002730400')"> if domain.trd.blank? | |
</li> | |
<li onclick="toggle('pre70294002730400', 'post70294002730400')"> errors.add :name, "MUST NOT be apex domain (must include a sub-domain, e.g. 'www.example.com')" | |
</li> | |
<li onclick="toggle('pre70294002730400', 'post70294002730400')"> end | |
</li> | |
<li onclick="toggle('pre70294002730400', 'post70294002730400')"> end | |
</li> | |
<li onclick="toggle('pre70294002730400', 'post70294002730400')"> | |
</li> | |
<li onclick="toggle('pre70294002730400', 'post70294002730400')"> def provision! | |
</li> | |
<li onclick="toggle('pre70294002730400', 'post70294002730400')"> DomainService.new(self.application).add_custom_domain!(self, name) | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>_run__4525251604204077528__validate__1485707892267497542__callbacks</code> | |
<div class="context" id="c70294002751360"> | |
<ol start="422" class="pre-context" id="pre70294002751360"> | |
<li onclick="toggle('pre70294002751360', 'post70294002751360')"> options = filters.last.is_a?(Hash) ? filters.pop : {} | |
</li> | |
<li onclick="toggle('pre70294002751360', 'post70294002751360')"> filters.unshift(block) if block | |
</li> | |
<li onclick="toggle('pre70294002751360', 'post70294002751360')"> | |
</li> | |
<li onclick="toggle('pre70294002751360', 'post70294002751360')"> ([self] + ActiveSupport::DescendantsTracker.descendants(self)).reverse.each do |target| | |
</li> | |
<li onclick="toggle('pre70294002751360', 'post70294002751360')"> chain = target.send("_#{name}_callbacks") | |
</li> | |
<li onclick="toggle('pre70294002751360', 'post70294002751360')"> yield target, chain.dup, type, filters, options | |
</li> | |
<li onclick="toggle('pre70294002751360', 'post70294002751360')"> target.__reset_runner(name) | |
</li> | |
</ol> | |
<ol start="429" class="context-line"> | |
<li onclick="toggle('pre70294002751360', 'post70294002751360')"> end<span>...</span></li></ol> | |
<ol start='430' class="post-context" id="post70294002751360"> | |
<li onclick="toggle('pre70294002751360', 'post70294002751360')"> end | |
</li> | |
<li onclick="toggle('pre70294002751360', 'post70294002751360')"> | |
</li> | |
<li onclick="toggle('pre70294002751360', 'post70294002751360')"> # Install a callback for the given event. | |
</li> | |
<li onclick="toggle('pre70294002751360', 'post70294002751360')"> # | |
</li> | |
<li onclick="toggle('pre70294002751360', 'post70294002751360')"> # set_callback :save, :before, :before_meth | |
</li> | |
<li onclick="toggle('pre70294002751360', 'post70294002751360')"> # set_callback :save, :after, :after_meth, :if => :condition | |
</li> | |
<li onclick="toggle('pre70294002751360', 'post70294002751360')"> # set_callback :save, :around, lambda { |r| stuff; result = yield; stuff } | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>__run_callback</code> | |
<div class="context" id="c70294002796460"> | |
<ol start="398" class="pre-context" id="pre70294002796460"> | |
<li onclick="toggle('pre70294002796460', 'post70294002796460')"> unless object.respond_to?(name, true) | |
</li> | |
<li onclick="toggle('pre70294002796460', 'post70294002796460')"> str = object.send("_#{kind}_callbacks").compile(key, object) | |
</li> | |
<li onclick="toggle('pre70294002796460', 'post70294002796460')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294002796460', 'post70294002796460')"> def #{name}() #{str} end | |
</li> | |
<li onclick="toggle('pre70294002796460', 'post70294002796460')"> protected :#{name} | |
</li> | |
<li onclick="toggle('pre70294002796460', 'post70294002796460')"> RUBY_EVAL | |
</li> | |
<li onclick="toggle('pre70294002796460', 'post70294002796460')"> end | |
</li> | |
</ol> | |
<ol start="405" class="context-line"> | |
<li onclick="toggle('pre70294002796460', 'post70294002796460')"> object.send(name, &blk)<span>...</span></li></ol> | |
<ol start='406' class="post-context" id="post70294002796460"> | |
<li onclick="toggle('pre70294002796460', 'post70294002796460')"> end | |
</li> | |
<li onclick="toggle('pre70294002796460', 'post70294002796460')"> | |
</li> | |
<li onclick="toggle('pre70294002796460', 'post70294002796460')"> def __reset_runner(symbol) | |
</li> | |
<li onclick="toggle('pre70294002796460', 'post70294002796460')"> name = __callback_runner_name(nil, symbol) | |
</li> | |
<li onclick="toggle('pre70294002796460', 'post70294002796460')"> undef_method(name) if method_defined?(name) | |
</li> | |
<li onclick="toggle('pre70294002796460', 'post70294002796460')"> end | |
</li> | |
<li onclick="toggle('pre70294002796460', 'post70294002796460')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>_run_validate_callbacks</code> | |
<div class="context" id="c70294002843940"> | |
<ol start="378" class="pre-context" id="pre70294002843940"> | |
<li onclick="toggle('pre70294002843940', 'post70294002843940')"> module ClassMethods | |
</li> | |
<li onclick="toggle('pre70294002843940', 'post70294002843940')"> # Generate the internal runner method called by +run_callbacks+. | |
</li> | |
<li onclick="toggle('pre70294002843940', 'post70294002843940')"> def __define_runner(symbol) #:nodoc: | |
</li> | |
<li onclick="toggle('pre70294002843940', 'post70294002843940')"> runner_method = "_run_#{symbol}_callbacks" | |
</li> | |
<li onclick="toggle('pre70294002843940', 'post70294002843940')"> unless private_method_defined?(runner_method) | |
</li> | |
<li onclick="toggle('pre70294002843940', 'post70294002843940')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294002843940', 'post70294002843940')"> def #{runner_method}(key = nil, &blk) | |
</li> | |
</ol> | |
<ol start="385" class="context-line"> | |
<li onclick="toggle('pre70294002843940', 'post70294002843940')"> self.class.__run_callback(key, :#{symbol}, self, &blk)<span>...</span></li></ol> | |
<ol start='386' class="post-context" id="post70294002843940"> | |
<li onclick="toggle('pre70294002843940', 'post70294002843940')"> end | |
</li> | |
<li onclick="toggle('pre70294002843940', 'post70294002843940')"> private :#{runner_method} | |
</li> | |
<li onclick="toggle('pre70294002843940', 'post70294002843940')"> RUBY_EVAL | |
</li> | |
<li onclick="toggle('pre70294002843940', 'post70294002843940')"> end | |
</li> | |
<li onclick="toggle('pre70294002843940', 'post70294002843940')"> end | |
</li> | |
<li onclick="toggle('pre70294002843940', 'post70294002843940')"> | |
</li> | |
<li onclick="toggle('pre70294002843940', 'post70294002843940')"> # This method calls the callback method for the given key. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>run_callbacks</code> | |
<div class="context" id="c70294002948720"> | |
<ol start="74" class="pre-context" id="pre70294002948720"> | |
<li onclick="toggle('pre70294002948720', 'post70294002948720')"> # of the block, or +true+ if no block is given. | |
</li> | |
<li onclick="toggle('pre70294002948720', 'post70294002948720')"> # | |
</li> | |
<li onclick="toggle('pre70294002948720', 'post70294002948720')"> # run_callbacks :save do | |
</li> | |
<li onclick="toggle('pre70294002948720', 'post70294002948720')"> # save | |
</li> | |
<li onclick="toggle('pre70294002948720', 'post70294002948720')"> # end | |
</li> | |
<li onclick="toggle('pre70294002948720', 'post70294002948720')"> # | |
</li> | |
<li onclick="toggle('pre70294002948720', 'post70294002948720')"> def run_callbacks(kind, *args, &block) | |
</li> | |
</ol> | |
<ol start="81" class="context-line"> | |
<li onclick="toggle('pre70294002948720', 'post70294002948720')"> send("_run_#{kind}_callbacks", *args, &block)<span>...</span></li></ol> | |
<ol start='82' class="post-context" id="post70294002948720"> | |
<li onclick="toggle('pre70294002948720', 'post70294002948720')"> end | |
</li> | |
<li onclick="toggle('pre70294002948720', 'post70294002948720')"> | |
</li> | |
<li onclick="toggle('pre70294002948720', 'post70294002948720')"> private | |
</li> | |
<li onclick="toggle('pre70294002948720', 'post70294002948720')"> | |
</li> | |
<li onclick="toggle('pre70294002948720', 'post70294002948720')"> # A hook invoked everytime a before callback is halted. | |
</li> | |
<li onclick="toggle('pre70294002948720', 'post70294002948720')"> # This can be overriden in AS::Callback implementors in order | |
</li> | |
<li onclick="toggle('pre70294002948720', 'post70294002948720')"> # to provide better debugging/logging. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/embedded_callbacks.rb</code>: in <code>run_callbacks</code> | |
<div class="context" id="c70294003022660"> | |
<ol start="45" class="pre-context" id="pre70294003022660"> | |
<li onclick="toggle('pre70294003022660', 'post70294003022660')"> lambda { doc.run_callbacks(callback, *args, &chain) } | |
</li> | |
<li onclick="toggle('pre70294003022660', 'post70294003022660')"> else | |
</li> | |
<li onclick="toggle('pre70294003022660', 'post70294003022660')"> chain | |
</li> | |
<li onclick="toggle('pre70294003022660', 'post70294003022660')"> end | |
</li> | |
<li onclick="toggle('pre70294003022660', 'post70294003022660')"> end | |
</li> | |
<li onclick="toggle('pre70294003022660', 'post70294003022660')"> end | |
</li> | |
<li onclick="toggle('pre70294003022660', 'post70294003022660')"> | |
</li> | |
</ol> | |
<ol start="52" class="context-line"> | |
<li onclick="toggle('pre70294003022660', 'post70294003022660')"> super callback, *args, &block<span>...</span></li></ol> | |
<ol start='53' class="post-context" id="post70294003022660"> | |
<li onclick="toggle('pre70294003022660', 'post70294003022660')"> end | |
</li> | |
<li onclick="toggle('pre70294003022660', 'post70294003022660')"> end | |
</li> | |
<li onclick="toggle('pre70294003022660', 'post70294003022660')"> end | |
</li> | |
<li onclick="toggle('pre70294003022660', 'post70294003022660')">end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activemodel-3.2.12/lib/active_model/validations.rb</code>: in <code>run_validations!</code> | |
<div class="context" id="c70293954223620"> | |
<ol start="221" class="pre-context" id="pre70293954223620"> | |
<li onclick="toggle('pre70293954223620', 'post70293954223620')"> # end | |
</li> | |
<li onclick="toggle('pre70293954223620', 'post70293954223620')"> # | |
</li> | |
<li onclick="toggle('pre70293954223620', 'post70293954223620')"> alias :read_attribute_for_validation :send | |
</li> | |
<li onclick="toggle('pre70293954223620', 'post70293954223620')"> | |
</li> | |
<li onclick="toggle('pre70293954223620', 'post70293954223620')"> protected | |
</li> | |
<li onclick="toggle('pre70293954223620', 'post70293954223620')"> | |
</li> | |
<li onclick="toggle('pre70293954223620', 'post70293954223620')"> def run_validations! | |
</li> | |
</ol> | |
<ol start="228" class="context-line"> | |
<li onclick="toggle('pre70293954223620', 'post70293954223620')"> run_callbacks :validate<span>...</span></li></ol> | |
<ol start='229' class="post-context" id="post70293954223620"> | |
<li onclick="toggle('pre70293954223620', 'post70293954223620')"> errors.empty? | |
</li> | |
<li onclick="toggle('pre70293954223620', 'post70293954223620')"> end | |
</li> | |
<li onclick="toggle('pre70293954223620', 'post70293954223620')"> end | |
</li> | |
<li onclick="toggle('pre70293954223620', 'post70293954223620')">end | |
</li> | |
<li onclick="toggle('pre70293954223620', 'post70293954223620')"> | |
</li> | |
<li onclick="toggle('pre70293954223620', 'post70293954223620')">Dir[File.dirname(__FILE__) + "/validations/*.rb"].sort.each do |path| | |
</li> | |
<li onclick="toggle('pre70293954223620', 'post70293954223620')"> filename = File.basename(path) | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/validations.rb</code>: in <code>block in run_validations!</code> | |
<div class="context" id="c70294002972780"> | |
<ol start="77" class="pre-context" id="pre70294002972780"> | |
<li onclick="toggle('pre70294002972780', 'post70294002972780')">end | |
</li> | |
<li onclick="toggle('pre70294002972780', 'post70294002972780')"> | |
</li> | |
<li onclick="toggle('pre70294002972780', 'post70294002972780')"># Need to monkey patch ActiveModel for now since it uses the internal | |
</li> | |
<li onclick="toggle('pre70294002972780', 'post70294002972780')"># _run_validation_callbacks, which is impossible to override due to the | |
</li> | |
<li onclick="toggle('pre70294002972780', 'post70294002972780')"># way ActiveSupport::Callbacks is implemented. | |
</li> | |
<li onclick="toggle('pre70294002972780', 'post70294002972780')">ActiveModel::Validations::Callbacks.class_eval do | |
</li> | |
<li onclick="toggle('pre70294002972780', 'post70294002972780')"> def run_validations! | |
</li> | |
</ol> | |
<ol start="84" class="context-line"> | |
<li onclick="toggle('pre70294002972780', 'post70294002972780')"> run_callbacks(:validation) { super }<span>...</span></li></ol> | |
<ol start='85' class="post-context" id="post70294002972780"> | |
<li onclick="toggle('pre70294002972780', 'post70294002972780')"> end | |
</li> | |
<li onclick="toggle('pre70294002972780', 'post70294002972780')">end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>_run__4525251604204077528__validation__1485707892267497542__callbacks</code> | |
<div class="context" id="c70294002966800"> | |
<ol start="396" class="pre-context" id="pre70294002966800"> | |
<li onclick="toggle('pre70294002966800', 'post70294002966800')"> def __run_callback(key, kind, object, &blk) #:nodoc: | |
</li> | |
<li onclick="toggle('pre70294002966800', 'post70294002966800')"> name = __callback_runner_name(key, kind) | |
</li> | |
<li onclick="toggle('pre70294002966800', 'post70294002966800')"> unless object.respond_to?(name, true) | |
</li> | |
<li onclick="toggle('pre70294002966800', 'post70294002966800')"> str = object.send("_#{kind}_callbacks").compile(key, object) | |
</li> | |
<li onclick="toggle('pre70294002966800', 'post70294002966800')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294002966800', 'post70294002966800')"> def #{name}() #{str} end | |
</li> | |
<li onclick="toggle('pre70294002966800', 'post70294002966800')"> protected :#{name} | |
</li> | |
</ol> | |
<ol start="403" class="context-line"> | |
<li onclick="toggle('pre70294002966800', 'post70294002966800')"> RUBY_EVAL<span>...</span></li></ol> | |
<ol start='404' class="post-context" id="post70294002966800"> | |
<li onclick="toggle('pre70294002966800', 'post70294002966800')"> end | |
</li> | |
<li onclick="toggle('pre70294002966800', 'post70294002966800')"> object.send(name, &blk) | |
</li> | |
<li onclick="toggle('pre70294002966800', 'post70294002966800')"> end | |
</li> | |
<li onclick="toggle('pre70294002966800', 'post70294002966800')"> | |
</li> | |
<li onclick="toggle('pre70294002966800', 'post70294002966800')"> def __reset_runner(symbol) | |
</li> | |
<li onclick="toggle('pre70294002966800', 'post70294002966800')"> name = __callback_runner_name(nil, symbol) | |
</li> | |
<li onclick="toggle('pre70294002966800', 'post70294002966800')"> undef_method(name) if method_defined?(name) | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>__run_callback</code> | |
<div class="context" id="c70294003066920"> | |
<ol start="398" class="pre-context" id="pre70294003066920"> | |
<li onclick="toggle('pre70294003066920', 'post70294003066920')"> unless object.respond_to?(name, true) | |
</li> | |
<li onclick="toggle('pre70294003066920', 'post70294003066920')"> str = object.send("_#{kind}_callbacks").compile(key, object) | |
</li> | |
<li onclick="toggle('pre70294003066920', 'post70294003066920')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294003066920', 'post70294003066920')"> def #{name}() #{str} end | |
</li> | |
<li onclick="toggle('pre70294003066920', 'post70294003066920')"> protected :#{name} | |
</li> | |
<li onclick="toggle('pre70294003066920', 'post70294003066920')"> RUBY_EVAL | |
</li> | |
<li onclick="toggle('pre70294003066920', 'post70294003066920')"> end | |
</li> | |
</ol> | |
<ol start="405" class="context-line"> | |
<li onclick="toggle('pre70294003066920', 'post70294003066920')"> object.send(name, &blk)<span>...</span></li></ol> | |
<ol start='406' class="post-context" id="post70294003066920"> | |
<li onclick="toggle('pre70294003066920', 'post70294003066920')"> end | |
</li> | |
<li onclick="toggle('pre70294003066920', 'post70294003066920')"> | |
</li> | |
<li onclick="toggle('pre70294003066920', 'post70294003066920')"> def __reset_runner(symbol) | |
</li> | |
<li onclick="toggle('pre70294003066920', 'post70294003066920')"> name = __callback_runner_name(nil, symbol) | |
</li> | |
<li onclick="toggle('pre70294003066920', 'post70294003066920')"> undef_method(name) if method_defined?(name) | |
</li> | |
<li onclick="toggle('pre70294003066920', 'post70294003066920')"> end | |
</li> | |
<li onclick="toggle('pre70294003066920', 'post70294003066920')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>_run_validation_callbacks</code> | |
<div class="context" id="c70294003117800"> | |
<ol start="378" class="pre-context" id="pre70294003117800"> | |
<li onclick="toggle('pre70294003117800', 'post70294003117800')"> module ClassMethods | |
</li> | |
<li onclick="toggle('pre70294003117800', 'post70294003117800')"> # Generate the internal runner method called by +run_callbacks+. | |
</li> | |
<li onclick="toggle('pre70294003117800', 'post70294003117800')"> def __define_runner(symbol) #:nodoc: | |
</li> | |
<li onclick="toggle('pre70294003117800', 'post70294003117800')"> runner_method = "_run_#{symbol}_callbacks" | |
</li> | |
<li onclick="toggle('pre70294003117800', 'post70294003117800')"> unless private_method_defined?(runner_method) | |
</li> | |
<li onclick="toggle('pre70294003117800', 'post70294003117800')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294003117800', 'post70294003117800')"> def #{runner_method}(key = nil, &blk) | |
</li> | |
</ol> | |
<ol start="385" class="context-line"> | |
<li onclick="toggle('pre70294003117800', 'post70294003117800')"> self.class.__run_callback(key, :#{symbol}, self, &blk)<span>...</span></li></ol> | |
<ol start='386' class="post-context" id="post70294003117800"> | |
<li onclick="toggle('pre70294003117800', 'post70294003117800')"> end | |
</li> | |
<li onclick="toggle('pre70294003117800', 'post70294003117800')"> private :#{runner_method} | |
</li> | |
<li onclick="toggle('pre70294003117800', 'post70294003117800')"> RUBY_EVAL | |
</li> | |
<li onclick="toggle('pre70294003117800', 'post70294003117800')"> end | |
</li> | |
<li onclick="toggle('pre70294003117800', 'post70294003117800')"> end | |
</li> | |
<li onclick="toggle('pre70294003117800', 'post70294003117800')"> | |
</li> | |
<li onclick="toggle('pre70294003117800', 'post70294003117800')"> # This method calls the callback method for the given key. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>run_callbacks</code> | |
<div class="context" id="c70294003131000"> | |
<ol start="74" class="pre-context" id="pre70294003131000"> | |
<li onclick="toggle('pre70294003131000', 'post70294003131000')"> # of the block, or +true+ if no block is given. | |
</li> | |
<li onclick="toggle('pre70294003131000', 'post70294003131000')"> # | |
</li> | |
<li onclick="toggle('pre70294003131000', 'post70294003131000')"> # run_callbacks :save do | |
</li> | |
<li onclick="toggle('pre70294003131000', 'post70294003131000')"> # save | |
</li> | |
<li onclick="toggle('pre70294003131000', 'post70294003131000')"> # end | |
</li> | |
<li onclick="toggle('pre70294003131000', 'post70294003131000')"> # | |
</li> | |
<li onclick="toggle('pre70294003131000', 'post70294003131000')"> def run_callbacks(kind, *args, &block) | |
</li> | |
</ol> | |
<ol start="81" class="context-line"> | |
<li onclick="toggle('pre70294003131000', 'post70294003131000')"> send("_run_#{kind}_callbacks", *args, &block)<span>...</span></li></ol> | |
<ol start='82' class="post-context" id="post70294003131000"> | |
<li onclick="toggle('pre70294003131000', 'post70294003131000')"> end | |
</li> | |
<li onclick="toggle('pre70294003131000', 'post70294003131000')"> | |
</li> | |
<li onclick="toggle('pre70294003131000', 'post70294003131000')"> private | |
</li> | |
<li onclick="toggle('pre70294003131000', 'post70294003131000')"> | |
</li> | |
<li onclick="toggle('pre70294003131000', 'post70294003131000')"> # A hook invoked everytime a before callback is halted. | |
</li> | |
<li onclick="toggle('pre70294003131000', 'post70294003131000')"> # This can be overriden in AS::Callback implementors in order | |
</li> | |
<li onclick="toggle('pre70294003131000', 'post70294003131000')"> # to provide better debugging/logging. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/embedded_callbacks.rb</code>: in <code>run_callbacks</code> | |
<div class="context" id="c70294003165900"> | |
<ol start="45" class="pre-context" id="pre70294003165900"> | |
<li onclick="toggle('pre70294003165900', 'post70294003165900')"> lambda { doc.run_callbacks(callback, *args, &chain) } | |
</li> | |
<li onclick="toggle('pre70294003165900', 'post70294003165900')"> else | |
</li> | |
<li onclick="toggle('pre70294003165900', 'post70294003165900')"> chain | |
</li> | |
<li onclick="toggle('pre70294003165900', 'post70294003165900')"> end | |
</li> | |
<li onclick="toggle('pre70294003165900', 'post70294003165900')"> end | |
</li> | |
<li onclick="toggle('pre70294003165900', 'post70294003165900')"> end | |
</li> | |
<li onclick="toggle('pre70294003165900', 'post70294003165900')"> | |
</li> | |
</ol> | |
<ol start="52" class="context-line"> | |
<li onclick="toggle('pre70294003165900', 'post70294003165900')"> super callback, *args, &block<span>...</span></li></ol> | |
<ol start='53' class="post-context" id="post70294003165900"> | |
<li onclick="toggle('pre70294003165900', 'post70294003165900')"> end | |
</li> | |
<li onclick="toggle('pre70294003165900', 'post70294003165900')"> end | |
</li> | |
<li onclick="toggle('pre70294003165900', 'post70294003165900')"> end | |
</li> | |
<li onclick="toggle('pre70294003165900', 'post70294003165900')">end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/validations.rb</code>: in <code>run_validations!</code> | |
<div class="context" id="c70294003180340"> | |
<ol start="77" class="pre-context" id="pre70294003180340"> | |
<li onclick="toggle('pre70294003180340', 'post70294003180340')">end | |
</li> | |
<li onclick="toggle('pre70294003180340', 'post70294003180340')"> | |
</li> | |
<li onclick="toggle('pre70294003180340', 'post70294003180340')"># Need to monkey patch ActiveModel for now since it uses the internal | |
</li> | |
<li onclick="toggle('pre70294003180340', 'post70294003180340')"># _run_validation_callbacks, which is impossible to override due to the | |
</li> | |
<li onclick="toggle('pre70294003180340', 'post70294003180340')"># way ActiveSupport::Callbacks is implemented. | |
</li> | |
<li onclick="toggle('pre70294003180340', 'post70294003180340')">ActiveModel::Validations::Callbacks.class_eval do | |
</li> | |
<li onclick="toggle('pre70294003180340', 'post70294003180340')"> def run_validations! | |
</li> | |
</ol> | |
<ol start="84" class="context-line"> | |
<li onclick="toggle('pre70294003180340', 'post70294003180340')"> run_callbacks(:validation) { super }<span>...</span></li></ol> | |
<ol start='85' class="post-context" id="post70294003180340"> | |
<li onclick="toggle('pre70294003180340', 'post70294003180340')"> end | |
</li> | |
<li onclick="toggle('pre70294003180340', 'post70294003180340')">end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activemodel-3.2.12/lib/active_model/validations.rb</code>: in <code>valid?</code> | |
<div class="context" id="c70294003263620"> | |
<ol start="188" class="pre-context" id="pre70294003263620"> | |
<li onclick="toggle('pre70294003263620', 'post70294003263620')"> | |
</li> | |
<li onclick="toggle('pre70294003263620', 'post70294003263620')"> # Runs all the specified validations and returns true if no errors were added | |
</li> | |
<li onclick="toggle('pre70294003263620', 'post70294003263620')"> # otherwise false. Context can optionally be supplied to define which callbacks | |
</li> | |
<li onclick="toggle('pre70294003263620', 'post70294003263620')"> # to test against (the context is defined on the validations using :on). | |
</li> | |
<li onclick="toggle('pre70294003263620', 'post70294003263620')"> def valid?(context = nil) | |
</li> | |
<li onclick="toggle('pre70294003263620', 'post70294003263620')"> current_context, self.validation_context = validation_context, context | |
</li> | |
<li onclick="toggle('pre70294003263620', 'post70294003263620')"> errors.clear | |
</li> | |
</ol> | |
<ol start="195" class="context-line"> | |
<li onclick="toggle('pre70294003263620', 'post70294003263620')"> run_validations!<span>...</span></li></ol> | |
<ol start='196' class="post-context" id="post70294003263620"> | |
<li onclick="toggle('pre70294003263620', 'post70294003263620')"> ensure | |
</li> | |
<li onclick="toggle('pre70294003263620', 'post70294003263620')"> self.validation_context = current_context | |
</li> | |
<li onclick="toggle('pre70294003263620', 'post70294003263620')"> end | |
</li> | |
<li onclick="toggle('pre70294003263620', 'post70294003263620')"> | |
</li> | |
<li onclick="toggle('pre70294003263620', 'post70294003263620')"> # Performs the opposite of <tt>valid?</tt>. Returns true if errors were added, | |
</li> | |
<li onclick="toggle('pre70294003263620', 'post70294003263620')"> # false otherwise. | |
</li> | |
<li onclick="toggle('pre70294003263620', 'post70294003263620')"> def invalid?(context = nil) | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/validations.rb</code>: in <code>valid?</code> | |
<div class="context" id="c70294003399580"> | |
<ol start="20" class="pre-context" id="pre70294003399580"> | |
<li onclick="toggle('pre70294003399580', 'post70294003399580')"> def save(options = {}) | |
</li> | |
<li onclick="toggle('pre70294003399580', 'post70294003399580')"> options = options.reverse_merge(:validate => true) | |
</li> | |
<li onclick="toggle('pre70294003399580', 'post70294003399580')"> !options[:validate] || valid? ? super : false | |
</li> | |
<li onclick="toggle('pre70294003399580', 'post70294003399580')"> end | |
</li> | |
<li onclick="toggle('pre70294003399580', 'post70294003399580')"> | |
</li> | |
<li onclick="toggle('pre70294003399580', 'post70294003399580')"> def valid?(context = nil) | |
</li> | |
<li onclick="toggle('pre70294003399580', 'post70294003399580')"> context ||= (new_record? ? :create : :update) | |
</li> | |
</ol> | |
<ol start="27" class="context-line"> | |
<li onclick="toggle('pre70294003399580', 'post70294003399580')"> super(context)<span>...</span></li></ol> | |
<ol start='28' class="post-context" id="post70294003399580"> | |
<li onclick="toggle('pre70294003399580', 'post70294003399580')"> end | |
</li> | |
<li onclick="toggle('pre70294003399580', 'post70294003399580')"> | |
</li> | |
<li onclick="toggle('pre70294003399580', 'post70294003399580')"> class UniquenessValidator < ::ActiveModel::EachValidator | |
</li> | |
<li onclick="toggle('pre70294003399580', 'post70294003399580')"> def initialize(options) | |
</li> | |
<li onclick="toggle('pre70294003399580', 'post70294003399580')"> super(options.reverse_merge(:case_sensitive => true)) | |
</li> | |
<li onclick="toggle('pre70294003399580', 'post70294003399580')"> end | |
</li> | |
<li onclick="toggle('pre70294003399580', 'post70294003399580')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/validations.rb</code>: in <code>save</code> | |
<div class="context" id="c70294003458100"> | |
<ol start="15" class="pre-context" id="pre70294003458100"> | |
<li onclick="toggle('pre70294003458100', 'post70294003458100')"> def validates_associated(*attr_names) | |
</li> | |
<li onclick="toggle('pre70294003458100', 'post70294003458100')"> validates_with AssociatedValidator, _merge_attributes(attr_names) | |
</li> | |
<li onclick="toggle('pre70294003458100', 'post70294003458100')"> end | |
</li> | |
<li onclick="toggle('pre70294003458100', 'post70294003458100')"> end | |
</li> | |
<li onclick="toggle('pre70294003458100', 'post70294003458100')"> | |
</li> | |
<li onclick="toggle('pre70294003458100', 'post70294003458100')"> def save(options = {}) | |
</li> | |
<li onclick="toggle('pre70294003458100', 'post70294003458100')"> options = options.reverse_merge(:validate => true) | |
</li> | |
</ol> | |
<ol start="22" class="context-line"> | |
<li onclick="toggle('pre70294003458100', 'post70294003458100')"> !options[:validate] || valid? ? super : false<span>...</span></li></ol> | |
<ol start='23' class="post-context" id="post70294003458100"> | |
<li onclick="toggle('pre70294003458100', 'post70294003458100')"> end | |
</li> | |
<li onclick="toggle('pre70294003458100', 'post70294003458100')"> | |
</li> | |
<li onclick="toggle('pre70294003458100', 'post70294003458100')"> def valid?(context = nil) | |
</li> | |
<li onclick="toggle('pre70294003458100', 'post70294003458100')"> context ||= (new_record? ? :create : :update) | |
</li> | |
<li onclick="toggle('pre70294003458100', 'post70294003458100')"> super(context) | |
</li> | |
<li onclick="toggle('pre70294003458100', 'post70294003458100')"> end | |
</li> | |
<li onclick="toggle('pre70294003458100', 'post70294003458100')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/identity_map.rb</code>: in <code>save</code> | |
<div class="context" id="c70294003543580"> | |
<ol start="103" class="pre-context" id="pre70294003543580"> | |
<li onclick="toggle('pre70294003543580', 'post70294003543580')"> end | |
</li> | |
<li onclick="toggle('pre70294003543580', 'post70294003543580')"> | |
</li> | |
<li onclick="toggle('pre70294003543580', 'post70294003543580')"> document | |
</li> | |
<li onclick="toggle('pre70294003543580', 'post70294003543580')"> end | |
</li> | |
<li onclick="toggle('pre70294003543580', 'post70294003543580')"> end | |
</li> | |
<li onclick="toggle('pre70294003543580', 'post70294003543580')"> | |
</li> | |
<li onclick="toggle('pre70294003543580', 'post70294003543580')"> def save(*args) | |
</li> | |
</ol> | |
<ol start="110" class="context-line"> | |
<li onclick="toggle('pre70294003543580', 'post70294003543580')"> super.tap { |result| add_to_identity_map if result }<span>...</span></li></ol> | |
<ol start='111' class="post-context" id="post70294003543580"> | |
<li onclick="toggle('pre70294003543580', 'post70294003543580')"> end | |
</li> | |
<li onclick="toggle('pre70294003543580', 'post70294003543580')"> | |
</li> | |
<li onclick="toggle('pre70294003543580', 'post70294003543580')"> def delete | |
</li> | |
<li onclick="toggle('pre70294003543580', 'post70294003543580')"> super.tap { remove_from_identity_map } | |
</li> | |
<li onclick="toggle('pre70294003543580', 'post70294003543580')"> end | |
</li> | |
<li onclick="toggle('pre70294003543580', 'post70294003543580')"> | |
</li> | |
<li onclick="toggle('pre70294003543580', 'post70294003543580')"> def add_to_identity_map | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/querying.rb</code>: in <code>save!</code> | |
<div class="context" id="c70294003596520"> | |
<ol start="111" class="pre-context" id="pre70294003596520"> | |
<li onclick="toggle('pre70294003596520', 'post70294003596520')"> def save(options={}) | |
</li> | |
<li onclick="toggle('pre70294003596520', 'post70294003596520')"> options.assert_valid_keys(:validate, :safe) | |
</li> | |
<li onclick="toggle('pre70294003596520', 'post70294003596520')"> create_or_update(options) | |
</li> | |
<li onclick="toggle('pre70294003596520', 'post70294003596520')"> end | |
</li> | |
<li onclick="toggle('pre70294003596520', 'post70294003596520')"> | |
</li> | |
<li onclick="toggle('pre70294003596520', 'post70294003596520')"> def save!(options={}) | |
</li> | |
<li onclick="toggle('pre70294003596520', 'post70294003596520')"> options.assert_valid_keys(:safe) | |
</li> | |
</ol> | |
<ol start="118" class="context-line"> | |
<li onclick="toggle('pre70294003596520', 'post70294003596520')"> save(options) || raise(DocumentNotValid.new(self))<span>...</span></li></ol> | |
<ol start='119' class="post-context" id="post70294003596520"> | |
<li onclick="toggle('pre70294003596520', 'post70294003596520')"> end | |
</li> | |
<li onclick="toggle('pre70294003596520', 'post70294003596520')"> | |
</li> | |
<li onclick="toggle('pre70294003596520', 'post70294003596520')"> def destroy | |
</li> | |
<li onclick="toggle('pre70294003596520', 'post70294003596520')"> delete | |
</li> | |
<li onclick="toggle('pre70294003596520', 'post70294003596520')"> end | |
</li> | |
<li onclick="toggle('pre70294003596520', 'post70294003596520')"> | |
</li> | |
<li onclick="toggle('pre70294003596520', 'post70294003596520')"> def delete | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/associations/many_documents_proxy.rb</code>: in <code>create!</code> | |
<div class="context" id="c70294003641160"> | |
<ol start="43" class="pre-context" id="pre70294003641160"> | |
<li onclick="toggle('pre70294003641160', 'post70294003641160')"> apply_scope(doc).save | |
</li> | |
<li onclick="toggle('pre70294003641160', 'post70294003641160')"> reset | |
</li> | |
<li onclick="toggle('pre70294003641160', 'post70294003641160')"> doc | |
</li> | |
<li onclick="toggle('pre70294003641160', 'post70294003641160')"> end | |
</li> | |
<li onclick="toggle('pre70294003641160', 'post70294003641160')"> | |
</li> | |
<li onclick="toggle('pre70294003641160', 'post70294003641160')"> def create!(attrs={}) | |
</li> | |
<li onclick="toggle('pre70294003641160', 'post70294003641160')"> doc = klass.new(attrs) | |
</li> | |
</ol> | |
<ol start="50" class="context-line"> | |
<li onclick="toggle('pre70294003641160', 'post70294003641160')"> apply_scope(doc).save!<span>...</span></li></ol> | |
<ol start='51' class="post-context" id="post70294003641160"> | |
<li onclick="toggle('pre70294003641160', 'post70294003641160')"> reset | |
</li> | |
<li onclick="toggle('pre70294003641160', 'post70294003641160')"> doc | |
</li> | |
<li onclick="toggle('pre70294003641160', 'post70294003641160')"> end | |
</li> | |
<li onclick="toggle('pre70294003641160', 'post70294003641160')"> | |
</li> | |
<li onclick="toggle('pre70294003641160', 'post70294003641160')"> def destroy_all(options={}) | |
</li> | |
<li onclick="toggle('pre70294003641160', 'post70294003641160')"> all(options).each { |doc| doc.destroy } | |
</li> | |
<li onclick="toggle('pre70294003641160', 'post70294003641160')"> reset | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/www/divshot/api/app/models/hosting/hosted_application.rb</code>: in <code>add_custom_domain</code> | |
<div class="context" id="c70294003676600"> | |
<ol start="58" class="pre-context" id="pre70294003676600"> | |
<li onclick="toggle('pre70294003676600', 'post70294003676600')"> def provision_dns_and_cdn | |
</li> | |
<li onclick="toggle('pre70294003676600', 'post70294003676600')"> DomainService.new(self).provision! | |
</li> | |
<li onclick="toggle('pre70294003676600', 'post70294003676600')"> add_custom_domain("#{name}.#{ENV['DIO_DOMAIN']}") | |
</li> | |
<li onclick="toggle('pre70294003676600', 'post70294003676600')"> save | |
</li> | |
<li onclick="toggle('pre70294003676600', 'post70294003676600')"> end | |
</li> | |
<li onclick="toggle('pre70294003676600', 'post70294003676600')"> | |
</li> | |
<li onclick="toggle('pre70294003676600', 'post70294003676600')"> def add_custom_domain(name) | |
</li> | |
</ol> | |
<ol start="65" class="context-line"> | |
<li onclick="toggle('pre70294003676600', 'post70294003676600')"> domains.create!(name: name, application: self)<span>...</span></li></ol> | |
<ol start='66' class="post-context" id="post70294003676600"> | |
<li onclick="toggle('pre70294003676600', 'post70294003676600')"> end | |
</li> | |
<li onclick="toggle('pre70294003676600', 'post70294003676600')"> | |
</li> | |
<li onclick="toggle('pre70294003676600', 'post70294003676600')"> def remove_custom_domain(name) | |
</li> | |
<li onclick="toggle('pre70294003676600', 'post70294003676600')"> domains.where(name: name).first.destroy | |
</li> | |
<li onclick="toggle('pre70294003676600', 'post70294003676600')"> end | |
</li> | |
<li onclick="toggle('pre70294003676600', 'post70294003676600')"> | |
</li> | |
<li onclick="toggle('pre70294003676600', 'post70294003676600')"> # FIXME: why does this method work, but 'many' does not? | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/www/divshot/api/app/models/hosting/hosted_application.rb</code>: in <code>provision_dns_and_cdn</code> | |
<div class="context" id="c70294003804180"> | |
<ol start="53" class="pre-context" id="pre70294003804180"> | |
<li onclick="toggle('pre70294003804180', 'post70294003804180')"> | |
</li> | |
<li onclick="toggle('pre70294003804180', 'post70294003804180')"> def has_domain?(name) | |
</li> | |
<li onclick="toggle('pre70294003804180', 'post70294003804180')"> domains.where(name:name).any? | |
</li> | |
<li onclick="toggle('pre70294003804180', 'post70294003804180')"> end | |
</li> | |
<li onclick="toggle('pre70294003804180', 'post70294003804180')"> | |
</li> | |
<li onclick="toggle('pre70294003804180', 'post70294003804180')"> def provision_dns_and_cdn | |
</li> | |
<li onclick="toggle('pre70294003804180', 'post70294003804180')"> DomainService.new(self).provision! | |
</li> | |
</ol> | |
<ol start="60" class="context-line"> | |
<li onclick="toggle('pre70294003804180', 'post70294003804180')"> add_custom_domain("#{name}.#{ENV['DIO_DOMAIN']}")<span>...</span></li></ol> | |
<ol start='61' class="post-context" id="post70294003804180"> | |
<li onclick="toggle('pre70294003804180', 'post70294003804180')"> save | |
</li> | |
<li onclick="toggle('pre70294003804180', 'post70294003804180')"> end | |
</li> | |
<li onclick="toggle('pre70294003804180', 'post70294003804180')"> | |
</li> | |
<li onclick="toggle('pre70294003804180', 'post70294003804180')"> def add_custom_domain(name) | |
</li> | |
<li onclick="toggle('pre70294003804180', 'post70294003804180')"> domains.create!(name: name, application: self) | |
</li> | |
<li onclick="toggle('pre70294003804180', 'post70294003804180')"> end | |
</li> | |
<li onclick="toggle('pre70294003804180', 'post70294003804180')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>_run__3966229577945123102__create__1485707892267497542__callbacks</code> | |
<div class="context" id="c70294003839500"> | |
<ol start="398" class="pre-context" id="pre70294003839500"> | |
<li onclick="toggle('pre70294003839500', 'post70294003839500')"> unless object.respond_to?(name, true) | |
</li> | |
<li onclick="toggle('pre70294003839500', 'post70294003839500')"> str = object.send("_#{kind}_callbacks").compile(key, object) | |
</li> | |
<li onclick="toggle('pre70294003839500', 'post70294003839500')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294003839500', 'post70294003839500')"> def #{name}() #{str} end | |
</li> | |
<li onclick="toggle('pre70294003839500', 'post70294003839500')"> protected :#{name} | |
</li> | |
<li onclick="toggle('pre70294003839500', 'post70294003839500')"> RUBY_EVAL | |
</li> | |
<li onclick="toggle('pre70294003839500', 'post70294003839500')"> end | |
</li> | |
</ol> | |
<ol start="405" class="context-line"> | |
<li onclick="toggle('pre70294003839500', 'post70294003839500')"> object.send(name, &blk)<span>...</span></li></ol> | |
<ol start='406' class="post-context" id="post70294003839500"> | |
<li onclick="toggle('pre70294003839500', 'post70294003839500')"> end | |
</li> | |
<li onclick="toggle('pre70294003839500', 'post70294003839500')"> | |
</li> | |
<li onclick="toggle('pre70294003839500', 'post70294003839500')"> def __reset_runner(symbol) | |
</li> | |
<li onclick="toggle('pre70294003839500', 'post70294003839500')"> name = __callback_runner_name(nil, symbol) | |
</li> | |
<li onclick="toggle('pre70294003839500', 'post70294003839500')"> undef_method(name) if method_defined?(name) | |
</li> | |
<li onclick="toggle('pre70294003839500', 'post70294003839500')"> end | |
</li> | |
<li onclick="toggle('pre70294003839500', 'post70294003839500')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>__run_callback</code> | |
<div class="context" id="c70294004146480"> | |
<ol start="398" class="pre-context" id="pre70294004146480"> | |
<li onclick="toggle('pre70294004146480', 'post70294004146480')"> unless object.respond_to?(name, true) | |
</li> | |
<li onclick="toggle('pre70294004146480', 'post70294004146480')"> str = object.send("_#{kind}_callbacks").compile(key, object) | |
</li> | |
<li onclick="toggle('pre70294004146480', 'post70294004146480')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294004146480', 'post70294004146480')"> def #{name}() #{str} end | |
</li> | |
<li onclick="toggle('pre70294004146480', 'post70294004146480')"> protected :#{name} | |
</li> | |
<li onclick="toggle('pre70294004146480', 'post70294004146480')"> RUBY_EVAL | |
</li> | |
<li onclick="toggle('pre70294004146480', 'post70294004146480')"> end | |
</li> | |
</ol> | |
<ol start="405" class="context-line"> | |
<li onclick="toggle('pre70294004146480', 'post70294004146480')"> object.send(name, &blk)<span>...</span></li></ol> | |
<ol start='406' class="post-context" id="post70294004146480"> | |
<li onclick="toggle('pre70294004146480', 'post70294004146480')"> end | |
</li> | |
<li onclick="toggle('pre70294004146480', 'post70294004146480')"> | |
</li> | |
<li onclick="toggle('pre70294004146480', 'post70294004146480')"> def __reset_runner(symbol) | |
</li> | |
<li onclick="toggle('pre70294004146480', 'post70294004146480')"> name = __callback_runner_name(nil, symbol) | |
</li> | |
<li onclick="toggle('pre70294004146480', 'post70294004146480')"> undef_method(name) if method_defined?(name) | |
</li> | |
<li onclick="toggle('pre70294004146480', 'post70294004146480')"> end | |
</li> | |
<li onclick="toggle('pre70294004146480', 'post70294004146480')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>_run_create_callbacks</code> | |
<div class="context" id="c70294004474880"> | |
<ol start="378" class="pre-context" id="pre70294004474880"> | |
<li onclick="toggle('pre70294004474880', 'post70294004474880')"> module ClassMethods | |
</li> | |
<li onclick="toggle('pre70294004474880', 'post70294004474880')"> # Generate the internal runner method called by +run_callbacks+. | |
</li> | |
<li onclick="toggle('pre70294004474880', 'post70294004474880')"> def __define_runner(symbol) #:nodoc: | |
</li> | |
<li onclick="toggle('pre70294004474880', 'post70294004474880')"> runner_method = "_run_#{symbol}_callbacks" | |
</li> | |
<li onclick="toggle('pre70294004474880', 'post70294004474880')"> unless private_method_defined?(runner_method) | |
</li> | |
<li onclick="toggle('pre70294004474880', 'post70294004474880')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294004474880', 'post70294004474880')"> def #{runner_method}(key = nil, &blk) | |
</li> | |
</ol> | |
<ol start="385" class="context-line"> | |
<li onclick="toggle('pre70294004474880', 'post70294004474880')"> self.class.__run_callback(key, :#{symbol}, self, &blk)<span>...</span></li></ol> | |
<ol start='386' class="post-context" id="post70294004474880"> | |
<li onclick="toggle('pre70294004474880', 'post70294004474880')"> end | |
</li> | |
<li onclick="toggle('pre70294004474880', 'post70294004474880')"> private :#{runner_method} | |
</li> | |
<li onclick="toggle('pre70294004474880', 'post70294004474880')"> RUBY_EVAL | |
</li> | |
<li onclick="toggle('pre70294004474880', 'post70294004474880')"> end | |
</li> | |
<li onclick="toggle('pre70294004474880', 'post70294004474880')"> end | |
</li> | |
<li onclick="toggle('pre70294004474880', 'post70294004474880')"> | |
</li> | |
<li onclick="toggle('pre70294004474880', 'post70294004474880')"> # This method calls the callback method for the given key. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>run_callbacks</code> | |
<div class="context" id="c70294004594220"> | |
<ol start="74" class="pre-context" id="pre70294004594220"> | |
<li onclick="toggle('pre70294004594220', 'post70294004594220')"> # of the block, or +true+ if no block is given. | |
</li> | |
<li onclick="toggle('pre70294004594220', 'post70294004594220')"> # | |
</li> | |
<li onclick="toggle('pre70294004594220', 'post70294004594220')"> # run_callbacks :save do | |
</li> | |
<li onclick="toggle('pre70294004594220', 'post70294004594220')"> # save | |
</li> | |
<li onclick="toggle('pre70294004594220', 'post70294004594220')"> # end | |
</li> | |
<li onclick="toggle('pre70294004594220', 'post70294004594220')"> # | |
</li> | |
<li onclick="toggle('pre70294004594220', 'post70294004594220')"> def run_callbacks(kind, *args, &block) | |
</li> | |
</ol> | |
<ol start="81" class="context-line"> | |
<li onclick="toggle('pre70294004594220', 'post70294004594220')"> send("_run_#{kind}_callbacks", *args, &block)<span>...</span></li></ol> | |
<ol start='82' class="post-context" id="post70294004594220"> | |
<li onclick="toggle('pre70294004594220', 'post70294004594220')"> end | |
</li> | |
<li onclick="toggle('pre70294004594220', 'post70294004594220')"> | |
</li> | |
<li onclick="toggle('pre70294004594220', 'post70294004594220')"> private | |
</li> | |
<li onclick="toggle('pre70294004594220', 'post70294004594220')"> | |
</li> | |
<li onclick="toggle('pre70294004594220', 'post70294004594220')"> # A hook invoked everytime a before callback is halted. | |
</li> | |
<li onclick="toggle('pre70294004594220', 'post70294004594220')"> # This can be overriden in AS::Callback implementors in order | |
</li> | |
<li onclick="toggle('pre70294004594220', 'post70294004594220')"> # to provide better debugging/logging. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/embedded_callbacks.rb</code>: in <code>run_callbacks</code> | |
<div class="context" id="c70294004819980"> | |
<ol start="45" class="pre-context" id="pre70294004819980"> | |
<li onclick="toggle('pre70294004819980', 'post70294004819980')"> lambda { doc.run_callbacks(callback, *args, &chain) } | |
</li> | |
<li onclick="toggle('pre70294004819980', 'post70294004819980')"> else | |
</li> | |
<li onclick="toggle('pre70294004819980', 'post70294004819980')"> chain | |
</li> | |
<li onclick="toggle('pre70294004819980', 'post70294004819980')"> end | |
</li> | |
<li onclick="toggle('pre70294004819980', 'post70294004819980')"> end | |
</li> | |
<li onclick="toggle('pre70294004819980', 'post70294004819980')"> end | |
</li> | |
<li onclick="toggle('pre70294004819980', 'post70294004819980')"> | |
</li> | |
</ol> | |
<ol start="52" class="context-line"> | |
<li onclick="toggle('pre70294004819980', 'post70294004819980')"> super callback, *args, &block<span>...</span></li></ol> | |
<ol start='53' class="post-context" id="post70294004819980"> | |
<li onclick="toggle('pre70294004819980', 'post70294004819980')"> end | |
</li> | |
<li onclick="toggle('pre70294004819980', 'post70294004819980')"> end | |
</li> | |
<li onclick="toggle('pre70294004819980', 'post70294004819980')"> end | |
</li> | |
<li onclick="toggle('pre70294004819980', 'post70294004819980')">end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/callbacks.rb</code>: in <code>create</code> | |
<div class="context" id="c70294004855160"> | |
<ol start="14" class="pre-context" id="pre70294004855160"> | |
<li onclick="toggle('pre70294004855160', 'post70294004855160')"> | |
</li> | |
<li onclick="toggle('pre70294004855160', 'post70294004855160')"> private | |
</li> | |
<li onclick="toggle('pre70294004855160', 'post70294004855160')"> def create_or_update(*) | |
</li> | |
<li onclick="toggle('pre70294004855160', 'post70294004855160')"> run_callbacks(:save) { super } | |
</li> | |
<li onclick="toggle('pre70294004855160', 'post70294004855160')"> end | |
</li> | |
<li onclick="toggle('pre70294004855160', 'post70294004855160')"> | |
</li> | |
<li onclick="toggle('pre70294004855160', 'post70294004855160')"> def create(*) | |
</li> | |
</ol> | |
<ol start="21" class="context-line"> | |
<li onclick="toggle('pre70294004855160', 'post70294004855160')"> run_callbacks(:create) { super }<span>...</span></li></ol> | |
<ol start='22' class="post-context" id="post70294004855160"> | |
<li onclick="toggle('pre70294004855160', 'post70294004855160')"> end | |
</li> | |
<li onclick="toggle('pre70294004855160', 'post70294004855160')"> | |
</li> | |
<li onclick="toggle('pre70294004855160', 'post70294004855160')"> def update(*) | |
</li> | |
<li onclick="toggle('pre70294004855160', 'post70294004855160')"> run_callbacks(:update) { super } | |
</li> | |
<li onclick="toggle('pre70294004855160', 'post70294004855160')"> end | |
</li> | |
<li onclick="toggle('pre70294004855160', 'post70294004855160')"> end | |
</li> | |
<li onclick="toggle('pre70294004855160', 'post70294004855160')"> end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/querying.rb</code>: in <code>create_or_update</code> | |
<div class="context" id="c70294004886840"> | |
<ol start="124" class="pre-context" id="pre70294004886840"> | |
<li onclick="toggle('pre70294004886840', 'post70294004886840')"> | |
</li> | |
<li onclick="toggle('pre70294004886840', 'post70294004886840')"> def delete | |
</li> | |
<li onclick="toggle('pre70294004886840', 'post70294004886840')"> self.class.delete(id).tap { @_destroyed = true } if persisted? | |
</li> | |
<li onclick="toggle('pre70294004886840', 'post70294004886840')"> end | |
</li> | |
<li onclick="toggle('pre70294004886840', 'post70294004886840')"> | |
</li> | |
<li onclick="toggle('pre70294004886840', 'post70294004886840')"> private | |
</li> | |
<li onclick="toggle('pre70294004886840', 'post70294004886840')"> def create_or_update(options={}) | |
</li> | |
</ol> | |
<ol start="131" class="context-line"> | |
<li onclick="toggle('pre70294004886840', 'post70294004886840')"> result = persisted? ? update(options) : create(options)<span>...</span></li></ol> | |
<ol start='132' class="post-context" id="post70294004886840"> | |
<li onclick="toggle('pre70294004886840', 'post70294004886840')"> result != false | |
</li> | |
<li onclick="toggle('pre70294004886840', 'post70294004886840')"> end | |
</li> | |
<li onclick="toggle('pre70294004886840', 'post70294004886840')"> | |
</li> | |
<li onclick="toggle('pre70294004886840', 'post70294004886840')"> def create(options={}) | |
</li> | |
<li onclick="toggle('pre70294004886840', 'post70294004886840')"> save_to_collection(options) | |
</li> | |
<li onclick="toggle('pre70294004886840', 'post70294004886840')"> end | |
</li> | |
<li onclick="toggle('pre70294004886840', 'post70294004886840')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/callbacks.rb</code>: in <code>block in create_or_update</code> | |
<div class="context" id="c70294005002220"> | |
<ol start="10" class="pre-context" id="pre70294005002220"> | |
<li onclick="toggle('pre70294005002220', 'post70294005002220')"> | |
</li> | |
<li onclick="toggle('pre70294005002220', 'post70294005002220')"> def touch(*) | |
</li> | |
<li onclick="toggle('pre70294005002220', 'post70294005002220')"> run_callbacks(:touch) { super } | |
</li> | |
<li onclick="toggle('pre70294005002220', 'post70294005002220')"> end | |
</li> | |
<li onclick="toggle('pre70294005002220', 'post70294005002220')"> | |
</li> | |
<li onclick="toggle('pre70294005002220', 'post70294005002220')"> private | |
</li> | |
<li onclick="toggle('pre70294005002220', 'post70294005002220')"> def create_or_update(*) | |
</li> | |
</ol> | |
<ol start="17" class="context-line"> | |
<li onclick="toggle('pre70294005002220', 'post70294005002220')"> run_callbacks(:save) { super }<span>...</span></li></ol> | |
<ol start='18' class="post-context" id="post70294005002220"> | |
<li onclick="toggle('pre70294005002220', 'post70294005002220')"> end | |
</li> | |
<li onclick="toggle('pre70294005002220', 'post70294005002220')"> | |
</li> | |
<li onclick="toggle('pre70294005002220', 'post70294005002220')"> def create(*) | |
</li> | |
<li onclick="toggle('pre70294005002220', 'post70294005002220')"> run_callbacks(:create) { super } | |
</li> | |
<li onclick="toggle('pre70294005002220', 'post70294005002220')"> end | |
</li> | |
<li onclick="toggle('pre70294005002220', 'post70294005002220')"> | |
</li> | |
<li onclick="toggle('pre70294005002220', 'post70294005002220')"> def update(*) | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>_run__3816160412465385381__save__1485707892267497542__callbacks</code> | |
<div class="context" id="c70294005036080"> | |
<ol start="396" class="pre-context" id="pre70294005036080"> | |
<li onclick="toggle('pre70294005036080', 'post70294005036080')"> def __run_callback(key, kind, object, &blk) #:nodoc: | |
</li> | |
<li onclick="toggle('pre70294005036080', 'post70294005036080')"> name = __callback_runner_name(key, kind) | |
</li> | |
<li onclick="toggle('pre70294005036080', 'post70294005036080')"> unless object.respond_to?(name, true) | |
</li> | |
<li onclick="toggle('pre70294005036080', 'post70294005036080')"> str = object.send("_#{kind}_callbacks").compile(key, object) | |
</li> | |
<li onclick="toggle('pre70294005036080', 'post70294005036080')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294005036080', 'post70294005036080')"> def #{name}() #{str} end | |
</li> | |
<li onclick="toggle('pre70294005036080', 'post70294005036080')"> protected :#{name} | |
</li> | |
</ol> | |
<ol start="403" class="context-line"> | |
<li onclick="toggle('pre70294005036080', 'post70294005036080')"> RUBY_EVAL<span>...</span></li></ol> | |
<ol start='404' class="post-context" id="post70294005036080"> | |
<li onclick="toggle('pre70294005036080', 'post70294005036080')"> end | |
</li> | |
<li onclick="toggle('pre70294005036080', 'post70294005036080')"> object.send(name, &blk) | |
</li> | |
<li onclick="toggle('pre70294005036080', 'post70294005036080')"> end | |
</li> | |
<li onclick="toggle('pre70294005036080', 'post70294005036080')"> | |
</li> | |
<li onclick="toggle('pre70294005036080', 'post70294005036080')"> def __reset_runner(symbol) | |
</li> | |
<li onclick="toggle('pre70294005036080', 'post70294005036080')"> name = __callback_runner_name(nil, symbol) | |
</li> | |
<li onclick="toggle('pre70294005036080', 'post70294005036080')"> undef_method(name) if method_defined?(name) | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>__run_callback</code> | |
<div class="context" id="c70294005282100"> | |
<ol start="398" class="pre-context" id="pre70294005282100"> | |
<li onclick="toggle('pre70294005282100', 'post70294005282100')"> unless object.respond_to?(name, true) | |
</li> | |
<li onclick="toggle('pre70294005282100', 'post70294005282100')"> str = object.send("_#{kind}_callbacks").compile(key, object) | |
</li> | |
<li onclick="toggle('pre70294005282100', 'post70294005282100')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294005282100', 'post70294005282100')"> def #{name}() #{str} end | |
</li> | |
<li onclick="toggle('pre70294005282100', 'post70294005282100')"> protected :#{name} | |
</li> | |
<li onclick="toggle('pre70294005282100', 'post70294005282100')"> RUBY_EVAL | |
</li> | |
<li onclick="toggle('pre70294005282100', 'post70294005282100')"> end | |
</li> | |
</ol> | |
<ol start="405" class="context-line"> | |
<li onclick="toggle('pre70294005282100', 'post70294005282100')"> object.send(name, &blk)<span>...</span></li></ol> | |
<ol start='406' class="post-context" id="post70294005282100"> | |
<li onclick="toggle('pre70294005282100', 'post70294005282100')"> end | |
</li> | |
<li onclick="toggle('pre70294005282100', 'post70294005282100')"> | |
</li> | |
<li onclick="toggle('pre70294005282100', 'post70294005282100')"> def __reset_runner(symbol) | |
</li> | |
<li onclick="toggle('pre70294005282100', 'post70294005282100')"> name = __callback_runner_name(nil, symbol) | |
</li> | |
<li onclick="toggle('pre70294005282100', 'post70294005282100')"> undef_method(name) if method_defined?(name) | |
</li> | |
<li onclick="toggle('pre70294005282100', 'post70294005282100')"> end | |
</li> | |
<li onclick="toggle('pre70294005282100', 'post70294005282100')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>_run_save_callbacks</code> | |
<div class="context" id="c70294005727000"> | |
<ol start="378" class="pre-context" id="pre70294005727000"> | |
<li onclick="toggle('pre70294005727000', 'post70294005727000')"> module ClassMethods | |
</li> | |
<li onclick="toggle('pre70294005727000', 'post70294005727000')"> # Generate the internal runner method called by +run_callbacks+. | |
</li> | |
<li onclick="toggle('pre70294005727000', 'post70294005727000')"> def __define_runner(symbol) #:nodoc: | |
</li> | |
<li onclick="toggle('pre70294005727000', 'post70294005727000')"> runner_method = "_run_#{symbol}_callbacks" | |
</li> | |
<li onclick="toggle('pre70294005727000', 'post70294005727000')"> unless private_method_defined?(runner_method) | |
</li> | |
<li onclick="toggle('pre70294005727000', 'post70294005727000')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294005727000', 'post70294005727000')"> def #{runner_method}(key = nil, &blk) | |
</li> | |
</ol> | |
<ol start="385" class="context-line"> | |
<li onclick="toggle('pre70294005727000', 'post70294005727000')"> self.class.__run_callback(key, :#{symbol}, self, &blk)<span>...</span></li></ol> | |
<ol start='386' class="post-context" id="post70294005727000"> | |
<li onclick="toggle('pre70294005727000', 'post70294005727000')"> end | |
</li> | |
<li onclick="toggle('pre70294005727000', 'post70294005727000')"> private :#{runner_method} | |
</li> | |
<li onclick="toggle('pre70294005727000', 'post70294005727000')"> RUBY_EVAL | |
</li> | |
<li onclick="toggle('pre70294005727000', 'post70294005727000')"> end | |
</li> | |
<li onclick="toggle('pre70294005727000', 'post70294005727000')"> end | |
</li> | |
<li onclick="toggle('pre70294005727000', 'post70294005727000')"> | |
</li> | |
<li onclick="toggle('pre70294005727000', 'post70294005727000')"> # This method calls the callback method for the given key. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>run_callbacks</code> | |
<div class="context" id="c70294014417240"> | |
<ol start="74" class="pre-context" id="pre70294014417240"> | |
<li onclick="toggle('pre70294014417240', 'post70294014417240')"> # of the block, or +true+ if no block is given. | |
</li> | |
<li onclick="toggle('pre70294014417240', 'post70294014417240')"> # | |
</li> | |
<li onclick="toggle('pre70294014417240', 'post70294014417240')"> # run_callbacks :save do | |
</li> | |
<li onclick="toggle('pre70294014417240', 'post70294014417240')"> # save | |
</li> | |
<li onclick="toggle('pre70294014417240', 'post70294014417240')"> # end | |
</li> | |
<li onclick="toggle('pre70294014417240', 'post70294014417240')"> # | |
</li> | |
<li onclick="toggle('pre70294014417240', 'post70294014417240')"> def run_callbacks(kind, *args, &block) | |
</li> | |
</ol> | |
<ol start="81" class="context-line"> | |
<li onclick="toggle('pre70294014417240', 'post70294014417240')"> send("_run_#{kind}_callbacks", *args, &block)<span>...</span></li></ol> | |
<ol start='82' class="post-context" id="post70294014417240"> | |
<li onclick="toggle('pre70294014417240', 'post70294014417240')"> end | |
</li> | |
<li onclick="toggle('pre70294014417240', 'post70294014417240')"> | |
</li> | |
<li onclick="toggle('pre70294014417240', 'post70294014417240')"> private | |
</li> | |
<li onclick="toggle('pre70294014417240', 'post70294014417240')"> | |
</li> | |
<li onclick="toggle('pre70294014417240', 'post70294014417240')"> # A hook invoked everytime a before callback is halted. | |
</li> | |
<li onclick="toggle('pre70294014417240', 'post70294014417240')"> # This can be overriden in AS::Callback implementors in order | |
</li> | |
<li onclick="toggle('pre70294014417240', 'post70294014417240')"> # to provide better debugging/logging. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/embedded_callbacks.rb</code>: in <code>run_callbacks</code> | |
<div class="context" id="c70294014822220"> | |
<ol start="45" class="pre-context" id="pre70294014822220"> | |
<li onclick="toggle('pre70294014822220', 'post70294014822220')"> lambda { doc.run_callbacks(callback, *args, &chain) } | |
</li> | |
<li onclick="toggle('pre70294014822220', 'post70294014822220')"> else | |
</li> | |
<li onclick="toggle('pre70294014822220', 'post70294014822220')"> chain | |
</li> | |
<li onclick="toggle('pre70294014822220', 'post70294014822220')"> end | |
</li> | |
<li onclick="toggle('pre70294014822220', 'post70294014822220')"> end | |
</li> | |
<li onclick="toggle('pre70294014822220', 'post70294014822220')"> end | |
</li> | |
<li onclick="toggle('pre70294014822220', 'post70294014822220')"> | |
</li> | |
</ol> | |
<ol start="52" class="context-line"> | |
<li onclick="toggle('pre70294014822220', 'post70294014822220')"> super callback, *args, &block<span>...</span></li></ol> | |
<ol start='53' class="post-context" id="post70294014822220"> | |
<li onclick="toggle('pre70294014822220', 'post70294014822220')"> end | |
</li> | |
<li onclick="toggle('pre70294014822220', 'post70294014822220')"> end | |
</li> | |
<li onclick="toggle('pre70294014822220', 'post70294014822220')"> end | |
</li> | |
<li onclick="toggle('pre70294014822220', 'post70294014822220')">end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/embedded_callbacks.rb</code>: in <code>block (2 levels) in run_callbacks</code> | |
<div class="context" id="c70294014855440"> | |
<ol start="38" class="pre-context" id="pre70294014855440"> | |
<li onclick="toggle('pre70294014855440', 'post70294014855440')"> | |
</li> | |
<li onclick="toggle('pre70294014855440', 'post70294014855440')"> embedded_associations.each do |association| | |
</li> | |
<li onclick="toggle('pre70294014855440', 'post70294014855440')"> embedded_docs += Array(get_proxy(association).send(:load_target)) | |
</li> | |
<li onclick="toggle('pre70294014855440', 'post70294014855440')"> end | |
</li> | |
<li onclick="toggle('pre70294014855440', 'post70294014855440')"> | |
</li> | |
<li onclick="toggle('pre70294014855440', 'post70294014855440')"> block = embedded_docs.inject(block) do |chain, doc| | |
</li> | |
<li onclick="toggle('pre70294014855440', 'post70294014855440')"> if doc.class.respond_to?("_#{callback}_callbacks") | |
</li> | |
</ol> | |
<ol start="45" class="context-line"> | |
<li onclick="toggle('pre70294014855440', 'post70294014855440')"> lambda { doc.run_callbacks(callback, *args, &chain) }<span>...</span></li></ol> | |
<ol start='46' class="post-context" id="post70294014855440"> | |
<li onclick="toggle('pre70294014855440', 'post70294014855440')"> else | |
</li> | |
<li onclick="toggle('pre70294014855440', 'post70294014855440')"> chain | |
</li> | |
<li onclick="toggle('pre70294014855440', 'post70294014855440')"> end | |
</li> | |
<li onclick="toggle('pre70294014855440', 'post70294014855440')"> end | |
</li> | |
<li onclick="toggle('pre70294014855440', 'post70294014855440')"> end | |
</li> | |
<li onclick="toggle('pre70294014855440', 'post70294014855440')"> | |
</li> | |
<li onclick="toggle('pre70294014855440', 'post70294014855440')"> super callback, *args, &block | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>_run__3816160412465385381__save__1485707892267497542__callbacks</code> | |
<div class="context" id="c70294014926740"> | |
<ol start="396" class="pre-context" id="pre70294014926740"> | |
<li onclick="toggle('pre70294014926740', 'post70294014926740')"> def __run_callback(key, kind, object, &blk) #:nodoc: | |
</li> | |
<li onclick="toggle('pre70294014926740', 'post70294014926740')"> name = __callback_runner_name(key, kind) | |
</li> | |
<li onclick="toggle('pre70294014926740', 'post70294014926740')"> unless object.respond_to?(name, true) | |
</li> | |
<li onclick="toggle('pre70294014926740', 'post70294014926740')"> str = object.send("_#{kind}_callbacks").compile(key, object) | |
</li> | |
<li onclick="toggle('pre70294014926740', 'post70294014926740')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294014926740', 'post70294014926740')"> def #{name}() #{str} end | |
</li> | |
<li onclick="toggle('pre70294014926740', 'post70294014926740')"> protected :#{name} | |
</li> | |
</ol> | |
<ol start="403" class="context-line"> | |
<li onclick="toggle('pre70294014926740', 'post70294014926740')"> RUBY_EVAL<span>...</span></li></ol> | |
<ol start='404' class="post-context" id="post70294014926740"> | |
<li onclick="toggle('pre70294014926740', 'post70294014926740')"> end | |
</li> | |
<li onclick="toggle('pre70294014926740', 'post70294014926740')"> object.send(name, &blk) | |
</li> | |
<li onclick="toggle('pre70294014926740', 'post70294014926740')"> end | |
</li> | |
<li onclick="toggle('pre70294014926740', 'post70294014926740')"> | |
</li> | |
<li onclick="toggle('pre70294014926740', 'post70294014926740')"> def __reset_runner(symbol) | |
</li> | |
<li onclick="toggle('pre70294014926740', 'post70294014926740')"> name = __callback_runner_name(nil, symbol) | |
</li> | |
<li onclick="toggle('pre70294014926740', 'post70294014926740')"> undef_method(name) if method_defined?(name) | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>__run_callback</code> | |
<div class="context" id="c70294014969280"> | |
<ol start="398" class="pre-context" id="pre70294014969280"> | |
<li onclick="toggle('pre70294014969280', 'post70294014969280')"> unless object.respond_to?(name, true) | |
</li> | |
<li onclick="toggle('pre70294014969280', 'post70294014969280')"> str = object.send("_#{kind}_callbacks").compile(key, object) | |
</li> | |
<li onclick="toggle('pre70294014969280', 'post70294014969280')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294014969280', 'post70294014969280')"> def #{name}() #{str} end | |
</li> | |
<li onclick="toggle('pre70294014969280', 'post70294014969280')"> protected :#{name} | |
</li> | |
<li onclick="toggle('pre70294014969280', 'post70294014969280')"> RUBY_EVAL | |
</li> | |
<li onclick="toggle('pre70294014969280', 'post70294014969280')"> end | |
</li> | |
</ol> | |
<ol start="405" class="context-line"> | |
<li onclick="toggle('pre70294014969280', 'post70294014969280')"> object.send(name, &blk)<span>...</span></li></ol> | |
<ol start='406' class="post-context" id="post70294014969280"> | |
<li onclick="toggle('pre70294014969280', 'post70294014969280')"> end | |
</li> | |
<li onclick="toggle('pre70294014969280', 'post70294014969280')"> | |
</li> | |
<li onclick="toggle('pre70294014969280', 'post70294014969280')"> def __reset_runner(symbol) | |
</li> | |
<li onclick="toggle('pre70294014969280', 'post70294014969280')"> name = __callback_runner_name(nil, symbol) | |
</li> | |
<li onclick="toggle('pre70294014969280', 'post70294014969280')"> undef_method(name) if method_defined?(name) | |
</li> | |
<li onclick="toggle('pre70294014969280', 'post70294014969280')"> end | |
</li> | |
<li onclick="toggle('pre70294014969280', 'post70294014969280')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>_run_save_callbacks</code> | |
<div class="context" id="c70294015019220"> | |
<ol start="378" class="pre-context" id="pre70294015019220"> | |
<li onclick="toggle('pre70294015019220', 'post70294015019220')"> module ClassMethods | |
</li> | |
<li onclick="toggle('pre70294015019220', 'post70294015019220')"> # Generate the internal runner method called by +run_callbacks+. | |
</li> | |
<li onclick="toggle('pre70294015019220', 'post70294015019220')"> def __define_runner(symbol) #:nodoc: | |
</li> | |
<li onclick="toggle('pre70294015019220', 'post70294015019220')"> runner_method = "_run_#{symbol}_callbacks" | |
</li> | |
<li onclick="toggle('pre70294015019220', 'post70294015019220')"> unless private_method_defined?(runner_method) | |
</li> | |
<li onclick="toggle('pre70294015019220', 'post70294015019220')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294015019220', 'post70294015019220')"> def #{runner_method}(key = nil, &blk) | |
</li> | |
</ol> | |
<ol start="385" class="context-line"> | |
<li onclick="toggle('pre70294015019220', 'post70294015019220')"> self.class.__run_callback(key, :#{symbol}, self, &blk)<span>...</span></li></ol> | |
<ol start='386' class="post-context" id="post70294015019220"> | |
<li onclick="toggle('pre70294015019220', 'post70294015019220')"> end | |
</li> | |
<li onclick="toggle('pre70294015019220', 'post70294015019220')"> private :#{runner_method} | |
</li> | |
<li onclick="toggle('pre70294015019220', 'post70294015019220')"> RUBY_EVAL | |
</li> | |
<li onclick="toggle('pre70294015019220', 'post70294015019220')"> end | |
</li> | |
<li onclick="toggle('pre70294015019220', 'post70294015019220')"> end | |
</li> | |
<li onclick="toggle('pre70294015019220', 'post70294015019220')"> | |
</li> | |
<li onclick="toggle('pre70294015019220', 'post70294015019220')"> # This method calls the callback method for the given key. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>run_callbacks</code> | |
<div class="context" id="c70294015070620"> | |
<ol start="74" class="pre-context" id="pre70294015070620"> | |
<li onclick="toggle('pre70294015070620', 'post70294015070620')"> # of the block, or +true+ if no block is given. | |
</li> | |
<li onclick="toggle('pre70294015070620', 'post70294015070620')"> # | |
</li> | |
<li onclick="toggle('pre70294015070620', 'post70294015070620')"> # run_callbacks :save do | |
</li> | |
<li onclick="toggle('pre70294015070620', 'post70294015070620')"> # save | |
</li> | |
<li onclick="toggle('pre70294015070620', 'post70294015070620')"> # end | |
</li> | |
<li onclick="toggle('pre70294015070620', 'post70294015070620')"> # | |
</li> | |
<li onclick="toggle('pre70294015070620', 'post70294015070620')"> def run_callbacks(kind, *args, &block) | |
</li> | |
</ol> | |
<ol start="81" class="context-line"> | |
<li onclick="toggle('pre70294015070620', 'post70294015070620')"> send("_run_#{kind}_callbacks", *args, &block)<span>...</span></li></ol> | |
<ol start='82' class="post-context" id="post70294015070620"> | |
<li onclick="toggle('pre70294015070620', 'post70294015070620')"> end | |
</li> | |
<li onclick="toggle('pre70294015070620', 'post70294015070620')"> | |
</li> | |
<li onclick="toggle('pre70294015070620', 'post70294015070620')"> private | |
</li> | |
<li onclick="toggle('pre70294015070620', 'post70294015070620')"> | |
</li> | |
<li onclick="toggle('pre70294015070620', 'post70294015070620')"> # A hook invoked everytime a before callback is halted. | |
</li> | |
<li onclick="toggle('pre70294015070620', 'post70294015070620')"> # This can be overriden in AS::Callback implementors in order | |
</li> | |
<li onclick="toggle('pre70294015070620', 'post70294015070620')"> # to provide better debugging/logging. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/embedded_callbacks.rb</code>: in <code>run_callbacks</code> | |
<div class="context" id="c70294015122160"> | |
<ol start="45" class="pre-context" id="pre70294015122160"> | |
<li onclick="toggle('pre70294015122160', 'post70294015122160')"> lambda { doc.run_callbacks(callback, *args, &chain) } | |
</li> | |
<li onclick="toggle('pre70294015122160', 'post70294015122160')"> else | |
</li> | |
<li onclick="toggle('pre70294015122160', 'post70294015122160')"> chain | |
</li> | |
<li onclick="toggle('pre70294015122160', 'post70294015122160')"> end | |
</li> | |
<li onclick="toggle('pre70294015122160', 'post70294015122160')"> end | |
</li> | |
<li onclick="toggle('pre70294015122160', 'post70294015122160')"> end | |
</li> | |
<li onclick="toggle('pre70294015122160', 'post70294015122160')"> | |
</li> | |
</ol> | |
<ol start="52" class="context-line"> | |
<li onclick="toggle('pre70294015122160', 'post70294015122160')"> super callback, *args, &block<span>...</span></li></ol> | |
<ol start='53' class="post-context" id="post70294015122160"> | |
<li onclick="toggle('pre70294015122160', 'post70294015122160')"> end | |
</li> | |
<li onclick="toggle('pre70294015122160', 'post70294015122160')"> end | |
</li> | |
<li onclick="toggle('pre70294015122160', 'post70294015122160')"> end | |
</li> | |
<li onclick="toggle('pre70294015122160', 'post70294015122160')">end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/embedded_callbacks.rb</code>: in <code>block (2 levels) in run_callbacks</code> | |
<div class="context" id="c70294015117340"> | |
<ol start="38" class="pre-context" id="pre70294015117340"> | |
<li onclick="toggle('pre70294015117340', 'post70294015117340')"> | |
</li> | |
<li onclick="toggle('pre70294015117340', 'post70294015117340')"> embedded_associations.each do |association| | |
</li> | |
<li onclick="toggle('pre70294015117340', 'post70294015117340')"> embedded_docs += Array(get_proxy(association).send(:load_target)) | |
</li> | |
<li onclick="toggle('pre70294015117340', 'post70294015117340')"> end | |
</li> | |
<li onclick="toggle('pre70294015117340', 'post70294015117340')"> | |
</li> | |
<li onclick="toggle('pre70294015117340', 'post70294015117340')"> block = embedded_docs.inject(block) do |chain, doc| | |
</li> | |
<li onclick="toggle('pre70294015117340', 'post70294015117340')"> if doc.class.respond_to?("_#{callback}_callbacks") | |
</li> | |
</ol> | |
<ol start="45" class="context-line"> | |
<li onclick="toggle('pre70294015117340', 'post70294015117340')"> lambda { doc.run_callbacks(callback, *args, &chain) }<span>...</span></li></ol> | |
<ol start='46' class="post-context" id="post70294015117340"> | |
<li onclick="toggle('pre70294015117340', 'post70294015117340')"> else | |
</li> | |
<li onclick="toggle('pre70294015117340', 'post70294015117340')"> chain | |
</li> | |
<li onclick="toggle('pre70294015117340', 'post70294015117340')"> end | |
</li> | |
<li onclick="toggle('pre70294015117340', 'post70294015117340')"> end | |
</li> | |
<li onclick="toggle('pre70294015117340', 'post70294015117340')"> end | |
</li> | |
<li onclick="toggle('pre70294015117340', 'post70294015117340')"> | |
</li> | |
<li onclick="toggle('pre70294015117340', 'post70294015117340')"> super callback, *args, &block | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>_run__3816160412465385381__save__1485707892267497542__callbacks</code> | |
<div class="context" id="c70294015137140"> | |
<ol start="396" class="pre-context" id="pre70294015137140"> | |
<li onclick="toggle('pre70294015137140', 'post70294015137140')"> def __run_callback(key, kind, object, &blk) #:nodoc: | |
</li> | |
<li onclick="toggle('pre70294015137140', 'post70294015137140')"> name = __callback_runner_name(key, kind) | |
</li> | |
<li onclick="toggle('pre70294015137140', 'post70294015137140')"> unless object.respond_to?(name, true) | |
</li> | |
<li onclick="toggle('pre70294015137140', 'post70294015137140')"> str = object.send("_#{kind}_callbacks").compile(key, object) | |
</li> | |
<li onclick="toggle('pre70294015137140', 'post70294015137140')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294015137140', 'post70294015137140')"> def #{name}() #{str} end | |
</li> | |
<li onclick="toggle('pre70294015137140', 'post70294015137140')"> protected :#{name} | |
</li> | |
</ol> | |
<ol start="403" class="context-line"> | |
<li onclick="toggle('pre70294015137140', 'post70294015137140')"> RUBY_EVAL<span>...</span></li></ol> | |
<ol start='404' class="post-context" id="post70294015137140"> | |
<li onclick="toggle('pre70294015137140', 'post70294015137140')"> end | |
</li> | |
<li onclick="toggle('pre70294015137140', 'post70294015137140')"> object.send(name, &blk) | |
</li> | |
<li onclick="toggle('pre70294015137140', 'post70294015137140')"> end | |
</li> | |
<li onclick="toggle('pre70294015137140', 'post70294015137140')"> | |
</li> | |
<li onclick="toggle('pre70294015137140', 'post70294015137140')"> def __reset_runner(symbol) | |
</li> | |
<li onclick="toggle('pre70294015137140', 'post70294015137140')"> name = __callback_runner_name(nil, symbol) | |
</li> | |
<li onclick="toggle('pre70294015137140', 'post70294015137140')"> undef_method(name) if method_defined?(name) | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>__run_callback</code> | |
<div class="context" id="c70294015188860"> | |
<ol start="398" class="pre-context" id="pre70294015188860"> | |
<li onclick="toggle('pre70294015188860', 'post70294015188860')"> unless object.respond_to?(name, true) | |
</li> | |
<li onclick="toggle('pre70294015188860', 'post70294015188860')"> str = object.send("_#{kind}_callbacks").compile(key, object) | |
</li> | |
<li onclick="toggle('pre70294015188860', 'post70294015188860')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294015188860', 'post70294015188860')"> def #{name}() #{str} end | |
</li> | |
<li onclick="toggle('pre70294015188860', 'post70294015188860')"> protected :#{name} | |
</li> | |
<li onclick="toggle('pre70294015188860', 'post70294015188860')"> RUBY_EVAL | |
</li> | |
<li onclick="toggle('pre70294015188860', 'post70294015188860')"> end | |
</li> | |
</ol> | |
<ol start="405" class="context-line"> | |
<li onclick="toggle('pre70294015188860', 'post70294015188860')"> object.send(name, &blk)<span>...</span></li></ol> | |
<ol start='406' class="post-context" id="post70294015188860"> | |
<li onclick="toggle('pre70294015188860', 'post70294015188860')"> end | |
</li> | |
<li onclick="toggle('pre70294015188860', 'post70294015188860')"> | |
</li> | |
<li onclick="toggle('pre70294015188860', 'post70294015188860')"> def __reset_runner(symbol) | |
</li> | |
<li onclick="toggle('pre70294015188860', 'post70294015188860')"> name = __callback_runner_name(nil, symbol) | |
</li> | |
<li onclick="toggle('pre70294015188860', 'post70294015188860')"> undef_method(name) if method_defined?(name) | |
</li> | |
<li onclick="toggle('pre70294015188860', 'post70294015188860')"> end | |
</li> | |
<li onclick="toggle('pre70294015188860', 'post70294015188860')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>_run_save_callbacks</code> | |
<div class="context" id="c70294015215760"> | |
<ol start="378" class="pre-context" id="pre70294015215760"> | |
<li onclick="toggle('pre70294015215760', 'post70294015215760')"> module ClassMethods | |
</li> | |
<li onclick="toggle('pre70294015215760', 'post70294015215760')"> # Generate the internal runner method called by +run_callbacks+. | |
</li> | |
<li onclick="toggle('pre70294015215760', 'post70294015215760')"> def __define_runner(symbol) #:nodoc: | |
</li> | |
<li onclick="toggle('pre70294015215760', 'post70294015215760')"> runner_method = "_run_#{symbol}_callbacks" | |
</li> | |
<li onclick="toggle('pre70294015215760', 'post70294015215760')"> unless private_method_defined?(runner_method) | |
</li> | |
<li onclick="toggle('pre70294015215760', 'post70294015215760')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294015215760', 'post70294015215760')"> def #{runner_method}(key = nil, &blk) | |
</li> | |
</ol> | |
<ol start="385" class="context-line"> | |
<li onclick="toggle('pre70294015215760', 'post70294015215760')"> self.class.__run_callback(key, :#{symbol}, self, &blk)<span>...</span></li></ol> | |
<ol start='386' class="post-context" id="post70294015215760"> | |
<li onclick="toggle('pre70294015215760', 'post70294015215760')"> end | |
</li> | |
<li onclick="toggle('pre70294015215760', 'post70294015215760')"> private :#{runner_method} | |
</li> | |
<li onclick="toggle('pre70294015215760', 'post70294015215760')"> RUBY_EVAL | |
</li> | |
<li onclick="toggle('pre70294015215760', 'post70294015215760')"> end | |
</li> | |
<li onclick="toggle('pre70294015215760', 'post70294015215760')"> end | |
</li> | |
<li onclick="toggle('pre70294015215760', 'post70294015215760')"> | |
</li> | |
<li onclick="toggle('pre70294015215760', 'post70294015215760')"> # This method calls the callback method for the given key. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>run_callbacks</code> | |
<div class="context" id="c70294015267620"> | |
<ol start="74" class="pre-context" id="pre70294015267620"> | |
<li onclick="toggle('pre70294015267620', 'post70294015267620')"> # of the block, or +true+ if no block is given. | |
</li> | |
<li onclick="toggle('pre70294015267620', 'post70294015267620')"> # | |
</li> | |
<li onclick="toggle('pre70294015267620', 'post70294015267620')"> # run_callbacks :save do | |
</li> | |
<li onclick="toggle('pre70294015267620', 'post70294015267620')"> # save | |
</li> | |
<li onclick="toggle('pre70294015267620', 'post70294015267620')"> # end | |
</li> | |
<li onclick="toggle('pre70294015267620', 'post70294015267620')"> # | |
</li> | |
<li onclick="toggle('pre70294015267620', 'post70294015267620')"> def run_callbacks(kind, *args, &block) | |
</li> | |
</ol> | |
<ol start="81" class="context-line"> | |
<li onclick="toggle('pre70294015267620', 'post70294015267620')"> send("_run_#{kind}_callbacks", *args, &block)<span>...</span></li></ol> | |
<ol start='82' class="post-context" id="post70294015267620"> | |
<li onclick="toggle('pre70294015267620', 'post70294015267620')"> end | |
</li> | |
<li onclick="toggle('pre70294015267620', 'post70294015267620')"> | |
</li> | |
<li onclick="toggle('pre70294015267620', 'post70294015267620')"> private | |
</li> | |
<li onclick="toggle('pre70294015267620', 'post70294015267620')"> | |
</li> | |
<li onclick="toggle('pre70294015267620', 'post70294015267620')"> # A hook invoked everytime a before callback is halted. | |
</li> | |
<li onclick="toggle('pre70294015267620', 'post70294015267620')"> # This can be overriden in AS::Callback implementors in order | |
</li> | |
<li onclick="toggle('pre70294015267620', 'post70294015267620')"> # to provide better debugging/logging. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/embedded_callbacks.rb</code>: in <code>run_callbacks</code> | |
<div class="context" id="c70294015319260"> | |
<ol start="45" class="pre-context" id="pre70294015319260"> | |
<li onclick="toggle('pre70294015319260', 'post70294015319260')"> lambda { doc.run_callbacks(callback, *args, &chain) } | |
</li> | |
<li onclick="toggle('pre70294015319260', 'post70294015319260')"> else | |
</li> | |
<li onclick="toggle('pre70294015319260', 'post70294015319260')"> chain | |
</li> | |
<li onclick="toggle('pre70294015319260', 'post70294015319260')"> end | |
</li> | |
<li onclick="toggle('pre70294015319260', 'post70294015319260')"> end | |
</li> | |
<li onclick="toggle('pre70294015319260', 'post70294015319260')"> end | |
</li> | |
<li onclick="toggle('pre70294015319260', 'post70294015319260')"> | |
</li> | |
</ol> | |
<ol start="52" class="context-line"> | |
<li onclick="toggle('pre70294015319260', 'post70294015319260')"> super callback, *args, &block<span>...</span></li></ol> | |
<ol start='53' class="post-context" id="post70294015319260"> | |
<li onclick="toggle('pre70294015319260', 'post70294015319260')"> end | |
</li> | |
<li onclick="toggle('pre70294015319260', 'post70294015319260')"> end | |
</li> | |
<li onclick="toggle('pre70294015319260', 'post70294015319260')"> end | |
</li> | |
<li onclick="toggle('pre70294015319260', 'post70294015319260')">end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/embedded_callbacks.rb</code>: in <code>block (2 levels) in run_callbacks</code> | |
<div class="context" id="c70294015314500"> | |
<ol start="38" class="pre-context" id="pre70294015314500"> | |
<li onclick="toggle('pre70294015314500', 'post70294015314500')"> | |
</li> | |
<li onclick="toggle('pre70294015314500', 'post70294015314500')"> embedded_associations.each do |association| | |
</li> | |
<li onclick="toggle('pre70294015314500', 'post70294015314500')"> embedded_docs += Array(get_proxy(association).send(:load_target)) | |
</li> | |
<li onclick="toggle('pre70294015314500', 'post70294015314500')"> end | |
</li> | |
<li onclick="toggle('pre70294015314500', 'post70294015314500')"> | |
</li> | |
<li onclick="toggle('pre70294015314500', 'post70294015314500')"> block = embedded_docs.inject(block) do |chain, doc| | |
</li> | |
<li onclick="toggle('pre70294015314500', 'post70294015314500')"> if doc.class.respond_to?("_#{callback}_callbacks") | |
</li> | |
</ol> | |
<ol start="45" class="context-line"> | |
<li onclick="toggle('pre70294015314500', 'post70294015314500')"> lambda { doc.run_callbacks(callback, *args, &chain) }<span>...</span></li></ol> | |
<ol start='46' class="post-context" id="post70294015314500"> | |
<li onclick="toggle('pre70294015314500', 'post70294015314500')"> else | |
</li> | |
<li onclick="toggle('pre70294015314500', 'post70294015314500')"> chain | |
</li> | |
<li onclick="toggle('pre70294015314500', 'post70294015314500')"> end | |
</li> | |
<li onclick="toggle('pre70294015314500', 'post70294015314500')"> end | |
</li> | |
<li onclick="toggle('pre70294015314500', 'post70294015314500')"> end | |
</li> | |
<li onclick="toggle('pre70294015314500', 'post70294015314500')"> | |
</li> | |
<li onclick="toggle('pre70294015314500', 'post70294015314500')"> super callback, *args, &block | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>_run__3966229577945123102__save__1485707892267497542__callbacks</code> | |
<div class="context" id="c70294015334220"> | |
<ol start="407" class="pre-context" id="pre70294015334220"> | |
<li onclick="toggle('pre70294015334220', 'post70294015334220')"> | |
</li> | |
<li onclick="toggle('pre70294015334220', 'post70294015334220')"> def __reset_runner(symbol) | |
</li> | |
<li onclick="toggle('pre70294015334220', 'post70294015334220')"> name = __callback_runner_name(nil, symbol) | |
</li> | |
<li onclick="toggle('pre70294015334220', 'post70294015334220')"> undef_method(name) if method_defined?(name) | |
</li> | |
<li onclick="toggle('pre70294015334220', 'post70294015334220')"> end | |
</li> | |
<li onclick="toggle('pre70294015334220', 'post70294015334220')"> | |
</li> | |
<li onclick="toggle('pre70294015334220', 'post70294015334220')"> def __callback_runner_name(key, kind) | |
</li> | |
</ol> | |
<ol start="414" class="context-line"> | |
<li onclick="toggle('pre70294015334220', 'post70294015334220')"> "_run__#{self.name.hash.abs}__#{kind}__#{key.hash.abs}__callbacks"<span>...</span></li></ol> | |
<ol start='415' class="post-context" id="post70294015334220"> | |
<li onclick="toggle('pre70294015334220', 'post70294015334220')"> end | |
</li> | |
<li onclick="toggle('pre70294015334220', 'post70294015334220')"> | |
</li> | |
<li onclick="toggle('pre70294015334220', 'post70294015334220')"> # This is used internally to append, prepend and skip callbacks to the | |
</li> | |
<li onclick="toggle('pre70294015334220', 'post70294015334220')"> # CallbackChain. | |
</li> | |
<li onclick="toggle('pre70294015334220', 'post70294015334220')"> # | |
</li> | |
<li onclick="toggle('pre70294015334220', 'post70294015334220')"> def __update_callbacks(name, filters = [], block = nil) #:nodoc: | |
</li> | |
<li onclick="toggle('pre70294015334220', 'post70294015334220')"> type = filters.first.in?([:before, :after, :around]) ? filters.shift : :before | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>__run_callback</code> | |
<div class="context" id="c70294015361440"> | |
<ol start="398" class="pre-context" id="pre70294015361440"> | |
<li onclick="toggle('pre70294015361440', 'post70294015361440')"> unless object.respond_to?(name, true) | |
</li> | |
<li onclick="toggle('pre70294015361440', 'post70294015361440')"> str = object.send("_#{kind}_callbacks").compile(key, object) | |
</li> | |
<li onclick="toggle('pre70294015361440', 'post70294015361440')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294015361440', 'post70294015361440')"> def #{name}() #{str} end | |
</li> | |
<li onclick="toggle('pre70294015361440', 'post70294015361440')"> protected :#{name} | |
</li> | |
<li onclick="toggle('pre70294015361440', 'post70294015361440')"> RUBY_EVAL | |
</li> | |
<li onclick="toggle('pre70294015361440', 'post70294015361440')"> end | |
</li> | |
</ol> | |
<ol start="405" class="context-line"> | |
<li onclick="toggle('pre70294015361440', 'post70294015361440')"> object.send(name, &blk)<span>...</span></li></ol> | |
<ol start='406' class="post-context" id="post70294015361440"> | |
<li onclick="toggle('pre70294015361440', 'post70294015361440')"> end | |
</li> | |
<li onclick="toggle('pre70294015361440', 'post70294015361440')"> | |
</li> | |
<li onclick="toggle('pre70294015361440', 'post70294015361440')"> def __reset_runner(symbol) | |
</li> | |
<li onclick="toggle('pre70294015361440', 'post70294015361440')"> name = __callback_runner_name(nil, symbol) | |
</li> | |
<li onclick="toggle('pre70294015361440', 'post70294015361440')"> undef_method(name) if method_defined?(name) | |
</li> | |
<li onclick="toggle('pre70294015361440', 'post70294015361440')"> end | |
</li> | |
<li onclick="toggle('pre70294015361440', 'post70294015361440')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>_run_save_callbacks</code> | |
<div class="context" id="c70294015412980"> | |
<ol start="378" class="pre-context" id="pre70294015412980"> | |
<li onclick="toggle('pre70294015412980', 'post70294015412980')"> module ClassMethods | |
</li> | |
<li onclick="toggle('pre70294015412980', 'post70294015412980')"> # Generate the internal runner method called by +run_callbacks+. | |
</li> | |
<li onclick="toggle('pre70294015412980', 'post70294015412980')"> def __define_runner(symbol) #:nodoc: | |
</li> | |
<li onclick="toggle('pre70294015412980', 'post70294015412980')"> runner_method = "_run_#{symbol}_callbacks" | |
</li> | |
<li onclick="toggle('pre70294015412980', 'post70294015412980')"> unless private_method_defined?(runner_method) | |
</li> | |
<li onclick="toggle('pre70294015412980', 'post70294015412980')"> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 | |
</li> | |
<li onclick="toggle('pre70294015412980', 'post70294015412980')"> def #{runner_method}(key = nil, &blk) | |
</li> | |
</ol> | |
<ol start="385" class="context-line"> | |
<li onclick="toggle('pre70294015412980', 'post70294015412980')"> self.class.__run_callback(key, :#{symbol}, self, &blk)<span>...</span></li></ol> | |
<ol start='386' class="post-context" id="post70294015412980"> | |
<li onclick="toggle('pre70294015412980', 'post70294015412980')"> end | |
</li> | |
<li onclick="toggle('pre70294015412980', 'post70294015412980')"> private :#{runner_method} | |
</li> | |
<li onclick="toggle('pre70294015412980', 'post70294015412980')"> RUBY_EVAL | |
</li> | |
<li onclick="toggle('pre70294015412980', 'post70294015412980')"> end | |
</li> | |
<li onclick="toggle('pre70294015412980', 'post70294015412980')"> end | |
</li> | |
<li onclick="toggle('pre70294015412980', 'post70294015412980')"> | |
</li> | |
<li onclick="toggle('pre70294015412980', 'post70294015412980')"> # This method calls the callback method for the given key. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/activesupport-3.2.12/lib/active_support/callbacks.rb</code>: in <code>run_callbacks</code> | |
<div class="context" id="c70294015464740"> | |
<ol start="74" class="pre-context" id="pre70294015464740"> | |
<li onclick="toggle('pre70294015464740', 'post70294015464740')"> # of the block, or +true+ if no block is given. | |
</li> | |
<li onclick="toggle('pre70294015464740', 'post70294015464740')"> # | |
</li> | |
<li onclick="toggle('pre70294015464740', 'post70294015464740')"> # run_callbacks :save do | |
</li> | |
<li onclick="toggle('pre70294015464740', 'post70294015464740')"> # save | |
</li> | |
<li onclick="toggle('pre70294015464740', 'post70294015464740')"> # end | |
</li> | |
<li onclick="toggle('pre70294015464740', 'post70294015464740')"> # | |
</li> | |
<li onclick="toggle('pre70294015464740', 'post70294015464740')"> def run_callbacks(kind, *args, &block) | |
</li> | |
</ol> | |
<ol start="81" class="context-line"> | |
<li onclick="toggle('pre70294015464740', 'post70294015464740')"> send("_run_#{kind}_callbacks", *args, &block)<span>...</span></li></ol> | |
<ol start='82' class="post-context" id="post70294015464740"> | |
<li onclick="toggle('pre70294015464740', 'post70294015464740')"> end | |
</li> | |
<li onclick="toggle('pre70294015464740', 'post70294015464740')"> | |
</li> | |
<li onclick="toggle('pre70294015464740', 'post70294015464740')"> private | |
</li> | |
<li onclick="toggle('pre70294015464740', 'post70294015464740')"> | |
</li> | |
<li onclick="toggle('pre70294015464740', 'post70294015464740')"> # A hook invoked everytime a before callback is halted. | |
</li> | |
<li onclick="toggle('pre70294015464740', 'post70294015464740')"> # This can be overriden in AS::Callback implementors in order | |
</li> | |
<li onclick="toggle('pre70294015464740', 'post70294015464740')"> # to provide better debugging/logging. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/embedded_callbacks.rb</code>: in <code>run_callbacks</code> | |
<div class="context" id="c70294015516500"> | |
<ol start="45" class="pre-context" id="pre70294015516500"> | |
<li onclick="toggle('pre70294015516500', 'post70294015516500')"> lambda { doc.run_callbacks(callback, *args, &chain) } | |
</li> | |
<li onclick="toggle('pre70294015516500', 'post70294015516500')"> else | |
</li> | |
<li onclick="toggle('pre70294015516500', 'post70294015516500')"> chain | |
</li> | |
<li onclick="toggle('pre70294015516500', 'post70294015516500')"> end | |
</li> | |
<li onclick="toggle('pre70294015516500', 'post70294015516500')"> end | |
</li> | |
<li onclick="toggle('pre70294015516500', 'post70294015516500')"> end | |
</li> | |
<li onclick="toggle('pre70294015516500', 'post70294015516500')"> | |
</li> | |
</ol> | |
<ol start="52" class="context-line"> | |
<li onclick="toggle('pre70294015516500', 'post70294015516500')"> super callback, *args, &block<span>...</span></li></ol> | |
<ol start='53' class="post-context" id="post70294015516500"> | |
<li onclick="toggle('pre70294015516500', 'post70294015516500')"> end | |
</li> | |
<li onclick="toggle('pre70294015516500', 'post70294015516500')"> end | |
</li> | |
<li onclick="toggle('pre70294015516500', 'post70294015516500')"> end | |
</li> | |
<li onclick="toggle('pre70294015516500', 'post70294015516500')">end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/callbacks.rb</code>: in <code>create_or_update</code> | |
<div class="context" id="c70294015511740"> | |
<ol start="10" class="pre-context" id="pre70294015511740"> | |
<li onclick="toggle('pre70294015511740', 'post70294015511740')"> | |
</li> | |
<li onclick="toggle('pre70294015511740', 'post70294015511740')"> def touch(*) | |
</li> | |
<li onclick="toggle('pre70294015511740', 'post70294015511740')"> run_callbacks(:touch) { super } | |
</li> | |
<li onclick="toggle('pre70294015511740', 'post70294015511740')"> end | |
</li> | |
<li onclick="toggle('pre70294015511740', 'post70294015511740')"> | |
</li> | |
<li onclick="toggle('pre70294015511740', 'post70294015511740')"> private | |
</li> | |
<li onclick="toggle('pre70294015511740', 'post70294015511740')"> def create_or_update(*) | |
</li> | |
</ol> | |
<ol start="17" class="context-line"> | |
<li onclick="toggle('pre70294015511740', 'post70294015511740')"> run_callbacks(:save) { super }<span>...</span></li></ol> | |
<ol start='18' class="post-context" id="post70294015511740"> | |
<li onclick="toggle('pre70294015511740', 'post70294015511740')"> end | |
</li> | |
<li onclick="toggle('pre70294015511740', 'post70294015511740')"> | |
</li> | |
<li onclick="toggle('pre70294015511740', 'post70294015511740')"> def create(*) | |
</li> | |
<li onclick="toggle('pre70294015511740', 'post70294015511740')"> run_callbacks(:create) { super } | |
</li> | |
<li onclick="toggle('pre70294015511740', 'post70294015511740')"> end | |
</li> | |
<li onclick="toggle('pre70294015511740', 'post70294015511740')"> | |
</li> | |
<li onclick="toggle('pre70294015511740', 'post70294015511740')"> def update(*) | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/querying.rb</code>: in <code>save</code> | |
<div class="context" id="c70294015532220"> | |
<ol start="106" class="pre-context" id="pre70294015532220"> | |
<li onclick="toggle('pre70294015532220', 'post70294015532220')"> docs.each_pair { |id, attrs| instances << update(id, attrs) } | |
</li> | |
<li onclick="toggle('pre70294015532220', 'post70294015532220')"> instances | |
</li> | |
<li onclick="toggle('pre70294015532220', 'post70294015532220')"> end | |
</li> | |
<li onclick="toggle('pre70294015532220', 'post70294015532220')"> end | |
</li> | |
<li onclick="toggle('pre70294015532220', 'post70294015532220')"> | |
</li> | |
<li onclick="toggle('pre70294015532220', 'post70294015532220')"> def save(options={}) | |
</li> | |
<li onclick="toggle('pre70294015532220', 'post70294015532220')"> options.assert_valid_keys(:validate, :safe) | |
</li> | |
</ol> | |
<ol start="113" class="context-line"> | |
<li onclick="toggle('pre70294015532220', 'post70294015532220')"> create_or_update(options)<span>...</span></li></ol> | |
<ol start='114' class="post-context" id="post70294015532220"> | |
<li onclick="toggle('pre70294015532220', 'post70294015532220')"> end | |
</li> | |
<li onclick="toggle('pre70294015532220', 'post70294015532220')"> | |
</li> | |
<li onclick="toggle('pre70294015532220', 'post70294015532220')"> def save!(options={}) | |
</li> | |
<li onclick="toggle('pre70294015532220', 'post70294015532220')"> options.assert_valid_keys(:safe) | |
</li> | |
<li onclick="toggle('pre70294015532220', 'post70294015532220')"> save(options) || raise(DocumentNotValid.new(self)) | |
</li> | |
<li onclick="toggle('pre70294015532220', 'post70294015532220')"> end | |
</li> | |
<li onclick="toggle('pre70294015532220', 'post70294015532220')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/dirty.rb</code>: in <code>block in save</code> | |
<div class="context" id="c70294015549080"> | |
<ol start="16" class="pre-context" id="pre70294015549080"> | |
<li onclick="toggle('pre70294015549080', 'post70294015549080')"> super.tap { | |
</li> | |
<li onclick="toggle('pre70294015549080', 'post70294015549080')"> changed_attributes.clear | |
</li> | |
<li onclick="toggle('pre70294015549080', 'post70294015549080')"> @initializing_from_database = false | |
</li> | |
<li onclick="toggle('pre70294015549080', 'post70294015549080')"> } | |
</li> | |
<li onclick="toggle('pre70294015549080', 'post70294015549080')"> end | |
</li> | |
<li onclick="toggle('pre70294015549080', 'post70294015549080')"> | |
</li> | |
<li onclick="toggle('pre70294015549080', 'post70294015549080')"> def save(*) | |
</li> | |
</ol> | |
<ol start="23" class="context-line"> | |
<li onclick="toggle('pre70294015549080', 'post70294015549080')"> clear_changes { super }<span>...</span></li></ol> | |
<ol start='24' class="post-context" id="post70294015549080"> | |
<li onclick="toggle('pre70294015549080', 'post70294015549080')"> end | |
</li> | |
<li onclick="toggle('pre70294015549080', 'post70294015549080')"> | |
</li> | |
<li onclick="toggle('pre70294015549080', 'post70294015549080')"> def reload(*) | |
</li> | |
<li onclick="toggle('pre70294015549080', 'post70294015549080')"> super.tap { clear_changes } | |
</li> | |
<li onclick="toggle('pre70294015549080', 'post70294015549080')"> end | |
</li> | |
<li onclick="toggle('pre70294015549080', 'post70294015549080')"> | |
</li> | |
<li onclick="toggle('pre70294015549080', 'post70294015549080')"> def clear_changes | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/dirty.rb</code>: in <code>clear_changes</code> | |
<div class="context" id="c70294015544040"> | |
<ol start="25" class="pre-context" id="pre70294015544040"> | |
<li onclick="toggle('pre70294015544040', 'post70294015544040')"> | |
</li> | |
<li onclick="toggle('pre70294015544040', 'post70294015544040')"> def reload(*) | |
</li> | |
<li onclick="toggle('pre70294015544040', 'post70294015544040')"> super.tap { clear_changes } | |
</li> | |
<li onclick="toggle('pre70294015544040', 'post70294015544040')"> end | |
</li> | |
<li onclick="toggle('pre70294015544040', 'post70294015544040')"> | |
</li> | |
<li onclick="toggle('pre70294015544040', 'post70294015544040')"> def clear_changes | |
</li> | |
<li onclick="toggle('pre70294015544040', 'post70294015544040')"> previous = changes | |
</li> | |
</ol> | |
<ol start="32" class="context-line"> | |
<li onclick="toggle('pre70294015544040', 'post70294015544040')"> (block_given? ? yield : true).tap do |result|<span>...</span></li></ol> | |
<ol start='33' class="post-context" id="post70294015544040"> | |
<li onclick="toggle('pre70294015544040', 'post70294015544040')"> unless result == false #failed validation; nil is OK. | |
</li> | |
<li onclick="toggle('pre70294015544040', 'post70294015544040')"> @previously_changed = previous | |
</li> | |
<li onclick="toggle('pre70294015544040', 'post70294015544040')"> changed_attributes.clear | |
</li> | |
<li onclick="toggle('pre70294015544040', 'post70294015544040')"> end | |
</li> | |
<li onclick="toggle('pre70294015544040', 'post70294015544040')"> end | |
</li> | |
<li onclick="toggle('pre70294015544040', 'post70294015544040')"> end | |
</li> | |
<li onclick="toggle('pre70294015544040', 'post70294015544040')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/dirty.rb</code>: in <code>save</code> | |
<div class="context" id="c70294015563420"> | |
<ol start="16" class="pre-context" id="pre70294015563420"> | |
<li onclick="toggle('pre70294015563420', 'post70294015563420')"> super.tap { | |
</li> | |
<li onclick="toggle('pre70294015563420', 'post70294015563420')"> changed_attributes.clear | |
</li> | |
<li onclick="toggle('pre70294015563420', 'post70294015563420')"> @initializing_from_database = false | |
</li> | |
<li onclick="toggle('pre70294015563420', 'post70294015563420')"> } | |
</li> | |
<li onclick="toggle('pre70294015563420', 'post70294015563420')"> end | |
</li> | |
<li onclick="toggle('pre70294015563420', 'post70294015563420')"> | |
</li> | |
<li onclick="toggle('pre70294015563420', 'post70294015563420')"> def save(*) | |
</li> | |
</ol> | |
<ol start="23" class="context-line"> | |
<li onclick="toggle('pre70294015563420', 'post70294015563420')"> clear_changes { super }<span>...</span></li></ol> | |
<ol start='24' class="post-context" id="post70294015563420"> | |
<li onclick="toggle('pre70294015563420', 'post70294015563420')"> end | |
</li> | |
<li onclick="toggle('pre70294015563420', 'post70294015563420')"> | |
</li> | |
<li onclick="toggle('pre70294015563420', 'post70294015563420')"> def reload(*) | |
</li> | |
<li onclick="toggle('pre70294015563420', 'post70294015563420')"> super.tap { clear_changes } | |
</li> | |
<li onclick="toggle('pre70294015563420', 'post70294015563420')"> end | |
</li> | |
<li onclick="toggle('pre70294015563420', 'post70294015563420')"> | |
</li> | |
<li onclick="toggle('pre70294015563420', 'post70294015563420')"> def clear_changes | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/validations.rb</code>: in <code>save</code> | |
<div class="context" id="c70294015558300"> | |
<ol start="15" class="pre-context" id="pre70294015558300"> | |
<li onclick="toggle('pre70294015558300', 'post70294015558300')"> def validates_associated(*attr_names) | |
</li> | |
<li onclick="toggle('pre70294015558300', 'post70294015558300')"> validates_with AssociatedValidator, _merge_attributes(attr_names) | |
</li> | |
<li onclick="toggle('pre70294015558300', 'post70294015558300')"> end | |
</li> | |
<li onclick="toggle('pre70294015558300', 'post70294015558300')"> end | |
</li> | |
<li onclick="toggle('pre70294015558300', 'post70294015558300')"> | |
</li> | |
<li onclick="toggle('pre70294015558300', 'post70294015558300')"> def save(options = {}) | |
</li> | |
<li onclick="toggle('pre70294015558300', 'post70294015558300')"> options = options.reverse_merge(:validate => true) | |
</li> | |
</ol> | |
<ol start="22" class="context-line"> | |
<li onclick="toggle('pre70294015558300', 'post70294015558300')"> !options[:validate] || valid? ? super : false<span>...</span></li></ol> | |
<ol start='23' class="post-context" id="post70294015558300"> | |
<li onclick="toggle('pre70294015558300', 'post70294015558300')"> end | |
</li> | |
<li onclick="toggle('pre70294015558300', 'post70294015558300')"> | |
</li> | |
<li onclick="toggle('pre70294015558300', 'post70294015558300')"> def valid?(context = nil) | |
</li> | |
<li onclick="toggle('pre70294015558300', 'post70294015558300')"> context ||= (new_record? ? :create : :update) | |
</li> | |
<li onclick="toggle('pre70294015558300', 'post70294015558300')"> super(context) | |
</li> | |
<li onclick="toggle('pre70294015558300', 'post70294015558300')"> end | |
</li> | |
<li onclick="toggle('pre70294015558300', 'post70294015558300')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/identity_map.rb</code>: in <code>save</code> | |
<div class="context" id="c70294015577160"> | |
<ol start="103" class="pre-context" id="pre70294015577160"> | |
<li onclick="toggle('pre70294015577160', 'post70294015577160')"> end | |
</li> | |
<li onclick="toggle('pre70294015577160', 'post70294015577160')"> | |
</li> | |
<li onclick="toggle('pre70294015577160', 'post70294015577160')"> document | |
</li> | |
<li onclick="toggle('pre70294015577160', 'post70294015577160')"> end | |
</li> | |
<li onclick="toggle('pre70294015577160', 'post70294015577160')"> end | |
</li> | |
<li onclick="toggle('pre70294015577160', 'post70294015577160')"> | |
</li> | |
<li onclick="toggle('pre70294015577160', 'post70294015577160')"> def save(*args) | |
</li> | |
</ol> | |
<ol start="110" class="context-line"> | |
<li onclick="toggle('pre70294015577160', 'post70294015577160')"> super.tap { |result| add_to_identity_map if result }<span>...</span></li></ol> | |
<ol start='111' class="post-context" id="post70294015577160"> | |
<li onclick="toggle('pre70294015577160', 'post70294015577160')"> end | |
</li> | |
<li onclick="toggle('pre70294015577160', 'post70294015577160')"> | |
</li> | |
<li onclick="toggle('pre70294015577160', 'post70294015577160')"> def delete | |
</li> | |
<li onclick="toggle('pre70294015577160', 'post70294015577160')"> super.tap { remove_from_identity_map } | |
</li> | |
<li onclick="toggle('pre70294015577160', 'post70294015577160')"> end | |
</li> | |
<li onclick="toggle('pre70294015577160', 'post70294015577160')"> | |
</li> | |
<li onclick="toggle('pre70294015577160', 'post70294015577160')"> def add_to_identity_map | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/mongomapper-1e40d7eb8001/lib/mongo_mapper/plugins/querying.rb</code>: in <code>save!</code> | |
<div class="context" id="c70294015595020"> | |
<ol start="111" class="pre-context" id="pre70294015595020"> | |
<li onclick="toggle('pre70294015595020', 'post70294015595020')"> def save(options={}) | |
</li> | |
<li onclick="toggle('pre70294015595020', 'post70294015595020')"> options.assert_valid_keys(:validate, :safe) | |
</li> | |
<li onclick="toggle('pre70294015595020', 'post70294015595020')"> create_or_update(options) | |
</li> | |
<li onclick="toggle('pre70294015595020', 'post70294015595020')"> end | |
</li> | |
<li onclick="toggle('pre70294015595020', 'post70294015595020')"> | |
</li> | |
<li onclick="toggle('pre70294015595020', 'post70294015595020')"> def save!(options={}) | |
</li> | |
<li onclick="toggle('pre70294015595020', 'post70294015595020')"> options.assert_valid_keys(:safe) | |
</li> | |
</ol> | |
<ol start="118" class="context-line"> | |
<li onclick="toggle('pre70294015595020', 'post70294015595020')"> save(options) || raise(DocumentNotValid.new(self))<span>...</span></li></ol> | |
<ol start='119' class="post-context" id="post70294015595020"> | |
<li onclick="toggle('pre70294015595020', 'post70294015595020')"> end | |
</li> | |
<li onclick="toggle('pre70294015595020', 'post70294015595020')"> | |
</li> | |
<li onclick="toggle('pre70294015595020', 'post70294015595020')"> def destroy | |
</li> | |
<li onclick="toggle('pre70294015595020', 'post70294015595020')"> delete | |
</li> | |
<li onclick="toggle('pre70294015595020', 'post70294015595020')"> end | |
</li> | |
<li onclick="toggle('pre70294015595020', 'post70294015595020')"> | |
</li> | |
<li onclick="toggle('pre70294015595020', 'post70294015595020')"> def delete | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/www/divshot/api/app/apis/hosting/apps.rb</code>: in <code>block (2 levels) in <class:Apps></code> | |
<div class="context" id="c70294015612600"> | |
<ol start="95" class="pre-context" id="pre70294015612600"> | |
<li onclick="toggle('pre70294015612600', 'post70294015612600')"> requires :name, type: String, desc: "The subdomain at which the app will be located." | |
</li> | |
<li onclick="toggle('pre70294015612600', 'post70294015612600')"> end | |
</li> | |
<li onclick="toggle('pre70294015612600', 'post70294015612600')"> | |
</li> | |
<li onclick="toggle('pre70294015612600', 'post70294015612600')"> post do | |
</li> | |
<li onclick="toggle('pre70294015612600', 'post70294015612600')"> begin | |
</li> | |
<li onclick="toggle('pre70294015612600', 'post70294015612600')"> hosted_app = HostedApplication.new declared(params).merge(owner:current_user) | |
</li> | |
<li onclick="toggle('pre70294015612600', 'post70294015612600')"> if hosted_app.valid? | |
</li> | |
</ol> | |
<ol start="102" class="context-line"> | |
<li onclick="toggle('pre70294015612600', 'post70294015612600')"> hosted_app.save!<span>...</span></li></ol> | |
<ol start='103' class="post-context" id="post70294015612600"> | |
<li onclick="toggle('pre70294015612600', 'post70294015612600')"> present hosted_app | |
</li> | |
<li onclick="toggle('pre70294015612600', 'post70294015612600')"> else | |
</li> | |
<li onclick="toggle('pre70294015612600', 'post70294015612600')"> failure! :invalid_data, hosted_app.errors | |
</li> | |
<li onclick="toggle('pre70294015612600', 'post70294015612600')"> end | |
</li> | |
<li onclick="toggle('pre70294015612600', 'post70294015612600')"> end | |
</li> | |
<li onclick="toggle('pre70294015612600', 'post70294015612600')"> end | |
</li> | |
<li onclick="toggle('pre70294015612600', 'post70294015612600')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/endpoint.rb</code>: in <code>call</code> | |
<div class="context" id="c70294015627540"> | |
<ol start="24" class="pre-context" id="pre70294015627540"> | |
<li onclick="toggle('pre70294015627540', 'post70294015627540')"> def generate_api_method(method_name, &block) | |
</li> | |
<li onclick="toggle('pre70294015627540', 'post70294015627540')"> if instance_methods.include?(method_name.to_sym) || instance_methods.include?(method_name.to_s) | |
</li> | |
<li onclick="toggle('pre70294015627540', 'post70294015627540')"> raise NameError.new("method #{method_name.inspect} already exists and cannot be used as an unbound method name") | |
</li> | |
<li onclick="toggle('pre70294015627540', 'post70294015627540')"> end | |
</li> | |
<li onclick="toggle('pre70294015627540', 'post70294015627540')"> define_method(method_name, &block) | |
</li> | |
<li onclick="toggle('pre70294015627540', 'post70294015627540')"> method = instance_method(method_name) | |
</li> | |
<li onclick="toggle('pre70294015627540', 'post70294015627540')"> remove_method(method_name) | |
</li> | |
</ol> | |
<ol start="31" class="context-line"> | |
<li onclick="toggle('pre70294015627540', 'post70294015627540')"> proc { |endpoint_instance| method.bind(endpoint_instance).call }<span>...</span></li></ol> | |
<ol start='32' class="post-context" id="post70294015627540"> | |
<li onclick="toggle('pre70294015627540', 'post70294015627540')"> end | |
</li> | |
<li onclick="toggle('pre70294015627540', 'post70294015627540')"> end | |
</li> | |
<li onclick="toggle('pre70294015627540', 'post70294015627540')"> | |
</li> | |
<li onclick="toggle('pre70294015627540', 'post70294015627540')"> def initialize(settings, options = {}, &block) | |
</li> | |
<li onclick="toggle('pre70294015627540', 'post70294015627540')"> require_option(options, :path) | |
</li> | |
<li onclick="toggle('pre70294015627540', 'post70294015627540')"> require_option(options, :method) | |
</li> | |
<li onclick="toggle('pre70294015627540', 'post70294015627540')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/endpoint.rb</code>: in <code>block in generate_api_method</code> | |
<div class="context" id="c70294015660340"> | |
<ol start="24" class="pre-context" id="pre70294015660340"> | |
<li onclick="toggle('pre70294015660340', 'post70294015660340')"> def generate_api_method(method_name, &block) | |
</li> | |
<li onclick="toggle('pre70294015660340', 'post70294015660340')"> if instance_methods.include?(method_name.to_sym) || instance_methods.include?(method_name.to_s) | |
</li> | |
<li onclick="toggle('pre70294015660340', 'post70294015660340')"> raise NameError.new("method #{method_name.inspect} already exists and cannot be used as an unbound method name") | |
</li> | |
<li onclick="toggle('pre70294015660340', 'post70294015660340')"> end | |
</li> | |
<li onclick="toggle('pre70294015660340', 'post70294015660340')"> define_method(method_name, &block) | |
</li> | |
<li onclick="toggle('pre70294015660340', 'post70294015660340')"> method = instance_method(method_name) | |
</li> | |
<li onclick="toggle('pre70294015660340', 'post70294015660340')"> remove_method(method_name) | |
</li> | |
</ol> | |
<ol start="31" class="context-line"> | |
<li onclick="toggle('pre70294015660340', 'post70294015660340')"> proc { |endpoint_instance| method.bind(endpoint_instance).call }<span>...</span></li></ol> | |
<ol start='32' class="post-context" id="post70294015660340"> | |
<li onclick="toggle('pre70294015660340', 'post70294015660340')"> end | |
</li> | |
<li onclick="toggle('pre70294015660340', 'post70294015660340')"> end | |
</li> | |
<li onclick="toggle('pre70294015660340', 'post70294015660340')"> | |
</li> | |
<li onclick="toggle('pre70294015660340', 'post70294015660340')"> def initialize(settings, options = {}, &block) | |
</li> | |
<li onclick="toggle('pre70294015660340', 'post70294015660340')"> require_option(options, :path) | |
</li> | |
<li onclick="toggle('pre70294015660340', 'post70294015660340')"> require_option(options, :method) | |
</li> | |
<li onclick="toggle('pre70294015660340', 'post70294015660340')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/endpoint.rb</code>: in <code>call</code> | |
<div class="context" id="c70294015693380"> | |
<ol start="392" class="pre-context" id="pre70294015693380"> | |
<li onclick="toggle('pre70294015693380', 'post70294015693380')"> | |
</li> | |
<li onclick="toggle('pre70294015693380', 'post70294015693380')"> if validation_errors.any? | |
</li> | |
<li onclick="toggle('pre70294015693380', 'post70294015693380')"> raise Grape::Exceptions::ValidationErrors, errors: validation_errors | |
</li> | |
<li onclick="toggle('pre70294015693380', 'post70294015693380')"> end | |
</li> | |
<li onclick="toggle('pre70294015693380', 'post70294015693380')"> | |
</li> | |
<li onclick="toggle('pre70294015693380', 'post70294015693380')"> run_filters after_validations | |
</li> | |
<li onclick="toggle('pre70294015693380', 'post70294015693380')"> | |
</li> | |
</ol> | |
<ol start="399" class="context-line"> | |
<li onclick="toggle('pre70294015693380', 'post70294015693380')"> response_text = @block ? @block.call(self) : nil<span>...</span></li></ol> | |
<ol start='400' class="post-context" id="post70294015693380"> | |
<li onclick="toggle('pre70294015693380', 'post70294015693380')"> run_filters afters | |
</li> | |
<li onclick="toggle('pre70294015693380', 'post70294015693380')"> cookies.write(header) | |
</li> | |
<li onclick="toggle('pre70294015693380', 'post70294015693380')"> | |
</li> | |
<li onclick="toggle('pre70294015693380', 'post70294015693380')"> [status, header, [body || response_text]] | |
</li> | |
<li onclick="toggle('pre70294015693380', 'post70294015693380')"> end | |
</li> | |
<li onclick="toggle('pre70294015693380', 'post70294015693380')"> | |
</li> | |
<li onclick="toggle('pre70294015693380', 'post70294015693380')"> def build_middleware | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/endpoint.rb</code>: in <code>run</code> | |
<div class="context" id="c70294015726280"> | |
<ol start="392" class="pre-context" id="pre70294015726280"> | |
<li onclick="toggle('pre70294015726280', 'post70294015726280')"> | |
</li> | |
<li onclick="toggle('pre70294015726280', 'post70294015726280')"> if validation_errors.any? | |
</li> | |
<li onclick="toggle('pre70294015726280', 'post70294015726280')"> raise Grape::Exceptions::ValidationErrors, errors: validation_errors | |
</li> | |
<li onclick="toggle('pre70294015726280', 'post70294015726280')"> end | |
</li> | |
<li onclick="toggle('pre70294015726280', 'post70294015726280')"> | |
</li> | |
<li onclick="toggle('pre70294015726280', 'post70294015726280')"> run_filters after_validations | |
</li> | |
<li onclick="toggle('pre70294015726280', 'post70294015726280')"> | |
</li> | |
</ol> | |
<ol start="399" class="context-line"> | |
<li onclick="toggle('pre70294015726280', 'post70294015726280')"> response_text = @block ? @block.call(self) : nil<span>...</span></li></ol> | |
<ol start='400' class="post-context" id="post70294015726280"> | |
<li onclick="toggle('pre70294015726280', 'post70294015726280')"> run_filters afters | |
</li> | |
<li onclick="toggle('pre70294015726280', 'post70294015726280')"> cookies.write(header) | |
</li> | |
<li onclick="toggle('pre70294015726280', 'post70294015726280')"> | |
</li> | |
<li onclick="toggle('pre70294015726280', 'post70294015726280')"> [status, header, [body || response_text]] | |
</li> | |
<li onclick="toggle('pre70294015726280', 'post70294015726280')"> end | |
</li> | |
<li onclick="toggle('pre70294015726280', 'post70294015726280')"> | |
</li> | |
<li onclick="toggle('pre70294015726280', 'post70294015726280')"> def build_middleware | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/endpoint.rb</code>: in <code>block in call!</code> | |
<div class="context" id="c70294015759440"> | |
<ol start="147" class="pre-context" id="pre70294015759440"> | |
<li onclick="toggle('pre70294015759440', 'post70294015759440')"> | |
</li> | |
<li onclick="toggle('pre70294015759440', 'post70294015759440')"> def call!(env) | |
</li> | |
<li onclick="toggle('pre70294015759440', 'post70294015759440')"> env['api.endpoint'] = self | |
</li> | |
<li onclick="toggle('pre70294015759440', 'post70294015759440')"> if options[:app] | |
</li> | |
<li onclick="toggle('pre70294015759440', 'post70294015759440')"> options[:app].call(env) | |
</li> | |
<li onclick="toggle('pre70294015759440', 'post70294015759440')"> else | |
</li> | |
<li onclick="toggle('pre70294015759440', 'post70294015759440')"> builder = build_middleware | |
</li> | |
</ol> | |
<ol start="154" class="context-line"> | |
<li onclick="toggle('pre70294015759440', 'post70294015759440')"> builder.run options[:app] || lambda{|env| self.run(env) }<span>...</span></li></ol> | |
<ol start='155' class="post-context" id="post70294015759440"> | |
<li onclick="toggle('pre70294015759440', 'post70294015759440')"> builder.call(env) | |
</li> | |
<li onclick="toggle('pre70294015759440', 'post70294015759440')"> end | |
</li> | |
<li onclick="toggle('pre70294015759440', 'post70294015759440')"> end | |
</li> | |
<li onclick="toggle('pre70294015759440', 'post70294015759440')"> | |
</li> | |
<li onclick="toggle('pre70294015759440', 'post70294015759440')"> # The parameters passed into the request as | |
</li> | |
<li onclick="toggle('pre70294015759440', 'post70294015759440')"> # well as parsed from URL segments. | |
</li> | |
<li onclick="toggle('pre70294015759440', 'post70294015759440')"> def params | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/middleware/base.rb</code>: in <code>call</code> | |
<div class="context" id="c70294015792400"> | |
<ol start="17" class="pre-context" id="pre70294015792400"> | |
<li onclick="toggle('pre70294015792400', 'post70294015792400')"> def call(env) | |
</li> | |
<li onclick="toggle('pre70294015792400', 'post70294015792400')"> dup.call!(env) | |
</li> | |
<li onclick="toggle('pre70294015792400', 'post70294015792400')"> end | |
</li> | |
<li onclick="toggle('pre70294015792400', 'post70294015792400')"> | |
</li> | |
<li onclick="toggle('pre70294015792400', 'post70294015792400')"> def call!(env) | |
</li> | |
<li onclick="toggle('pre70294015792400', 'post70294015792400')"> @env = env | |
</li> | |
<li onclick="toggle('pre70294015792400', 'post70294015792400')"> before | |
</li> | |
</ol> | |
<ol start="24" class="context-line"> | |
<li onclick="toggle('pre70294015792400', 'post70294015792400')"> @app_response = @app.call(@env)<span>...</span></li></ol> | |
<ol start='25' class="post-context" id="post70294015792400"> | |
<li onclick="toggle('pre70294015792400', 'post70294015792400')"> after || @app_response | |
</li> | |
<li onclick="toggle('pre70294015792400', 'post70294015792400')"> end | |
</li> | |
<li onclick="toggle('pre70294015792400', 'post70294015792400')"> | |
</li> | |
<li onclick="toggle('pre70294015792400', 'post70294015792400')"> # @abstract | |
</li> | |
<li onclick="toggle('pre70294015792400', 'post70294015792400')"> # Called before the application is called in the middleware lifecycle. | |
</li> | |
<li onclick="toggle('pre70294015792400', 'post70294015792400')"> def before; end | |
</li> | |
<li onclick="toggle('pre70294015792400', 'post70294015792400')"> # @abstract | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/middleware/base.rb</code>: in <code>call!</code> | |
<div class="context" id="c70294015787600"> | |
<ol start="17" class="pre-context" id="pre70294015787600"> | |
<li onclick="toggle('pre70294015787600', 'post70294015787600')"> def call(env) | |
</li> | |
<li onclick="toggle('pre70294015787600', 'post70294015787600')"> dup.call!(env) | |
</li> | |
<li onclick="toggle('pre70294015787600', 'post70294015787600')"> end | |
</li> | |
<li onclick="toggle('pre70294015787600', 'post70294015787600')"> | |
</li> | |
<li onclick="toggle('pre70294015787600', 'post70294015787600')"> def call!(env) | |
</li> | |
<li onclick="toggle('pre70294015787600', 'post70294015787600')"> @env = env | |
</li> | |
<li onclick="toggle('pre70294015787600', 'post70294015787600')"> before | |
</li> | |
</ol> | |
<ol start="24" class="context-line"> | |
<li onclick="toggle('pre70294015787600', 'post70294015787600')"> @app_response = @app.call(@env)<span>...</span></li></ol> | |
<ol start='25' class="post-context" id="post70294015787600"> | |
<li onclick="toggle('pre70294015787600', 'post70294015787600')"> after || @app_response | |
</li> | |
<li onclick="toggle('pre70294015787600', 'post70294015787600')"> end | |
</li> | |
<li onclick="toggle('pre70294015787600', 'post70294015787600')"> | |
</li> | |
<li onclick="toggle('pre70294015787600', 'post70294015787600')"> # @abstract | |
</li> | |
<li onclick="toggle('pre70294015787600', 'post70294015787600')"> # Called before the application is called in the middleware lifecycle. | |
</li> | |
<li onclick="toggle('pre70294015787600', 'post70294015787600')"> def before; end | |
</li> | |
<li onclick="toggle('pre70294015787600', 'post70294015787600')"> # @abstract | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/middleware/base.rb</code>: in <code>call</code> | |
<div class="context" id="c70294015807420"> | |
<ol start="11" class="pre-context" id="pre70294015807420"> | |
<li onclick="toggle('pre70294015807420', 'post70294015807420')"> end | |
</li> | |
<li onclick="toggle('pre70294015807420', 'post70294015807420')"> | |
</li> | |
<li onclick="toggle('pre70294015807420', 'post70294015807420')"> def default_options | |
</li> | |
<li onclick="toggle('pre70294015807420', 'post70294015807420')"> {} | |
</li> | |
<li onclick="toggle('pre70294015807420', 'post70294015807420')"> end | |
</li> | |
<li onclick="toggle('pre70294015807420', 'post70294015807420')"> | |
</li> | |
<li onclick="toggle('pre70294015807420', 'post70294015807420')"> def call(env) | |
</li> | |
</ol> | |
<ol start="18" class="context-line"> | |
<li onclick="toggle('pre70294015807420', 'post70294015807420')"> dup.call!(env)<span>...</span></li></ol> | |
<ol start='19' class="post-context" id="post70294015807420"> | |
<li onclick="toggle('pre70294015807420', 'post70294015807420')"> end | |
</li> | |
<li onclick="toggle('pre70294015807420', 'post70294015807420')"> | |
</li> | |
<li onclick="toggle('pre70294015807420', 'post70294015807420')"> def call!(env) | |
</li> | |
<li onclick="toggle('pre70294015807420', 'post70294015807420')"> @env = env | |
</li> | |
<li onclick="toggle('pre70294015807420', 'post70294015807420')"> before | |
</li> | |
<li onclick="toggle('pre70294015807420', 'post70294015807420')"> @app_response = @app.call(@env) | |
</li> | |
<li onclick="toggle('pre70294015807420', 'post70294015807420')"> after || @app_response | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/middleware/base.rb</code>: in <code>call!</code> | |
<div class="context" id="c70294015827260"> | |
<ol start="17" class="pre-context" id="pre70294015827260"> | |
<li onclick="toggle('pre70294015827260', 'post70294015827260')"> def call(env) | |
</li> | |
<li onclick="toggle('pre70294015827260', 'post70294015827260')"> dup.call!(env) | |
</li> | |
<li onclick="toggle('pre70294015827260', 'post70294015827260')"> end | |
</li> | |
<li onclick="toggle('pre70294015827260', 'post70294015827260')"> | |
</li> | |
<li onclick="toggle('pre70294015827260', 'post70294015827260')"> def call!(env) | |
</li> | |
<li onclick="toggle('pre70294015827260', 'post70294015827260')"> @env = env | |
</li> | |
<li onclick="toggle('pre70294015827260', 'post70294015827260')"> before | |
</li> | |
</ol> | |
<ol start="24" class="context-line"> | |
<li onclick="toggle('pre70294015827260', 'post70294015827260')"> @app_response = @app.call(@env)<span>...</span></li></ol> | |
<ol start='25' class="post-context" id="post70294015827260"> | |
<li onclick="toggle('pre70294015827260', 'post70294015827260')"> after || @app_response | |
</li> | |
<li onclick="toggle('pre70294015827260', 'post70294015827260')"> end | |
</li> | |
<li onclick="toggle('pre70294015827260', 'post70294015827260')"> | |
</li> | |
<li onclick="toggle('pre70294015827260', 'post70294015827260')"> # @abstract | |
</li> | |
<li onclick="toggle('pre70294015827260', 'post70294015827260')"> # Called before the application is called in the middleware lifecycle. | |
</li> | |
<li onclick="toggle('pre70294015827260', 'post70294015827260')"> def before; end | |
</li> | |
<li onclick="toggle('pre70294015827260', 'post70294015827260')"> # @abstract | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/middleware/base.rb</code>: in <code>call</code> | |
<div class="context" id="c70294015822500"> | |
<ol start="11" class="pre-context" id="pre70294015822500"> | |
<li onclick="toggle('pre70294015822500', 'post70294015822500')"> end | |
</li> | |
<li onclick="toggle('pre70294015822500', 'post70294015822500')"> | |
</li> | |
<li onclick="toggle('pre70294015822500', 'post70294015822500')"> def default_options | |
</li> | |
<li onclick="toggle('pre70294015822500', 'post70294015822500')"> {} | |
</li> | |
<li onclick="toggle('pre70294015822500', 'post70294015822500')"> end | |
</li> | |
<li onclick="toggle('pre70294015822500', 'post70294015822500')"> | |
</li> | |
<li onclick="toggle('pre70294015822500', 'post70294015822500')"> def call(env) | |
</li> | |
</ol> | |
<ol start="18" class="context-line"> | |
<li onclick="toggle('pre70294015822500', 'post70294015822500')"> dup.call!(env)<span>...</span></li></ol> | |
<ol start='19' class="post-context" id="post70294015822500"> | |
<li onclick="toggle('pre70294015822500', 'post70294015822500')"> end | |
</li> | |
<li onclick="toggle('pre70294015822500', 'post70294015822500')"> | |
</li> | |
<li onclick="toggle('pre70294015822500', 'post70294015822500')"> def call!(env) | |
</li> | |
<li onclick="toggle('pre70294015822500', 'post70294015822500')"> @env = env | |
</li> | |
<li onclick="toggle('pre70294015822500', 'post70294015822500')"> before | |
</li> | |
<li onclick="toggle('pre70294015822500', 'post70294015822500')"> @app_response = @app.call(@env) | |
</li> | |
<li onclick="toggle('pre70294015822500', 'post70294015822500')"> after || @app_response | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/middleware/error.rb</code>: in <code>block in call!</code> | |
<div class="context" id="c70294015842320"> | |
<ol start="19" class="pre-context" id="pre70294015842320"> | |
<li onclick="toggle('pre70294015842320', 'post70294015842320')"> end | |
</li> | |
<li onclick="toggle('pre70294015842320', 'post70294015842320')"> | |
</li> | |
<li onclick="toggle('pre70294015842320', 'post70294015842320')"> def call!(env) | |
</li> | |
<li onclick="toggle('pre70294015842320', 'post70294015842320')"> @env = env | |
</li> | |
<li onclick="toggle('pre70294015842320', 'post70294015842320')"> | |
</li> | |
<li onclick="toggle('pre70294015842320', 'post70294015842320')"> begin | |
</li> | |
<li onclick="toggle('pre70294015842320', 'post70294015842320')"> error_response(catch(:error){ | |
</li> | |
</ol> | |
<ol start="26" class="context-line"> | |
<li onclick="toggle('pre70294015842320', 'post70294015842320')"> return @app.call(@env)<span>...</span></li></ol> | |
<ol start='27' class="post-context" id="post70294015842320"> | |
<li onclick="toggle('pre70294015842320', 'post70294015842320')"> }) | |
</li> | |
<li onclick="toggle('pre70294015842320', 'post70294015842320')"> rescue Exception => e | |
</li> | |
<li onclick="toggle('pre70294015842320', 'post70294015842320')"> is_rescuable = rescuable?(e.class) | |
</li> | |
<li onclick="toggle('pre70294015842320', 'post70294015842320')"> if e.is_a?(Grape::Exceptions::Base) && !is_rescuable | |
</li> | |
<li onclick="toggle('pre70294015842320', 'post70294015842320')"> handler = lambda {|e| error_response(e) } | |
</li> | |
<li onclick="toggle('pre70294015842320', 'post70294015842320')"> else | |
</li> | |
<li onclick="toggle('pre70294015842320', 'post70294015842320')"> raise unless is_rescuable | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/middleware/error.rb</code>: in <code>catch</code> | |
<div class="context" id="c70294015837260"> | |
<ol start="18" class="pre-context" id="pre70294015837260"> | |
<li onclick="toggle('pre70294015837260', 'post70294015837260')"> } | |
</li> | |
<li onclick="toggle('pre70294015837260', 'post70294015837260')"> end | |
</li> | |
<li onclick="toggle('pre70294015837260', 'post70294015837260')"> | |
</li> | |
<li onclick="toggle('pre70294015837260', 'post70294015837260')"> def call!(env) | |
</li> | |
<li onclick="toggle('pre70294015837260', 'post70294015837260')"> @env = env | |
</li> | |
<li onclick="toggle('pre70294015837260', 'post70294015837260')"> | |
</li> | |
<li onclick="toggle('pre70294015837260', 'post70294015837260')"> begin | |
</li> | |
</ol> | |
<ol start="25" class="context-line"> | |
<li onclick="toggle('pre70294015837260', 'post70294015837260')"> error_response(catch(:error){<span>...</span></li></ol> | |
<ol start='26' class="post-context" id="post70294015837260"> | |
<li onclick="toggle('pre70294015837260', 'post70294015837260')"> return @app.call(@env) | |
</li> | |
<li onclick="toggle('pre70294015837260', 'post70294015837260')"> }) | |
</li> | |
<li onclick="toggle('pre70294015837260', 'post70294015837260')"> rescue Exception => e | |
</li> | |
<li onclick="toggle('pre70294015837260', 'post70294015837260')"> is_rescuable = rescuable?(e.class) | |
</li> | |
<li onclick="toggle('pre70294015837260', 'post70294015837260')"> if e.is_a?(Grape::Exceptions::Base) && !is_rescuable | |
</li> | |
<li onclick="toggle('pre70294015837260', 'post70294015837260')"> handler = lambda {|e| error_response(e) } | |
</li> | |
<li onclick="toggle('pre70294015837260', 'post70294015837260')"> else | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/middleware/error.rb</code>: in <code>call!</code> | |
<div class="context" id="c70294015856520"> | |
<ol start="18" class="pre-context" id="pre70294015856520"> | |
<li onclick="toggle('pre70294015856520', 'post70294015856520')"> } | |
</li> | |
<li onclick="toggle('pre70294015856520', 'post70294015856520')"> end | |
</li> | |
<li onclick="toggle('pre70294015856520', 'post70294015856520')"> | |
</li> | |
<li onclick="toggle('pre70294015856520', 'post70294015856520')"> def call!(env) | |
</li> | |
<li onclick="toggle('pre70294015856520', 'post70294015856520')"> @env = env | |
</li> | |
<li onclick="toggle('pre70294015856520', 'post70294015856520')"> | |
</li> | |
<li onclick="toggle('pre70294015856520', 'post70294015856520')"> begin | |
</li> | |
</ol> | |
<ol start="25" class="context-line"> | |
<li onclick="toggle('pre70294015856520', 'post70294015856520')"> error_response(catch(:error){<span>...</span></li></ol> | |
<ol start='26' class="post-context" id="post70294015856520"> | |
<li onclick="toggle('pre70294015856520', 'post70294015856520')"> return @app.call(@env) | |
</li> | |
<li onclick="toggle('pre70294015856520', 'post70294015856520')"> }) | |
</li> | |
<li onclick="toggle('pre70294015856520', 'post70294015856520')"> rescue Exception => e | |
</li> | |
<li onclick="toggle('pre70294015856520', 'post70294015856520')"> is_rescuable = rescuable?(e.class) | |
</li> | |
<li onclick="toggle('pre70294015856520', 'post70294015856520')"> if e.is_a?(Grape::Exceptions::Base) && !is_rescuable | |
</li> | |
<li onclick="toggle('pre70294015856520', 'post70294015856520')"> handler = lambda {|e| error_response(e) } | |
</li> | |
<li onclick="toggle('pre70294015856520', 'post70294015856520')"> else | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/middleware/base.rb</code>: in <code>call</code> | |
<div class="context" id="c70294015876060"> | |
<ol start="11" class="pre-context" id="pre70294015876060"> | |
<li onclick="toggle('pre70294015876060', 'post70294015876060')"> end | |
</li> | |
<li onclick="toggle('pre70294015876060', 'post70294015876060')"> | |
</li> | |
<li onclick="toggle('pre70294015876060', 'post70294015876060')"> def default_options | |
</li> | |
<li onclick="toggle('pre70294015876060', 'post70294015876060')"> {} | |
</li> | |
<li onclick="toggle('pre70294015876060', 'post70294015876060')"> end | |
</li> | |
<li onclick="toggle('pre70294015876060', 'post70294015876060')"> | |
</li> | |
<li onclick="toggle('pre70294015876060', 'post70294015876060')"> def call(env) | |
</li> | |
</ol> | |
<ol start="18" class="context-line"> | |
<li onclick="toggle('pre70294015876060', 'post70294015876060')"> dup.call!(env)<span>...</span></li></ol> | |
<ol start='19' class="post-context" id="post70294015876060"> | |
<li onclick="toggle('pre70294015876060', 'post70294015876060')"> end | |
</li> | |
<li onclick="toggle('pre70294015876060', 'post70294015876060')"> | |
</li> | |
<li onclick="toggle('pre70294015876060', 'post70294015876060')"> def call!(env) | |
</li> | |
<li onclick="toggle('pre70294015876060', 'post70294015876060')"> @env = env | |
</li> | |
<li onclick="toggle('pre70294015876060', 'post70294015876060')"> before | |
</li> | |
<li onclick="toggle('pre70294015876060', 'post70294015876060')"> @app_response = @app.call(@env) | |
</li> | |
<li onclick="toggle('pre70294015876060', 'post70294015876060')"> after || @app_response | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/head.rb</code>: in <code>call</code> | |
<div class="context" id="c70294015871400"> | |
<ol start="4" class="pre-context" id="pre70294015871400"> | |
<li onclick="toggle('pre70294015871400', 'post70294015871400')"> # Rack::Head returns an empty body for all HEAD requests. It leaves | |
</li> | |
<li onclick="toggle('pre70294015871400', 'post70294015871400')"> # all other requests unchanged. | |
</li> | |
<li onclick="toggle('pre70294015871400', 'post70294015871400')"> def initialize(app) | |
</li> | |
<li onclick="toggle('pre70294015871400', 'post70294015871400')"> @app = app | |
</li> | |
<li onclick="toggle('pre70294015871400', 'post70294015871400')"> end | |
</li> | |
<li onclick="toggle('pre70294015871400', 'post70294015871400')"> | |
</li> | |
<li onclick="toggle('pre70294015871400', 'post70294015871400')"> def call(env) | |
</li> | |
</ol> | |
<ol start="11" class="context-line"> | |
<li onclick="toggle('pre70294015871400', 'post70294015871400')"> status, headers, body = @app.call(env)<span>...</span></li></ol> | |
<ol start='12' class="post-context" id="post70294015871400"> | |
<li onclick="toggle('pre70294015871400', 'post70294015871400')"> | |
</li> | |
<li onclick="toggle('pre70294015871400', 'post70294015871400')"> if env["REQUEST_METHOD"] == "HEAD" | |
</li> | |
<li onclick="toggle('pre70294015871400', 'post70294015871400')"> body.close if body.respond_to? :close | |
</li> | |
<li onclick="toggle('pre70294015871400', 'post70294015871400')"> [status, headers, []] | |
</li> | |
<li onclick="toggle('pre70294015871400', 'post70294015871400')"> else | |
</li> | |
<li onclick="toggle('pre70294015871400', 'post70294015871400')"> [status, headers, body] | |
</li> | |
<li onclick="toggle('pre70294015871400', 'post70294015871400')"> end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/builder.rb</code>: in <code>call</code> | |
<div class="context" id="c70294015892380"> | |
<ol start="131" class="pre-context" id="pre70294015892380"> | |
<li onclick="toggle('pre70294015892380', 'post70294015892380')"> def to_app | |
</li> | |
<li onclick="toggle('pre70294015892380', 'post70294015892380')"> app = @map ? generate_map(@run, @map) : @run | |
</li> | |
<li onclick="toggle('pre70294015892380', 'post70294015892380')"> fail "missing run or map statement" unless app | |
</li> | |
<li onclick="toggle('pre70294015892380', 'post70294015892380')"> @use.reverse.inject(app) { |a,e| e[a] } | |
</li> | |
<li onclick="toggle('pre70294015892380', 'post70294015892380')"> end | |
</li> | |
<li onclick="toggle('pre70294015892380', 'post70294015892380')"> | |
</li> | |
<li onclick="toggle('pre70294015892380', 'post70294015892380')"> def call(env) | |
</li> | |
</ol> | |
<ol start="138" class="context-line"> | |
<li onclick="toggle('pre70294015892380', 'post70294015892380')"> to_app.call(env)<span>...</span></li></ol> | |
<ol start='139' class="post-context" id="post70294015892380"> | |
<li onclick="toggle('pre70294015892380', 'post70294015892380')"> end | |
</li> | |
<li onclick="toggle('pre70294015892380', 'post70294015892380')"> | |
</li> | |
<li onclick="toggle('pre70294015892380', 'post70294015892380')"> private | |
</li> | |
<li onclick="toggle('pre70294015892380', 'post70294015892380')"> | |
</li> | |
<li onclick="toggle('pre70294015892380', 'post70294015892380')"> def generate_map(default_app, mapping) | |
</li> | |
<li onclick="toggle('pre70294015892380', 'post70294015892380')"> mapped = default_app ? {'/' => default_app} : {} | |
</li> | |
<li onclick="toggle('pre70294015892380', 'post70294015892380')"> mapping.each { |r,b| mapped[r] = self.class.new(default_app, &b) } | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/endpoint.rb</code>: in <code>call!</code> | |
<div class="context" id="c70294015909800"> | |
<ol start="148" class="pre-context" id="pre70294015909800"> | |
<li onclick="toggle('pre70294015909800', 'post70294015909800')"> def call!(env) | |
</li> | |
<li onclick="toggle('pre70294015909800', 'post70294015909800')"> env['api.endpoint'] = self | |
</li> | |
<li onclick="toggle('pre70294015909800', 'post70294015909800')"> if options[:app] | |
</li> | |
<li onclick="toggle('pre70294015909800', 'post70294015909800')"> options[:app].call(env) | |
</li> | |
<li onclick="toggle('pre70294015909800', 'post70294015909800')"> else | |
</li> | |
<li onclick="toggle('pre70294015909800', 'post70294015909800')"> builder = build_middleware | |
</li> | |
<li onclick="toggle('pre70294015909800', 'post70294015909800')"> builder.run options[:app] || lambda{|env| self.run(env) } | |
</li> | |
</ol> | |
<ol start="155" class="context-line"> | |
<li onclick="toggle('pre70294015909800', 'post70294015909800')"> builder.call(env)<span>...</span></li></ol> | |
<ol start='156' class="post-context" id="post70294015909800"> | |
<li onclick="toggle('pre70294015909800', 'post70294015909800')"> end | |
</li> | |
<li onclick="toggle('pre70294015909800', 'post70294015909800')"> end | |
</li> | |
<li onclick="toggle('pre70294015909800', 'post70294015909800')"> | |
</li> | |
<li onclick="toggle('pre70294015909800', 'post70294015909800')"> # The parameters passed into the request as | |
</li> | |
<li onclick="toggle('pre70294015909800', 'post70294015909800')"> # well as parsed from URL segments. | |
</li> | |
<li onclick="toggle('pre70294015909800', 'post70294015909800')"> def params | |
</li> | |
<li onclick="toggle('pre70294015909800', 'post70294015909800')"> @params ||= @request.params | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/endpoint.rb</code>: in <code>call</code> | |
<div class="context" id="c70294015942280"> | |
<ol start="138" class="pre-context" id="pre70294015942280"> | |
<li onclick="toggle('pre70294015942280', 'post70294015942280')"> endpoint_options = {} | |
</li> | |
<li onclick="toggle('pre70294015942280', 'post70294015942280')"> endpoint_options[:version] = /#{settings[:version].join('|')}/ if settings[:version] | |
</li> | |
<li onclick="toggle('pre70294015942280', 'post70294015942280')"> endpoint_options.merge!(requirements) | |
</li> | |
<li onclick="toggle('pre70294015942280', 'post70294015942280')"> Rack::Mount::Strexp.compile(prepared_path, endpoint_options, %w( / . ? ), anchor) | |
</li> | |
<li onclick="toggle('pre70294015942280', 'post70294015942280')"> end | |
</li> | |
<li onclick="toggle('pre70294015942280', 'post70294015942280')"> | |
</li> | |
<li onclick="toggle('pre70294015942280', 'post70294015942280')"> def call(env) | |
</li> | |
</ol> | |
<ol start="145" class="context-line"> | |
<li onclick="toggle('pre70294015942280', 'post70294015942280')"> dup.call!(env)<span>...</span></li></ol> | |
<ol start='146' class="post-context" id="post70294015942280"> | |
<li onclick="toggle('pre70294015942280', 'post70294015942280')"> end | |
</li> | |
<li onclick="toggle('pre70294015942280', 'post70294015942280')"> | |
</li> | |
<li onclick="toggle('pre70294015942280', 'post70294015942280')"> def call!(env) | |
</li> | |
<li onclick="toggle('pre70294015942280', 'post70294015942280')"> env['api.endpoint'] = self | |
</li> | |
<li onclick="toggle('pre70294015942280', 'post70294015942280')"> if options[:app] | |
</li> | |
<li onclick="toggle('pre70294015942280', 'post70294015942280')"> options[:app].call(env) | |
</li> | |
<li onclick="toggle('pre70294015942280', 'post70294015942280')"> else | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-mount-0.8.3/lib/rack/mount/route_set.rb</code>: in <code>block in call</code> | |
<div class="context" id="c70294015974960"> | |
<ol start="145" class="pre-context" id="pre70294015974960"> | |
<li onclick="toggle('pre70294015974960', 'post70294015974960')"> if route.prefix? | |
</li> | |
<li onclick="toggle('pre70294015974960', 'post70294015974960')"> env[Prefix::KEY] = matches[:path_info].to_s | |
</li> | |
<li onclick="toggle('pre70294015974960', 'post70294015974960')"> end | |
</li> | |
<li onclick="toggle('pre70294015974960', 'post70294015974960')"> | |
</li> | |
<li onclick="toggle('pre70294015974960', 'post70294015974960')"> old_params = env[@parameters_key] | |
</li> | |
<li onclick="toggle('pre70294015974960', 'post70294015974960')"> env[@parameters_key] = (old_params || {}).merge(params) | |
</li> | |
<li onclick="toggle('pre70294015974960', 'post70294015974960')"> | |
</li> | |
</ol> | |
<ol start="152" class="context-line"> | |
<li onclick="toggle('pre70294015974960', 'post70294015974960')"> result = route.app.call(env)<span>...</span></li></ol> | |
<ol start='153' class="post-context" id="post70294015974960"> | |
<li onclick="toggle('pre70294015974960', 'post70294015974960')"> | |
</li> | |
<li onclick="toggle('pre70294015974960', 'post70294015974960')"> if result[1][X_CASCADE] == PASS | |
</li> | |
<li onclick="toggle('pre70294015974960', 'post70294015974960')"> env[@parameters_key] = old_params | |
</li> | |
<li onclick="toggle('pre70294015974960', 'post70294015974960')"> else | |
</li> | |
<li onclick="toggle('pre70294015974960', 'post70294015974960')"> return result | |
</li> | |
<li onclick="toggle('pre70294015974960', 'post70294015974960')"> end | |
</li> | |
<li onclick="toggle('pre70294015974960', 'post70294015974960')"> end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb</code>: in <code>block in recognize</code> | |
<div class="context" id="c70294015985280"> | |
<ol start="89" class="pre-context" id="pre70294015985280"> | |
<li onclick="toggle('pre70294015985280', 'post70294015985280')"> instance_eval(<<-RUBY, __FILE__, __LINE__) | |
</li> | |
<li onclick="toggle('pre70294015985280', 'post70294015985280')"> def recognize(obj) | |
</li> | |
<li onclick="toggle('pre70294015985280', 'post70294015985280')"> #{"cache = {}" if uses_cache} | |
</li> | |
<li onclick="toggle('pre70294015985280', 'post70294015985280')"> container = @recognition_graph[#{keys}] | |
</li> | |
<li onclick="toggle('pre70294015985280', 'post70294015985280')"> optimize_container_iterator(container) unless container.respond_to?(:optimized_each) | |
</li> | |
<li onclick="toggle('pre70294015985280', 'post70294015985280')"> | |
</li> | |
<li onclick="toggle('pre70294015985280', 'post70294015985280')"> if block_given? | |
</li> | |
</ol> | |
<ol start="96" class="context-line"> | |
<li onclick="toggle('pre70294015985280', 'post70294015985280')"> container.optimized_each(obj) do |route, matches, params|<span>...</span></li></ol> | |
<ol start='97' class="post-context" id="post70294015985280"> | |
<li onclick="toggle('pre70294015985280', 'post70294015985280')"> yield route, matches, params | |
</li> | |
<li onclick="toggle('pre70294015985280', 'post70294015985280')"> end | |
</li> | |
<li onclick="toggle('pre70294015985280', 'post70294015985280')"> else | |
</li> | |
<li onclick="toggle('pre70294015985280', 'post70294015985280')"> container.optimized_each(obj) do |route, matches, params| | |
</li> | |
<li onclick="toggle('pre70294015985280', 'post70294015985280')"> return route, matches, params | |
</li> | |
<li onclick="toggle('pre70294015985280', 'post70294015985280')"> end | |
</li> | |
<li onclick="toggle('pre70294015985280', 'post70294015985280')"> end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb</code>: in <code>optimized_each</code> | |
<div class="context" id="c70294016003440"> | |
<ol start="61" class="pre-context" id="pre70294016003440"> | |
<li onclick="toggle('pre70294016003440', 'post70294016003440')"> } | |
</li> | |
<li onclick="toggle('pre70294016003440', 'post70294016003440')"> | |
</li> | |
<li onclick="toggle('pre70294016003440', 'post70294016003440')"> container.instance_eval(<<-RUBY, __FILE__, __LINE__) | |
</li> | |
<li onclick="toggle('pre70294016003440', 'post70294016003440')"> def optimized_each(obj) | |
</li> | |
<li onclick="toggle('pre70294016003440', 'post70294016003440')"> #{body.join("\n")} | |
</li> | |
<li onclick="toggle('pre70294016003440', 'post70294016003440')"> nil | |
</li> | |
<li onclick="toggle('pre70294016003440', 'post70294016003440')"> end | |
</li> | |
</ol> | |
<ol start="68" class="context-line"> | |
<li onclick="toggle('pre70294016003440', 'post70294016003440')"> RUBY<span>...</span></li></ol> | |
<ol start='69' class="post-context" id="post70294016003440"> | |
<li onclick="toggle('pre70294016003440', 'post70294016003440')"> end | |
</li> | |
<li onclick="toggle('pre70294016003440', 'post70294016003440')"> | |
</li> | |
<li onclick="toggle('pre70294016003440', 'post70294016003440')"> def optimize_recognize! | |
</li> | |
<li onclick="toggle('pre70294016003440', 'post70294016003440')"> Utils.debug "optimizing recognize" | |
</li> | |
<li onclick="toggle('pre70294016003440', 'post70294016003440')"> | |
</li> | |
<li onclick="toggle('pre70294016003440', 'post70294016003440')"> uses_cache = false | |
</li> | |
<li onclick="toggle('pre70294016003440', 'post70294016003440')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb</code>: in <code>recognize</code> | |
<div class="context" id="c70294016021580"> | |
<ol start="88" class="pre-context" id="pre70294016021580"> | |
<li onclick="toggle('pre70294016021580', 'post70294016021580')"> | |
</li> | |
<li onclick="toggle('pre70294016021580', 'post70294016021580')"> instance_eval(<<-RUBY, __FILE__, __LINE__) | |
</li> | |
<li onclick="toggle('pre70294016021580', 'post70294016021580')"> def recognize(obj) | |
</li> | |
<li onclick="toggle('pre70294016021580', 'post70294016021580')"> #{"cache = {}" if uses_cache} | |
</li> | |
<li onclick="toggle('pre70294016021580', 'post70294016021580')"> container = @recognition_graph[#{keys}] | |
</li> | |
<li onclick="toggle('pre70294016021580', 'post70294016021580')"> optimize_container_iterator(container) unless container.respond_to?(:optimized_each) | |
</li> | |
<li onclick="toggle('pre70294016021580', 'post70294016021580')"> | |
</li> | |
</ol> | |
<ol start="95" class="context-line"> | |
<li onclick="toggle('pre70294016021580', 'post70294016021580')"> if block_given?<span>...</span></li></ol> | |
<ol start='96' class="post-context" id="post70294016021580"> | |
<li onclick="toggle('pre70294016021580', 'post70294016021580')"> container.optimized_each(obj) do |route, matches, params| | |
</li> | |
<li onclick="toggle('pre70294016021580', 'post70294016021580')"> yield route, matches, params | |
</li> | |
<li onclick="toggle('pre70294016021580', 'post70294016021580')"> end | |
</li> | |
<li onclick="toggle('pre70294016021580', 'post70294016021580')"> else | |
</li> | |
<li onclick="toggle('pre70294016021580', 'post70294016021580')"> container.optimized_each(obj) do |route, matches, params| | |
</li> | |
<li onclick="toggle('pre70294016021580', 'post70294016021580')"> return route, matches, params | |
</li> | |
<li onclick="toggle('pre70294016021580', 'post70294016021580')"> end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-mount-0.8.3/lib/rack/mount/route_set.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016039780"> | |
<ol start="134" class="pre-context" id="pre70294016039780"> | |
<li onclick="toggle('pre70294016039780', 'post70294016039780')"> def call(env) | |
</li> | |
<li onclick="toggle('pre70294016039780', 'post70294016039780')"> raise 'route set not finalized' unless @recognition_graph | |
</li> | |
<li onclick="toggle('pre70294016039780', 'post70294016039780')"> | |
</li> | |
<li onclick="toggle('pre70294016039780', 'post70294016039780')"> env[PATH_INFO] = Utils.normalize_path(env[PATH_INFO]) | |
</li> | |
<li onclick="toggle('pre70294016039780', 'post70294016039780')"> | |
</li> | |
<li onclick="toggle('pre70294016039780', 'post70294016039780')"> request = nil | |
</li> | |
<li onclick="toggle('pre70294016039780', 'post70294016039780')"> req = @request_class.new(env) | |
</li> | |
</ol> | |
<ol start="141" class="context-line"> | |
<li onclick="toggle('pre70294016039780', 'post70294016039780')"> recognize(req) do |route, matches, params|<span>...</span></li></ol> | |
<ol start='142' class="post-context" id="post70294016039780"> | |
<li onclick="toggle('pre70294016039780', 'post70294016039780')"> # TODO: We only want to unescape params from uri related methods | |
</li> | |
<li onclick="toggle('pre70294016039780', 'post70294016039780')"> params.each { |k, v| params[k] = Utils.unescape_uri(v) if v.is_a?(String) } | |
</li> | |
<li onclick="toggle('pre70294016039780', 'post70294016039780')"> | |
</li> | |
<li onclick="toggle('pre70294016039780', 'post70294016039780')"> if route.prefix? | |
</li> | |
<li onclick="toggle('pre70294016039780', 'post70294016039780')"> env[Prefix::KEY] = matches[:path_info].to_s | |
</li> | |
<li onclick="toggle('pre70294016039780', 'post70294016039780')"> end | |
</li> | |
<li onclick="toggle('pre70294016039780', 'post70294016039780')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/api.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016050020"> | |
<ol start="486" class="pre-context" id="pre70294016050020"> | |
<li onclick="toggle('pre70294016050020', 'post70294016050020')"> endpoint.mount_in(@route_set) | |
</li> | |
<li onclick="toggle('pre70294016050020', 'post70294016050020')"> end | |
</li> | |
<li onclick="toggle('pre70294016050020', 'post70294016050020')"> add_head_not_allowed_methods | |
</li> | |
<li onclick="toggle('pre70294016050020', 'post70294016050020')"> @route_set.freeze | |
</li> | |
<li onclick="toggle('pre70294016050020', 'post70294016050020')"> end | |
</li> | |
<li onclick="toggle('pre70294016050020', 'post70294016050020')"> | |
</li> | |
<li onclick="toggle('pre70294016050020', 'post70294016050020')"> def call(env) | |
</li> | |
</ol> | |
<ol start="493" class="context-line"> | |
<li onclick="toggle('pre70294016050020', 'post70294016050020')"> status, headers, body = @route_set.call(env)<span>...</span></li></ol> | |
<ol start='494' class="post-context" id="post70294016050020"> | |
<li onclick="toggle('pre70294016050020', 'post70294016050020')"> headers.delete('X-Cascade') unless cascade? | |
</li> | |
<li onclick="toggle('pre70294016050020', 'post70294016050020')"> [ status, headers, body ] | |
</li> | |
<li onclick="toggle('pre70294016050020', 'post70294016050020')"> end | |
</li> | |
<li onclick="toggle('pre70294016050020', 'post70294016050020')"> | |
</li> | |
<li onclick="toggle('pre70294016050020', 'post70294016050020')"> # Some requests may return a HTTP 404 error if grape cannot find a matching | |
</li> | |
<li onclick="toggle('pre70294016050020', 'post70294016050020')"> # route. In this case, Rack::Mount adds a X-Cascade header to the response | |
</li> | |
<li onclick="toggle('pre70294016050020', 'post70294016050020')"> # and sets it to 'pass', indicating to grape's parents they should keep | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/api.rb</code>: in <code>call!</code> | |
<div class="context" id="c70294016105060"> | |
<ol start="35" class="pre-context" id="pre70294016105060"> | |
<li onclick="toggle('pre70294016105060', 'post70294016105060')"> | |
</li> | |
<li onclick="toggle('pre70294016105060', 'post70294016105060')"> def call(env) | |
</li> | |
<li onclick="toggle('pre70294016105060', 'post70294016105060')"> compile unless instance | |
</li> | |
<li onclick="toggle('pre70294016105060', 'post70294016105060')"> call!(env) | |
</li> | |
<li onclick="toggle('pre70294016105060', 'post70294016105060')"> end | |
</li> | |
<li onclick="toggle('pre70294016105060', 'post70294016105060')"> | |
</li> | |
<li onclick="toggle('pre70294016105060', 'post70294016105060')"> def call!(env) | |
</li> | |
</ol> | |
<ol start="42" class="context-line"> | |
<li onclick="toggle('pre70294016105060', 'post70294016105060')"> instance.call(env)<span>...</span></li></ol> | |
<ol start='43' class="post-context" id="post70294016105060"> | |
<li onclick="toggle('pre70294016105060', 'post70294016105060')"> end | |
</li> | |
<li onclick="toggle('pre70294016105060', 'post70294016105060')"> | |
</li> | |
<li onclick="toggle('pre70294016105060', 'post70294016105060')"> # Set a configuration value for this namespace. | |
</li> | |
<li onclick="toggle('pre70294016105060', 'post70294016105060')"> # | |
</li> | |
<li onclick="toggle('pre70294016105060', 'post70294016105060')"> # @param key [Symbol] The key of the configuration variable. | |
</li> | |
<li onclick="toggle('pre70294016105060', 'post70294016105060')"> # @param value [Object] The value to which to set the configuration variable. | |
</li> | |
<li onclick="toggle('pre70294016105060', 'post70294016105060')"> def set(key, value) | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/api.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016135780"> | |
<ol start="31" class="pre-context" id="pre70294016135780"> | |
<li onclick="toggle('pre70294016135780', 'post70294016135780')"> | |
</li> | |
<li onclick="toggle('pre70294016135780', 'post70294016135780')"> def change! | |
</li> | |
<li onclick="toggle('pre70294016135780', 'post70294016135780')"> @instance = nil | |
</li> | |
<li onclick="toggle('pre70294016135780', 'post70294016135780')"> end | |
</li> | |
<li onclick="toggle('pre70294016135780', 'post70294016135780')"> | |
</li> | |
<li onclick="toggle('pre70294016135780', 'post70294016135780')"> def call(env) | |
</li> | |
<li onclick="toggle('pre70294016135780', 'post70294016135780')"> compile unless instance | |
</li> | |
</ol> | |
<ol start="38" class="context-line"> | |
<li onclick="toggle('pre70294016135780', 'post70294016135780')"> call!(env)<span>...</span></li></ol> | |
<ol start='39' class="post-context" id="post70294016135780"> | |
<li onclick="toggle('pre70294016135780', 'post70294016135780')"> end | |
</li> | |
<li onclick="toggle('pre70294016135780', 'post70294016135780')"> | |
</li> | |
<li onclick="toggle('pre70294016135780', 'post70294016135780')"> def call!(env) | |
</li> | |
<li onclick="toggle('pre70294016135780', 'post70294016135780')"> instance.call(env) | |
</li> | |
<li onclick="toggle('pre70294016135780', 'post70294016135780')"> end | |
</li> | |
<li onclick="toggle('pre70294016135780', 'post70294016135780')"> | |
</li> | |
<li onclick="toggle('pre70294016135780', 'post70294016135780')"> # Set a configuration value for this namespace. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/www/divshot/api/lib/cascade_with_override.rb</code>: in <code>block in call</code> | |
<div class="context" id="c70294016166440"> | |
<ol start="13" class="pre-context" id="pre70294016166440"> | |
<li onclick="toggle('pre70294016166440', 'post70294016166440')"> # by the server, or if it is replaced by a middleware action. Cascade | |
</li> | |
<li onclick="toggle('pre70294016166440', 'post70294016166440')"> # replaces the body each time a cascade happens. It is assumed that nil | |
</li> | |
<li onclick="toggle('pre70294016166440', 'post70294016166440')"> # does not respond to close, otherwise the previous application body | |
</li> | |
<li onclick="toggle('pre70294016166440', 'post70294016166440')"> # will be closed. The final application body will not be closed, as it | |
</li> | |
<li onclick="toggle('pre70294016166440', 'post70294016166440')"> # will be passed to the server as a result. | |
</li> | |
<li onclick="toggle('pre70294016166440', 'post70294016166440')"> last_body.close if last_body.respond_to? :close | |
</li> | |
<li onclick="toggle('pre70294016166440', 'post70294016166440')"> | |
</li> | |
</ol> | |
<ol start="20" class="context-line"> | |
<li onclick="toggle('pre70294016166440', 'post70294016166440')"> result = app.call(env)<span>...</span></li></ol> | |
<ol start='21' class="post-context" id="post70294016166440"> | |
<li onclick="toggle('pre70294016166440', 'post70294016166440')"> last_body = result[2] | |
</li> | |
<li onclick="toggle('pre70294016166440', 'post70294016166440')"> break unless continue?(result[0].to_i, result[1]["X-Cascade"]) | |
</li> | |
<li onclick="toggle('pre70294016166440', 'post70294016166440')"> end | |
</li> | |
<li onclick="toggle('pre70294016166440', 'post70294016166440')"> | |
</li> | |
<li onclick="toggle('pre70294016166440', 'post70294016166440')"> result | |
</li> | |
<li onclick="toggle('pre70294016166440', 'post70294016166440')"> end | |
</li> | |
<li onclick="toggle('pre70294016166440', 'post70294016166440')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/www/divshot/api/lib/cascade_with_override.rb</code>: in <code>each</code> | |
<div class="context" id="c70294016187060"> | |
<ol start="4" class="pre-context" id="pre70294016187060"> | |
<li onclick="toggle('pre70294016187060', 'post70294016187060')"> | |
</li> | |
<li onclick="toggle('pre70294016187060', 'post70294016187060')"> class CascadeWithOverride < Cascade | |
</li> | |
<li onclick="toggle('pre70294016187060', 'post70294016187060')"> def call(env) | |
</li> | |
<li onclick="toggle('pre70294016187060', 'post70294016187060')"> result = ::Rack::Cascade::NotFound | |
</li> | |
<li onclick="toggle('pre70294016187060', 'post70294016187060')"> | |
</li> | |
<li onclick="toggle('pre70294016187060', 'post70294016187060')"> last_body = nil | |
</li> | |
<li onclick="toggle('pre70294016187060', 'post70294016187060')"> | |
</li> | |
</ol> | |
<ol start="11" class="context-line"> | |
<li onclick="toggle('pre70294016187060', 'post70294016187060')"> @apps.each do |app|<span>...</span></li></ol> | |
<ol start='12' class="post-context" id="post70294016187060"> | |
<li onclick="toggle('pre70294016187060', 'post70294016187060')"> # The SPEC says that the body must be closed after it has been iterated | |
</li> | |
<li onclick="toggle('pre70294016187060', 'post70294016187060')"> # by the server, or if it is replaced by a middleware action. Cascade | |
</li> | |
<li onclick="toggle('pre70294016187060', 'post70294016187060')"> # replaces the body each time a cascade happens. It is assumed that nil | |
</li> | |
<li onclick="toggle('pre70294016187060', 'post70294016187060')"> # does not respond to close, otherwise the previous application body | |
</li> | |
<li onclick="toggle('pre70294016187060', 'post70294016187060')"> # will be closed. The final application body will not be closed, as it | |
</li> | |
<li onclick="toggle('pre70294016187060', 'post70294016187060')"> # will be passed to the server as a result. | |
</li> | |
<li onclick="toggle('pre70294016187060', 'post70294016187060')"> last_body.close if last_body.respond_to? :close | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/www/divshot/api/lib/cascade_with_override.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016183360"> | |
<ol start="4" class="pre-context" id="pre70294016183360"> | |
<li onclick="toggle('pre70294016183360', 'post70294016183360')"> | |
</li> | |
<li onclick="toggle('pre70294016183360', 'post70294016183360')"> class CascadeWithOverride < Cascade | |
</li> | |
<li onclick="toggle('pre70294016183360', 'post70294016183360')"> def call(env) | |
</li> | |
<li onclick="toggle('pre70294016183360', 'post70294016183360')"> result = ::Rack::Cascade::NotFound | |
</li> | |
<li onclick="toggle('pre70294016183360', 'post70294016183360')"> | |
</li> | |
<li onclick="toggle('pre70294016183360', 'post70294016183360')"> last_body = nil | |
</li> | |
<li onclick="toggle('pre70294016183360', 'post70294016183360')"> | |
</li> | |
</ol> | |
<ol start="11" class="context-line"> | |
<li onclick="toggle('pre70294016183360', 'post70294016183360')"> @apps.each do |app|<span>...</span></li></ol> | |
<ol start='12' class="post-context" id="post70294016183360"> | |
<li onclick="toggle('pre70294016183360', 'post70294016183360')"> # The SPEC says that the body must be closed after it has been iterated | |
</li> | |
<li onclick="toggle('pre70294016183360', 'post70294016183360')"> # by the server, or if it is replaced by a middleware action. Cascade | |
</li> | |
<li onclick="toggle('pre70294016183360', 'post70294016183360')"> # replaces the body each time a cascade happens. It is assumed that nil | |
</li> | |
<li onclick="toggle('pre70294016183360', 'post70294016183360')"> # does not respond to close, otherwise the previous application body | |
</li> | |
<li onclick="toggle('pre70294016183360', 'post70294016183360')"> # will be closed. The final application body will not be closed, as it | |
</li> | |
<li onclick="toggle('pre70294016183360', 'post70294016183360')"> # will be passed to the server as a result. | |
</li> | |
<li onclick="toggle('pre70294016183360', 'post70294016183360')"> last_body.close if last_body.respond_to? :close | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/urlmap.rb</code>: in <code>block in call</code> | |
<div class="context" id="c70294016204060"> | |
<ol start="58" class="pre-context" id="pre70294016204060"> | |
<li onclick="toggle('pre70294016204060', 'post70294016204060')"> | |
</li> | |
<li onclick="toggle('pre70294016204060', 'post70294016204060')"> rest = m[1] | |
</li> | |
<li onclick="toggle('pre70294016204060', 'post70294016204060')"> next unless !rest || rest.empty? || rest[0] == ?/ | |
</li> | |
<li onclick="toggle('pre70294016204060', 'post70294016204060')"> | |
</li> | |
<li onclick="toggle('pre70294016204060', 'post70294016204060')"> env['SCRIPT_NAME'] = (script_name + location) | |
</li> | |
<li onclick="toggle('pre70294016204060', 'post70294016204060')"> env['PATH_INFO'] = rest | |
</li> | |
<li onclick="toggle('pre70294016204060', 'post70294016204060')"> | |
</li> | |
</ol> | |
<ol start="65" class="context-line"> | |
<li onclick="toggle('pre70294016204060', 'post70294016204060')"> return app.call(env)<span>...</span></li></ol> | |
<ol start='66' class="post-context" id="post70294016204060"> | |
<li onclick="toggle('pre70294016204060', 'post70294016204060')"> end | |
</li> | |
<li onclick="toggle('pre70294016204060', 'post70294016204060')"> | |
</li> | |
<li onclick="toggle('pre70294016204060', 'post70294016204060')"> [404, {"Content-Type" => "text/plain", "X-Cascade" => "pass"}, ["Not Found: #{path}"]] | |
</li> | |
<li onclick="toggle('pre70294016204060', 'post70294016204060')"> | |
</li> | |
<li onclick="toggle('pre70294016204060', 'post70294016204060')"> ensure | |
</li> | |
<li onclick="toggle('pre70294016204060', 'post70294016204060')"> env['PATH_INFO'] = path | |
</li> | |
<li onclick="toggle('pre70294016204060', 'post70294016204060')"> env['SCRIPT_NAME'] = script_name | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/urlmap.rb</code>: in <code>each</code> | |
<div class="context" id="c70294016199140"> | |
<ol start="43" class="pre-context" id="pre70294016199140"> | |
<li onclick="toggle('pre70294016199140', 'post70294016199140')"> def call(env) | |
</li> | |
<li onclick="toggle('pre70294016199140', 'post70294016199140')"> path = env["PATH_INFO"] | |
</li> | |
<li onclick="toggle('pre70294016199140', 'post70294016199140')"> script_name = env['SCRIPT_NAME'] | |
</li> | |
<li onclick="toggle('pre70294016199140', 'post70294016199140')"> hHost = env['HTTP_HOST'] | |
</li> | |
<li onclick="toggle('pre70294016199140', 'post70294016199140')"> sName = env['SERVER_NAME'] | |
</li> | |
<li onclick="toggle('pre70294016199140', 'post70294016199140')"> sPort = env['SERVER_PORT'] | |
</li> | |
<li onclick="toggle('pre70294016199140', 'post70294016199140')"> | |
</li> | |
</ol> | |
<ol start="50" class="context-line"> | |
<li onclick="toggle('pre70294016199140', 'post70294016199140')"> @mapping.each do |host, location, match, app|<span>...</span></li></ol> | |
<ol start='51' class="post-context" id="post70294016199140"> | |
<li onclick="toggle('pre70294016199140', 'post70294016199140')"> unless hHost == host \ | |
</li> | |
<li onclick="toggle('pre70294016199140', 'post70294016199140')"> || sName == host \ | |
</li> | |
<li onclick="toggle('pre70294016199140', 'post70294016199140')"> || (!host && (hHost == sName || hHost == sName+':'+sPort)) | |
</li> | |
<li onclick="toggle('pre70294016199140', 'post70294016199140')"> next | |
</li> | |
<li onclick="toggle('pre70294016199140', 'post70294016199140')"> end | |
</li> | |
<li onclick="toggle('pre70294016199140', 'post70294016199140')"> | |
</li> | |
<li onclick="toggle('pre70294016199140', 'post70294016199140')"> next unless m = match.match(path.to_s) | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/urlmap.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016218900"> | |
<ol start="43" class="pre-context" id="pre70294016218900"> | |
<li onclick="toggle('pre70294016218900', 'post70294016218900')"> def call(env) | |
</li> | |
<li onclick="toggle('pre70294016218900', 'post70294016218900')"> path = env["PATH_INFO"] | |
</li> | |
<li onclick="toggle('pre70294016218900', 'post70294016218900')"> script_name = env['SCRIPT_NAME'] | |
</li> | |
<li onclick="toggle('pre70294016218900', 'post70294016218900')"> hHost = env['HTTP_HOST'] | |
</li> | |
<li onclick="toggle('pre70294016218900', 'post70294016218900')"> sName = env['SERVER_NAME'] | |
</li> | |
<li onclick="toggle('pre70294016218900', 'post70294016218900')"> sPort = env['SERVER_PORT'] | |
</li> | |
<li onclick="toggle('pre70294016218900', 'post70294016218900')"> | |
</li> | |
</ol> | |
<ol start="50" class="context-line"> | |
<li onclick="toggle('pre70294016218900', 'post70294016218900')"> @mapping.each do |host, location, match, app|<span>...</span></li></ol> | |
<ol start='51' class="post-context" id="post70294016218900"> | |
<li onclick="toggle('pre70294016218900', 'post70294016218900')"> unless hHost == host \ | |
</li> | |
<li onclick="toggle('pre70294016218900', 'post70294016218900')"> || sName == host \ | |
</li> | |
<li onclick="toggle('pre70294016218900', 'post70294016218900')"> || (!host && (hHost == sName || hHost == sName+':'+sPort)) | |
</li> | |
<li onclick="toggle('pre70294016218900', 'post70294016218900')"> next | |
</li> | |
<li onclick="toggle('pre70294016218900', 'post70294016218900')"> end | |
</li> | |
<li onclick="toggle('pre70294016218900', 'post70294016218900')"> | |
</li> | |
<li onclick="toggle('pre70294016218900', 'post70294016218900')"> next unless m = match.match(path.to_s) | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/commonlogger.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016214000"> | |
<ol start="26" class="pre-context" id="pre70294016214000"> | |
<li onclick="toggle('pre70294016214000', 'post70294016214000')"> def initialize(app, logger=nil) | |
</li> | |
<li onclick="toggle('pre70294016214000', 'post70294016214000')"> @app = app | |
</li> | |
<li onclick="toggle('pre70294016214000', 'post70294016214000')"> @logger = logger | |
</li> | |
<li onclick="toggle('pre70294016214000', 'post70294016214000')"> end | |
</li> | |
<li onclick="toggle('pre70294016214000', 'post70294016214000')"> | |
</li> | |
<li onclick="toggle('pre70294016214000', 'post70294016214000')"> def call(env) | |
</li> | |
<li onclick="toggle('pre70294016214000', 'post70294016214000')"> began_at = Time.now | |
</li> | |
</ol> | |
<ol start="33" class="context-line"> | |
<li onclick="toggle('pre70294016214000', 'post70294016214000')"> status, header, body = @app.call(env)<span>...</span></li></ol> | |
<ol start='34' class="post-context" id="post70294016214000"> | |
<li onclick="toggle('pre70294016214000', 'post70294016214000')"> header = Utils::HeaderHash.new(header) | |
</li> | |
<li onclick="toggle('pre70294016214000', 'post70294016214000')"> body = BodyProxy.new(body) { log(env, status, header, began_at) } | |
</li> | |
<li onclick="toggle('pre70294016214000', 'post70294016214000')"> [status, header, body] | |
</li> | |
<li onclick="toggle('pre70294016214000', 'post70294016214000')"> end | |
</li> | |
<li onclick="toggle('pre70294016214000', 'post70294016214000')"> | |
</li> | |
<li onclick="toggle('pre70294016214000', 'post70294016214000')"> private | |
</li> | |
<li onclick="toggle('pre70294016214000', 'post70294016214000')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/sinatra-1.3.4/lib/sinatra/base.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016234140"> | |
<ol start="154" class="pre-context" id="pre70294016234140"> | |
<li onclick="toggle('pre70294016234140', 'post70294016234140')"> env['sinatra.commonlogger'] ? @app.call(env) : super | |
</li> | |
<li onclick="toggle('pre70294016234140', 'post70294016234140')"> end | |
</li> | |
<li onclick="toggle('pre70294016234140', 'post70294016234140')"> | |
</li> | |
<li onclick="toggle('pre70294016234140', 'post70294016234140')"> superclass.class_eval do | |
</li> | |
<li onclick="toggle('pre70294016234140', 'post70294016234140')"> alias call_without_check call unless method_defined? :call_without_check | |
</li> | |
<li onclick="toggle('pre70294016234140', 'post70294016234140')"> def call(env) | |
</li> | |
<li onclick="toggle('pre70294016234140', 'post70294016234140')"> env['sinatra.commonlogger'] = true | |
</li> | |
</ol> | |
<ol start="161" class="context-line"> | |
<li onclick="toggle('pre70294016234140', 'post70294016234140')"> call_without_check(env)<span>...</span></li></ol> | |
<ol start='162' class="post-context" id="post70294016234140"> | |
<li onclick="toggle('pre70294016234140', 'post70294016234140')"> end | |
</li> | |
<li onclick="toggle('pre70294016234140', 'post70294016234140')"> end | |
</li> | |
<li onclick="toggle('pre70294016234140', 'post70294016234140')"> end | |
</li> | |
<li onclick="toggle('pre70294016234140', 'post70294016234140')"> | |
</li> | |
<li onclick="toggle('pre70294016234140', 'post70294016234140')"> class NotFound < NameError #:nodoc: | |
</li> | |
<li onclick="toggle('pre70294016234140', 'post70294016234140')"> def code ; 404 ; end | |
</li> | |
<li onclick="toggle('pre70294016234140', 'post70294016234140')"> end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/omniauth-1.1.4/lib/omniauth/strategy.rb</code>: in <code>call_app!</code> | |
<div class="context" id="c70294016328820"> | |
<ol start="394" class="pre-context" id="pre70294016328820"> | |
<li onclick="toggle('pre70294016328820', 'post70294016328820')"> end | |
</li> | |
<li onclick="toggle('pre70294016328820', 'post70294016328820')"> | |
</li> | |
<li onclick="toggle('pre70294016328820', 'post70294016328820')"> def query_string | |
</li> | |
<li onclick="toggle('pre70294016328820', 'post70294016328820')"> request.query_string.empty? ? "" : "?#{request.query_string}" | |
</li> | |
<li onclick="toggle('pre70294016328820', 'post70294016328820')"> end | |
</li> | |
<li onclick="toggle('pre70294016328820', 'post70294016328820')"> | |
</li> | |
<li onclick="toggle('pre70294016328820', 'post70294016328820')"> def call_app!(env = @env) | |
</li> | |
</ol> | |
<ol start="401" class="context-line"> | |
<li onclick="toggle('pre70294016328820', 'post70294016328820')"> @app.call(env)<span>...</span></li></ol> | |
<ol start='402' class="post-context" id="post70294016328820"> | |
<li onclick="toggle('pre70294016328820', 'post70294016328820')"> end | |
</li> | |
<li onclick="toggle('pre70294016328820', 'post70294016328820')"> | |
</li> | |
<li onclick="toggle('pre70294016328820', 'post70294016328820')"> def full_host | |
</li> | |
<li onclick="toggle('pre70294016328820', 'post70294016328820')"> case OmniAuth.config.full_host | |
</li> | |
<li onclick="toggle('pre70294016328820', 'post70294016328820')"> when String | |
</li> | |
<li onclick="toggle('pre70294016328820', 'post70294016328820')"> OmniAuth.config.full_host | |
</li> | |
<li onclick="toggle('pre70294016328820', 'post70294016328820')"> when Proc | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/omniauth-identity-1.1.0/lib/omniauth/strategies/identity.rb</code>: in <code>other_phase</code> | |
<div class="context" id="c70294016361240"> | |
<ol start="29" class="pre-context" id="pre70294016361240"> | |
<li onclick="toggle('pre70294016361240', 'post70294016361240')"> if on_registration_path? | |
</li> | |
<li onclick="toggle('pre70294016361240', 'post70294016361240')"> if request.get? | |
</li> | |
<li onclick="toggle('pre70294016361240', 'post70294016361240')"> registration_form | |
</li> | |
<li onclick="toggle('pre70294016361240', 'post70294016361240')"> elsif request.post? | |
</li> | |
<li onclick="toggle('pre70294016361240', 'post70294016361240')"> registration_phase | |
</li> | |
<li onclick="toggle('pre70294016361240', 'post70294016361240')"> end | |
</li> | |
<li onclick="toggle('pre70294016361240', 'post70294016361240')"> else | |
</li> | |
</ol> | |
<ol start="36" class="context-line"> | |
<li onclick="toggle('pre70294016361240', 'post70294016361240')"> call_app!<span>...</span></li></ol> | |
<ol start='37' class="post-context" id="post70294016361240"> | |
<li onclick="toggle('pre70294016361240', 'post70294016361240')"> end | |
</li> | |
<li onclick="toggle('pre70294016361240', 'post70294016361240')"> end | |
</li> | |
<li onclick="toggle('pre70294016361240', 'post70294016361240')"> | |
</li> | |
<li onclick="toggle('pre70294016361240', 'post70294016361240')"> def registration_form | |
</li> | |
<li onclick="toggle('pre70294016361240', 'post70294016361240')"> OmniAuth::Form.build(:title => 'Register Identity') do |f| | |
</li> | |
<li onclick="toggle('pre70294016361240', 'post70294016361240')"> options[:fields].each do |field| | |
</li> | |
<li onclick="toggle('pre70294016361240', 'post70294016361240')"> f.text_field field.to_s.capitalize, field.to_s | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/omniauth-1.1.4/lib/omniauth/strategy.rb</code>: in <code>call!</code> | |
<div class="context" id="c70294016380240"> | |
<ol start="176" class="pre-context" id="pre70294016380240"> | |
<li onclick="toggle('pre70294016380240', 'post70294016380240')"> @env['omniauth.strategy'] = self if on_auth_path? | |
</li> | |
<li onclick="toggle('pre70294016380240', 'post70294016380240')"> | |
</li> | |
<li onclick="toggle('pre70294016380240', 'post70294016380240')"> return mock_call!(env) if OmniAuth.config.test_mode | |
</li> | |
<li onclick="toggle('pre70294016380240', 'post70294016380240')"> | |
</li> | |
<li onclick="toggle('pre70294016380240', 'post70294016380240')"> return options_call if on_auth_path? && options_request? | |
</li> | |
<li onclick="toggle('pre70294016380240', 'post70294016380240')"> return request_call if on_request_path? && OmniAuth.config.allowed_request_methods.include?(request.request_method.downcase.to_sym) | |
</li> | |
<li onclick="toggle('pre70294016380240', 'post70294016380240')"> return callback_call if on_callback_path? | |
</li> | |
</ol> | |
<ol start="183" class="context-line"> | |
<li onclick="toggle('pre70294016380240', 'post70294016380240')"> return other_phase if respond_to?(:other_phase)<span>...</span></li></ol> | |
<ol start='184' class="post-context" id="post70294016380240"> | |
<li onclick="toggle('pre70294016380240', 'post70294016380240')"> @app.call(env) | |
</li> | |
<li onclick="toggle('pre70294016380240', 'post70294016380240')"> end | |
</li> | |
<li onclick="toggle('pre70294016380240', 'post70294016380240')"> | |
</li> | |
<li onclick="toggle('pre70294016380240', 'post70294016380240')"> # Responds to an OPTIONS request. | |
</li> | |
<li onclick="toggle('pre70294016380240', 'post70294016380240')"> def options_call | |
</li> | |
<li onclick="toggle('pre70294016380240', 'post70294016380240')"> verbs = OmniAuth.config.allowed_request_methods.map(&:to_s).map(&:upcase).join(', ') | |
</li> | |
<li onclick="toggle('pre70294016380240', 'post70294016380240')"> return [ 200, { 'Allow' => verbs }, [] ] | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/omniauth-1.1.4/lib/omniauth/strategy.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016412620"> | |
<ol start="157" class="pre-context" id="pre70294016412620"> | |
<li onclick="toggle('pre70294016412620', 'post70294016412620')"> def log(level, message) | |
</li> | |
<li onclick="toggle('pre70294016412620', 'post70294016412620')"> OmniAuth.logger.send(level, "(#{name}) #{message}") | |
</li> | |
<li onclick="toggle('pre70294016412620', 'post70294016412620')"> end | |
</li> | |
<li onclick="toggle('pre70294016412620', 'post70294016412620')"> | |
</li> | |
<li onclick="toggle('pre70294016412620', 'post70294016412620')"> # Duplicates this instance and runs #call! on it. | |
</li> | |
<li onclick="toggle('pre70294016412620', 'post70294016412620')"> # @param [Hash] The Rack environment. | |
</li> | |
<li onclick="toggle('pre70294016412620', 'post70294016412620')"> def call(env) | |
</li> | |
</ol> | |
<ol start="164" class="context-line"> | |
<li onclick="toggle('pre70294016412620', 'post70294016412620')"> dup.call!(env)<span>...</span></li></ol> | |
<ol start='165' class="post-context" id="post70294016412620"> | |
<li onclick="toggle('pre70294016412620', 'post70294016412620')"> end | |
</li> | |
<li onclick="toggle('pre70294016412620', 'post70294016412620')"> | |
</li> | |
<li onclick="toggle('pre70294016412620', 'post70294016412620')"> # The logic for dispatching any additional actions that need | |
</li> | |
<li onclick="toggle('pre70294016412620', 'post70294016412620')"> # to be taken. For instance, calling the request phase if | |
</li> | |
<li onclick="toggle('pre70294016412620', 'post70294016412620')"> # the request path is recognized. | |
</li> | |
<li onclick="toggle('pre70294016412620', 'post70294016412620')"> # | |
</li> | |
<li onclick="toggle('pre70294016412620', 'post70294016412620')"> # @param env [Hash] The Rack environment. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/omniauth-1.1.4/lib/omniauth/strategy.rb</code>: in <code>call!</code> | |
<div class="context" id="c70294016444940"> | |
<ol start="177" class="pre-context" id="pre70294016444940"> | |
<li onclick="toggle('pre70294016444940', 'post70294016444940')"> | |
</li> | |
<li onclick="toggle('pre70294016444940', 'post70294016444940')"> return mock_call!(env) if OmniAuth.config.test_mode | |
</li> | |
<li onclick="toggle('pre70294016444940', 'post70294016444940')"> | |
</li> | |
<li onclick="toggle('pre70294016444940', 'post70294016444940')"> return options_call if on_auth_path? && options_request? | |
</li> | |
<li onclick="toggle('pre70294016444940', 'post70294016444940')"> return request_call if on_request_path? && OmniAuth.config.allowed_request_methods.include?(request.request_method.downcase.to_sym) | |
</li> | |
<li onclick="toggle('pre70294016444940', 'post70294016444940')"> return callback_call if on_callback_path? | |
</li> | |
<li onclick="toggle('pre70294016444940', 'post70294016444940')"> return other_phase if respond_to?(:other_phase) | |
</li> | |
</ol> | |
<ol start="184" class="context-line"> | |
<li onclick="toggle('pre70294016444940', 'post70294016444940')"> @app.call(env)<span>...</span></li></ol> | |
<ol start='185' class="post-context" id="post70294016444940"> | |
<li onclick="toggle('pre70294016444940', 'post70294016444940')"> end | |
</li> | |
<li onclick="toggle('pre70294016444940', 'post70294016444940')"> | |
</li> | |
<li onclick="toggle('pre70294016444940', 'post70294016444940')"> # Responds to an OPTIONS request. | |
</li> | |
<li onclick="toggle('pre70294016444940', 'post70294016444940')"> def options_call | |
</li> | |
<li onclick="toggle('pre70294016444940', 'post70294016444940')"> verbs = OmniAuth.config.allowed_request_methods.map(&:to_s).map(&:upcase).join(', ') | |
</li> | |
<li onclick="toggle('pre70294016444940', 'post70294016444940')"> return [ 200, { 'Allow' => verbs }, [] ] | |
</li> | |
<li onclick="toggle('pre70294016444940', 'post70294016444940')"> end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/omniauth-1.1.4/lib/omniauth/strategy.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016477100"> | |
<ol start="157" class="pre-context" id="pre70294016477100"> | |
<li onclick="toggle('pre70294016477100', 'post70294016477100')"> def log(level, message) | |
</li> | |
<li onclick="toggle('pre70294016477100', 'post70294016477100')"> OmniAuth.logger.send(level, "(#{name}) #{message}") | |
</li> | |
<li onclick="toggle('pre70294016477100', 'post70294016477100')"> end | |
</li> | |
<li onclick="toggle('pre70294016477100', 'post70294016477100')"> | |
</li> | |
<li onclick="toggle('pre70294016477100', 'post70294016477100')"> # Duplicates this instance and runs #call! on it. | |
</li> | |
<li onclick="toggle('pre70294016477100', 'post70294016477100')"> # @param [Hash] The Rack environment. | |
</li> | |
<li onclick="toggle('pre70294016477100', 'post70294016477100')"> def call(env) | |
</li> | |
</ol> | |
<ol start="164" class="context-line"> | |
<li onclick="toggle('pre70294016477100', 'post70294016477100')"> dup.call!(env)<span>...</span></li></ol> | |
<ol start='165' class="post-context" id="post70294016477100"> | |
<li onclick="toggle('pre70294016477100', 'post70294016477100')"> end | |
</li> | |
<li onclick="toggle('pre70294016477100', 'post70294016477100')"> | |
</li> | |
<li onclick="toggle('pre70294016477100', 'post70294016477100')"> # The logic for dispatching any additional actions that need | |
</li> | |
<li onclick="toggle('pre70294016477100', 'post70294016477100')"> # to be taken. For instance, calling the request phase if | |
</li> | |
<li onclick="toggle('pre70294016477100', 'post70294016477100')"> # the request path is recognized. | |
</li> | |
<li onclick="toggle('pre70294016477100', 'post70294016477100')"> # | |
</li> | |
<li onclick="toggle('pre70294016477100', 'post70294016477100')"> # @param env [Hash] The Rack environment. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/omniauth-1.1.4/lib/omniauth/strategy.rb</code>: in <code>call!</code> | |
<div class="context" id="c70294016509560"> | |
<ol start="177" class="pre-context" id="pre70294016509560"> | |
<li onclick="toggle('pre70294016509560', 'post70294016509560')"> | |
</li> | |
<li onclick="toggle('pre70294016509560', 'post70294016509560')"> return mock_call!(env) if OmniAuth.config.test_mode | |
</li> | |
<li onclick="toggle('pre70294016509560', 'post70294016509560')"> | |
</li> | |
<li onclick="toggle('pre70294016509560', 'post70294016509560')"> return options_call if on_auth_path? && options_request? | |
</li> | |
<li onclick="toggle('pre70294016509560', 'post70294016509560')"> return request_call if on_request_path? && OmniAuth.config.allowed_request_methods.include?(request.request_method.downcase.to_sym) | |
</li> | |
<li onclick="toggle('pre70294016509560', 'post70294016509560')"> return callback_call if on_callback_path? | |
</li> | |
<li onclick="toggle('pre70294016509560', 'post70294016509560')"> return other_phase if respond_to?(:other_phase) | |
</li> | |
</ol> | |
<ol start="184" class="context-line"> | |
<li onclick="toggle('pre70294016509560', 'post70294016509560')"> @app.call(env)<span>...</span></li></ol> | |
<ol start='185' class="post-context" id="post70294016509560"> | |
<li onclick="toggle('pre70294016509560', 'post70294016509560')"> end | |
</li> | |
<li onclick="toggle('pre70294016509560', 'post70294016509560')"> | |
</li> | |
<li onclick="toggle('pre70294016509560', 'post70294016509560')"> # Responds to an OPTIONS request. | |
</li> | |
<li onclick="toggle('pre70294016509560', 'post70294016509560')"> def options_call | |
</li> | |
<li onclick="toggle('pre70294016509560', 'post70294016509560')"> verbs = OmniAuth.config.allowed_request_methods.map(&:to_s).map(&:upcase).join(', ') | |
</li> | |
<li onclick="toggle('pre70294016509560', 'post70294016509560')"> return [ 200, { 'Allow' => verbs }, [] ] | |
</li> | |
<li onclick="toggle('pre70294016509560', 'post70294016509560')"> end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/omniauth-1.1.4/lib/omniauth/strategy.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016542020"> | |
<ol start="157" class="pre-context" id="pre70294016542020"> | |
<li onclick="toggle('pre70294016542020', 'post70294016542020')"> def log(level, message) | |
</li> | |
<li onclick="toggle('pre70294016542020', 'post70294016542020')"> OmniAuth.logger.send(level, "(#{name}) #{message}") | |
</li> | |
<li onclick="toggle('pre70294016542020', 'post70294016542020')"> end | |
</li> | |
<li onclick="toggle('pre70294016542020', 'post70294016542020')"> | |
</li> | |
<li onclick="toggle('pre70294016542020', 'post70294016542020')"> # Duplicates this instance and runs #call! on it. | |
</li> | |
<li onclick="toggle('pre70294016542020', 'post70294016542020')"> # @param [Hash] The Rack environment. | |
</li> | |
<li onclick="toggle('pre70294016542020', 'post70294016542020')"> def call(env) | |
</li> | |
</ol> | |
<ol start="164" class="context-line"> | |
<li onclick="toggle('pre70294016542020', 'post70294016542020')"> dup.call!(env)<span>...</span></li></ol> | |
<ol start='165' class="post-context" id="post70294016542020"> | |
<li onclick="toggle('pre70294016542020', 'post70294016542020')"> end | |
</li> | |
<li onclick="toggle('pre70294016542020', 'post70294016542020')"> | |
</li> | |
<li onclick="toggle('pre70294016542020', 'post70294016542020')"> # The logic for dispatching any additional actions that need | |
</li> | |
<li onclick="toggle('pre70294016542020', 'post70294016542020')"> # to be taken. For instance, calling the request phase if | |
</li> | |
<li onclick="toggle('pre70294016542020', 'post70294016542020')"> # the request path is recognized. | |
</li> | |
<li onclick="toggle('pre70294016542020', 'post70294016542020')"> # | |
</li> | |
<li onclick="toggle('pre70294016542020', 'post70294016542020')"> # @param env [Hash] The Rack environment. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/omniauth-1.1.4/lib/omniauth/builder.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016574320"> | |
<ol start="42" class="pre-context" id="pre70294016574320"> | |
<li onclick="toggle('pre70294016574320', 'post70294016574320')"> end | |
</li> | |
<li onclick="toggle('pre70294016574320', 'post70294016574320')"> | |
</li> | |
<li onclick="toggle('pre70294016574320', 'post70294016574320')"> args.last.is_a?(Hash) ? args.push(options.merge(args.pop)) : args.push(options) | |
</li> | |
<li onclick="toggle('pre70294016574320', 'post70294016574320')"> use middleware, *args, &block | |
</li> | |
<li onclick="toggle('pre70294016574320', 'post70294016574320')"> end | |
</li> | |
<li onclick="toggle('pre70294016574320', 'post70294016574320')"> | |
</li> | |
<li onclick="toggle('pre70294016574320', 'post70294016574320')"> def call(env) | |
</li> | |
</ol> | |
<ol start="49" class="context-line"> | |
<li onclick="toggle('pre70294016574320', 'post70294016574320')"> to_app.call(env)<span>...</span></li></ol> | |
<ol start='50' class="post-context" id="post70294016574320"> | |
<li onclick="toggle('pre70294016574320', 'post70294016574320')"> end | |
</li> | |
<li onclick="toggle('pre70294016574320', 'post70294016574320')"> end | |
</li> | |
<li onclick="toggle('pre70294016574320', 'post70294016574320')">end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/urlmap.rb</code>: in <code>block in call</code> | |
<div class="context" id="c70294016594400"> | |
<ol start="58" class="pre-context" id="pre70294016594400"> | |
<li onclick="toggle('pre70294016594400', 'post70294016594400')"> | |
</li> | |
<li onclick="toggle('pre70294016594400', 'post70294016594400')"> rest = m[1] | |
</li> | |
<li onclick="toggle('pre70294016594400', 'post70294016594400')"> next unless !rest || rest.empty? || rest[0] == ?/ | |
</li> | |
<li onclick="toggle('pre70294016594400', 'post70294016594400')"> | |
</li> | |
<li onclick="toggle('pre70294016594400', 'post70294016594400')"> env['SCRIPT_NAME'] = (script_name + location) | |
</li> | |
<li onclick="toggle('pre70294016594400', 'post70294016594400')"> env['PATH_INFO'] = rest | |
</li> | |
<li onclick="toggle('pre70294016594400', 'post70294016594400')"> | |
</li> | |
</ol> | |
<ol start="65" class="context-line"> | |
<li onclick="toggle('pre70294016594400', 'post70294016594400')"> return app.call(env)<span>...</span></li></ol> | |
<ol start='66' class="post-context" id="post70294016594400"> | |
<li onclick="toggle('pre70294016594400', 'post70294016594400')"> end | |
</li> | |
<li onclick="toggle('pre70294016594400', 'post70294016594400')"> | |
</li> | |
<li onclick="toggle('pre70294016594400', 'post70294016594400')"> [404, {"Content-Type" => "text/plain", "X-Cascade" => "pass"}, ["Not Found: #{path}"]] | |
</li> | |
<li onclick="toggle('pre70294016594400', 'post70294016594400')"> | |
</li> | |
<li onclick="toggle('pre70294016594400', 'post70294016594400')"> ensure | |
</li> | |
<li onclick="toggle('pre70294016594400', 'post70294016594400')"> env['PATH_INFO'] = path | |
</li> | |
<li onclick="toggle('pre70294016594400', 'post70294016594400')"> env['SCRIPT_NAME'] = script_name | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/urlmap.rb</code>: in <code>each</code> | |
<div class="context" id="c70294016613860"> | |
<ol start="43" class="pre-context" id="pre70294016613860"> | |
<li onclick="toggle('pre70294016613860', 'post70294016613860')"> def call(env) | |
</li> | |
<li onclick="toggle('pre70294016613860', 'post70294016613860')"> path = env["PATH_INFO"] | |
</li> | |
<li onclick="toggle('pre70294016613860', 'post70294016613860')"> script_name = env['SCRIPT_NAME'] | |
</li> | |
<li onclick="toggle('pre70294016613860', 'post70294016613860')"> hHost = env['HTTP_HOST'] | |
</li> | |
<li onclick="toggle('pre70294016613860', 'post70294016613860')"> sName = env['SERVER_NAME'] | |
</li> | |
<li onclick="toggle('pre70294016613860', 'post70294016613860')"> sPort = env['SERVER_PORT'] | |
</li> | |
<li onclick="toggle('pre70294016613860', 'post70294016613860')"> | |
</li> | |
</ol> | |
<ol start="50" class="context-line"> | |
<li onclick="toggle('pre70294016613860', 'post70294016613860')"> @mapping.each do |host, location, match, app|<span>...</span></li></ol> | |
<ol start='51' class="post-context" id="post70294016613860"> | |
<li onclick="toggle('pre70294016613860', 'post70294016613860')"> unless hHost == host \ | |
</li> | |
<li onclick="toggle('pre70294016613860', 'post70294016613860')"> || sName == host \ | |
</li> | |
<li onclick="toggle('pre70294016613860', 'post70294016613860')"> || (!host && (hHost == sName || hHost == sName+':'+sPort)) | |
</li> | |
<li onclick="toggle('pre70294016613860', 'post70294016613860')"> next | |
</li> | |
<li onclick="toggle('pre70294016613860', 'post70294016613860')"> end | |
</li> | |
<li onclick="toggle('pre70294016613860', 'post70294016613860')"> | |
</li> | |
<li onclick="toggle('pre70294016613860', 'post70294016613860')"> next unless m = match.match(path.to_s) | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/urlmap.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016608700"> | |
<ol start="43" class="pre-context" id="pre70294016608700"> | |
<li onclick="toggle('pre70294016608700', 'post70294016608700')"> def call(env) | |
</li> | |
<li onclick="toggle('pre70294016608700', 'post70294016608700')"> path = env["PATH_INFO"] | |
</li> | |
<li onclick="toggle('pre70294016608700', 'post70294016608700')"> script_name = env['SCRIPT_NAME'] | |
</li> | |
<li onclick="toggle('pre70294016608700', 'post70294016608700')"> hHost = env['HTTP_HOST'] | |
</li> | |
<li onclick="toggle('pre70294016608700', 'post70294016608700')"> sName = env['SERVER_NAME'] | |
</li> | |
<li onclick="toggle('pre70294016608700', 'post70294016608700')"> sPort = env['SERVER_PORT'] | |
</li> | |
<li onclick="toggle('pre70294016608700', 'post70294016608700')"> | |
</li> | |
</ol> | |
<ol start="50" class="context-line"> | |
<li onclick="toggle('pre70294016608700', 'post70294016608700')"> @mapping.each do |host, location, match, app|<span>...</span></li></ol> | |
<ol start='51' class="post-context" id="post70294016608700"> | |
<li onclick="toggle('pre70294016608700', 'post70294016608700')"> unless hHost == host \ | |
</li> | |
<li onclick="toggle('pre70294016608700', 'post70294016608700')"> || sName == host \ | |
</li> | |
<li onclick="toggle('pre70294016608700', 'post70294016608700')"> || (!host && (hHost == sName || hHost == sName+':'+sPort)) | |
</li> | |
<li onclick="toggle('pre70294016608700', 'post70294016608700')"> next | |
</li> | |
<li onclick="toggle('pre70294016608700', 'post70294016608700')"> end | |
</li> | |
<li onclick="toggle('pre70294016608700', 'post70294016608700')"> | |
</li> | |
<li onclick="toggle('pre70294016608700', 'post70294016608700')"> next unless m = match.match(path.to_s) | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bundler/gems/rack-cors-13782d90ebda/lib/rack/cors.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016628120"> | |
<ol start="47" class="pre-context" id="pre70294016628120"> | |
<li onclick="toggle('pre70294016628120', 'post70294016628120')"> end | |
</li> | |
<li onclick="toggle('pre70294016628120', 'post70294016628120')"> return [200, headers, []] | |
</li> | |
<li onclick="toggle('pre70294016628120', 'post70294016628120')"> end | |
</li> | |
<li onclick="toggle('pre70294016628120', 'post70294016628120')"> else | |
</li> | |
<li onclick="toggle('pre70294016628120', 'post70294016628120')"> cors_headers = process_cors(env) | |
</li> | |
<li onclick="toggle('pre70294016628120', 'post70294016628120')"> end | |
</li> | |
<li onclick="toggle('pre70294016628120', 'post70294016628120')"> end | |
</li> | |
</ol> | |
<ol start="54" class="context-line"> | |
<li onclick="toggle('pre70294016628120', 'post70294016628120')"> status, headers, body = @app.call env<span>...</span></li></ol> | |
<ol start='55' class="post-context" id="post70294016628120"> | |
<li onclick="toggle('pre70294016628120', 'post70294016628120')"> if cors_headers | |
</li> | |
<li onclick="toggle('pre70294016628120', 'post70294016628120')"> headers = headers.merge(cors_headers) | |
</li> | |
<li onclick="toggle('pre70294016628120', 'post70294016628120')"> unless headers['Access-Control-Allow-Origin'] == '*' | |
</li> | |
<li onclick="toggle('pre70294016628120', 'post70294016628120')"> vary = headers['Vary'] | |
</li> | |
<li onclick="toggle('pre70294016628120', 'post70294016628120')"> headers['Vary'] = ((vary ? vary.split(/,\s*/) : []) + ['Origin']).uniq.join(', ') | |
</li> | |
<li onclick="toggle('pre70294016628120', 'post70294016628120')"> end | |
</li> | |
<li onclick="toggle('pre70294016628120', 'post70294016628120')"> end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/session/abstract/id.rb</code>: in <code>context</code> | |
<div class="context" id="c70294016642760"> | |
<ol start="218" class="pre-context" id="pre70294016642760"> | |
<li onclick="toggle('pre70294016642760', 'post70294016642760')"> | |
</li> | |
<li onclick="toggle('pre70294016642760', 'post70294016642760')"> def call(env) | |
</li> | |
<li onclick="toggle('pre70294016642760', 'post70294016642760')"> context(env) | |
</li> | |
<li onclick="toggle('pre70294016642760', 'post70294016642760')"> end | |
</li> | |
<li onclick="toggle('pre70294016642760', 'post70294016642760')"> | |
</li> | |
<li onclick="toggle('pre70294016642760', 'post70294016642760')"> def context(env, app=@app) | |
</li> | |
<li onclick="toggle('pre70294016642760', 'post70294016642760')"> prepare_session(env) | |
</li> | |
</ol> | |
<ol start="225" class="context-line"> | |
<li onclick="toggle('pre70294016642760', 'post70294016642760')"> status, headers, body = app.call(env)<span>...</span></li></ol> | |
<ol start='226' class="post-context" id="post70294016642760"> | |
<li onclick="toggle('pre70294016642760', 'post70294016642760')"> commit_session(env, status, headers, body) | |
</li> | |
<li onclick="toggle('pre70294016642760', 'post70294016642760')"> end | |
</li> | |
<li onclick="toggle('pre70294016642760', 'post70294016642760')"> | |
</li> | |
<li onclick="toggle('pre70294016642760', 'post70294016642760')"> private | |
</li> | |
<li onclick="toggle('pre70294016642760', 'post70294016642760')"> | |
</li> | |
<li onclick="toggle('pre70294016642760', 'post70294016642760')"> def initialize_sid | |
</li> | |
<li onclick="toggle('pre70294016642760', 'post70294016642760')"> @sidbits = @default_options[:sidbits] | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/session/abstract/id.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016677640"> | |
<ol start="213" class="pre-context" id="pre70294016677640"> | |
<li onclick="toggle('pre70294016677640', 'post70294016677640')"> @default_options = self.class::DEFAULT_OPTIONS.merge(options) | |
</li> | |
<li onclick="toggle('pre70294016677640', 'post70294016677640')"> @key = @default_options.delete(:key) | |
</li> | |
<li onclick="toggle('pre70294016677640', 'post70294016677640')"> @cookie_only = @default_options.delete(:cookie_only) | |
</li> | |
<li onclick="toggle('pre70294016677640', 'post70294016677640')"> initialize_sid | |
</li> | |
<li onclick="toggle('pre70294016677640', 'post70294016677640')"> end | |
</li> | |
<li onclick="toggle('pre70294016677640', 'post70294016677640')"> | |
</li> | |
<li onclick="toggle('pre70294016677640', 'post70294016677640')"> def call(env) | |
</li> | |
</ol> | |
<ol start="220" class="context-line"> | |
<li onclick="toggle('pre70294016677640', 'post70294016677640')"> context(env)<span>...</span></li></ol> | |
<ol start='221' class="post-context" id="post70294016677640"> | |
<li onclick="toggle('pre70294016677640', 'post70294016677640')"> end | |
</li> | |
<li onclick="toggle('pre70294016677640', 'post70294016677640')"> | |
</li> | |
<li onclick="toggle('pre70294016677640', 'post70294016677640')"> def context(env, app=@app) | |
</li> | |
<li onclick="toggle('pre70294016677640', 'post70294016677640')"> prepare_session(env) | |
</li> | |
<li onclick="toggle('pre70294016677640', 'post70294016677640')"> status, headers, body = app.call(env) | |
</li> | |
<li onclick="toggle('pre70294016677640', 'post70294016677640')"> commit_session(env, status, headers, body) | |
</li> | |
<li onclick="toggle('pre70294016677640', 'post70294016677640')"> end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/newrelic_rpm-3.5.7.59/lib/new_relic/rack/developer_mode.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016712300"> | |
<ol start="17" class="pre-context" id="pre70294016712300"> | |
<li onclick="toggle('pre70294016712300', 'post70294016712300')"> include NewRelic::DeveloperModeHelper | |
</li> | |
<li onclick="toggle('pre70294016712300', 'post70294016712300')"> | |
</li> | |
<li onclick="toggle('pre70294016712300', 'post70294016712300')"> def initialize(app) | |
</li> | |
<li onclick="toggle('pre70294016712300', 'post70294016712300')"> @app = app | |
</li> | |
<li onclick="toggle('pre70294016712300', 'post70294016712300')"> end | |
</li> | |
<li onclick="toggle('pre70294016712300', 'post70294016712300')"> | |
</li> | |
<li onclick="toggle('pre70294016712300', 'post70294016712300')"> def call(env) | |
</li> | |
</ol> | |
<ol start="24" class="context-line"> | |
<li onclick="toggle('pre70294016712300', 'post70294016712300')"> return @app.call(env) unless /^\/newrelic/ =~ ::Rack::Request.new(env).path_info<span>...</span></li></ol> | |
<ol start='25' class="post-context" id="post70294016712300"> | |
<li onclick="toggle('pre70294016712300', 'post70294016712300')"> dup._call(env) | |
</li> | |
<li onclick="toggle('pre70294016712300', 'post70294016712300')"> end | |
</li> | |
<li onclick="toggle('pre70294016712300', 'post70294016712300')"> | |
</li> | |
<li onclick="toggle('pre70294016712300', 'post70294016712300')"> protected | |
</li> | |
<li onclick="toggle('pre70294016712300', 'post70294016712300')"> | |
</li> | |
<li onclick="toggle('pre70294016712300', 'post70294016712300')"> def _call(env) | |
</li> | |
<li onclick="toggle('pre70294016712300', 'post70294016712300')"> @req = ::Rack::Request.new(env) | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/lint.rb</code>: in <code>_call</code> | |
<div class="context" id="c70294016726220"> | |
<ol start="42" class="pre-context" id="pre70294016726220"> | |
<li onclick="toggle('pre70294016726220', 'post70294016726220')"> assert("No env given") { env } | |
</li> | |
<li onclick="toggle('pre70294016726220', 'post70294016726220')"> check_env env | |
</li> | |
<li onclick="toggle('pre70294016726220', 'post70294016726220')"> | |
</li> | |
<li onclick="toggle('pre70294016726220', 'post70294016726220')"> env['rack.input'] = InputWrapper.new(env['rack.input']) | |
</li> | |
<li onclick="toggle('pre70294016726220', 'post70294016726220')"> env['rack.errors'] = ErrorWrapper.new(env['rack.errors']) | |
</li> | |
<li onclick="toggle('pre70294016726220', 'post70294016726220')"> | |
</li> | |
<li onclick="toggle('pre70294016726220', 'post70294016726220')"> ## and returns an Array of exactly three values: | |
</li> | |
</ol> | |
<ol start="49" class="context-line"> | |
<li onclick="toggle('pre70294016726220', 'post70294016726220')"> status, headers, @body = @app.call(env)<span>...</span></li></ol> | |
<ol start='50' class="post-context" id="post70294016726220"> | |
<li onclick="toggle('pre70294016726220', 'post70294016726220')"> ## The *status*, | |
</li> | |
<li onclick="toggle('pre70294016726220', 'post70294016726220')"> check_status status | |
</li> | |
<li onclick="toggle('pre70294016726220', 'post70294016726220')"> ## the *headers*, | |
</li> | |
<li onclick="toggle('pre70294016726220', 'post70294016726220')"> check_headers headers | |
</li> | |
<li onclick="toggle('pre70294016726220', 'post70294016726220')"> | |
</li> | |
<li onclick="toggle('pre70294016726220', 'post70294016726220')"> check_hijack_response headers, env | |
</li> | |
<li onclick="toggle('pre70294016726220', 'post70294016726220')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/lint.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016777060"> | |
<ol start="30" class="pre-context" id="pre70294016777060"> | |
<li onclick="toggle('pre70294016777060', 'post70294016777060')"> ## after to catch all mistakes. | |
</li> | |
<li onclick="toggle('pre70294016777060', 'post70294016777060')"> | |
</li> | |
<li onclick="toggle('pre70294016777060', 'post70294016777060')"> ## = Rack applications | |
</li> | |
<li onclick="toggle('pre70294016777060', 'post70294016777060')"> | |
</li> | |
<li onclick="toggle('pre70294016777060', 'post70294016777060')"> ## A Rack application is a Ruby object (not a class) that | |
</li> | |
<li onclick="toggle('pre70294016777060', 'post70294016777060')"> ## responds to +call+. | |
</li> | |
<li onclick="toggle('pre70294016777060', 'post70294016777060')"> def call(env=nil) | |
</li> | |
</ol> | |
<ol start="37" class="context-line"> | |
<li onclick="toggle('pre70294016777060', 'post70294016777060')"> dup._call(env)<span>...</span></li></ol> | |
<ol start='38' class="post-context" id="post70294016777060"> | |
<li onclick="toggle('pre70294016777060', 'post70294016777060')"> end | |
</li> | |
<li onclick="toggle('pre70294016777060', 'post70294016777060')"> | |
</li> | |
<li onclick="toggle('pre70294016777060', 'post70294016777060')"> def _call(env) | |
</li> | |
<li onclick="toggle('pre70294016777060', 'post70294016777060')"> ## It takes exactly one argument, the *environment* | |
</li> | |
<li onclick="toggle('pre70294016777060', 'post70294016777060')"> assert("No env given") { env } | |
</li> | |
<li onclick="toggle('pre70294016777060', 'post70294016777060')"> check_env env | |
</li> | |
<li onclick="toggle('pre70294016777060', 'post70294016777060')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/showexceptions.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016803620"> | |
<ol start="17" class="pre-context" id="pre70294016803620"> | |
<li onclick="toggle('pre70294016803620', 'post70294016803620')"> | |
</li> | |
<li onclick="toggle('pre70294016803620', 'post70294016803620')"> def initialize(app) | |
</li> | |
<li onclick="toggle('pre70294016803620', 'post70294016803620')"> @app = app | |
</li> | |
<li onclick="toggle('pre70294016803620', 'post70294016803620')"> @template = ERB.new(TEMPLATE) | |
</li> | |
<li onclick="toggle('pre70294016803620', 'post70294016803620')"> end | |
</li> | |
<li onclick="toggle('pre70294016803620', 'post70294016803620')"> | |
</li> | |
<li onclick="toggle('pre70294016803620', 'post70294016803620')"> def call(env) | |
</li> | |
</ol> | |
<ol start="24" class="context-line"> | |
<li onclick="toggle('pre70294016803620', 'post70294016803620')"> @app.call(env)<span>...</span></li></ol> | |
<ol start='25' class="post-context" id="post70294016803620"> | |
<li onclick="toggle('pre70294016803620', 'post70294016803620')"> rescue StandardError, LoadError, SyntaxError => e | |
</li> | |
<li onclick="toggle('pre70294016803620', 'post70294016803620')"> exception_string = dump_exception(e) | |
</li> | |
<li onclick="toggle('pre70294016803620', 'post70294016803620')"> | |
</li> | |
<li onclick="toggle('pre70294016803620', 'post70294016803620')"> env["rack.errors"].puts(exception_string) | |
</li> | |
<li onclick="toggle('pre70294016803620', 'post70294016803620')"> env["rack.errors"].flush | |
</li> | |
<li onclick="toggle('pre70294016803620', 'post70294016803620')"> | |
</li> | |
<li onclick="toggle('pre70294016803620', 'post70294016803620')"> if prefers_plain_text?(env) | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/commonlogger.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016839420"> | |
<ol start="26" class="pre-context" id="pre70294016839420"> | |
<li onclick="toggle('pre70294016839420', 'post70294016839420')"> def initialize(app, logger=nil) | |
</li> | |
<li onclick="toggle('pre70294016839420', 'post70294016839420')"> @app = app | |
</li> | |
<li onclick="toggle('pre70294016839420', 'post70294016839420')"> @logger = logger | |
</li> | |
<li onclick="toggle('pre70294016839420', 'post70294016839420')"> end | |
</li> | |
<li onclick="toggle('pre70294016839420', 'post70294016839420')"> | |
</li> | |
<li onclick="toggle('pre70294016839420', 'post70294016839420')"> def call(env) | |
</li> | |
<li onclick="toggle('pre70294016839420', 'post70294016839420')"> began_at = Time.now | |
</li> | |
</ol> | |
<ol start="33" class="context-line"> | |
<li onclick="toggle('pre70294016839420', 'post70294016839420')"> status, header, body = @app.call(env)<span>...</span></li></ol> | |
<ol start='34' class="post-context" id="post70294016839420"> | |
<li onclick="toggle('pre70294016839420', 'post70294016839420')"> header = Utils::HeaderHash.new(header) | |
</li> | |
<li onclick="toggle('pre70294016839420', 'post70294016839420')"> body = BodyProxy.new(body) { log(env, status, header, began_at) } | |
</li> | |
<li onclick="toggle('pre70294016839420', 'post70294016839420')"> [status, header, body] | |
</li> | |
<li onclick="toggle('pre70294016839420', 'post70294016839420')"> end | |
</li> | |
<li onclick="toggle('pre70294016839420', 'post70294016839420')"> | |
</li> | |
<li onclick="toggle('pre70294016839420', 'post70294016839420')"> private | |
</li> | |
<li onclick="toggle('pre70294016839420', 'post70294016839420')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/sinatra-1.3.4/lib/sinatra/base.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016859120"> | |
<ol start="154" class="pre-context" id="pre70294016859120"> | |
<li onclick="toggle('pre70294016859120', 'post70294016859120')"> env['sinatra.commonlogger'] ? @app.call(env) : super | |
</li> | |
<li onclick="toggle('pre70294016859120', 'post70294016859120')"> end | |
</li> | |
<li onclick="toggle('pre70294016859120', 'post70294016859120')"> | |
</li> | |
<li onclick="toggle('pre70294016859120', 'post70294016859120')"> superclass.class_eval do | |
</li> | |
<li onclick="toggle('pre70294016859120', 'post70294016859120')"> alias call_without_check call unless method_defined? :call_without_check | |
</li> | |
<li onclick="toggle('pre70294016859120', 'post70294016859120')"> def call(env) | |
</li> | |
<li onclick="toggle('pre70294016859120', 'post70294016859120')"> env['sinatra.commonlogger'] = true | |
</li> | |
</ol> | |
<ol start="161" class="context-line"> | |
<li onclick="toggle('pre70294016859120', 'post70294016859120')"> call_without_check(env)<span>...</span></li></ol> | |
<ol start='162' class="post-context" id="post70294016859120"> | |
<li onclick="toggle('pre70294016859120', 'post70294016859120')"> end | |
</li> | |
<li onclick="toggle('pre70294016859120', 'post70294016859120')"> end | |
</li> | |
<li onclick="toggle('pre70294016859120', 'post70294016859120')"> end | |
</li> | |
<li onclick="toggle('pre70294016859120', 'post70294016859120')"> | |
</li> | |
<li onclick="toggle('pre70294016859120', 'post70294016859120')"> class NotFound < NameError #:nodoc: | |
</li> | |
<li onclick="toggle('pre70294016859120', 'post70294016859120')"> def code ; 404 ; end | |
</li> | |
<li onclick="toggle('pre70294016859120', 'post70294016859120')"> end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/chunked.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016954020"> | |
<ol start="36" class="pre-context" id="pre70294016954020"> | |
<li onclick="toggle('pre70294016954020', 'post70294016954020')"> end | |
</li> | |
<li onclick="toggle('pre70294016954020', 'post70294016954020')"> | |
</li> | |
<li onclick="toggle('pre70294016954020', 'post70294016954020')"> def initialize(app) | |
</li> | |
<li onclick="toggle('pre70294016954020', 'post70294016954020')"> @app = app | |
</li> | |
<li onclick="toggle('pre70294016954020', 'post70294016954020')"> end | |
</li> | |
<li onclick="toggle('pre70294016954020', 'post70294016954020')"> | |
</li> | |
<li onclick="toggle('pre70294016954020', 'post70294016954020')"> def call(env) | |
</li> | |
</ol> | |
<ol start="43" class="context-line"> | |
<li onclick="toggle('pre70294016954020', 'post70294016954020')"> status, headers, body = @app.call(env)<span>...</span></li></ol> | |
<ol start='44' class="post-context" id="post70294016954020"> | |
<li onclick="toggle('pre70294016954020', 'post70294016954020')"> headers = HeaderHash.new(headers) | |
</li> | |
<li onclick="toggle('pre70294016954020', 'post70294016954020')"> | |
</li> | |
<li onclick="toggle('pre70294016954020', 'post70294016954020')"> if env['HTTP_VERSION'] == 'HTTP/1.0' || | |
</li> | |
<li onclick="toggle('pre70294016954020', 'post70294016954020')"> STATUS_WITH_NO_ENTITY_BODY.include?(status) || | |
</li> | |
<li onclick="toggle('pre70294016954020', 'post70294016954020')"> headers['Content-Length'] || | |
</li> | |
<li onclick="toggle('pre70294016954020', 'post70294016954020')"> headers['Transfer-Encoding'] | |
</li> | |
<li onclick="toggle('pre70294016954020', 'post70294016954020')"> [status, headers, body] | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/content_length.rb</code>: in <code>call</code> | |
<div class="context" id="c70294016973980"> | |
<ol start="7" class="pre-context" id="pre70294016973980"> | |
<li onclick="toggle('pre70294016973980', 'post70294016973980')"> include Rack::Utils | |
</li> | |
<li onclick="toggle('pre70294016973980', 'post70294016973980')"> | |
</li> | |
<li onclick="toggle('pre70294016973980', 'post70294016973980')"> def initialize(app) | |
</li> | |
<li onclick="toggle('pre70294016973980', 'post70294016973980')"> @app = app | |
</li> | |
<li onclick="toggle('pre70294016973980', 'post70294016973980')"> end | |
</li> | |
<li onclick="toggle('pre70294016973980', 'post70294016973980')"> | |
</li> | |
<li onclick="toggle('pre70294016973980', 'post70294016973980')"> def call(env) | |
</li> | |
</ol> | |
<ol start="14" class="context-line"> | |
<li onclick="toggle('pre70294016973980', 'post70294016973980')"> status, headers, body = @app.call(env)<span>...</span></li></ol> | |
<ol start='15' class="post-context" id="post70294016973980"> | |
<li onclick="toggle('pre70294016973980', 'post70294016973980')"> headers = HeaderHash.new(headers) | |
</li> | |
<li onclick="toggle('pre70294016973980', 'post70294016973980')"> | |
</li> | |
<li onclick="toggle('pre70294016973980', 'post70294016973980')"> if !STATUS_WITH_NO_ENTITY_BODY.include?(status.to_i) && | |
</li> | |
<li onclick="toggle('pre70294016973980', 'post70294016973980')"> !headers['Content-Length'] && | |
</li> | |
<li onclick="toggle('pre70294016973980', 'post70294016973980')"> !headers['Transfer-Encoding'] && | |
</li> | |
<li onclick="toggle('pre70294016973980', 'post70294016973980')"> body.respond_to?(:to_ary) | |
</li> | |
<li onclick="toggle('pre70294016973980', 'post70294016973980')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/thin-1.5.0/lib/thin/connection.rb</code>: in <code>block in pre_process</code> | |
<div class="context" id="c70294016970220"> | |
<ol start="74" class="pre-context" id="pre70294016970220"> | |
<li onclick="toggle('pre70294016970220', 'post70294016970220')"> | |
</li> | |
<li onclick="toggle('pre70294016970220', 'post70294016970220')"> # When we're under a non-async framework like rails, we can still spawn | |
</li> | |
<li onclick="toggle('pre70294016970220', 'post70294016970220')"> # off async responses using the callback info, so there's little point | |
</li> | |
<li onclick="toggle('pre70294016970220', 'post70294016970220')"> # in removing this. | |
</li> | |
<li onclick="toggle('pre70294016970220', 'post70294016970220')"> response = AsyncResponse | |
</li> | |
<li onclick="toggle('pre70294016970220', 'post70294016970220')"> catch(:async) do | |
</li> | |
<li onclick="toggle('pre70294016970220', 'post70294016970220')"> # Process the request calling the Rack adapter | |
</li> | |
</ol> | |
<ol start="81" class="context-line"> | |
<li onclick="toggle('pre70294016970220', 'post70294016970220')"> response = @app.call(@request.env)<span>...</span></li></ol> | |
<ol start='82' class="post-context" id="post70294016970220"> | |
<li onclick="toggle('pre70294016970220', 'post70294016970220')"> end | |
</li> | |
<li onclick="toggle('pre70294016970220', 'post70294016970220')"> response | |
</li> | |
<li onclick="toggle('pre70294016970220', 'post70294016970220')"> rescue Exception | |
</li> | |
<li onclick="toggle('pre70294016970220', 'post70294016970220')"> handle_error | |
</li> | |
<li onclick="toggle('pre70294016970220', 'post70294016970220')"> # Pass through error response | |
</li> | |
<li onclick="toggle('pre70294016970220', 'post70294016970220')"> can_persist? && @request.persistent? ? Response::PERSISTENT_ERROR : Response::ERROR | |
</li> | |
<li onclick="toggle('pre70294016970220', 'post70294016970220')"> end | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/thin-1.5.0/lib/thin/connection.rb</code>: in <code>catch</code> | |
<div class="context" id="c70294016986180"> | |
<ol start="72" class="pre-context" id="pre70294016986180"> | |
<li onclick="toggle('pre70294016986180', 'post70294016986180')"> end | |
</li> | |
<li onclick="toggle('pre70294016986180', 'post70294016986180')"> end | |
</li> | |
<li onclick="toggle('pre70294016986180', 'post70294016986180')"> | |
</li> | |
<li onclick="toggle('pre70294016986180', 'post70294016986180')"> # When we're under a non-async framework like rails, we can still spawn | |
</li> | |
<li onclick="toggle('pre70294016986180', 'post70294016986180')"> # off async responses using the callback info, so there's little point | |
</li> | |
<li onclick="toggle('pre70294016986180', 'post70294016986180')"> # in removing this. | |
</li> | |
<li onclick="toggle('pre70294016986180', 'post70294016986180')"> response = AsyncResponse | |
</li> | |
</ol> | |
<ol start="79" class="context-line"> | |
<li onclick="toggle('pre70294016986180', 'post70294016986180')"> catch(:async) do<span>...</span></li></ol> | |
<ol start='80' class="post-context" id="post70294016986180"> | |
<li onclick="toggle('pre70294016986180', 'post70294016986180')"> # Process the request calling the Rack adapter | |
</li> | |
<li onclick="toggle('pre70294016986180', 'post70294016986180')"> response = @app.call(@request.env) | |
</li> | |
<li onclick="toggle('pre70294016986180', 'post70294016986180')"> end | |
</li> | |
<li onclick="toggle('pre70294016986180', 'post70294016986180')"> response | |
</li> | |
<li onclick="toggle('pre70294016986180', 'post70294016986180')"> rescue Exception | |
</li> | |
<li onclick="toggle('pre70294016986180', 'post70294016986180')"> handle_error | |
</li> | |
<li onclick="toggle('pre70294016986180', 'post70294016986180')"> # Pass through error response | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/thin-1.5.0/lib/thin/connection.rb</code>: in <code>pre_process</code> | |
<div class="context" id="c70294017002040"> | |
<ol start="72" class="pre-context" id="pre70294017002040"> | |
<li onclick="toggle('pre70294017002040', 'post70294017002040')"> end | |
</li> | |
<li onclick="toggle('pre70294017002040', 'post70294017002040')"> end | |
</li> | |
<li onclick="toggle('pre70294017002040', 'post70294017002040')"> | |
</li> | |
<li onclick="toggle('pre70294017002040', 'post70294017002040')"> # When we're under a non-async framework like rails, we can still spawn | |
</li> | |
<li onclick="toggle('pre70294017002040', 'post70294017002040')"> # off async responses using the callback info, so there's little point | |
</li> | |
<li onclick="toggle('pre70294017002040', 'post70294017002040')"> # in removing this. | |
</li> | |
<li onclick="toggle('pre70294017002040', 'post70294017002040')"> response = AsyncResponse | |
</li> | |
</ol> | |
<ol start="79" class="context-line"> | |
<li onclick="toggle('pre70294017002040', 'post70294017002040')"> catch(:async) do<span>...</span></li></ol> | |
<ol start='80' class="post-context" id="post70294017002040"> | |
<li onclick="toggle('pre70294017002040', 'post70294017002040')"> # Process the request calling the Rack adapter | |
</li> | |
<li onclick="toggle('pre70294017002040', 'post70294017002040')"> response = @app.call(@request.env) | |
</li> | |
<li onclick="toggle('pre70294017002040', 'post70294017002040')"> end | |
</li> | |
<li onclick="toggle('pre70294017002040', 'post70294017002040')"> response | |
</li> | |
<li onclick="toggle('pre70294017002040', 'post70294017002040')"> rescue Exception | |
</li> | |
<li onclick="toggle('pre70294017002040', 'post70294017002040')"> handle_error | |
</li> | |
<li onclick="toggle('pre70294017002040', 'post70294017002040')"> # Pass through error response | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/thin-1.5.0/lib/thin/connection.rb</code>: in <code>process</code> | |
<div class="context" id="c70294017017960"> | |
<ol start="47" class="pre-context" id="pre70294017017960"> | |
<li onclick="toggle('pre70294017017960', 'post70294017017960')"> # is ready to be processed. | |
</li> | |
<li onclick="toggle('pre70294017017960', 'post70294017017960')"> def process | |
</li> | |
<li onclick="toggle('pre70294017017960', 'post70294017017960')"> if threaded? | |
</li> | |
<li onclick="toggle('pre70294017017960', 'post70294017017960')"> @request.threaded = true | |
</li> | |
<li onclick="toggle('pre70294017017960', 'post70294017017960')"> EventMachine.defer(method(:pre_process), method(:post_process)) | |
</li> | |
<li onclick="toggle('pre70294017017960', 'post70294017017960')"> else | |
</li> | |
<li onclick="toggle('pre70294017017960', 'post70294017017960')"> @request.threaded = false | |
</li> | |
</ol> | |
<ol start="54" class="context-line"> | |
<li onclick="toggle('pre70294017017960', 'post70294017017960')"> post_process(pre_process)<span>...</span></li></ol> | |
<ol start='55' class="post-context" id="post70294017017960"> | |
<li onclick="toggle('pre70294017017960', 'post70294017017960')"> end | |
</li> | |
<li onclick="toggle('pre70294017017960', 'post70294017017960')"> end | |
</li> | |
<li onclick="toggle('pre70294017017960', 'post70294017017960')"> | |
</li> | |
<li onclick="toggle('pre70294017017960', 'post70294017017960')"> def pre_process | |
</li> | |
<li onclick="toggle('pre70294017017960', 'post70294017017960')"> # Add client info to the request env | |
</li> | |
<li onclick="toggle('pre70294017017960', 'post70294017017960')"> @request.remote_address = remote_address | |
</li> | |
<li onclick="toggle('pre70294017017960', 'post70294017017960')"> | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/thin-1.5.0/lib/thin/connection.rb</code>: in <code>receive_data</code> | |
<div class="context" id="c70294017034040"> | |
<ol start="32" class="pre-context" id="pre70294017034040"> | |
<li onclick="toggle('pre70294017034040', 'post70294017034040')"> @response = Response.new | |
</li> | |
<li onclick="toggle('pre70294017034040', 'post70294017034040')"> end | |
</li> | |
<li onclick="toggle('pre70294017034040', 'post70294017034040')"> | |
</li> | |
<li onclick="toggle('pre70294017034040', 'post70294017034040')"> # Called when data is received from the client. | |
</li> | |
<li onclick="toggle('pre70294017034040', 'post70294017034040')"> def receive_data(data) | |
</li> | |
<li onclick="toggle('pre70294017034040', 'post70294017034040')"> @idle = false | |
</li> | |
<li onclick="toggle('pre70294017034040', 'post70294017034040')"> trace { data } | |
</li> | |
</ol> | |
<ol start="39" class="context-line"> | |
<li onclick="toggle('pre70294017034040', 'post70294017034040')"> process if @request.parse(data)<span>...</span></li></ol> | |
<ol start='40' class="post-context" id="post70294017034040"> | |
<li onclick="toggle('pre70294017034040', 'post70294017034040')"> rescue InvalidRequest => e | |
</li> | |
<li onclick="toggle('pre70294017034040', 'post70294017034040')"> log "!! Invalid request" | |
</li> | |
<li onclick="toggle('pre70294017034040', 'post70294017034040')"> log_error e | |
</li> | |
<li onclick="toggle('pre70294017034040', 'post70294017034040')"> post_process Response::BAD_REQUEST | |
</li> | |
<li onclick="toggle('pre70294017034040', 'post70294017034040')"> end | |
</li> | |
<li onclick="toggle('pre70294017034040', 'post70294017034040')"> | |
</li> | |
<li onclick="toggle('pre70294017034040', 'post70294017034040')"> # Called when all data was received and the request | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/eventmachine-1.0.0/lib/eventmachine.rb</code>: in <code>run_machine</code> | |
<div class="context" id="c70294017049720"> | |
<ol start="180" class="pre-context" id="pre70294017049720"> | |
<li onclick="toggle('pre70294017049720', 'post70294017049720')"> @reactor_running = true | |
</li> | |
<li onclick="toggle('pre70294017049720', 'post70294017049720')"> initialize_event_machine | |
</li> | |
<li onclick="toggle('pre70294017049720', 'post70294017049720')"> (b = blk || block) and add_timer(0, b) | |
</li> | |
<li onclick="toggle('pre70294017049720', 'post70294017049720')"> if @next_tick_queue && !@next_tick_queue.empty? | |
</li> | |
<li onclick="toggle('pre70294017049720', 'post70294017049720')"> add_timer(0) { signal_loopbreak } | |
</li> | |
<li onclick="toggle('pre70294017049720', 'post70294017049720')"> end | |
</li> | |
<li onclick="toggle('pre70294017049720', 'post70294017049720')"> @reactor_thread = Thread.current | |
</li> | |
</ol> | |
<ol start="187" class="context-line"> | |
<li onclick="toggle('pre70294017049720', 'post70294017049720')"> run_machine<span>...</span></li></ol> | |
<ol start='188' class="post-context" id="post70294017049720"> | |
<li onclick="toggle('pre70294017049720', 'post70294017049720')"> ensure | |
</li> | |
<li onclick="toggle('pre70294017049720', 'post70294017049720')"> until @tails.empty? | |
</li> | |
<li onclick="toggle('pre70294017049720', 'post70294017049720')"> @tails.pop.call | |
</li> | |
<li onclick="toggle('pre70294017049720', 'post70294017049720')"> end | |
</li> | |
<li onclick="toggle('pre70294017049720', 'post70294017049720')"> | |
</li> | |
<li onclick="toggle('pre70294017049720', 'post70294017049720')"> begin | |
</li> | |
<li onclick="toggle('pre70294017049720', 'post70294017049720')"> release_machine | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/eventmachine-1.0.0/lib/eventmachine.rb</code>: in <code>run</code> | |
<div class="context" id="c70294017151560"> | |
<ol start="180" class="pre-context" id="pre70294017151560"> | |
<li onclick="toggle('pre70294017151560', 'post70294017151560')"> @reactor_running = true | |
</li> | |
<li onclick="toggle('pre70294017151560', 'post70294017151560')"> initialize_event_machine | |
</li> | |
<li onclick="toggle('pre70294017151560', 'post70294017151560')"> (b = blk || block) and add_timer(0, b) | |
</li> | |
<li onclick="toggle('pre70294017151560', 'post70294017151560')"> if @next_tick_queue && !@next_tick_queue.empty? | |
</li> | |
<li onclick="toggle('pre70294017151560', 'post70294017151560')"> add_timer(0) { signal_loopbreak } | |
</li> | |
<li onclick="toggle('pre70294017151560', 'post70294017151560')"> end | |
</li> | |
<li onclick="toggle('pre70294017151560', 'post70294017151560')"> @reactor_thread = Thread.current | |
</li> | |
</ol> | |
<ol start="187" class="context-line"> | |
<li onclick="toggle('pre70294017151560', 'post70294017151560')"> run_machine<span>...</span></li></ol> | |
<ol start='188' class="post-context" id="post70294017151560"> | |
<li onclick="toggle('pre70294017151560', 'post70294017151560')"> ensure | |
</li> | |
<li onclick="toggle('pre70294017151560', 'post70294017151560')"> until @tails.empty? | |
</li> | |
<li onclick="toggle('pre70294017151560', 'post70294017151560')"> @tails.pop.call | |
</li> | |
<li onclick="toggle('pre70294017151560', 'post70294017151560')"> end | |
</li> | |
<li onclick="toggle('pre70294017151560', 'post70294017151560')"> | |
</li> | |
<li onclick="toggle('pre70294017151560', 'post70294017151560')"> begin | |
</li> | |
<li onclick="toggle('pre70294017151560', 'post70294017151560')"> release_machine | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/thin-1.5.0/lib/thin/backends/base.rb</code>: in <code>start</code> | |
<div class="context" id="c70294017230260"> | |
<ol start="56" class="pre-context" id="pre70294017230260"> | |
<li onclick="toggle('pre70294017230260', 'post70294017230260')"> @running = true | |
</li> | |
<li onclick="toggle('pre70294017230260', 'post70294017230260')"> end | |
</li> | |
<li onclick="toggle('pre70294017230260', 'post70294017230260')"> | |
</li> | |
<li onclick="toggle('pre70294017230260', 'post70294017230260')"> # Allow for early run up of eventmachine. | |
</li> | |
<li onclick="toggle('pre70294017230260', 'post70294017230260')"> if EventMachine.reactor_running? | |
</li> | |
<li onclick="toggle('pre70294017230260', 'post70294017230260')"> starter.call | |
</li> | |
<li onclick="toggle('pre70294017230260', 'post70294017230260')"> else | |
</li> | |
</ol> | |
<ol start="63" class="context-line"> | |
<li onclick="toggle('pre70294017230260', 'post70294017230260')"> EventMachine.run(&starter)<span>...</span></li></ol> | |
<ol start='64' class="post-context" id="post70294017230260"> | |
<li onclick="toggle('pre70294017230260', 'post70294017230260')"> end | |
</li> | |
<li onclick="toggle('pre70294017230260', 'post70294017230260')"> end | |
</li> | |
<li onclick="toggle('pre70294017230260', 'post70294017230260')"> | |
</li> | |
<li onclick="toggle('pre70294017230260', 'post70294017230260')"> # Stop of the backend from accepting new connections. | |
</li> | |
<li onclick="toggle('pre70294017230260', 'post70294017230260')"> def stop | |
</li> | |
<li onclick="toggle('pre70294017230260', 'post70294017230260')"> @running = false | |
</li> | |
<li onclick="toggle('pre70294017230260', 'post70294017230260')"> @stopping = true | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/thin-1.5.0/lib/thin/server.rb</code>: in <code>start</code> | |
<div class="context" id="c70294017248200"> | |
<ol start="152" class="pre-context" id="pre70294017248200"> | |
<li onclick="toggle('pre70294017248200', 'post70294017248200')"> log ">> Thin web server (v#{VERSION::STRING} codename #{VERSION::CODENAME})" | |
</li> | |
<li onclick="toggle('pre70294017248200', 'post70294017248200')"> debug ">> Debugging ON" | |
</li> | |
<li onclick="toggle('pre70294017248200', 'post70294017248200')"> trace ">> Tracing ON" | |
</li> | |
<li onclick="toggle('pre70294017248200', 'post70294017248200')"> | |
</li> | |
<li onclick="toggle('pre70294017248200', 'post70294017248200')"> log ">> Maximum connections set to #{@backend.maximum_connections}" | |
</li> | |
<li onclick="toggle('pre70294017248200', 'post70294017248200')"> log ">> Listening on #{@backend}, CTRL+C to stop" | |
</li> | |
<li onclick="toggle('pre70294017248200', 'post70294017248200')"> | |
</li> | |
</ol> | |
<ol start="159" class="context-line"> | |
<li onclick="toggle('pre70294017248200', 'post70294017248200')"> @backend.start<span>...</span></li></ol> | |
<ol start='160' class="post-context" id="post70294017248200"> | |
<li onclick="toggle('pre70294017248200', 'post70294017248200')"> end | |
</li> | |
<li onclick="toggle('pre70294017248200', 'post70294017248200')"> alias :start! :start | |
</li> | |
<li onclick="toggle('pre70294017248200', 'post70294017248200')"> | |
</li> | |
<li onclick="toggle('pre70294017248200', 'post70294017248200')"> # == Gracefull shutdown | |
</li> | |
<li onclick="toggle('pre70294017248200', 'post70294017248200')"> # Stops the server after processing all current connections. | |
</li> | |
<li onclick="toggle('pre70294017248200', 'post70294017248200')"> # As soon as this method is called, the server stops accepting | |
</li> | |
<li onclick="toggle('pre70294017248200', 'post70294017248200')"> # new requests and wait for all current connections to finish. | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/handler/thin.rb</code>: in <code>run</code> | |
<div class="context" id="c70294017262700"> | |
<ol start="9" class="pre-context" id="pre70294017262700"> | |
<li onclick="toggle('pre70294017262700', 'post70294017262700')"> host = options.delete(:Host) || '0.0.0.0' | |
</li> | |
<li onclick="toggle('pre70294017262700', 'post70294017262700')"> port = options.delete(:Port) || 8080 | |
</li> | |
<li onclick="toggle('pre70294017262700', 'post70294017262700')"> args = [host, port, app, options] | |
</li> | |
<li onclick="toggle('pre70294017262700', 'post70294017262700')"> # Thin versions below 0.8.0 do not support additional options | |
</li> | |
<li onclick="toggle('pre70294017262700', 'post70294017262700')"> args.pop if ::Thin::VERSION::MAJOR < 1 && ::Thin::VERSION::MINOR < 8 | |
</li> | |
<li onclick="toggle('pre70294017262700', 'post70294017262700')"> server = ::Thin::Server.new(*args) | |
</li> | |
<li onclick="toggle('pre70294017262700', 'post70294017262700')"> yield server if block_given? | |
</li> | |
</ol> | |
<ol start="16" class="context-line"> | |
<li onclick="toggle('pre70294017262700', 'post70294017262700')"> server.start<span>...</span></li></ol> | |
<ol start='17' class="post-context" id="post70294017262700"> | |
<li onclick="toggle('pre70294017262700', 'post70294017262700')"> end | |
</li> | |
<li onclick="toggle('pre70294017262700', 'post70294017262700')"> | |
</li> | |
<li onclick="toggle('pre70294017262700', 'post70294017262700')"> def self.valid_options | |
</li> | |
<li onclick="toggle('pre70294017262700', 'post70294017262700')"> { | |
</li> | |
<li onclick="toggle('pre70294017262700', 'post70294017262700')"> "Host=HOST" => "Hostname to listen on (default: localhost)", | |
</li> | |
<li onclick="toggle('pre70294017262700', 'post70294017262700')"> "Port=PORT" => "Port to listen on (default: 8080)", | |
</li> | |
<li onclick="toggle('pre70294017262700', 'post70294017262700')"> } | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/server.rb</code>: in <code>start</code> | |
<div class="context" id="c70294017283700"> | |
<ol start="257" class="pre-context" id="pre70294017283700"> | |
<li onclick="toggle('pre70294017283700', 'post70294017283700')"> if server.respond_to?(:shutdown) | |
</li> | |
<li onclick="toggle('pre70294017283700', 'post70294017283700')"> server.shutdown | |
</li> | |
<li onclick="toggle('pre70294017283700', 'post70294017283700')"> else | |
</li> | |
<li onclick="toggle('pre70294017283700', 'post70294017283700')"> exit | |
</li> | |
<li onclick="toggle('pre70294017283700', 'post70294017283700')"> end | |
</li> | |
<li onclick="toggle('pre70294017283700', 'post70294017283700')"> end | |
</li> | |
<li onclick="toggle('pre70294017283700', 'post70294017283700')"> | |
</li> | |
</ol> | |
<ol start="264" class="context-line"> | |
<li onclick="toggle('pre70294017283700', 'post70294017283700')"> server.run wrapped_app, options, &blk<span>...</span></li></ol> | |
<ol start='265' class="post-context" id="post70294017283700"> | |
<li onclick="toggle('pre70294017283700', 'post70294017283700')"> end | |
</li> | |
<li onclick="toggle('pre70294017283700', 'post70294017283700')"> | |
</li> | |
<li onclick="toggle('pre70294017283700', 'post70294017283700')"> def server | |
</li> | |
<li onclick="toggle('pre70294017283700', 'post70294017283700')"> @_server ||= Rack::Handler.get(options[:server]) || Rack::Handler.default(options) | |
</li> | |
<li onclick="toggle('pre70294017283700', 'post70294017283700')"> end | |
</li> | |
<li onclick="toggle('pre70294017283700', 'post70294017283700')"> | |
</li> | |
<li onclick="toggle('pre70294017283700', 'post70294017283700')"> private | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/lib/rack/server.rb</code>: in <code>start</code> | |
<div class="context" id="c70294017295580"> | |
<ol start="134" class="pre-context" id="pre70294017295580"> | |
<li onclick="toggle('pre70294017295580', 'post70294017295580')"> # [200, {'Content-Type' => 'text/html'}, ['hello world']] | |
</li> | |
<li onclick="toggle('pre70294017295580', 'post70294017295580')"> # end, | |
</li> | |
<li onclick="toggle('pre70294017295580', 'post70294017295580')"> # :server => 'cgi' | |
</li> | |
<li onclick="toggle('pre70294017295580', 'post70294017295580')"> # ) | |
</li> | |
<li onclick="toggle('pre70294017295580', 'post70294017295580')"> # | |
</li> | |
<li onclick="toggle('pre70294017295580', 'post70294017295580')"> # Further options available here are documented on Rack::Server#initialize | |
</li> | |
<li onclick="toggle('pre70294017295580', 'post70294017295580')"> def self.start(options = nil) | |
</li> | |
</ol> | |
<ol start="141" class="context-line"> | |
<li onclick="toggle('pre70294017295580', 'post70294017295580')"> new(options).start<span>...</span></li></ol> | |
<ol start='142' class="post-context" id="post70294017295580"> | |
<li onclick="toggle('pre70294017295580', 'post70294017295580')"> end | |
</li> | |
<li onclick="toggle('pre70294017295580', 'post70294017295580')"> | |
</li> | |
<li onclick="toggle('pre70294017295580', 'post70294017295580')"> attr_writer :options | |
</li> | |
<li onclick="toggle('pre70294017295580', 'post70294017295580')"> | |
</li> | |
<li onclick="toggle('pre70294017295580', 'post70294017295580')"> # Options may include: | |
</li> | |
<li onclick="toggle('pre70294017295580', 'post70294017295580')"> # * :app | |
</li> | |
<li onclick="toggle('pre70294017295580', 'post70294017295580')"> # a rack application to run (overrides :config) | |
</li> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/rack-1.5.2/bin/rackup</code>: in <code><top (required)></code> | |
<div class="context" id="c70294017332040"> | |
<ol start="1" class="pre-context" id="pre70294017332040"> | |
<li onclick="toggle('pre70294017332040', 'post70294017332040')">#!/usr/bin/env ruby | |
</li> | |
<li onclick="toggle('pre70294017332040', 'post70294017332040')"> | |
</li> | |
<li onclick="toggle('pre70294017332040', 'post70294017332040')">require "rack" | |
</li> | |
</ol> | |
<ol start="4" class="context-line"> | |
<li onclick="toggle('pre70294017332040', 'post70294017332040')">Rack::Server.start<span>...</span></li></ol> | |
<ol start='5' class="post-context" id="post70294017332040"> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bin/rackup</code>: in <code>load</code> | |
<div class="context" id="c70294017329140"> | |
<ol start="16" class="pre-context" id="pre70294017329140"> | |
<li onclick="toggle('pre70294017329140', 'post70294017329140')"> if str =~ /\A_(.*)_\z/ | |
</li> | |
<li onclick="toggle('pre70294017329140', 'post70294017329140')"> version = $1 | |
</li> | |
<li onclick="toggle('pre70294017329140', 'post70294017329140')"> ARGV.shift | |
</li> | |
<li onclick="toggle('pre70294017329140', 'post70294017329140')"> end | |
</li> | |
<li onclick="toggle('pre70294017329140', 'post70294017329140')">end | |
</li> | |
<li onclick="toggle('pre70294017329140', 'post70294017329140')"> | |
</li> | |
<li onclick="toggle('pre70294017329140', 'post70294017329140')">gem 'rack', version | |
</li> | |
</ol> | |
<ol start="23" class="context-line"> | |
<li onclick="toggle('pre70294017329140', 'post70294017329140')">load Gem.bin_path('rack', 'rackup', version)<span>...</span></li></ol> | |
<ol start='24' class="post-context" id="post70294017329140"> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bin/rackup</code>: in <code><main></code> | |
<div class="context" id="c70294017350280"> | |
<ol start="16" class="pre-context" id="pre70294017350280"> | |
<li onclick="toggle('pre70294017350280', 'post70294017350280')"> if str =~ /\A_(.*)_\z/ | |
</li> | |
<li onclick="toggle('pre70294017350280', 'post70294017350280')"> version = $1 | |
</li> | |
<li onclick="toggle('pre70294017350280', 'post70294017350280')"> ARGV.shift | |
</li> | |
<li onclick="toggle('pre70294017350280', 'post70294017350280')"> end | |
</li> | |
<li onclick="toggle('pre70294017350280', 'post70294017350280')">end | |
</li> | |
<li onclick="toggle('pre70294017350280', 'post70294017350280')"> | |
</li> | |
<li onclick="toggle('pre70294017350280', 'post70294017350280')">gem 'rack', version | |
</li> | |
</ol> | |
<ol start="23" class="context-line"> | |
<li onclick="toggle('pre70294017350280', 'post70294017350280')">load Gem.bin_path('rack', 'rackup', version)<span>...</span></li></ol> | |
<ol start='24' class="post-context" id="post70294017350280"> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bin/ruby_noexec_wrapper</code>: in <code>eval</code> | |
<div class="context" id="c70294017346860"> | |
<ol start="7" class="pre-context" id="pre70294017346860"> | |
<li onclick="toggle('pre70294017346860', 'post70294017346860')">require 'rubygems' | |
</li> | |
<li onclick="toggle('pre70294017346860', 'post70294017346860')">begin | |
</li> | |
<li onclick="toggle('pre70294017346860', 'post70294017346860')"> require 'rubygems-bundler/noexec' | |
</li> | |
<li onclick="toggle('pre70294017346860', 'post70294017346860')">rescue LoadError | |
</li> | |
<li onclick="toggle('pre70294017346860', 'post70294017346860')"> warn "unable to load rubygems-bundler/noexec" if ENV.key?('NOEXEC_DEBUG') | |
</li> | |
<li onclick="toggle('pre70294017346860', 'post70294017346860')">end | |
</li> | |
<li onclick="toggle('pre70294017346860', 'post70294017346860')"> | |
</li> | |
</ol> | |
<ol start="14" class="context-line"> | |
<li onclick="toggle('pre70294017346860', 'post70294017346860')">eval File.read(original_file), binding, original_file<span>...</span></li></ol> | |
<ol start='15' class="post-context" id="post70294017346860"> | |
</ol> | |
</div> | |
</li> | |
<li class="frame"> | |
<code>/Users/scott/.rvm/gems/ruby-2.0.0-p195/bin/ruby_noexec_wrapper</code>: in <code><main></code> | |
<div class="context" id="c70294017343560"> | |
<ol start="7" class="pre-context" id="pre70294017343560"> | |
<li onclick="toggle('pre70294017343560', 'post70294017343560')">require 'rubygems' | |
</li> | |
<li onclick="toggle('pre70294017343560', 'post70294017343560')">begin | |
</li> | |
<li onclick="toggle('pre70294017343560', 'post70294017343560')"> require 'rubygems-bundler/noexec' | |
</li> | |
<li onclick="toggle('pre70294017343560', 'post70294017343560')">rescue LoadError | |
</li> | |
<li onclick="toggle('pre70294017343560', 'post70294017343560')"> warn "unable to load rubygems-bundler/noexec" if ENV.key?('NOEXEC_DEBUG') | |
</li> | |
<li onclick="toggle('pre70294017343560', 'post70294017343560')">end | |
</li> | |
<li onclick="toggle('pre70294017343560', 'post70294017343560')"> | |
</li> | |
</ol> | |
<ol start="14" class="context-line"> | |
<li onclick="toggle('pre70294017343560', 'post70294017343560')">eval File.read(original_file), binding, original_file<span>...</span></li></ol> | |
<ol start='15' class="post-context" id="post70294017343560"> | |
</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> | |
<table class="req"> | |
<thead> | |
<tr> | |
<th>Variable</th> | |
<th>Value</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<td>name</td> | |
<td class="code"><div>"tryingagains"</div></td> | |
</tr> | |
</tbody> | |
</table> | |
<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>CONTENT_LENGTH</td> | |
<td class="code"><div>17</div></td> | |
</tr> | |
<tr> | |
<td>CONTENT_TYPE</td> | |
<td class="code"><div>application/x-www-form-urlencoded; charset=utf-8</div></td> | |
</tr> | |
<tr> | |
<td>GATEWAY_INTERFACE</td> | |
<td class="code"><div>CGI/1.2</div></td> | |
</tr> | |
<tr> | |
<td>HTTP_AUTHORIZATION</td> | |
<td class="code"><div>Bearer 9XlWtQwoijzujJFWnHdeZKJ_vriy4YJXNH0KpLZ_</div></td> | |
</tr> | |
<tr> | |
<td>HTTP_CONNECTION</td> | |
<td class="code"><div>keep-alive</div></td> | |
</tr> | |
<tr> | |
<td>HTTP_HOST</td> | |
<td class="code"><div>api.dev.divshot.com:9393</div></td> | |
</tr> | |
<tr> | |
<td>HTTP_ORIGIN</td> | |
<td class="code"><div>nil</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>/apps</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>POST</div></td> | |
</tr> | |
<tr> | |
<td>REQUEST_PATH</td> | |
<td class="code"><div>/apps</div></td> | |
</tr> | |
<tr> | |
<td>REQUEST_URI</td> | |
<td class="code"><div>/apps</div></td> | |
</tr> | |
<tr> | |
<td>SCRIPT_NAME</td> | |
<td class="code"><div></div></td> | |
</tr> | |
<tr> | |
<td>SERVER_NAME</td> | |
<td class="code"><div>api.dev.divshot.com</div></td> | |
</tr> | |
<tr> | |
<td>SERVER_PORT</td> | |
<td class="code"><div>9393</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>thin 1.5.0 codename Knife</div></td> | |
</tr> | |
<tr> | |
<td>api.endpoint</td> | |
<td class="code"><div>#<Grape::Endpoint:0x007fdd32148680 @settings=#<Grape::Util::HashStack:0x007fdd2e50cb80 @stack=[{:declared_params=>[], :validations=>[], :default_format=>:json, :content_types=>{:json=>"application/json", :html=>"text/html", :txt=>"text/plain"}, :formatters=>{:html=>#<Proc:0x007fdd3114e1d0@/Users/scott/www/divshot/api/app/app.rb:19 (lambda)>, :txt=>#<Proc:0x007fdd3114e180@/Users/scott/www/divshot/api/app/app.rb:20 (lambda)>}, :default_error_formatter=>Grape::ErrorFormatter::Json, :rescue_handlers=>{MongoMapper::DocumentNotFound=>#<Proc:0x007fdd2d6f9c28@/Users/scott/www/divshot/api/app/app.rb:32>}, :rescue_options=>{}, :rescued_errors=>[MongoMapper::DocumentNotFound]}, {:middleware=>[[Grape::Middleware::Auth::OAuth2]], :default_format=>:json, :rescue_handlers=>{MongoMapper::DocumentNotValid=>#<Proc:0x007fdd2d740768@/Users/scott/www/divshot/api/app/app.rb:42>}, :rescue_options=>{}, :rescued_errors=>[MongoMapper::DocumentNotValid], :helpers=>#<Module:0x007fdd2d7406c8>, :befores=>[#<Proc:0x007fdd2d740678@/Users/scott/www/divshot/api/app/app.rb:60>]}, {:befores=>[#<Proc:0x007fdd2e356908@/Users/scott/www/divshot/api/app/app.rb:73>], :mount_path=>"/"}, {:declared_params=>[], :validations=>[], :helpers=>#<Module:0x007fdd2e4edc30>, :failure_modes=>{:authenticaton_required=>{:status=>401, :message=>"Authentication is required before making requsets to the API"}, :unauthorized_read=>{:message=>"Not authorized to view this app.", :status=>403, :description=>"You are attempting to access an app you are not authorized to access. Please contact the owner of the application.\n"}, :unauthorized_mutation=>{:message=>"Not authorized to mutate this resource.", :status=>403, :description=>"You are attempting to access an app you are not authorized make changes to. Please contact the owner of the applicaton.\n"}, :app_not_found=>{:message=>"No app found by this id.", :status=>404, :description=>"There is no app registered to that id. Please check your records and if neccessary contact [email protected].\n"}, :invalid_data=>{:status=>422, :message=>"Data did not pass validaitons.", :description=>"Refer to the errors hash and try again.\n"}, :cannot_create_app_for_org=>{:status=>403, :message=>"Cannot create Org resources.", :description=>"You do not have permission to create apps for this Organization. Please contact the a representative of the Organization.\n"}, :unauthorized_org_read=>{:status=>403, :message=>"Cannot list Org Apps.", :description=>"You do not have permission te list apps for this Organization. Please contact the a representative of the Organization.\n"}}}, {:namespace=>#<Grape::Namespace:0x007fdd2e4fd680 @space="apps", @options={}>, :declared_params=>[:name], :validations=>[#<Grape::Validations::PresenceValidator:0x007fdd2e50d328 @attrs=[:name], @required=true, @scope=#<Grape::Validations::ParamsScope:0x007fdd2e50e160 @element=nil, @parent=nil, @api=Divshot::API::Hosting::Apps, @optional=false, @declared_params=[:name]>>, #<Grape::Validations::CoerceValidator:0x007fdd2e50d2b0 @option=String, @attrs=[:name], @required=true, @scope=#<Grape::Validations::ParamsScope:0x007fdd2e50e160 @element=nil, @parent=nil, @api=Divshot::API::Hosting::Apps, @optional=false, @declared_params=[:name]>>]}]>, @options={:method=>["POST"], :path=>["/"], :route_options=>{:description=>{:returns=>["App"], :return_type=>"instance", :failure_modes=>[:invalid_data], :text=>"# Create an App\n\nThe created application will be owned by the current AuthenticatedUser.\n\n## Sample request payload:\n\n```js\n{\n \"name\": \"my-fantastic-app\"\n}\n```\n\n## Sample response payload:\n\n```js\n{\n \"id\": \"524c0904562410a437000004\",\n \"name\": \"my-fantastic-app\",\n \"environment_hash\": {},\n \"created_at\": 1380748357\n \"updated_at\": 1380748357\n}\n```\n"}, :params=>{"name"=>{:required=>true, :type=>"String", :desc=>"The subdomain at which the app will be located."}}}}, @source=#<Proc:0x007fdd2e50d1c0@/Users/scott/www/divshot/api/app/apis/hosting/apps.rb:98>, @block=#<Proc:0x007fdd2e517a08@/Users/scott/.rvm/gems/ruby-2.0.0-p195/gems/grape-0.6.0/lib/grape/endpoint.rb:31>, @namespace="/apps", @routes=[#<Grape::Route:0x007fdd2e415d80 @options={:description=>{:returns=>["App"], :return_type=>"instance", :failure_modes=>[:invalid_data], :text=>"# Create an App\n\nThe created application will be owned by the current AuthenticatedUser.\n\n## Sample request payload:\n\n```js\n{\n \"name\": \"my-fantastic-app\"\n}\n```\n\n## Sample response payload:\n\n```js\n{\n \"id\": \"524c0904562410a437000004\",\n \"name\": \"my-fantastic-app\",\n \"environment_hash\": {},\n \"created_at\": 1380748357\n \"updated_at\": 1380748357\n}\n```\n"}, :params=>{"name"=>{:required=>true, :type=>"String", :desc=>"The subdomain at which the app will be located."}}, :prefix=>nil, :version=>nil, :namespace=>"/apps", :method=>"POST", :path=>"/apps(.:format)", :compiled=>/\A\/apps(?:\.(?<format>[^\/.?]+))?\Z/}>], @env={"SERVER_SOFTWARE"=>"thin 1.5.0 codename Knife", "SERVER_NAME"=>"api.dev.divshot.com", "rack.input"=>#<Rack::Lint::InputWrapper:0x007fdd32131660 @input=#<StringIO:0x007fdd32112378>>, "rack.version"=>[1, 0], "rack.errors"=>#<Rack::Lint::ErrorWrapper:0x007fdd32131570 @error=#<IO:<STDERR>>>, "rack.multithread"=>false, "rack.multiprocess"=>false, "rack.run_once"=>false, "REQUEST_METHOD"=>"POST", "REQUEST_PATH"=>"/apps", "PATH_INFO"=>"/apps", "REQUEST_URI"=>"/apps", "HTTP_VERSION"=>"HTTP/1.1", "HTTP_AUTHORIZATION"=>"Bearer 9XlWtQwoijzujJFWnHdeZKJ_vriy4YJXNH0KpLZ_", "HTTP_HOST"=>"api.dev.divshot.com:9393", "HTTP_CONNECTION"=>"keep-alive", "CONTENT_LENGTH"=>"17", "CONTENT_TYPE"=>"application/x-www-form-urlencoded; charset=utf-8", "GATEWAY_INTERFACE"=>"CGI/1.2", "SERVER_PORT"=>"9393", "QUERY_STRING"=>"", "SERVER_PROTOCOL"=>"HTTP/1.1", "rack.url_scheme"=>"http", "SCRIPT_NAME"=>"", "REMOTE_ADDR"=>"127.0.0.1", "async.callback"=>#<Method: Thin::Connection#post_process>, "async.close"=>#<EventMachine::DefaultDeferrable:0x007fdd3211bce8>, "sinatra.commonlogger"=>true, "rack.session"=>#<Rack::Session::Abstract::SessionHash:0x3fee99098a54 not yet loaded>, "rack.session.options"=>{:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :defer=>false, :renew=>false, :sidbits=>128, :secure_random=>SecureRandom, :secret=>"deb1d665093c426f716d0ac61b691eacd8fbe3da", :coder=>#<Rack::Session::Cookie::Base64::Marshal:0x007fdd32002140>}, "HTTP_ORIGIN"=>nil, "rack.routing_args"=>{:route_info=>#<Grape::Route:0x007fdd2e415d80 @options={:description=>{:returns=>["App"], :return_type=>"instance", :failure_modes=>[:invalid_data], :text=>"# Create an App\n\nThe created application will be owned by the current AuthenticatedUser.\n\n## Sample request payload:\n\n```js\n{\n \"name\": \"my-fantastic-app\"\n}\n```\n\n## Sample response payload:\n\n```js\n{\n \"id\": \"524c0904562410a437000004\",\n \"name\": \"my-fantastic-app\",\n \"environment_hash\": {},\n \"created_at\": 1380748357\n \"updated_at\": 1380748357\n}\n```\n"}, :params=>{"name"=>{:required=>true, :type=>"String", :desc=>"The subdomain at which the app will be located."}}, :prefix=>nil, :version=>nil, :namespace=>"/apps", :method=>"POST", :path=>"/apps(.:format)", :compiled=>/\A\/apps(?:\.(?<format>[^\/.?]+))?\Z/}>}, "api.endpoint"=>#<Grape::Endpoint:0x007fdd32148680 ...>, "rack.request.query_string"=>"", "rack.request.query_hash"=>{}, "rack.request.form_input"=>#<Rack::Lint::InputWrapper:0x007fdd32131660 @input=#<StringIO:0x007fdd32112378>>, "rack.request.form_hash"=>{"name"=>"tryingagains"}, "rack.request.form_vars"=>"name=tryingagains", "grape.request.params"=>#<Hashie::Mash name="tryingagains" route_info=#<Grape::Route:0x007fdd2e415d80 @options={:description=>{:returns=>["App"], :return_type=>"instance", :failure_modes=>[:invalid_data], :text=>"# Create an App\n\nThe created application will be owned by the current AuthenticatedUser.\n\n## Sample request payload:\n\n```js\n{\n \"name\": \"my-fantastic-app\"\n}\n```\n\n## Sample response payload:\n\n```js\n{\n \"id\": \"524c0904562410a437000004\",\n \"name\": \"my-fantastic-app\",\n \"environment_hash\": {},\n \"created_at\": 1380748357\n \"updated_at\": 1380748357\n}\n```\n"}, :params=>{"name"=>{:required=>true, :type=>"String", :desc=>"The subdomain at which the app will be located."}}, :prefix=>nil, :version=>nil, :namespace=>"/apps", :method=>"POST", :path=>"/apps(.:format)", :compiled=>/\A\/apps(?:\.(?<format>[^\/.?]+))?\Z/}>>, "api.token"=>#<AccessToken _id: BSON::ObjectId('52558240421aa908c300000a'), client_application_id: BSON::ObjectId('525578a3421aa98155000004'), created_at: 2013-10-09 16:20:16 UTC, disabled: false, owner_id: BSON::ObjectId('52310e83421aa9380a0027ea'), owner_type: "User", token: "9XlWtQwoijzujJFWnHdeZKJ_vriy4YJXNH0KpLZ_", updated_at: 2013-10-09 16:20:16 UTC>, "api.format"=>:json, "rack.request.cookie_hash"=>{}}, @header={}, @request=#<Grape::Request:0x007fdd32172778 @env={"SERVER_SOFTWARE"=>"thin 1.5.0 codename Knife", "SERVER_NAME"=>"api.dev.divshot.com", "rack.input"=>#<Rack::Lint::InputWrapper:0x007fdd32131660 @input=#<StringIO:0x007fdd32112378>>, "rack.version"=>[1, 0], "rack.errors"=>#<Rack::Lint::ErrorWrapper:0x007fdd32131570 @error=#<IO:<STDERR>>>, "rack.multithread"=>false, "rack.multiprocess"=>false, "rack.run_once"=>false, "REQUEST_METHOD"=>"POST", "REQUEST_PATH"=>"/apps", "PATH_INFO"=>"/apps", "REQUEST_URI"=>"/apps", "HTTP_VERSION"=>"HTTP/1.1", "HTTP_AUTHORIZATION"=>"Bearer 9XlWtQwoijzujJFWnHdeZKJ_vriy4YJXNH0KpLZ_", "HTTP_HOST"=>"api.dev.divshot.com:9393", "HTTP_CONNECTION"=>"keep-alive", "CONTENT_LENGTH"=>"17", "CONTENT_TYPE"=>"application/x-www-form-urlencoded; charset=utf-8", "GATEWAY_INTERFACE"=>"CGI/1.2", "SERVER_PORT"=>"9393", "QUERY_STRING"=>"", "SERVER_PROTOCOL"=>"HTTP/1.1", "rack.url_scheme"=>"http", "SCRIPT_NAME"=>"", "REMOTE_ADDR"=>"127.0.0.1", "async.callback"=>#<Method: Thin::Connection#post_process>, "async.close"=>#<EventMachine::DefaultDeferrable:0x007fdd3211bce8>, "sinatra.commonlogger"=>true, "rack.session"=>#<Rack::Session::Abstract::SessionHash:0x3fee99098a54 not yet loaded>, "rack.session.options"=>{:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :defer=>false, :renew=>false, :sidbits=>128, :secure_random=>SecureRandom, :secret=>"deb1d665093c426f716d0ac61b691eacd8fbe3da", :coder=>#<Rack::Session::Cookie::Base64::Marshal:0x007fdd32002140>}, "HTTP_ORIGIN"=>nil, "rack.routing_args"=>{:route_info=>#<Grape::Route:0x007fdd2e415d80 @options={:description=>{:returns=>["App"], :return_type=>"instance", :failure_modes=>[:invalid_data], :text=>"# Create an App\n\nThe created application will be owned by the current AuthenticatedUser.\n\n## Sample request payload:\n\n```js\n{\n \"name\": \"my-fantastic-app\"\n}\n```\n\n## Sample response payload:\n\n```js\n{\n \"id\": \"524c0904562410a437000004\",\n \"name\": \"my-fantastic-app\",\n \"environment_hash\": {},\n \"created_at\": 1380748357\n \"updated_at\": 1380748357\n}\n```\n"}, :params=>{"name"=>{:required=>true, :type=>"String", :desc=>"The subdomain at which the app will be located."}}, :prefix=>nil, :version=>nil, :namespace=>"/apps", :method=>"POST", :path=>"/apps(.:format)", :compiled=>/\A\/apps(?:\.(?<format>[^\/.?]+))?\Z/}>}, "api.endpoint"=>#<Grape::Endpoint:0x007fdd32148680 ...>, "rack.request.query_string"=>"", "rack.request.query_hash"=>{}, "rack.request.form_input"=>#<Rack::Lint::InputWrapper:0x007fdd32131660 @input=#<StringIO:0x007fdd32112378>>, "rack.request.form_hash"=>{"name"=>"tryingagains"}, "rack.request.form_vars"=>"name=tryingagains", "grape.request.params"=>#<Hashie::Mash name="tryingagains" route_info=#<Grape::Route:0x007fdd2e415d80 @options={:description=>{:returns=>["App"], :return_type=>"instance", :failure_modes=>[:invalid_data], :text=>"# Create an App\n\nThe created application will be owned by the current AuthenticatedUser.\n\n## Sample request payload:\n\n```js\n{\n \"name\": \"my-fantastic-app\"\n}\n```\n\n## Sample response payload:\n\n```js\n{\n \"id\": \"524c0904562410a437000004\",\n \"name\": \"my-fantastic-app\",\n \"environment_hash\": {},\n \"created_at\": 1380748357\n \"updated_at\": 1380748357\n}\n```\n"}, :params=>{"name"=>{:required=>true, :type=>"String", :desc=>"The subdomain at which the app will be located."}}, :prefix=>nil, :version=>nil, :namespace=>"/apps", :method=>"POST", :path=>"/apps(.:format)", :compiled=>/\A\/apps(?:\.(?<format>[^\/.?]+))?\Z/}>>, "api.token"=>#<AccessToken _id: BSON::ObjectId('52558240421aa908c300000a'), client_application_id: BSON::ObjectId('525578a3421aa98155000004'), created_at: 2013-10-09 16:20:16 UTC, disabled: false, owner_id: BSON::ObjectId('52310e83421aa9380a0027ea'), owner_type: "User", token: "9XlWtQwoijzujJFWnHdeZKJ_vriy4YJXNH0KpLZ_", updated_at: 2013-10-09 16:20:16 UTC>, "api.format"=>:json, "rack.request.cookie_hash"=>{}}, @params={"name"=>"tryingagains"}>, @cookies=#<Grape::Cookies:0x007fdd32172598 @cookies={}, @send_cookies={}>, @params=#<Hashie::Mash name="tryingagains" route_info=#<Grape::Route:0x007fdd2e415d80 @options={:description=>{:returns=>["App"], :return_type=>"instance", :failure_modes=>[:invalid_data], :text=>"# Create an App\n\nThe created application will be owned by the current AuthenticatedUser.\n\n## Sample request payload:\n\n```js\n{\n \"name\": \"my-fantastic-app\"\n}\n```\n\n## Sample response payload:\n\n```js\n{\n \"id\": \"524c0904562410a437000004\",\n \"name\": \"my-fantastic-app\",\n \"environment_hash\": {},\n \"created_at\": 1380748357\n \"updated_at\": 1380748357\n}\n```\n"}, :params=>{"name"=>{:required=>true, :type=>"String", :desc=>"The subdomain at which the app will be located."}}, :prefix=>nil, :version=>nil, :namespace=>"/apps", :method=>"POST", :path=>"/apps(.:format)", :compiled=>/\A\/apps(?:\.(?<format>[^\/.?]+))?\Z/}>>></div></td> | |
</tr> | |
<tr> | |
<td>api.format</td> | |
<td class="code"><div>:json</div></td> | |
</tr> | |
<tr> | |
<td>api.token</td> | |
<td class="code"><div>#<AccessToken _id: BSON::ObjectId('52558240421aa908c300000a'), client_application_id: BSON::ObjectId('525578a3421aa98155000004'), created_at: 2013-10-09 16:20:16 UTC, disabled: false, owner_id: BSON::ObjectId('52310e83421aa9380a0027ea'), owner_type: "User", token: "9XlWtQwoijzujJFWnHdeZKJ_vriy4YJXNH0KpLZ_", updated_at: 2013-10-09 16:20:16 UTC></div></td> | |
</tr> | |
<tr> | |
<td>async.callback</td> | |
<td class="code"><div>#<Method: Thin::Connection#post_process></div></td> | |
</tr> | |
<tr> | |
<td>async.close</td> | |
<td class="code"><div>#<EventMachine::DefaultDeferrable:0x007fdd3211bce8></div></td> | |
</tr> | |
<tr> | |
<td>grape.request.params</td> | |
<td class="code"><div>#<Hashie::Mash name="tryingagains" route_info=#<Grape::Route:0x007fdd2e415d80 @options={:description=>{:returns=>["App"], :return_type=>"instance", :failure_modes=>[:invalid_data], :text=>"# Create an App\n\nThe created application will be owned by the current AuthenticatedUser.\n\n## Sample request payload:\n\n```js\n{\n \"name\": \"my-fantastic-app\"\n}\n```\n\n## Sample response payload:\n\n```js\n{\n \"id\": \"524c0904562410a437000004\",\n \"name\": \"my-fantastic-app\",\n \"environment_hash\": {},\n \"created_at\": 1380748357\n \"updated_at\": 1380748357\n}\n```\n"}, :params=>{"name"=>{:required=>true, :type=>"String", :desc=>"The subdomain at which the app will be located."}}, :prefix=>nil, :version=>nil, :namespace=>"/apps", :method=>"POST", :path=>"/apps(.:format)", :compiled=>/\A\/apps(?:\.(?<format>[^\/.?]+))?\Z/}>></div></td> | |
</tr> | |
<tr> | |
<td>rack.errors</td> | |
<td class="code"><div>#<Rack::Lint::ErrorWrapper:0x007fdd32131570 @error=#<IO:<STDERR>>></div></td> | |
</tr> | |
<tr> | |
<td>rack.input</td> | |
<td class="code"><div>#<Rack::Lint::InputWrapper:0x007fdd32131660 @input=#<StringIO:0x007fdd32112378>></div></td> | |
</tr> | |
<tr> | |
<td>rack.multiprocess</td> | |
<td class="code"><div>false</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>{"name"=>"tryingagains"}</div></td> | |
</tr> | |
<tr> | |
<td>rack.request.form_input</td> | |
<td class="code"><div>#<Rack::Lint::InputWrapper:0x007fdd32131660 @input=#<StringIO:0x007fdd32112378>></div></td> | |
</tr> | |
<tr> | |
<td>rack.request.form_vars</td> | |
<td class="code"><div>name=tryingagains</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.routing_args</td> | |
<td class="code"><div>{:route_info=>#<Grape::Route:0x007fdd2e415d80 @options={:description=>{:returns=>["App"], :return_type=>"instance", :failure_modes=>[:invalid_data], :text=>"# Create an App\n\nThe created application will be owned by the current AuthenticatedUser.\n\n## Sample request payload:\n\n```js\n{\n \"name\": \"my-fantastic-app\"\n}\n```\n\n## Sample response payload:\n\n```js\n{\n \"id\": \"524c0904562410a437000004\",\n \"name\": \"my-fantastic-app\",\n \"environment_hash\": {},\n \"created_at\": 1380748357\n \"updated_at\": 1380748357\n}\n```\n"}, :params=>{"name"=>{:required=>true, :type=>"String", :desc=>"The subdomain at which the app will be located."}}, :prefix=>nil, :version=>nil, :namespace=>"/apps", :method=>"POST", :path=>"/apps(.:format)", :compiled=>/\A\/apps(?:\.(?<format>[^\/.?]+))?\Z/}>}</div></td> | |
</tr> | |
<tr> | |
<td>rack.run_once</td> | |
<td class="code"><div>false</div></td> | |
</tr> | |
<tr> | |
<td>rack.session</td> | |
<td class="code"><div>#<Rack::Session::Abstract::SessionHash:0x3fee99098a54 not yet loaded></div></td> | |
</tr> | |
<tr> | |
<td>rack.session.options</td> | |
<td class="code"><div>{:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :defer=>false, :renew=>false, :sidbits=>128, :secure_random=>SecureRandom, :secret=>"deb1d665093c426f716d0ac61b691eacd8fbe3da", :coder=>#<Rack::Session::Cookie::Base64::Marshal:0x007fdd32002140>}</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, 0]</div></td> | |
</tr> | |
<tr> | |
<td>sinatra.commonlogger</td> | |
<td class="code"><div>true</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> | |
Success: tryingagains has been created | |
~/www/divshot/hosting-docs | |
> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment