Sha256: 88feb4590bc326d1fcbf50820165679e8b427407f6c95e043ea1abaf2c5ae1e5
Contents?: true
Size: 820 Bytes
Versions: 3
Compression:
Stored size: 820 Bytes
Contents
# This is an absolute minimal Rails application require 'rails' require 'action_controller/railtie' class Dummy < Rails::Application config.session_store :cookie_store, :key => 'jiez4Mielu1AiHugog3shiiPhe3lai3faerooJohGo0rah5Mod' config.secret_token = 'ni6aeph6aeriBiphesh8omahv6cohpue5Quah5ceiMohtuvei8' config.logger = Logger.new(File.expand_path('../test.log', __FILE__)) Rails.logger = config.logger config.middleware.use SimpleAdminAuth::Builder do provider :developer, name: 'admin' end routes.draw do get '/' => 'dummy#index' constraints SimpleAdminAuth::Authenticate do get '/protected/test' => 'dummy#protected' end end end class DummyController < ActionController::Base def index render text: 'Home' end def protected render text: 'Admin' end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
simple_admin_auth-0.1.2 | spec/dummy/application.rb |
simple_admin_auth-0.1.1 | spec/dummy/application.rb |
simple_admin_auth-0.1.0 | spec/dummy/application.rb |