lib/hanami.rb in hanami-2.0.0.alpha4 vs lib/hanami.rb in hanami-2.0.0.alpha5

- old
+ new

@@ -29,26 +29,14 @@ @_application = klass unless klass.name.nil? end end - def self.app - @_mutex.synchronize do - raise "Hanami.app not configured" unless defined?(@_app) - - @_app - end + def self.rack_app + application.rack_app end - def self.app=(app) - @_mutex.synchronize do - raise "Hanami.app already configured" if defined?(@_app) - - @_app = app - end - end - def self.env (ENV["HANAMI_ENV"] || "development").to_sym end def self.env?(*names) @@ -61,17 +49,11 @@ def self.init application.init end - def self.boot(web: true) - if defined?(@_app) - @_app - else - application.boot - - @_app = application.new if web - end + def self.boot + application.boot end def self.shutdown application.shutdown end