Skip to content

Commit

Permalink
Support Default forever
Browse files Browse the repository at this point in the history
  • Loading branch information
sr committed Dec 13, 2009
1 parent 7a2ee02 commit 9208150
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions lib/sinatra/base.rb
Expand Up @@ -1056,8 +1056,9 @@ def caller_locations
end
end

# Base class for classic style (top-level) applications.
class Default < Base
# The top-level Application. All DSL methods executed on main are delegated
# to this class.
class Application < Base
set :raise_errors, Proc.new { test? }
set :show_exceptions, Proc.new { development? }
set :dump_errors, true
Expand All @@ -1072,17 +1073,9 @@ def self.register(*extensions, &block) #:nodoc:
Delegator.delegate(*added_methods)
super(*extensions, &block)
end

def self.new(app=nil)
warn "Sinatra::Default is deprecated. Use Sinatra::Application/Base"
super
end
end

# The top-level Application. All DSL methods executed on main are delegated
# to this class.
class Application < Default
end
Default = Application

# Sinatra delegation mixin. Mixing this module into an object causes all
# methods to be delegated to the Sinatra::Application class. Used primarily
Expand Down

0 comments on commit 9208150

Please sign in to comment.