detail.erb
block in singleton class
/app/config/../app/views/dog/expos/detail.erb
in
block in singleton class
<% end %><% end %>
<% unless @rvideo.blank? %><% @rvideo.each do |v| %>
<meta property="og:image" content="http://img.youtube.com/vi/<%= v.value %>/hqdefault.jpg">
<% end %><% end %>
<meta property="og:image" content="<%= @result.dog.p_photo %>"/>
<meta property="og:image" content="https://registerdog.s3.amazonaws.com/static/fbshare2.jpg"/>
<meta property="og:description" content="<% p @result %><%= @result.dog.pedigree_name %> - <%= t.result.classes(@result.class) %> - <%= @result.ranking.blank? || @result.ranking == 10 ? '' : @result.ranking.to_s << ( @result.rating.blank? ? '' : ' ' << t.result.ratings(@result.rating) ) %><%= %><%= @result.best_juniores ? " " << t.result.best_juniores : "" %><%= @result.best_puppy ? " " << t.result.best_puppy : "" %><%= @result.cac ? ' ' << t.result.cac : '' %><%= @result.rcac ? ' ' << t.result.rcac : '' %><%= @result.cacib ? ' ' << t.result.cacib : '' %><%= @result.rcacib ? ' ' << t.result.rcacib : '' %><%= @result.bos ? ' ' << t.result.bos : '' %><%= @result.bob ? ' ' << t.result.bob : '' %><%= @result.best_brace_breed ? " " << t.result.best_brace_breed : "" %><%= @result.best_breeders_group_breed ? " " << t.result.best_breeders_group_breed : "" %><%= @result.best_owners_group_breed ? " " << t.result.best_owners_group_breed : "" %><%= @result.best_progeny_group_breed ? " " << t.result.best_progeny_group_breed : "" %><%= @result.cacj ? ' ' << t.result.cacj : "" %><%= @result.cacv ? ' ' << t.result.cacv : "" %><%= @result.bis_brace ? " " << @result.bis_brace_rank.to_s << " " << t.result.bis_brace : "" %><%= @result.best_breeders_group ? " " << @result.best_breeders_group_rank.to_s << " " << t.result.best_breeders_group : "" %><%= @result.best_owners_group ? " " << @result.best_owners_group_rank.to_s << " " << t.result.best_owners_group : "" %><%= @result.best_progeny_group ? " " << @result.best_progeny_group_rank.to_s << " " << t.result.best_progeny_group : "" %><%= @result.bog ? " " << @result.bog_rank.to_s << " " << t.result.bog : "" %><%= @result.bis ? " " << @result.bis_rank.to_s << " " << t.result.bis : "" %><%= @result.bis_puppy_class ? " " << @result.bis_puppy_class_rank.to_s << " " << t.result.bis_puppy_class : "" %><%= @result.bis_junior_class ? " " << @result.bis_junior_class_rank.to_s << " " << t.result.bis_junior_class : "" %><%= @result.bis_veteran_class ? " " << @result.bis_veteran_class_rank.to_s << " " << t.result.bis_veteran_class : "" %><%= !@result.note.blank? ? " - " << @result.note : '' %>"/>
<meta property="og:locale" content="en_US"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
$(function() {
var pull1 = $('#pull1');
menu = $('#navhome');
menuHeight = menu.height();
/app/vendor/bundle/ruby/2.2.0/gems/tilt-2.0.1/lib/tilt/template.rb
in
call
# evaluation is guaranteed to be performed in the scope object with the
# locals specified and with support for yielding to the block.
#
# This method is only used by source generating templates. Subclasses that
# override render() may not support all features.
def evaluate(scope, locals, &block)
method = compiled_method(locals.keys)
method.bind(scope).call(locals, &block)
end
# Generates all template source by combining the preamble, template, and
# postamble and returns a two-tuple of the form: [source, offset], where
# source is the string containing (Ruby) source code for the template and
# offset is the integer line offset where line reporting should begin.
#
/app/vendor/bundle/ruby/2.2.0/gems/tilt-2.0.1/lib/tilt/template.rb
in
evaluate
# evaluation is guaranteed to be performed in the scope object with the
# locals specified and with support for yielding to the block.
#
# This method is only used by source generating templates. Subclasses that
# override render() may not support all features.
def evaluate(scope, locals, &block)
method = compiled_method(locals.keys)
method.bind(scope).call(locals, &block)
end
# Generates all template source by combining the preamble, template, and
# postamble and returns a two-tuple of the form: [source, offset], where
# source is the string containing (Ruby) source code for the template and
# offset is the integer line offset where line reporting should begin.
#
/app/vendor/bundle/ruby/2.2.0/gems/tilt-2.0.1/lib/tilt/template.rb
in
render
# Render the template in the given scope with the locals specified. If a
# block is given, it is typically available within the template via
# +yield+.
def render(scope=Object.new, locals={}, &block)
current_template = Thread.current[:tilt_current_template]
Thread.current[:tilt_current_template] = self
evaluate(scope, locals || {}, &block)
ensure
Thread.current[:tilt_current_template] = current_template
end
# The basename of the template file.
def basename(suffix='')
File.basename(file, suffix) if file
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
render
options[:default_encoding] ||= settings.default_encoding
# compile and render template
begin
layout_was = @default_layout
@default_layout = false
template = compile_template(engine, data, options, views)
output = template.render(scope, locals, &block)
ensure
@default_layout = layout_was
end
# render layout
if layout
options = options.merge(:views => views, :layout => false, :eat_errors => eat_errors, :scope => scope).
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
erb
def initialize
super
@default_layout = :layout
@preferred_extension = nil
end
def erb(template, options = {}, locals = {}, &block)
render(:erb, template, options, locals, &block)
end
def erubis(template, options = {}, locals = {})
warn "Sinatra::Templates#erubis is deprecated and will be removed, use #erb instead.\n" \
"If you have Erubis installed, it will be used automatically."
render :erubis, template, options, locals
end
/app/app/dog_routes.rb
in
block in <top (required)>
@result = Result.get(params[:result_id])
unless @result.nil?
@rvideo = Feed.all( :dog_id => @result.dog_id, :expo_id => @result.expo_id, :type => 'video', :hidden => false )
@page_title = "Risultato di " << @dog.pedigree_name
@dogs = Dog.all( :r_id => nil, :controlled => true, :limit => 7, :order => :created.desc, :avatar_uid.not => nil)
@breeders = User.all( :order => :id.desc, :limit => 7, :wantdelete => false, :avatar_uid.not => nil, :type => "breeder", :fname.not => nil, User.userdogs.dog.visible => true )
@users = User.all( :order => :id.desc, :limit => 7, :wantdelete => false, :avatar_uid.not => nil, :type => "private", :fname.not => nil, User.userdogs.dog.visible => true )
erb :'dog/expos/detail', :layout => false
else
not_found
# niente results
end
else
not_found
# niente cane
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
call
method_name = "#{verb} #{path}"
unbound_method = generate_method(method_name, &block)
pattern, keys = compile path
conditions, @conditions = @conditions, []
wrapper = block.arity != 0 ?
proc { |a,p| unbound_method.bind(a).call(*p) } :
proc { |a,p| unbound_method.bind(a).call }
wrapper.instance_variable_set(:@route_name, method_name)
[ pattern, keys, conditions, wrapper ]
end
def compile(path)
if path.respond_to? :to_str
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
block in compile!
method_name = "#{verb} #{path}"
unbound_method = generate_method(method_name, &block)
pattern, keys = compile path
conditions, @conditions = @conditions, []
wrapper = block.arity != 0 ?
proc { |a,p| unbound_method.bind(a).call(*p) } :
proc { |a,p| unbound_method.bind(a).call }
wrapper.instance_variable_set(:@route_name, method_name)
[ pattern, keys, conditions, wrapper ]
end
def compile(path)
if path.respond_to? :to_str
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
[]
# Run routes defined on the class and all superclasses.
def route!(base = settings, pass_block = nil)
if routes = base.routes[@request.request_method]
routes.each do |pattern, keys, conditions, block|
returned_pass_block = process_route(pattern, keys, conditions) do |*args|
env['sinatra.route'] = block.instance_variable_get(:@route_name)
route_eval { block[*args] }
end
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
end
end
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
block (3 levels) in route!
# Run routes defined on the class and all superclasses.
def route!(base = settings, pass_block = nil)
if routes = base.routes[@request.request_method]
routes.each do |pattern, keys, conditions, block|
returned_pass_block = process_route(pattern, keys, conditions) do |*args|
env['sinatra.route'] = block.instance_variable_get(:@route_name)
route_eval { block[*args] }
end
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
end
end
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
route_eval
route_eval(&pass_block) if pass_block
route_missing
end
# Run a route block and throw :halt with the result.
def route_eval
throw :halt, yield
end
# If the current request matches pattern and conditions, fill params
# with keys and call the given block.
# Revert params afterwards.
#
# Returns pass block.
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
block (2 levels) in route!
# Run routes defined on the class and all superclasses.
def route!(base = settings, pass_block = nil)
if routes = base.routes[@request.request_method]
routes.each do |pattern, keys, conditions, block|
returned_pass_block = process_route(pattern, keys, conditions) do |*args|
env['sinatra.route'] = block.instance_variable_get(:@route_name)
route_eval { block[*args] }
end
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
end
end
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
block in process_route
if values.any?
original, @params = params, params.merge('splat' => [], 'captures' => values)
keys.zip(values) { |k,v| Array === @params[k] ? @params[k] << v : @params[k] = v if v }
end
catch(:pass) do
conditions.each { |c| throw :pass if c.bind(self).call == false }
block ? block[self, values] : yield(self, values)
end
ensure
@params = original if original
end
# No matching route was found or all routes passed. The default
# implementation is to forward the request downstream when running
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
catch
values += match.captures.map! { |v| force_encoding URI_INSTANCE.unescape(v) if v }
if values.any?
original, @params = params, params.merge('splat' => [], 'captures' => values)
keys.zip(values) { |k,v| Array === @params[k] ? @params[k] << v : @params[k] = v if v }
end
catch(:pass) do
conditions.each { |c| throw :pass if c.bind(self).call == false }
block ? block[self, values] : yield(self, values)
end
ensure
@params = original if original
end
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
process_route
values += match.captures.map! { |v| force_encoding URI_INSTANCE.unescape(v) if v }
if values.any?
original, @params = params, params.merge('splat' => [], 'captures' => values)
keys.zip(values) { |k,v| Array === @params[k] ? @params[k] << v : @params[k] = v if v }
end
catch(:pass) do
conditions.each { |c| throw :pass if c.bind(self).call == false }
block ? block[self, values] : yield(self, values)
end
ensure
@params = original if original
end
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
block in route!
base.filters[type].each { |args| process_route(*args) }
end
# Run routes defined on the class and all superclasses.
def route!(base = settings, pass_block = nil)
if routes = base.routes[@request.request_method]
routes.each do |pattern, keys, conditions, block|
returned_pass_block = process_route(pattern, keys, conditions) do |*args|
env['sinatra.route'] = block.instance_variable_get(:@route_name)
route_eval { block[*args] }
end
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
end
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
each
filter! type, base.superclass if base.superclass.respond_to?(:filters)
base.filters[type].each { |args| process_route(*args) }
end
# Run routes defined on the class and all superclasses.
def route!(base = settings, pass_block = nil)
if routes = base.routes[@request.request_method]
routes.each do |pattern, keys, conditions, block|
returned_pass_block = process_route(pattern, keys, conditions) do |*args|
env['sinatra.route'] = block.instance_variable_get(:@route_name)
route_eval { block[*args] }
end
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
route!
filter! type, base.superclass if base.superclass.respond_to?(:filters)
base.filters[type].each { |args| process_route(*args) }
end
# Run routes defined on the class and all superclasses.
def route!(base = settings, pass_block = nil)
if routes = base.routes[@request.request_method]
routes.each do |pattern, keys, conditions, block|
returned_pass_block = process_route(pattern, keys, conditions) do |*args|
env['sinatra.route'] = block.instance_variable_get(:@route_name)
route_eval { block[*args] }
end
# don't wipe out pass_block in superclass
pass_block = returned_pass_block if returned_pass_block
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
block in dispatch!
end
# Dispatch a request with error handling.
def dispatch!
invoke do
static! if settings.static? && (request.get? || request.head?)
filter! :before
route!
end
rescue ::Exception => boom
invoke { handle_exception!(boom) }
ensure
begin
filter! :after unless env['sinatra.static_file']
rescue ::Exception => boom
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
block in invoke
# Creates a Hash with indifferent access.
def indifferent_hash
Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Fixnum === res or String === res
if Array === res and Fixnum === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
elsif res.respond_to? :each
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
catch
# Creates a Hash with indifferent access.
def indifferent_hash
Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Fixnum === res or String === res
if Array === res and Fixnum === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
elsif res.respond_to? :each
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
invoke
# Creates a Hash with indifferent access.
def indifferent_hash
Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Fixnum === res or String === res
if Array === res and Fixnum === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
elsif res.respond_to? :each
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
dispatch!
body res
end
nil # avoid double setting the same response tuple twice
end
# Dispatch a request with error handling.
def dispatch!
invoke do
static! if settings.static? && (request.get? || request.head?)
filter! :before
route!
end
rescue ::Exception => boom
invoke { handle_exception!(boom) }
ensure
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
block in call!
@request = Request.new(env)
@response = Response.new
@params = indifferent_params(@request.params)
template_cache.clear if settings.reload_templates
force_encoding(@params)
@response['Content-Type'] = nil
invoke { dispatch! }
invoke { error_block!(response.status) } unless @env['sinatra.error']
unless @response['Content-Type']
if Array === body and body[0].respond_to? :content_type
content_type body[0].content_type
else
content_type :html
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
block in invoke
# Creates a Hash with indifferent access.
def indifferent_hash
Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Fixnum === res or String === res
if Array === res and Fixnum === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
elsif res.respond_to? :each
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
catch
# Creates a Hash with indifferent access.
def indifferent_hash
Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Fixnum === res or String === res
if Array === res and Fixnum === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
elsif res.respond_to? :each
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
invoke
# Creates a Hash with indifferent access.
def indifferent_hash
Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
end
# Run the block with 'throw :halt' support and apply result to the response.
def invoke
res = catch(:halt) { yield }
res = [res] if Fixnum === res or String === res
if Array === res and Fixnum === res.first
res = res.dup
status(res.shift)
body(res.pop)
headers(*res)
elsif res.respond_to? :each
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
call!
@request = Request.new(env)
@response = Response.new
@params = indifferent_params(@request.params)
template_cache.clear if settings.reload_templates
force_encoding(@params)
@response['Content-Type'] = nil
invoke { dispatch! }
invoke { error_block!(response.status) } unless @env['sinatra.error']
unless @response['Content-Type']
if Array === body and body[0].respond_to? :content_type
content_type body[0].content_type
else
content_type :html
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
call
@app = app
@template_cache = Tilt::Cache.new
yield self if block_given?
end
# Rack call interface.
def call(env)
dup.call!(env)
end
def call!(env) # :nodoc:
@env = env
@request = Request.new(env)
@response = Response.new
@params = indifferent_params(@request.params)
/app/vendor/bundle/ruby/2.2.0/gems/rack-ssl-1.3.4/lib/rack/ssl.rb
in
call
@host = options[:host]
end
def call(env)
if @exclude && @exclude.call(env)
@app.call(env)
elsif scheme(env) == 'https'
status, headers, body = @app.call(env)
headers = hsts_headers.merge(headers)
flag_cookies_as_secure!(headers)
[status, headers, body]
else
redirect_to_https(env)
end
end
/app/vendor/bundle/ruby/2.2.0/gems/airbrake-4.1.0/lib/airbrake/rack.rb
in
call
unless ignored_user_agent?(env)
Airbrake.notify_or_ignore(exception, :rack_env => env)
end
end
def call(env)
begin
response = @app.call(env)
rescue Exception => raised
env['airbrake.error_id'] = notify_airbrake(raised, env)
raise raised
end
if framework_exception(env)
env['airbrake.error_id'] = notify_airbrake(framework_exception(env), env)
/app/vendor/bundle/ruby/2.2.0/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb
in
call
#
# Options:
# xss_mode:: How the browser should prevent the attack (default: :block)
class XSSHeader < Base
default_options :xss_mode => :block, :nosniff => true
def call(env)
status, headers, body = @app.call(env)
headers['X-XSS-Protection'] ||= "1; mode=#{options[:xss_mode]}" if html? headers
headers['X-Content-Type-Options'] ||= 'nosniff' if options[:nosniff]
[status, headers, body]
end
end
end
end
/app/vendor/bundle/ruby/2.2.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb
in
call
end
def call(env)
unless accepts? env
instrument env
result = react env
end
result or app.call(env)
end
def react(env)
result = send(options[:reaction], env)
result if Array === result and result.size == 3
end
/app/vendor/bundle/ruby/2.2.0/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb
in
call
#
# Unescapes '/' and '.', expands +path_info+.
# Thus <tt>GET /foo/%2e%2e%2fbar</tt> becomes <tt>GET /bar</tt>.
class PathTraversal < Base
def call(env)
path_was = env["PATH_INFO"]
env["PATH_INFO"] = cleanup path_was if path_was && !path_was.empty?
app.call env
ensure
env["PATH_INFO"] = path_was
end
def cleanup(path)
if path.respond_to?(:encoding)
# Ruby 1.9+ M17N
/app/vendor/bundle/ruby/2.2.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb
in
call
end
def call(env)
unless accepts? env
instrument env
result = react env
end
result or app.call(env)
end
def react(env)
result = send(options[:reaction], env)
result if Array === result and result.size == 3
end
/app/vendor/bundle/ruby/2.2.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb
in
call
end
def call(env)
unless accepts? env
instrument env
result = react env
end
result or app.call(env)
end
def react(env)
result = send(options[:reaction], env)
result if Array === result and result.size == 3
end
/app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.0/lib/rack/session/abstract/id.rb
in
context
def call(env)
context(env)
end
def context(env, app=@app)
prepare_session(env)
status, headers, body = app.call(env)
commit_session(env, status, headers, body)
end
private
def initialize_sid
@sidbits = @default_options[:sidbits]
/app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.0/lib/rack/session/abstract/id.rb
in
call
@default_options = self.class::DEFAULT_OPTIONS.merge(options)
@key = @default_options.delete(:key)
@cookie_only = @default_options.delete(:cookie_only)
initialize_sid
end
def call(env)
context(env)
end
def context(env, app=@app)
prepare_session(env)
status, headers, body = app.call(env)
commit_session(env, status, headers, body)
end
/app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.0/lib/rack/logger.rb
in
call
end
def call(env)
logger = ::Logger.new(env['rack.errors'])
logger.level = @level
env['rack.logger'] = logger
@app.call(env)
end
end
end
/app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.0/lib/rack/commonlogger.rb
in
call
def initialize(app, logger=nil)
@app = app
@logger = logger
end
def call(env)
began_at = Time.now
status, header, body = @app.call(env)
header = Utils::HeaderHash.new(header)
body = BodyProxy.new(body) { log(env, status, header, began_at) }
[status, header, body]
end
private
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
call
env['sinatra.commonlogger'] ? @app.call(env) : super
end
superclass.class_eval do
alias call_without_check call unless method_defined? :call_without_check
def call(env)
env['sinatra.commonlogger'] = true
call_without_check(env)
end
end
end
class NotFound < NameError #:nodoc:
def http_status; 404 end
end
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
call
end
end
# Behaves exactly like Rack::CommonLogger with the notable exception that it does nothing,
# if another CommonLogger is already in the middleware chain.
class CommonLogger < Rack::CommonLogger
def call(env)
env['sinatra.commonlogger'] ? @app.call(env) : super
end
superclass.class_eval do
alias call_without_check call unless method_defined? :call_without_check
def call(env)
env['sinatra.commonlogger'] = true
call_without_check(env)
/app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.0/lib/rack/head.rb
in
call
# Rack::Head returns an empty body for all HEAD requests. It leaves
# all other requests unchanged.
def initialize(app)
@app = app
end
def call(env)
status, headers, body = @app.call(env)
if env[REQUEST_METHOD] == HEAD
[
status, headers, Rack::BodyProxy.new([]) do
body.close if body.respond_to? :close
end
]
/app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.0/lib/rack/methodoverride.rb
in
call
method = method_override(env)
if HTTP_METHODS.include?(method)
env["rack.methodoverride.original_method"] = env[REQUEST_METHOD]
env[REQUEST_METHOD] = method
end
end
@app.call(env)
end
def method_override(env)
req = Request.new(env)
method = method_override_param(req) ||
env[HTTP_METHOD_OVERRIDE_HEADER]
method.to_s.upcase
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/show_exceptions.rb
in
call
def initialize(app)
@app = app
@template = ERB.new(TEMPLATE)
end
def call(env)
@app.call(env)
rescue Exception => e
errors, env["rack.errors"] = env["rack.errors"], @@eats_errors
if prefers_plain_text?(env)
content_type = "text/plain"
exception_string = dump_exception(e)
else
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
call
# Some Rack handlers (Thin, Rainbows!) implement an extended body object protocol, however,
# some middleware (namely Rack::Lint) will break it by not mirroring the methods in question.
# This middleware will detect an extended body object and will make sure it reaches the
# handler directly. We do this here, so our middleware and middleware set up by the app will
# still be able to run.
class ExtendedRack < Struct.new(:app)
def call(env)
result, callback = app.call(env), env['async.callback']
return result unless callback and async?(*result)
after_response { callback.call result }
setup_close(env, *result)
throw :async
end
private
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
call
end
def helpers
@instance
end
def call(env)
@stack.call(env)
end
def inspect
"#<#{@instance.class} app_file=#{settings.app_file.inspect}>"
end
end
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
block in call
setup_default_middleware builder
setup_middleware builder
builder.run app
builder
end
def call(env)
synchronize { prototype.call(env) }
end
# Like Kernel#caller but excluding certain magic entries and without
# line / method information; the resulting array contains filenames only.
def caller_files
cleaned_caller(1).flatten
end
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
synchronize
end
@@mutex = Mutex.new
def synchronize(&block)
if lock?
@@mutex.synchronize(&block)
else
yield
end
end
# used for deprecation warnings
def warn(message)
super message + "\n\tfrom #{cleaned_caller.first.join(':')}"
end
/app/vendor/bundle/ruby/2.2.0/bundler/gems/sinatra-27d1716c7388/lib/sinatra/base.rb
in
call
setup_default_middleware builder
setup_middleware builder
builder.run app
builder
end
def call(env)
synchronize { prototype.call(env) }
end
# Like Kernel#caller but excluding certain magic entries and without
# line / method information; the resulting array contains filenames only.
def caller_files
cleaned_caller(1).flatten
end
/app/vendor/bundle/ruby/2.2.0/gems/rack-timeout-0.0.4/lib/rack/timeout.rb
in
block in call
end
def initialize(app)
@app = app
end
def call(env)
SystemTimer.timeout(self.class.timeout, ::Timeout::Error) { @app.call(env) }
end
end
end
/app/vendor/ruby-2.2.8/lib/ruby/2.2.0/timeout.rb
in
block in timeout
sleep sec
rescue => e
x.raise e
else
x.raise exception, message
end
}
return yield(sec)
ensure
if y
y.kill
y.join # make sure y is dead.
end
end
end
/app/vendor/ruby-2.2.8/lib/ruby/2.2.0/timeout.rb
in
call
y.kill
y.join # make sure y is dead.
end
end
end
if klass
begin
bl.call(klass)
rescue klass => e
bt = e.backtrace
end
else
bt = Error.catch(message, &bl)
end
rej = /\A#{Regexp.quote(__FILE__)}:#{__LINE__-4}\z/o
/app/vendor/ruby-2.2.8/lib/ruby/2.2.0/timeout.rb
in
timeout
y.kill
y.join # make sure y is dead.
end
end
end
if klass
begin
bl.call(klass)
rescue klass => e
bt = e.backtrace
end
else
bt = Error.catch(message, &bl)
end
rej = /\A#{Regexp.quote(__FILE__)}:#{__LINE__-4}\z/o
/app/vendor/bundle/ruby/2.2.0/gems/rack-timeout-0.0.4/lib/rack/timeout.rb
in
call
end
def initialize(app)
@app = app
end
def call(env)
SystemTimer.timeout(self.class.timeout, ::Timeout::Error) { @app.call(env) }
end
end
end
/app/vendor/bundle/ruby/2.2.0/gems/dragonfly-1.0.7/lib/dragonfly/middleware.rb
in
call
@app = app
@dragonfly_app_name = dragonfly_app_name
end
def call(env)
response = Dragonfly.app(@dragonfly_app_name).call(env)
if response[1]['X-Cascade'] == 'pass'
@app.call(env)
else
response
end
end
end
end
/app/vendor/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb
in
process_client
Unicorn::Const::EXPECT_100_RESPONSE
end
end
# once a client is accepted, it is processed in its entirety here
# in 3 easy steps: read request, call app, write app response
def process_client(client)
status, headers, body = @app.call(env = @request.read(client))
return if @request.hijacked?
if 100 == status.to_i
client.write(expect_100_response)
env.delete(Unicorn::Const::HTTP_EXPECT)
status, headers, body = @app.call(env)
return if @request.hijacked?
/app/vendor/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb
in
worker_loop
nr = 0
worker.tick = Time.now.to_i
tmp = ready.dup
while sock = tmp.shift
# Unicorn::Worker#kgio_tryaccept is not like accept(2) at all,
# but that will return false
if client = sock.kgio_tryaccept
process_client(client)
nr += 1
worker.tick = Time.now.to_i
end
break if nr < 0
end
# make the following bet: if we accepted clients this round,
/app/vendor/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb
in
spawn_missing_workers
worker = Worker.new(worker_nr)
before_fork.call(self, worker)
if pid = fork
WORKERS[pid] = worker
worker.atfork_parent
else
after_fork_internal
worker_loop(worker)
exit
end
end
rescue => e
@logger.error(e) rescue nil
exit!
end
/app/vendor/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb
in
start
# This unfortunately has the side effect of clobbering valid PID if
# we upgrade and the upgrade breaks during preload_app==true && build_app!
self.pid = config[:pid]
build_app! if preload_app
bind_new_listeners!
spawn_missing_workers
self
end
# replaces current listener set with +listeners+. This will
# close the socket if it will not exist in the new listener set
def listeners=(listeners)
cur_names, dead_names = [], []
/app/vendor/bundle/ruby/2.2.0/gems/unicorn-4.8.3/bin/unicorn
in
<top (required)>
:unicorn_options => options,
:app => app,
:daemonize => rackup_opts[:daemonize],
})
end
Unicorn::Launcher.daemonize!(options) if rackup_opts[:daemonize]
Unicorn::HttpServer.new(app, options).start.join
/app/vendor/bundle/ruby/2.2.0/bin/unicorn
in
load
if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
version = $1
ARGV.shift
end
end
gem 'unicorn', version
load Gem.bin_path('unicorn', 'unicorn', version)
/app/vendor/bundle/ruby/2.2.0/bin/unicorn
in
<top (required)>
if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
version = $1
ARGV.shift
end
end
gem 'unicorn', version
load Gem.bin_path('unicorn', 'unicorn', version)
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb
in
load
$0 = file
Process.setproctitle(process_title(file, args)) if Process.respond_to?(:setproctitle)
ui = Bundler.ui
Bundler.ui = nil
require "bundler/setup"
signals = Signal.list.keys - RESERVED_SIGNALS
signals.each {|s| trap(s, "DEFAULT") }
Kernel.load(file)
rescue SystemExit
raise
rescue Exception => e # rubocop:disable Lint/RescueException
Bundler.ui = ui
Bundler.ui.error "bundler: failed to load command: #{cmd} (#{file})"
backtrace = e.backtrace.take_while {|bt| !bt.start_with?(__FILE__) }
abort "#{e.class}: #{e.message}\n #{backtrace.join("\n ")}"
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb
in
kernel_load
$0 = file
Process.setproctitle(process_title(file, args)) if Process.respond_to?(:setproctitle)
ui = Bundler.ui
Bundler.ui = nil
require "bundler/setup"
signals = Signal.list.keys - RESERVED_SIGNALS
signals.each {|s| trap(s, "DEFAULT") }
Kernel.load(file)
rescue SystemExit
raise
rescue Exception => e # rubocop:disable Lint/RescueException
Bundler.ui = ui
Bundler.ui.error "bundler: failed to load command: #{cmd} (#{file})"
backtrace = e.backtrace.take_while {|bt| !bt.start_with?(__FILE__) }
abort "#{e.class}: #{e.message}\n #{backtrace.join("\n ")}"
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb
in
run
end
def run
validate_cmd!
SharedHelpers.set_bundle_environment
if bin_path = Bundler.which(cmd)
if !Bundler.settings[:disable_exec_load] && ruby_shebang?(bin_path)
return kernel_load(bin_path, *args)
end
# First, try to exec directly to something in PATH
if Bundler.current_ruby.jruby_18?
kernel_exec(bin_path, *args)
else
kernel_exec([bin_path, cmd], *args)
end
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/cli.rb
in
exec
Exec runs a command, providing it access to the gems in the bundle. While using
bundle exec you can require and call the bundled gems as if they were installed
into the system wide Rubygems repository.
D
map "e" => "exec"
def exec(*args)
require "bundler/cli/exec"
Exec.new(options, args).run
end
desc "config NAME [VALUE]", "retrieve or set a configuration value"
long_desc <<-D
Retrieves or sets a configuration value. If only one parameter is provided, retrieve the value. If two parameters are provided, replace the
existing value with the newly provided one.
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/command.rb
in
run
def run(instance, args = [])
arity = nil
if private_method?(instance)
instance.class.handle_no_command_error(name)
elsif public_method?(instance)
arity = instance.method(name).arity
instance.__send__(name, *args)
elsif local_method?(instance, :method_missing)
instance.__send__(:method_missing, name.to_sym, *args)
else
instance.class.handle_no_command_error(name)
end
rescue ArgumentError => e
handle_argument_error?(instance, e, caller) ? instance.class.handle_argument_error(self, e, args, arity) : (raise e)
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/invocation.rb
in
invoke_command
# Invoke the given command if the given args.
def invoke_command(command, *args) #:nodoc:
current = @_invocations[self.class]
unless current.include?(command.name)
current << command.name
command.run(self, *args)
end
end
alias_method :invoke_task, :invoke_command
# Invoke all commands for the current instance.
def invoke_all #:nodoc:
self.class.all_commands.map { |_, command| invoke_command(command) }
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor.rb
in
dispatch
config[:current_command] = command
config[:command_options] = command.options
instance = new(args, opts, config)
yield instance if block_given?
args = instance.args
trailing = args[Range.new(arguments.size, -1)]
instance.invoke_command(command, trailing || [])
end
# The banner for this class. You can customize it if you are invoking the
# thor class by another ways which is not the Bundler::Thor::Runner. It receives
# the command that is going to be invoked and a boolean which indicates if
# the namespace should be displayed as arguments.
#
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/cli.rb
in
dispatch
raise e
ensure
warn_on_outdated_bundler
Bundler::SharedHelpers.print_major_deprecations!
end
def self.dispatch(*)
super {|i| i.send(:print_command) }
end
def initialize(*args)
super
custom_gemfile = options[:gemfile] || Bundler.settings[:gemfile]
if custom_gemfile && !custom_gemfile.empty?
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/base.rb
in
start
# can simply initialize it:
#
# script = MyScript.new(args, options, config)
# script.invoke(:command, first_arg, second_arg, third_arg)
#
def start(given_args = ARGV, config = {})
config[:shell] ||= Bundler::Thor::Base.shell.new
dispatch(nil, given_args.dup, nil, config)
rescue Bundler::Thor::Error => e
config[:debug] || ENV["THOR_DEBUG"] == "1" ? (raise e) : config[:shell].error(e.message)
exit(1) if exit_on_failure?
rescue Errno::EPIPE
# This happens if a thor command is piped to something like `head`,
# which closes the pipe when it's done reading. This will also
# mean that if the pipe is closed, further unnecessary
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/cli.rb
in
start
require "bundler/vendored_thor"
module Bundler
class CLI < Thor
AUTO_INSTALL_CMDS = %w(show binstubs outdated exec open console licenses clean).freeze
def self.start(*)
super
rescue Exception => e
Bundler.ui = UI::Shell.new
raise e
ensure
warn_on_outdated_bundler
Bundler::SharedHelpers.print_major_deprecations!
end
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/exe/bundle
in
block in <top (required)>
require "bundler/cli"
# Allow any command to use --help flag to show help for that command
help_flags = %w(--help -h)
help_flag_used = ARGV.any? {|a| help_flags.include? a }
args = help_flag_used ? Bundler::CLI.reformatted_help_args(ARGV) : ARGV
Bundler::CLI.start(args, :debug => true)
end
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/friendly_errors.rb
in
with_friendly_errors
message = message.split("-").first if exception.is_a?(Errno)
"https://github.com/bundler/bundler/search?q=" \
"#{CGI.escape(message)}&type=Issues"
end
end
def self.with_friendly_errors
yield
rescue Exception => e
FriendlyErrors.log_error(e)
exit FriendlyErrors.exit_status(e)
end
end
/app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/exe/bundle
in
<top (required)>
err << "Looks like you have a version of bundler that's older than 0.9.\n"
err << "Please remove your old versions.\n"
err << "An easy way to do this is by running `gem cleanup bundler`."
abort(err)
end
require "bundler/friendly_errors"
Bundler.with_friendly_errors do
require "bundler/cli"
# Allow any command to use --help flag to show help for that command
help_flags = %w(--help -h)
help_flag_used = ARGV.any? {|a| help_flags.include? a }
args = help_flag_used ? Bundler::CLI.reformatted_help_args(ARGV) : ARGV
/app/vendor/bundle/ruby/2.2.0/bin/bundle
in
load
str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
version = $1
ARGV.shift
end
end
load Gem.bin_path('bundler', 'bundle', version)
/app/vendor/bundle/ruby/2.2.0/bin/bundle
in
<main>
str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
version = $1
ARGV.shift
end
end
load Gem.bin_path('bundler', 'bundle', version)
No GET data.
No POST data.
Variable | Value |
---|---|
HTTP_ACCEPT | */* |
HTTP_CONNECTION | close |
HTTP_CONNECT_TIME | 0 |
HTTP_HOST | www.registerdog.com |
HTTP_TOTAL_ROUTE_TIME | 0 |
HTTP_USER_AGENT | claudebot |
HTTP_VERSION | HTTP/1.1 |
HTTP_VIA | 1.1 vegur |
HTTP_X_FORWARDED_FOR | 44.220.89.57 |
HTTP_X_FORWARDED_PORT | 443 |
HTTP_X_FORWARDED_PROTO | https |
HTTP_X_REQUEST_ID | e03bc6fe-f02f-44da-a357-4f9c98c23b68 |
HTTP_X_REQUEST_START | 1711690118671 |
PATH_INFO | /d/YKo3Ln53D2ZT/results-detail/33721 |
QUERY_STRING | |
REMOTE_ADDR | 10.1.46.91 |
REQUEST_METHOD | GET |
REQUEST_PATH | /d/YKo3Ln53D2ZT/results-detail/33721 |
REQUEST_URI | /d/YKo3Ln53D2ZT/results-detail/33721 |
SCRIPT_NAME | |
SERVER_NAME | www.registerdog.com |
SERVER_PORT | 443 |
SERVER_PROTOCOL | HTTP/1.1 |
SERVER_SOFTWARE | Unicorn 4.8.3 |
airbrake.error_id | nil |
rack.errors | #<Object:0x000000029351c8> |
rack.hijack | #<Proc:0x00000004b6f298@/app/vendor/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/http_request.rb:111> |
rack.hijack? | true |
rack.input | #<StringIO:0x0000000212caa8> |
rack.logger | #<Logger:0x00000004b6d628 @progname=nil, @level=1, @default_formatter=#<Logger::Formatter:0x00000004b6d600 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00000004b6d330 @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @mutex=#<Logger::LogDevice::LogDeviceMutex:0x00000004b6d290 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x00000004b6d1a0>>>> |
rack.multiprocess | true |
rack.multithread | false |
rack.request.cookie_hash | {} |
rack.request.query_hash | {} |
rack.request.query_string | |
rack.run_once | false |
rack.session | {"session_id"=>"7b4f3c150ebab9556bcce6f53d26590baf3afc5fb882d1ac1f4194d57b365df3", "csrf"=>"c25308a8b504877b0dfa92f5b2a440c1", "country"=>nil, "locale"=>"en"} |
rack.session.options | {:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :defer=>false, :renew=>false, :sidbits=>128, :secure_random=>SecureRandom, :secret=>"s3nhi378jdn3d0f9fsf032s4sc493e3s7d34iu5675j48dc49f84riuh56757kn0xof03lf9kk3m02lm", :coder=>#<Rack::Session::Cookie::Base64::Marshal:0x00000007037828>} |
rack.session.unpacked_cookie_data | {"session_id"=>"7b4f3c150ebab9556bcce6f53d26590baf3afc5fb882d1ac1f4194d57b365df3"} |
rack.url_scheme | https |
rack.version | [1, 2] |
sinatra.accept | [#<Sinatra::Request::AcceptEntry:0x00000001d87f10 @entry="*/*", @type="*/*", @params={}, @q=1.0>] |
sinatra.commonlogger | true |
sinatra.error | #<TypeError: no implicit conversion of nil into String> |
sinatra.route | GET /d/:dog_id/results-detail/:result_id |
You're seeing this error because you have
enabled the show_exceptions
setting.