test/rails/config/environment.rb in rack-oauth2-server-1.0.0 vs test/rails/config/environment.rb in rack-oauth2-server-1.1.0

- old
+ new

@@ -1,12 +1,12 @@ -require "rack/oauth2/rails" - Rails::Initializer.run do |config| config.frameworks = [ :action_controller ] config.action_controller.session = { :key=>"_myapp_session", :secret=>"Stay hungry. Stay foolish. -- Steve Jobs" } - config.oauth[:scopes] = %w{read write} - config.oauth[:authenticator] = lambda do |username, password| - "Superman" if username == "cowbell" && password == "more" + config.after_initialize do + config.oauth.database = DATABASE + config.oauth.scopes = %w{read write} + config.oauth.authenticator = lambda do |username, password| + "Superman" if username == "cowbell" && password == "more" + end end - config.oauth[:database] = DATABASE end