×

Set Preferred Currency

Yugioh Top Decks

Powered by Yugioh Prices


JSON::ParserError at /api/tcgplayer_kickback_info

BACKTRACE

(expand)

  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/json-2.0.3/lib/json/common.rb in parse
    1. # the default.
    2. # * *create_additions*: If set to false, the Parser doesn't create
    3. # additions even if a matching class and create_id was found. This option
    4. # defaults to false.
    5. # * *object_class*: Defaults to Hash
    6. # * *array_class*: Defaults to Array
    7. def parse(source, opts = {})
    1. Parser.new(source, opts).parse
    1. end
    2. # Parse the JSON document _source_ into a Ruby data structure and return it.
    3. # The bang version of the parse method defaults to the more dangerous values
    4. # for the _opts_ hash, so be sure only to parse trusted _source_ documents.
    5. #
    6. # _opts_ can have the following keys:
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/json-2.0.3/lib/json/common.rb in parse
    1. # the default.
    2. # * *create_additions*: If set to false, the Parser doesn't create
    3. # additions even if a matching class and create_id was found. This option
    4. # defaults to false.
    5. # * *object_class*: Defaults to Hash
    6. # * *array_class*: Defaults to Array
    7. def parse(source, opts = {})
    1. Parser.new(source, opts).parse
    1. end
    2. # Parse the JSON document _source_ into a Ruby data structure and return it.
    3. # The bang version of the parse method defaults to the more dangerous values
    4. # for the _opts_ hash, so be sure only to parse trusted _source_ documents.
    5. #
    6. # _opts_ can have the following keys:
  • /srv/api/yugioh_card_prices/lib/card_prices/adapters/tcgplayer.rb in get_kickback_info
    1. kickback_url = "https://kickbacks-api.tcgplayer.com/Kickbacks?api-version=1.0"
    2. kickback_data = CardPrices.get kickback_url
    3. CardPrices.set_memcached memcache_key, kickback_data, 3600
    4. end
    5. kickback_data = JSON.parse kickback_data
    6. ###
    1. # Verify we have product lines data, and mnake sure Yugioh is in that list
    1. ###
    2. # Make sure there's actually a sale going on
    3. game_name = "YuGiOh"
    4. return nil if not kickback_data["productLines"] or not kickback_data["productLines"].include? game_name
    5. ###
  • /srv/api/yugioh_card_prices/web/routes/api.rb in block in <class:WebApp>
    1. class WebApp < Sinatra::Base
    2. get '/api/docs' do
    3. redirect "http://docs.yugiohprices.apiary.io/"
    4. end
    5. get '/api/tcgplayer_kickback_info' do
    1. kickback_string = CardPrices::ADAPTERS['TCGPlayer'].get_kickback_info
    1. return kickback_string || ''
    2. end
    3. get '/api/card_names' do
    4. response = Cards.distinct(:name).select(:name).map {|x| x[:name] }
    5. content_type :json
    6. return response.to_json
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in call
    1. method_name = "#{verb} #{path}"
    2. unbound_method = generate_method(method_name, &block)
    3. pattern, keys = compile path
    4. conditions, @conditions = @conditions, []
    5. wrapper = block.arity != 0 ?
    6. proc { |a,p| unbound_method.bind(a).call(*p) } :
    1. proc { |a,p| unbound_method.bind(a).call }
    1. wrapper.instance_variable_set(:@route_name, method_name)
    2. [ pattern, keys, conditions, wrapper ]
    3. end
    4. def compile(path)
    5. if path.respond_to? :to_str
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in block in compile!
    1. method_name = "#{verb} #{path}"
    2. unbound_method = generate_method(method_name, &block)
    3. pattern, keys = compile path
    4. conditions, @conditions = @conditions, []
    5. wrapper = block.arity != 0 ?
    6. proc { |a,p| unbound_method.bind(a).call(*p) } :
    1. proc { |a,p| unbound_method.bind(a).call }
    1. wrapper.instance_variable_set(:@route_name, method_name)
    2. [ pattern, keys, conditions, wrapper ]
    3. end
    4. def compile(path)
    5. if path.respond_to? :to_str
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in block (3 levels) in route!
    1. # Run routes defined on the class and all superclasses.
    2. def route!(base = settings, pass_block = nil)
    3. if routes = base.routes[@request.request_method]
    4. routes.each do |pattern, keys, conditions, block|
    5. returned_pass_block = process_route(pattern, keys, conditions) do |*args|
    6. env['sinatra.route'] = block.instance_variable_get(:@route_name)
    1. route_eval { block[*args] }
    1. end
    2. # don't wipe out pass_block in superclass
    3. pass_block = returned_pass_block if returned_pass_block
    4. end
    5. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in route_eval
    1. route_eval(&pass_block) if pass_block
    2. route_missing
    3. end
    4. # Run a route block and throw :halt with the result.
    5. def route_eval
    1. throw :halt, yield
    1. end
    2. # If the current request matches pattern and conditions, fill params
    3. # with keys and call the given block.
    4. # Revert params afterwards.
    5. #
    6. # Returns pass block.
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in block (2 levels) in route!
    1. # Run routes defined on the class and all superclasses.
    2. def route!(base = settings, pass_block = nil)
    3. if routes = base.routes[@request.request_method]
    4. routes.each do |pattern, keys, conditions, block|
    5. returned_pass_block = process_route(pattern, keys, conditions) do |*args|
    6. env['sinatra.route'] = block.instance_variable_get(:@route_name)
    1. route_eval { block[*args] }
    1. end
    2. # don't wipe out pass_block in superclass
    3. pass_block = returned_pass_block if returned_pass_block
    4. end
    5. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in block in process_route
    1. if values.any?
    2. original, @params = params, params.merge('splat' => [], 'captures' => values)
    3. keys.zip(values) { |k,v| Array === @params[k] ? @params[k] << v : @params[k] = v if v }
    4. end
    5. catch(:pass) do
    6. conditions.each { |c| throw :pass if c.bind(self).call == false }
    1. block ? block[self, values] : yield(self, values)
    1. end
    2. ensure
    3. @params = original if original
    4. end
    5. # No matching route was found or all routes passed. The default
    6. # implementation is to forward the request downstream when running
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in catch
    1. values += match.captures.map! { |v| force_encoding URI_INSTANCE.unescape(v) if v }
    2. if values.any?
    3. original, @params = params, params.merge('splat' => [], 'captures' => values)
    4. keys.zip(values) { |k,v| Array === @params[k] ? @params[k] << v : @params[k] = v if v }
    5. end
    1. catch(:pass) do
    1. conditions.each { |c| throw :pass if c.bind(self).call == false }
    2. block ? block[self, values] : yield(self, values)
    3. end
    4. ensure
    5. @params = original if original
    6. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in process_route
    1. values += match.captures.map! { |v| force_encoding URI_INSTANCE.unescape(v) if v }
    2. if values.any?
    3. original, @params = params, params.merge('splat' => [], 'captures' => values)
    4. keys.zip(values) { |k,v| Array === @params[k] ? @params[k] << v : @params[k] = v if v }
    5. end
    1. catch(:pass) do
    1. conditions.each { |c| throw :pass if c.bind(self).call == false }
    2. block ? block[self, values] : yield(self, values)
    3. end
    4. ensure
    5. @params = original if original
    6. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in block in route!
    1. base.filters[type].each { |args| process_route(*args) }
    2. end
    3. # Run routes defined on the class and all superclasses.
    4. def route!(base = settings, pass_block = nil)
    5. if routes = base.routes[@request.request_method]
    6. routes.each do |pattern, keys, conditions, block|
    1. returned_pass_block = process_route(pattern, keys, conditions) do |*args|
    1. env['sinatra.route'] = block.instance_variable_get(:@route_name)
    2. route_eval { block[*args] }
    3. end
    4. # don't wipe out pass_block in superclass
    5. pass_block = returned_pass_block if returned_pass_block
    6. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in each
    1. filter! type, base.superclass if base.superclass.respond_to?(:filters)
    2. base.filters[type].each { |args| process_route(*args) }
    3. end
    4. # Run routes defined on the class and all superclasses.
    5. def route!(base = settings, pass_block = nil)
    6. if routes = base.routes[@request.request_method]
    1. routes.each do |pattern, keys, conditions, block|
    1. returned_pass_block = process_route(pattern, keys, conditions) do |*args|
    2. env['sinatra.route'] = block.instance_variable_get(:@route_name)
    3. route_eval { block[*args] }
    4. end
    5. # don't wipe out pass_block in superclass
    6. pass_block = returned_pass_block if returned_pass_block
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in route!
    1. filter! type, base.superclass if base.superclass.respond_to?(:filters)
    2. base.filters[type].each { |args| process_route(*args) }
    3. end
    4. # Run routes defined on the class and all superclasses.
    5. def route!(base = settings, pass_block = nil)
    6. if routes = base.routes[@request.request_method]
    1. routes.each do |pattern, keys, conditions, block|
    1. returned_pass_block = process_route(pattern, keys, conditions) do |*args|
    2. env['sinatra.route'] = block.instance_variable_get(:@route_name)
    3. route_eval { block[*args] }
    4. end
    5. # don't wipe out pass_block in superclass
    6. pass_block = returned_pass_block if returned_pass_block
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in block in dispatch!
    1. end
    2. # Dispatch a request with error handling.
    3. def dispatch!
    4. invoke do
    5. static! if settings.static? && (request.get? || request.head?)
    6. filter! :before
    1. route!
    1. end
    2. rescue ::Exception => boom
    3. invoke { handle_exception!(boom) }
    4. ensure
    5. begin
    6. filter! :after unless env['sinatra.static_file']
    7. rescue ::Exception => boom
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in block in invoke
    1. # Creates a Hash with indifferent access.
    2. def indifferent_hash
    3. Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
    4. end
    5. # Run the block with 'throw :halt' support and apply result to the response.
    6. def invoke
    1. res = catch(:halt) { yield }
    1. res = [res] if Integer === res or String === res
    2. if Array === res and Integer === res.first
    3. res = res.dup
    4. status(res.shift)
    5. body(res.pop)
    6. headers(*res)
    7. elsif res.respond_to? :each
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in catch
    1. # Creates a Hash with indifferent access.
    2. def indifferent_hash
    3. Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
    4. end
    5. # Run the block with 'throw :halt' support and apply result to the response.
    6. def invoke
    1. res = catch(:halt) { yield }
    1. res = [res] if Integer === res or String === res
    2. if Array === res and Integer === res.first
    3. res = res.dup
    4. status(res.shift)
    5. body(res.pop)
    6. headers(*res)
    7. elsif res.respond_to? :each
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in invoke
    1. # Creates a Hash with indifferent access.
    2. def indifferent_hash
    3. Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
    4. end
    5. # Run the block with 'throw :halt' support and apply result to the response.
    6. def invoke
    1. res = catch(:halt) { yield }
    1. res = [res] if Integer === res or String === res
    2. if Array === res and Integer === res.first
    3. res = res.dup
    4. status(res.shift)
    5. body(res.pop)
    6. headers(*res)
    7. elsif res.respond_to? :each
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in dispatch!
    1. body res
    2. end
    3. nil # avoid double setting the same response tuple twice
    4. end
    5. # Dispatch a request with error handling.
    6. def dispatch!
    1. invoke do
    1. static! if settings.static? && (request.get? || request.head?)
    2. filter! :before
    3. route!
    4. end
    5. rescue ::Exception => boom
    6. invoke { handle_exception!(boom) }
    7. ensure
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in block in call!
    1. @request = Request.new(env)
    2. @response = Response.new
    3. @params = indifferent_params(@request.params)
    4. template_cache.clear if settings.reload_templates
    5. force_encoding(@params)
    6. @response['Content-Type'] = nil
    1. invoke { dispatch! }
    1. invoke { error_block!(response.status) } unless @env['sinatra.error']
    2. unless @response['Content-Type']
    3. if Array === body and body[0].respond_to? :content_type
    4. content_type body[0].content_type
    5. else
    6. content_type :html
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in block in invoke
    1. # Creates a Hash with indifferent access.
    2. def indifferent_hash
    3. Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
    4. end
    5. # Run the block with 'throw :halt' support and apply result to the response.
    6. def invoke
    1. res = catch(:halt) { yield }
    1. res = [res] if Integer === res or String === res
    2. if Array === res and Integer === res.first
    3. res = res.dup
    4. status(res.shift)
    5. body(res.pop)
    6. headers(*res)
    7. elsif res.respond_to? :each
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in catch
    1. # Creates a Hash with indifferent access.
    2. def indifferent_hash
    3. Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
    4. end
    5. # Run the block with 'throw :halt' support and apply result to the response.
    6. def invoke
    1. res = catch(:halt) { yield }
    1. res = [res] if Integer === res or String === res
    2. if Array === res and Integer === res.first
    3. res = res.dup
    4. status(res.shift)
    5. body(res.pop)
    6. headers(*res)
    7. elsif res.respond_to? :each
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in invoke
    1. # Creates a Hash with indifferent access.
    2. def indifferent_hash
    3. Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
    4. end
    5. # Run the block with 'throw :halt' support and apply result to the response.
    6. def invoke
    1. res = catch(:halt) { yield }
    1. res = [res] if Integer === res or String === res
    2. if Array === res and Integer === res.first
    3. res = res.dup
    4. status(res.shift)
    5. body(res.pop)
    6. headers(*res)
    7. elsif res.respond_to? :each
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in call!
    1. @request = Request.new(env)
    2. @response = Response.new
    3. @params = indifferent_params(@request.params)
    4. template_cache.clear if settings.reload_templates
    5. force_encoding(@params)
    6. @response['Content-Type'] = nil
    1. invoke { dispatch! }
    1. invoke { error_block!(response.status) } unless @env['sinatra.error']
    2. unless @response['Content-Type']
    3. if Array === body and body[0].respond_to? :content_type
    4. content_type body[0].content_type
    5. else
    6. content_type :html
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in call
    1. @app = app
    2. @template_cache = Tilt::Cache.new
    3. yield self if block_given?
    4. end
    5. # Rack call interface.
    6. def call(env)
    1. dup.call!(env)
    1. end
    2. def call!(env) # :nodoc:
    3. @env = env
    4. @request = Request.new(env)
    5. @response = Response.new
    6. @params = indifferent_params(@request.params)
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb in call
    1. #
    2. # Options:
    3. # xss_mode:: How the browser should prevent the attack (default: :block)
    4. class XSSHeader < Base
    5. default_options :xss_mode => :block, :nosniff => true
    6. def call(env)
    1. status, headers, body = @app.call(env)
    1. headers['X-XSS-Protection'] ||= "1; mode=#{options[:xss_mode]}" if html? headers
    2. headers['X-Content-Type-Options'] ||= 'nosniff' if options[:nosniff]
    3. [status, headers, body]
    4. end
    5. end
    6. end
    7. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb in call
    1. end
    2. def call(env)
    3. unless accepts? env
    4. instrument env
    5. result = react env
    6. end
    1. result or app.call(env)
    1. end
    2. def react(env)
    3. result = send(options[:reaction], env)
    4. result if Array === result and result.size == 3
    5. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb in call
    1. end
    2. def call(env)
    3. unless accepts? env
    4. instrument env
    5. result = react env
    6. end
    1. result or app.call(env)
    1. end
    2. def react(env)
    3. result = send(options[:reaction], env)
    4. result if Array === result and result.size == 3
    5. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb in call
    1. # Array prototype has been patched to track data. Checks the referrer
    2. # even on GET requests if the content type is JSON.
    3. class JsonCsrf < Base
    4. alias react deny
    5. def call(env)
    6. request = Request.new(env)
    1. status, headers, body = app.call(env)
    1. if has_vector? request, headers
    2. warn env, "attack prevented by #{self.class}"
    3. react(env) or [status, headers, body]
    4. else
    5. [status, headers, body]
    6. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb in call
    1. end
    2. def call(env)
    3. unless accepts? env
    4. instrument env
    5. result = react env
    6. end
    1. result or app.call(env)
    1. end
    2. def react(env)
    3. result = send(options[:reaction], env)
    4. result if Array === result and result.size == 3
    5. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb in call
    1. end
    2. def call(env)
    3. unless accepts? env
    4. instrument env
    5. result = react env
    6. end
    1. result or app.call(env)
    1. end
    2. def react(env)
    3. result = send(options[:reaction], env)
    4. result if Array === result and result.size == 3
    5. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb in call
    1. frame_options = options[:frame_options]
    2. frame_options = options[:frame_options].to_s.upcase unless frame_options.respond_to? :to_str
    3. frame_options.to_str
    4. end
    5. end
    6. def call(env)
    1. status, headers, body = @app.call(env)
    1. headers['X-Frame-Options'] ||= frame_options if html? headers
    2. [status, headers, body]
    3. end
    4. end
    5. end
    6. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-1.6.5/lib/rack/session/abstract/id.rb in context
    1. def call(env)
    2. context(env)
    3. end
    4. def context(env, app=@app)
    5. prepare_session(env)
    1. status, headers, body = app.call(env)
    1. commit_session(env, status, headers, body)
    2. end
    3. private
    4. def initialize_sid
    5. @sidbits = @default_options[:sidbits]
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-1.6.5/lib/rack/session/abstract/id.rb in call
    1. @default_options = self.class::DEFAULT_OPTIONS.merge(options)
    2. @key = @default_options.delete(:key)
    3. @cookie_only = @default_options.delete(:cookie_only)
    4. initialize_sid
    5. end
    6. def call(env)
    1. context(env)
    1. end
    2. def context(env, app=@app)
    3. prepare_session(env)
    4. status, headers, body = app.call(env)
    5. commit_session(env, status, headers, body)
    6. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-1.6.5/lib/rack/nulllogger.rb in call
    1. class NullLogger
    2. def initialize(app)
    3. @app = app
    4. end
    5. def call(env)
    6. env['rack.logger'] = self
    1. @app.call(env)
    1. end
    2. def info(progname = nil, &block); end
    3. def debug(progname = nil, &block); end
    4. def warn(progname = nil, &block); end
    5. def error(progname = nil, &block); end
    6. def fatal(progname = nil, &block); end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-1.6.5/lib/rack/head.rb in call
    1. # Rack::Head returns an empty body for all HEAD requests. It leaves
    2. # all other requests unchanged.
    3. def initialize(app)
    4. @app = app
    5. end
    6. def call(env)
    1. status, headers, body = @app.call(env)
    1. if env[REQUEST_METHOD] == HEAD
    2. [
    3. status, headers, Rack::BodyProxy.new([]) do
    4. body.close if body.respond_to? :close
    5. end
    6. ]
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/show_exceptions.rb in call
    1. def initialize(app)
    2. @app = app
    3. @template = ERB.new(TEMPLATE)
    4. end
    5. def call(env)
    1. @app.call(env)
    1. rescue Exception => e
    2. errors, env["rack.errors"] = env["rack.errors"], @@eats_errors
    3. if prefers_plain_text?(env)
    4. content_type = "text/plain"
    5. exception = dump_exception(e)
    6. else
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in call
    1. # Some Rack handlers (Thin, Rainbows!) implement an extended body object protocol, however,
    2. # some middleware (namely Rack::Lint) will break it by not mirroring the methods in question.
    3. # This middleware will detect an extended body object and will make sure it reaches the
    4. # handler directly. We do this here, so our middleware and middleware set up by the app will
    5. # still be able to run.
    6. class ExtendedRack < Struct.new(:app)
    7. def call(env)
    1. result, callback = app.call(env), env['async.callback']
    1. return result unless callback and async?(*result)
    2. after_response { callback.call result }
    3. setup_close(env, *result)
    4. throw :async
    5. end
    6. private
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in call
    1. end
    2. def helpers
    3. @instance
    4. end
    5. def call(env)
    1. @stack.call(env)
    1. end
    2. def inspect
    3. "#<#{@instance.class} app_file=#{settings.app_file.inspect}>"
    4. end
    5. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in block in call
    1. setup_default_middleware builder
    2. setup_middleware builder
    3. builder.run app
    4. builder
    5. end
    6. def call(env)
    1. synchronize { prototype.call(env) }
    1. end
    2. # Like Kernel#caller but excluding certain magic entries and without
    3. # line / method information; the resulting array contains filenames only.
    4. def caller_files
    5. cleaned_caller(1).flatten
    6. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in synchronize
    1. end
    2. @@mutex = Mutex.new
    3. def synchronize(&block)
    4. if lock?
    5. @@mutex.synchronize(&block)
    6. else
    1. yield
    1. end
    2. end
    3. # used for deprecation warnings
    4. def warn(message)
    5. super message + "\n\tfrom #{cleaned_caller.first.join(':')}"
    6. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in call
    1. setup_default_middleware builder
    2. setup_middleware builder
    3. builder.run app
    4. builder
    5. end
    6. def call(env)
    1. synchronize { prototype.call(env) }
    1. end
    2. # Like Kernel#caller but excluding certain magic entries and without
    3. # line / method information; the resulting array contains filenames only.
    4. def caller_files
    5. cleaned_caller(1).flatten
    6. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-1.6.5/lib/rack/tempfile_reaper.rb in call
    1. class TempfileReaper
    2. def initialize(app)
    3. @app = app
    4. end
    5. def call(env)
    6. env['rack.tempfiles'] ||= []
    1. status, headers, body = @app.call(env)
    1. body_proxy = BodyProxy.new(body) do
    2. env['rack.tempfiles'].each { |f| f.close! } unless env['rack.tempfiles'].nil?
    3. end
    4. [status, headers, body_proxy]
    5. end
    6. end
    7. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-1.6.5/lib/rack/lint.rb in _call
    1. assert("No env given") { env }
    2. check_env env
    3. env['rack.input'] = InputWrapper.new(env['rack.input'])
    4. env['rack.errors'] = ErrorWrapper.new(env['rack.errors'])
    5. ## and returns an Array of exactly three values:
    1. status, headers, @body = @app.call(env)
    1. ## The *status*,
    2. check_status status
    3. ## the *headers*,
    4. check_headers headers
    5. check_hijack_response headers, env
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-1.6.5/lib/rack/lint.rb in call
    1. ## after to catch all mistakes.
    2. ## = Rack applications
    3. ## A Rack application is a Ruby object (not a class) that
    4. ## responds to +call+.
    5. def call(env=nil)
    1. dup._call(env)
    1. end
    2. def _call(env)
    3. ## It takes exactly one argument, the *environment*
    4. assert("No env given") { env }
    5. check_env env
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-1.6.5/lib/rack/showexceptions.rb in call
    1. def initialize(app)
    2. @app = app
    3. @template = ERB.new(TEMPLATE)
    4. end
    5. def call(env)
    1. @app.call(env)
    1. rescue StandardError, LoadError, SyntaxError => e
    2. exception_string = dump_exception(e)
    3. env["rack.errors"].puts(exception_string)
    4. env["rack.errors"].flush
    5. if accepts_html?(env)
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-1.6.5/lib/rack/commonlogger.rb in call
    1. def initialize(app, logger=nil)
    2. @app = app
    3. @logger = logger
    4. end
    5. def call(env)
    6. began_at = Time.now
    1. status, header, body = @app.call(env)
    1. header = Utils::HeaderHash.new(header)
    2. body = BodyProxy.new(body) { log(env, status, header, began_at) }
    3. [status, header, body]
    4. end
    5. private
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/sinatra-1.4.8/lib/sinatra/base.rb in call
    1. env['sinatra.commonlogger'] ? @app.call(env) : super
    2. end
    3. superclass.class_eval do
    4. alias call_without_check call unless method_defined? :call_without_check
    5. def call(env)
    6. env['sinatra.commonlogger'] = true
    1. call_without_check(env)
    1. end
    2. end
    3. end
    4. class NotFound < NameError #:nodoc:
    5. def http_status; 404 end
    6. end
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-1.6.5/lib/rack/chunked.rb in call
    1. false
    2. else
    3. true
    4. end
    5. end
    6. def call(env)
    1. status, headers, body = @app.call(env)
    1. headers = HeaderHash.new(headers)
    2. if ! chunkable_version?(env['HTTP_VERSION']) ||
    3. STATUS_WITH_NO_ENTITY_BODY.include?(status) ||
    4. headers[CONTENT_LENGTH] ||
    5. headers['Transfer-Encoding']
    6. [status, headers, body]
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-1.6.5/lib/rack/content_length.rb in call
    1. include Rack::Utils
    2. def initialize(app)
    3. @app = app
    4. end
    5. def call(env)
    1. status, headers, body = @app.call(env)
    1. headers = HeaderHash.new(headers)
    2. if !STATUS_WITH_NO_ENTITY_BODY.include?(status.to_i) &&
    3. !headers[CONTENT_LENGTH] &&
    4. !headers['Transfer-Encoding'] &&
    5. body.respond_to?(:to_ary)
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/unicorn-5.3.0/lib/unicorn/http_server.rb in process_client
    1. "HTTP/1.1 100 Continue\r\n\r\n".freeze)
    2. env.delete('HTTP_EXPECT'.freeze)
    3. end
    4. # once a client is accepted, it is processed in its entirety here
    5. # in 3 easy steps: read request, call app, write app response
    6. def process_client(client)
    1. status, headers, body = @app.call(env = @request.read(client))
    1. begin
    2. return if @request.hijacked?
    3. if 100 == status.to_i
    4. e100_response_write(client, env)
    5. status, headers, body = @app.call(env)
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/unicorn-5.3.0/lib/unicorn/http_server.rb in worker_loop
    1. nr = 0
    2. worker.tick = time_now.to_i
    3. tmp = ready.dup
    4. while sock = tmp.shift
    5. # Unicorn::Worker#kgio_tryaccept is not like accept(2) at all,
    6. # but that will return false
    7. if client = sock.kgio_tryaccept
    1. process_client(client)
    1. nr += 1
    2. worker.tick = time_now.to_i
    3. end
    4. break if nr < 0
    5. end
    6. # make the following bet: if we accepted clients this round,
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/unicorn-5.3.0/lib/unicorn/http_server.rb in spawn_missing_workers
    1. worker = Unicorn::Worker.new(worker_nr)
    2. before_fork.call(self, worker)
    3. pid = @worker_exec ? worker_spawn(worker) : fork
    4. unless pid
    5. after_fork_internal
    1. worker_loop(worker)
    1. exit
    2. end
    3. @workers[pid] = worker
    4. worker.atfork_parent
    5. end
    6. rescue => e
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/unicorn-5.3.0/lib/unicorn/http_server.rb in maintain_worker_count
    1. rescue => e
    2. @logger.error(e) rescue nil
    3. exit!
    4. end
    5. def maintain_worker_count
    6. (off = @workers.size - worker_processes) == 0 and return
    1. off < 0 and return spawn_missing_workers
    1. @workers.each_value { |w| w.nr >= worker_processes and w.soft_kill(:QUIT) }
    2. end
    3. # if we get any error, try to write something back to the client
    4. # assuming we haven't closed the socket, but don't get hung up
    5. # if the socket is already closed or broken. We'll always ensure
    6. # the socket is closed at the end of this function
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/unicorn-5.3.0/lib/unicorn/http_server.rb in join
    1. # machine) comes out of suspend/hibernation
    2. if (last_check + @timeout) >= (last_check = time_now)
    3. sleep_time = murder_lazy_workers
    4. else
    5. sleep_time = @timeout/2.0 + 1
    6. @logger.debug("waiting #{sleep_time}s after suspend/hibernation")
    7. end
    1. maintain_worker_count if respawn
    1. master_sleep(sleep_time)
    2. when :QUIT # graceful shutdown
    3. break
    4. when :TERM, :INT # immediate shutdown
    5. stop(false)
    6. break
    7. when :USR1 # rotate logs
  • /home/brandon/.rvm/gems/ruby-2.4.1/gems/unicorn-5.3.0/bin/unicorn in <top (required)>
    1. :unicorn_options => options,
    2. :app => app,
    3. :daemonize => rackup_opts[:daemonize],
    4. })
    5. end
    6. Unicorn::Launcher.daemonize!(options) if rackup_opts[:daemonize]
    1. Unicorn::HttpServer.new(app, options).start.join
  • /home/brandon/.rvm/gems/ruby-2.4.1/bin/unicorn in load
    1. str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
    2. if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
    3. version = $1
    4. ARGV.shift
    5. end
    6. end
    1. load Gem.activate_bin_path('unicorn', 'unicorn', version)
  • /home/brandon/.rvm/gems/ruby-2.4.1/bin/unicorn in <main>
    1. str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
    2. if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
    3. version = $1
    4. ARGV.shift
    5. end
    6. end
    1. load Gem.activate_bin_path('unicorn', 'unicorn', version)
  • /home/brandon/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks in eval
    1. begin
    2. require 'executable-hooks/hooks'
    3. Gem::ExecutableHooks.run($0)
    4. rescue LoadError
    5. warn "unable to load executable-hooks/hooks" if ENV.key?('ExecutableHooks_DEBUG')
    6. end
    1. eval File.read($0), binding, $0
  • /home/brandon/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks in <main>
    1. begin
    2. require 'executable-hooks/hooks'
    3. Gem::ExecutableHooks.run($0)
    4. rescue LoadError
    5. warn "unable to load executable-hooks/hooks" if ENV.key?('ExecutableHooks_DEBUG')
    6. end
    1. eval File.read($0), binding, $0

GET

No GET data.

POST

No POST data.

Variable Value
currency
"USD"
hide_multiples
"no"
show_vendors
"eBay,Troll and Toad,TCGPlayer,Amazon,Poke Order,Card Central,Alter Reality,Ideal808,CoreTCG"

Rack ENV

Variable Value
HTTP_ACCEPT
*/*
HTTP_CONNECTION
close
HTTP_HOST
yugiohprices.com
HTTP_USER_AGENT
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36
HTTP_VERSION
HTTP/1.0
HTTP_X_FORWARDED_FOR
209.90.109.18
HTTP_X_REAL_IP
209.90.109.18
PATH_INFO
/api/tcgplayer_kickback_info
QUERY_STRING
REMOTE_ADDR
127.0.0.1
REQUEST_METHOD
GET
REQUEST_PATH
/api/tcgplayer_kickback_info
REQUEST_URI
/api/tcgplayer_kickback_info
SCRIPT_NAME
SERVER_NAME
yugiohprices.com
SERVER_PORT
80
SERVER_PROTOCOL
HTTP/1.0
SERVER_SOFTWARE
Unicorn 5.3.0
rack.errors
#<Object:0x007ff97a9f4478>
rack.hijack
#<Proc:0x007ff97e7dbd90@/home/brandon/.rvm/gems/ruby-2.4.1/gems/rack-1.6.5/lib/rack/lint.rb:525>
rack.hijack?
true
rack.input
#<Rack::Lint::InputWrapper:0x007ff97e7b7440 @input=#<StringIO:0x007ff97abd2218>>
rack.logger
#<Rack::NullLogger:0x007ff97a4927c8 @app=#<Rack::Session::Cookie:0x007ff97a493178 @secrets=["65c076e443b70335027e32d83fea2b224871fa926224769bb0ca2c52db880ad782c5b8255bc0665af54a812ce9f17d5e74aa54022f09313a0dc9323855a0ef9b"], @coder=#<Rack::Session::Cookie::Base64::Marshal:0x007ff97a492b88>, @app=#<Rack::Protection::FrameOptions:0x007ff97a493a60 @app=#<Rack::Protection::HttpOrigin:0x007ff97a498268 @app=#<Rack::Protection::IPSpoofing:0x007ff97a498740 @app=#<Rack::Protection::JsonCsrf:0x007ff97a4990f0 @app=#<Rack::Protection::RemoteToken:0x007ff97a499cf8 @app=#<Rack::Protection::SessionHijacking:0x007ff97a49a040 @app=#<Rack::Protection::XSSHeader:0x007ff97a49a400 @app=#<CardPrices::WebApp:0x007ff97b3c6208 @default_layout=:layout, @preferred_extension=nil, @app=nil, @template_cache=#<Tilt::Cache:0x007ff97b3c61b8 @cache={}>>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :xss_mode=>:block, :nosniff=>true, :except=>[:path_traversal]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :tracking_key=>:tracking, :encrypt_tracking=>true, :track=>["HTTP_USER_AGENT", "HTTP_ACCEPT_LANGUAGE"], :except=>[:path_traversal]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :authenticity_param=>"authenticity_token", :except=>[:path_traversal]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :except=>[:path_traversal]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :except=>[:path_traversal]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :except=>[:path_traversal]}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml"], :frame_options=>:sameorigin, :except=>[:path_traversal]}, @frame_options="SAMEORIGIN">, @default_options={:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :defer=>false, :renew=>false, :sidbits=>128, :secure_random=>SecureRandom, :secret=>"65c076e443b70335027e32d83fea2b224871fa926224769bb0ca2c52db880ad782c5b8255bc0665af54a812ce9f17d5e74aa54022f09313a0dc9323855a0ef9b", :coder=>#<Rack::Session::Cookie::Base64::Marshal:0x007ff97a492b88>}, @key="rack.session", @cookie_only=true, @sidbits=128, @sid_secure=SecureRandom, @sid_length=32>>
rack.multiprocess
true
rack.multithread
false
rack.request.cookie_hash
{"currency"=>"USD", "hide_multiples"=>"no", "show_vendors"=>"eBay,Troll and Toad,TCGPlayer,Amazon,Poke Order,Card Central,Alter Reality,Ideal808,CoreTCG"}
rack.request.query_hash
{}
rack.request.query_string
rack.run_once
false
rack.session
{"session_id"=>"7f24d55baee345948949c85dec89440509f194aaa160d12d2e4e47f386c9d739", "csrf"=>"26cbe549723f51477aae6577bf5f5c50", "tracking"=>{"HTTP_USER_AGENT"=>"b812bd5bd49f7347f5deb46048c35dc987321fac", "HTTP_ACCEPT_LANGUAGE"=>"da39a3ee5e6b4b0d3255bfef95601890afd80709"}}
rack.session.options
{:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :defer=>false, :renew=>false, :sidbits=>128, :secure_random=>SecureRandom, :secret=>"65c076e443b70335027e32d83fea2b224871fa926224769bb0ca2c52db880ad782c5b8255bc0665af54a812ce9f17d5e74aa54022f09313a0dc9323855a0ef9b", :coder=>#<Rack::Session::Cookie::Base64::Marshal:0x007ff97a492b88>}
rack.session.unpacked_cookie_data
{"session_id"=>"7f24d55baee345948949c85dec89440509f194aaa160d12d2e4e47f386c9d739"}
rack.tempfiles
[]
rack.url_scheme
http
rack.version
[1, 2]
sinatra.accept
[#<Sinatra::Request::AcceptEntry:0x007ff97f69f8b8 @entry="*/*", @type="*/*", @params={}, @q=1.0>]
sinatra.commonlogger
true
sinatra.error
#<JSON::ParserError: 743: unexpected token at ''>
sinatra.route
GET /api/tcgplayer_kickback_info
unicorn.socket
#<Kgio::Socket:fd 7>

You're seeing this error because you have enabled the show_exceptions setting.


Deck Value

Loading Data

Deck Price Breakdown

Loading Data...