class Sinatra::Default

Sinatra::Base instead and set options as needed.
Deprecated as base class for non-top-level apps. Subclass

def self.const_missing(const_name) #:nodoc:

:nodoc:
def self.const_missing(const_name) #:nodoc:
  if const_name == :FORWARD_METHODS
    sinatra_warn 'Sinatra::Application::FORWARD_METHODS is deprecated;',
      'use Sinatra::Delegator::METHODS instead.'
    const_set :FORWARD_METHODS, Sinatra::Delegator::METHODS
    Sinatra::Delegator::METHODS
  else
    super
  end
end

def self.inherited(subclass)

def self.inherited(subclass)
  sinatra_warn 'Sinatra::Default is deprecated; ' \
               'subclass Sinatra::Base instead'
  super
end

def configures(*args, &block)

Deprecated. Use: configure
def configures(*args, &block)
  sinatra_warn "The 'configures' method is deprecated; use 'configure' instead."
  configure(*args, &block)
end

def default_options

Deprecated. Use: set
def default_options
  sinatra_warn "Sinatra::Application.default_options is deprecated; use 'set' instead."
  fake = lambda { |options| set(options) }
  def fake.merge!(options) ; call(options) ; end
  fake
end

def entity_tag(*args, &block)

Deprecated. Use: etag
def entity_tag(*args, &block)
  sinatra_warn "The 'entity_tag' method is deprecated; use 'etag' instead."
  etag(*args, &block)
end

def env

Deprecated. Use: options.environment
def env
  sinatra_warn "The :env option is deprecated; use :environment instead."
  environment
end

def env=(value)

Deprecated. Use: set :environment, ENV
def env=(value)
  sinatra_warn "The :env option is deprecated; use :environment instead."
  set :environment, value
end

def header(header=nil)

Deprecated. Use: response['Header-Name']
def header(header=nil)
  sinatra_warn "The 'header' method is deprecated; use 'headers' instead."
  headers(header)
end

def invoke(&block) #:nodoc:

:nodoc:
values.
deprecated. Override the invoke method to detect those types of return
Throwing halt with a Symbol and the to_result convention are
def invoke(&block) #:nodoc:
  res = super
  case
  when res.kind_of?(Symbol)
    sinatra_warn "Invoking the :#{res} helper by returning a Symbol is deprecated;",
      "call the helper directly instead."
    @response.body = __send__(res)
  when res.respond_to?(:to_result)
    sinatra_warn "The to_result convention is deprecated."
    @response.body = res.to_result(self)
  end
  res
end

def method_missing(name, *args, &b) #:nodoc:

:nodoc:
Deprecated. Missing messages are no longer delegated to @response.
def method_missing(name, *args, &b) #:nodoc:
  if @response.respond_to?(name)
    sinatra_warn "The '#{name}' method is deprecated; use 'response.#{name}' instead."
    @response.send(name, *args, &b)
  else
    super
  end
end

def options #:nodoc:

:nodoc:
def options #:nodoc:
  Options.new(self.class)
end

def options

Deprecated. Options are stored directly on the class object.
def options
  sinatra_warn "The 'options' class method is deprecated; use 'self' instead."
  Options.new(self)
end

def render(engine, template, options={}, locals={}, &bk)

The :views_directory, :options, :haml, and :sass options are deprecated.
def render(engine, template, options={}, locals={}, &bk)
  if options.key?(:views_directory)
    sinatra_warn "The :views_directory option is deprecated; use :views instead."
    options[:views] = options.delete(:views_directory)
  end
  [:options, engine.to_sym].each do |key|
    if options.key?(key)
      sinatra_warn "Passing :#{key} => {} to #{engine} is deprecated; " +
                   "merge options directly into hash instead."
      options.merge! options.delete(key)
    end
  end
  super(engine, template, options, locals, &bk)
end

def send_data(data, options={})

Array.
Deprecated. Use the #attachment helper and return the data as a String or
def send_data(data, options={})
  sinatra_warn "The 'send_data' method is deprecated. use attachment, status, content_type, etc. helpers instead."
  status       options[:status]   if options[:status]
  attachment   options[:filename] if options[:disposition] == 'attachment'
  content_type options[:type]     if options[:type]
  halt data
end

def set_option(*args, &block)

Deprecated. Use: set
def set_option(*args, &block)
  sinatra_warn "The 'set_option' method is deprecated; use 'set' instead."
  set(*args, &block)
end

def set_options(*args, &block)

def set_options(*args, &block)
  sinatra_warn "The 'set_options' method is deprecated; use 'set' instead."
  set(*args, &block)
end

def stop(*args, &block)

Deprecated. Use: halt
def stop(*args, &block)
  sinatra_warn "The 'stop' method is deprecated; use 'halt' instead."
  halt(*args, &block)
end