lib/simple_auth.rb in simple_auth-2.0.4 vs lib/simple_auth.rb in simple_auth-3.0.0

- old
+ new

@@ -1,11 +1,26 @@ -require "rails/railtie" -require "active_support/all" +module SimpleAuth + require "rails/railtie" + require "active_support/concern" -require "simple_auth/railtie" -require "simple_auth/config" -require "simple_auth/exceptions" -require "simple_auth/action_controller" -require "simple_auth/active_record" -require "simple_auth/session" -require "simple_auth/helper" -require "simple_auth/version" + require "simple_auth/version" + require "simple_auth/config" + require "simple_auth/railtie" + require "simple_auth/action_controller" + require "simple_auth/action_controller/require_login_action" + require "simple_auth/session" + require "simple_auth/generator" + + def self.setup + yield config + end + + def self.config + @config ||= Config.new + end + + setup do |config| + config.scopes = %i[user] + config.login_url = -> { login_path } + config.logged_url = -> { dashboard_path } + end +end