This repository has been archived by the owner on Mar 29, 2018. It is now read-only.
forked from nbudin/devise_cas_authenticatable
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
463 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
pkg/* | ||
spec/scenario/db/*.sqlite3 | ||
spec/scenario/tmp/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
source "http://rubygems.org" | ||
|
||
gemspec | ||
|
||
gem 'rails', '3.0.0' | ||
gem "rspec", ">= 2.0.0.beta.17" | ||
gem "rspec-rails", ">= 2.0.0.beta.17" | ||
gem "mocha" | ||
gem "shoulda" | ||
gem "sqlite3-ruby" | ||
gem "sham_rack" | ||
gem "webrat" | ||
gem "ruby-debug" | ||
gem "jeweler" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
devise_cas_authenticatable (1.0.0.alpha3) | ||
devise (>= 1.0.6) | ||
rubycas-client (~> 2.1.0) | ||
|
||
GEM | ||
remote: http://rubygems.org/ | ||
specs: | ||
abstract (1.0.0) | ||
actionmailer (3.0.0) | ||
actionpack (= 3.0.0) | ||
mail (~> 2.2.5) | ||
actionpack (3.0.0) | ||
activemodel (= 3.0.0) | ||
activesupport (= 3.0.0) | ||
builder (~> 2.1.2) | ||
erubis (~> 2.6.6) | ||
i18n (~> 0.4.1) | ||
rack (~> 1.2.1) | ||
rack-mount (~> 0.6.12) | ||
rack-test (~> 0.5.4) | ||
tzinfo (~> 0.3.23) | ||
activemodel (3.0.0) | ||
activesupport (= 3.0.0) | ||
builder (~> 2.1.2) | ||
i18n (~> 0.4.1) | ||
activerecord (3.0.0) | ||
activemodel (= 3.0.0) | ||
activesupport (= 3.0.0) | ||
arel (~> 1.0.0) | ||
tzinfo (~> 0.3.23) | ||
activeresource (3.0.0) | ||
activemodel (= 3.0.0) | ||
activesupport (= 3.0.0) | ||
activesupport (3.0.0) | ||
arel (1.0.1) | ||
activesupport (~> 3.0.0) | ||
bcrypt-ruby (2.1.2) | ||
builder (2.1.2) | ||
columnize (0.3.1) | ||
devise (1.1.2) | ||
bcrypt-ruby (~> 2.1.2) | ||
warden (~> 0.10.7) | ||
diff-lcs (1.1.2) | ||
erubis (2.6.6) | ||
abstract (>= 1.0.0) | ||
gemcutter (0.6.1) | ||
git (1.2.5) | ||
i18n (0.4.1) | ||
jeweler (1.4.0) | ||
gemcutter (>= 0.1.0) | ||
git (>= 1.2.5) | ||
rubyforge (>= 2.0.0) | ||
json_pure (1.4.6) | ||
linecache (0.43) | ||
mail (2.2.6.1) | ||
activesupport (>= 2.3.6) | ||
mime-types | ||
treetop (>= 1.4.5) | ||
mime-types (1.16) | ||
mocha (0.9.8) | ||
rake | ||
nokogiri (1.4.3.1) | ||
polyglot (0.3.1) | ||
rack (1.2.1) | ||
rack-mount (0.6.13) | ||
rack (>= 1.0.0) | ||
rack-test (0.5.4) | ||
rack (>= 1.0) | ||
rails (3.0.0) | ||
actionmailer (= 3.0.0) | ||
actionpack (= 3.0.0) | ||
activerecord (= 3.0.0) | ||
activeresource (= 3.0.0) | ||
activesupport (= 3.0.0) | ||
bundler (~> 1.0.0) | ||
railties (= 3.0.0) | ||
railties (3.0.0) | ||
actionpack (= 3.0.0) | ||
activesupport (= 3.0.0) | ||
rake (>= 0.8.4) | ||
thor (~> 0.14.0) | ||
rake (0.8.7) | ||
rspec (2.0.0.beta.22) | ||
rspec-core (= 2.0.0.beta.22) | ||
rspec-expectations (= 2.0.0.beta.22) | ||
rspec-mocks (= 2.0.0.beta.22) | ||
rspec-core (2.0.0.beta.22) | ||
rspec-expectations (2.0.0.beta.22) | ||
diff-lcs (>= 1.1.2) | ||
rspec-mocks (2.0.0.beta.22) | ||
rspec-core (= 2.0.0.beta.22) | ||
rspec-expectations (= 2.0.0.beta.22) | ||
rspec-rails (2.0.0.beta.22) | ||
rspec (= 2.0.0.beta.22) | ||
ruby-debug (0.10.3) | ||
columnize (>= 0.1) | ||
ruby-debug-base (~> 0.10.3.0) | ||
ruby-debug-base (0.10.3) | ||
linecache (>= 0.3) | ||
rubycas-client (2.1.0) | ||
activesupport | ||
rubyforge (2.0.4) | ||
json_pure (>= 1.1.7) | ||
sham_rack (1.3.2) | ||
shoulda (2.11.3) | ||
sqlite3-ruby (1.3.1) | ||
thor (0.14.1) | ||
treetop (1.4.8) | ||
polyglot (>= 0.3.1) | ||
tzinfo (0.3.23) | ||
warden (0.10.7) | ||
rack (>= 1.0.0) | ||
webrat (0.7.1) | ||
nokogiri (>= 1.2.0) | ||
rack (>= 1.0) | ||
rack-test (>= 0.5.3) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
devise (>= 1.0.6) | ||
devise_cas_authenticatable! | ||
jeweler | ||
mocha | ||
rails (= 3.0.0) | ||
rspec (>= 2.0.0.beta.17) | ||
rspec-rails (>= 2.0.0.beta.17) | ||
ruby-debug | ||
rubycas-client (~> 2.1.0) | ||
sham_rack | ||
shoulda | ||
sqlite3-ruby | ||
webrat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
require 'spec_helper' | ||
|
||
describe Devise::CasSessionsController do | ||
include RSpec::Rails::ControllerExampleGroup | ||
|
||
it { should route(:get, "/users").to(:action => "service") } | ||
it { should route(:get, "/users/sign_in").to(:action => "create") } | ||
it { should route(:post, "/users/sign_in").to(:action => "create") } | ||
it { should route(:get, "/users/sign_out").to(:action => "destroy") } | ||
|
||
it "should have the right route names" do | ||
controller.should respond_to("new_user_session_path", "user_session_path", "destroy_user_session_path") | ||
controller.new_user_session_path.should == "/users/sign_in" | ||
controller.user_session_path.should == "/users/sign_in" | ||
controller.destroy_user_session_path.should == "/users/sign_out" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.bundle | ||
db/*.sqlite3 | ||
log/*.log | ||
tmp/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class ApplicationController < ActionController::Base | ||
protect_from_forgery | ||
before_filter :authenticate_user! | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class HomeController < ApplicationController | ||
def index | ||
head(:ok) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class User < ActiveRecord::Base | ||
devise :cas_authenticatable, :rememberable | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Scenario</title> | ||
<%= stylesheet_link_tag :all %> | ||
<%= javascript_include_tag :defaults %> | ||
<%= csrf_meta_tag %> | ||
</head> | ||
<body> | ||
|
||
<p class="alert"><%= alert %></p> | ||
<p class="notice"><%= notice %></p> | ||
|
||
<%= yield %> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This file is used by Rack-based servers to start the application. | ||
|
||
require ::File.expand_path('../config/environment', __FILE__) | ||
run Scenario::Application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require File.expand_path('../boot', __FILE__) | ||
|
||
require 'rails/all' | ||
|
||
Bundler.require(:default, Rails.env) if defined?(Bundler) | ||
|
||
require "devise" | ||
require "devise_cas_authenticatable" | ||
|
||
Devise.setup do |config| | ||
require "devise/orm/active_record" | ||
end | ||
|
||
module Scenario | ||
class Application < Rails::Application | ||
config.active_support.deprecation = :stderr | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require 'rubygems' | ||
|
||
# Set up gems listed in the Gemfile. | ||
gemfile = File.expand_path('../../Gemfile', __FILE__) | ||
begin | ||
ENV['BUNDLE_GEMFILE'] = gemfile | ||
require 'bundler' | ||
Bundler.setup | ||
rescue Bundler::GemNotFound => e | ||
STDERR.puts e.message | ||
STDERR.puts "Try running `bundle install`." | ||
exit! | ||
end if File.exist?(gemfile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# SQLite version 3.x | ||
# gem install sqlite3-ruby (not necessary on OS X Leopard) | ||
development: | ||
adapter: sqlite3 | ||
database: db/development.sqlite3 | ||
pool: 5 | ||
timeout: 5000 | ||
|
||
# Warning: The database defined as "test" will be erased and | ||
# re-generated from your development database when you run "rake". | ||
# Do not set this db to the same as development or production. | ||
test: | ||
adapter: sqlite3 | ||
database: db/test.sqlite3 | ||
pool: 5 | ||
timeout: 5000 | ||
|
||
production: | ||
adapter: sqlite3 | ||
database: db/production.sqlite3 | ||
pool: 5 | ||
timeout: 5000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Load the rails application | ||
require File.expand_path('../application', __FILE__) | ||
|
||
# Initialize the rails application | ||
Scenario::Application.initialize! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Scenario::Application.configure do | ||
# Settings specified here will take precedence over those in config/environment.rb | ||
|
||
# In the development environment your application's code is reloaded on | ||
# every request. This slows down response time but is perfect for development | ||
# since you don't have to restart the webserver when you make code changes. | ||
config.cache_classes = false | ||
|
||
# Log error messages when you accidentally call methods on nil. | ||
config.whiny_nils = true | ||
|
||
# Show full error reports and disable caching | ||
config.consider_all_requests_local = true | ||
config.action_view.debug_rjs = true | ||
config.action_controller.perform_caching = false | ||
|
||
# Don't care if the mailer can't send | ||
config.action_mailer.raise_delivery_errors = false | ||
|
||
# Print deprecation notices to the Rails logger | ||
config.active_support.deprecation = :log | ||
|
||
# Only use best-standards-support built into browsers | ||
config.action_dispatch.best_standards_support = :builtin | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
Scenario::Application.configure do | ||
# Settings specified here will take precedence over those in config/environment.rb | ||
|
||
# The production environment is meant for finished, "live" apps. | ||
# Code is not reloaded between requests | ||
config.cache_classes = true | ||
|
||
# Full error reports are disabled and caching is turned on | ||
config.consider_all_requests_local = false | ||
config.action_controller.perform_caching = true | ||
|
||
# Specifies the header that your server uses for sending files | ||
config.action_dispatch.x_sendfile_header = "X-Sendfile" | ||
|
||
# For nginx: | ||
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' | ||
|
||
# If you have no front-end server that supports something like X-Sendfile, | ||
# just comment this out and Rails will serve the files | ||
|
||
# See everything in the log (default is :info) | ||
# config.log_level = :debug | ||
|
||
# Use a different logger for distributed setups | ||
# config.logger = SyslogLogger.new | ||
|
||
# Use a different cache store in production | ||
# config.cache_store = :mem_cache_store | ||
|
||
# Disable Rails's static asset server | ||
# In production, Apache or nginx will already do this | ||
config.serve_static_assets = false | ||
|
||
# Enable serving of images, stylesheets, and javascripts from an asset server | ||
# config.action_controller.asset_host = "http://assets.example.com" | ||
|
||
# Disable delivery errors, bad email addresses will be ignored | ||
# config.action_mailer.raise_delivery_errors = false | ||
|
||
# Enable threaded mode | ||
# config.threadsafe! | ||
|
||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to | ||
# the I18n.default_locale when a translation can not be found) | ||
config.i18n.fallbacks = true | ||
|
||
# Send deprecation notices to registered listeners | ||
config.active_support.deprecation = :notify | ||
end |
Oops, something went wrong.