Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Support Default forever

  • Loading branch information...
commit 92081500ee272b846b1bb9c6dc2723c626e7c911 1 parent 7a2ee02
@sr sr authored
Showing with 4 additions and 11 deletions.
  1. +4 −11 lib/sinatra/base.rb
View
15 lib/sinatra/base.rb
@@ -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
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.