devise_cas_authenticatable 1.0.0.alpha3 → 1.0.0.alpha4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. data/.gitignore +3 -0
  2. data/Gemfile +14 -0
  3. data/Gemfile.lock +137 -0
  4. data/README.md +2 -0
  5. data/Rakefile +5 -10
  6. data/VERSION +1 -1
  7. data/app/controllers/devise/cas_sessions_controller.rb +2 -0
  8. data/devise_cas_authenticatable.gemspec +52 -4
  9. data/lib/devise_cas_authenticatable/routes.rb +5 -5
  10. data/spec/routes_spec.rb +17 -0
  11. data/spec/scenario/.gitignore +4 -0
  12. data/spec/scenario/app/controllers/application_controller.rb +4 -0
  13. data/spec/scenario/app/controllers/home_controller.rb +5 -0
  14. data/spec/scenario/app/models/user.rb +3 -0
  15. data/spec/scenario/app/views/layouts/application.html.erb +17 -0
  16. data/spec/scenario/config/application.rb +18 -0
  17. data/spec/scenario/config/boot.rb +13 -0
  18. data/spec/scenario/config/database.yml +22 -0
  19. data/spec/scenario/config/environment.rb +5 -0
  20. data/spec/scenario/config/environments/development.rb +26 -0
  21. data/spec/scenario/config/environments/production.rb +49 -0
  22. data/spec/scenario/config/environments/test.rb +35 -0
  23. data/spec/scenario/config/initializers/backtrace_silencers.rb +7 -0
  24. data/spec/scenario/config/initializers/inflections.rb +10 -0
  25. data/spec/scenario/config/initializers/mime_types.rb +5 -0
  26. data/spec/scenario/config/initializers/secret_token.rb +7 -0
  27. data/spec/scenario/config/initializers/session_store.rb +8 -0
  28. data/spec/scenario/config/locales/en.yml +5 -0
  29. data/spec/scenario/config/routes.rb +4 -0
  30. data/spec/scenario/config.ru +4 -0
  31. data/spec/scenario/db/migrate/20100401102949_create_tables.rb +14 -0
  32. data/spec/spec_helper.rb +19 -0
  33. data/spec/support/migrations.rb +4 -0
  34. metadata +51 -6
data/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ pkg/*
2
+ spec/scenario/db/*.sqlite3
3
+ spec/scenario/tmp/*
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ gem 'rails', '3.0.0'
6
+ gem "rspec", ">= 2.0.0.beta.17"
7
+ gem "rspec-rails", ">= 2.0.0.beta.17"
8
+ gem "mocha"
9
+ gem "shoulda"
10
+ gem "sqlite3-ruby"
11
+ gem "sham_rack"
12
+ gem "webrat"
13
+ gem "ruby-debug"
14
+ gem "jeweler"
data/Gemfile.lock ADDED
@@ -0,0 +1,137 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ devise_cas_authenticatable (1.0.0.alpha3)
5
+ devise (>= 1.0.6)
6
+ rubycas-client (~> 2.1.0)
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ abstract (1.0.0)
12
+ actionmailer (3.0.0)
13
+ actionpack (= 3.0.0)
14
+ mail (~> 2.2.5)
15
+ actionpack (3.0.0)
16
+ activemodel (= 3.0.0)
17
+ activesupport (= 3.0.0)
18
+ builder (~> 2.1.2)
19
+ erubis (~> 2.6.6)
20
+ i18n (~> 0.4.1)
21
+ rack (~> 1.2.1)
22
+ rack-mount (~> 0.6.12)
23
+ rack-test (~> 0.5.4)
24
+ tzinfo (~> 0.3.23)
25
+ activemodel (3.0.0)
26
+ activesupport (= 3.0.0)
27
+ builder (~> 2.1.2)
28
+ i18n (~> 0.4.1)
29
+ activerecord (3.0.0)
30
+ activemodel (= 3.0.0)
31
+ activesupport (= 3.0.0)
32
+ arel (~> 1.0.0)
33
+ tzinfo (~> 0.3.23)
34
+ activeresource (3.0.0)
35
+ activemodel (= 3.0.0)
36
+ activesupport (= 3.0.0)
37
+ activesupport (3.0.0)
38
+ arel (1.0.1)
39
+ activesupport (~> 3.0.0)
40
+ bcrypt-ruby (2.1.2)
41
+ builder (2.1.2)
42
+ columnize (0.3.1)
43
+ devise (1.1.2)
44
+ bcrypt-ruby (~> 2.1.2)
45
+ warden (~> 0.10.7)
46
+ diff-lcs (1.1.2)
47
+ erubis (2.6.6)
48
+ abstract (>= 1.0.0)
49
+ gemcutter (0.6.1)
50
+ git (1.2.5)
51
+ i18n (0.4.1)
52
+ jeweler (1.4.0)
53
+ gemcutter (>= 0.1.0)
54
+ git (>= 1.2.5)
55
+ rubyforge (>= 2.0.0)
56
+ json_pure (1.4.6)
57
+ linecache (0.43)
58
+ mail (2.2.6.1)
59
+ activesupport (>= 2.3.6)
60
+ mime-types
61
+ treetop (>= 1.4.5)
62
+ mime-types (1.16)
63
+ mocha (0.9.8)
64
+ rake
65
+ nokogiri (1.4.3.1)
66
+ polyglot (0.3.1)
67
+ rack (1.2.1)
68
+ rack-mount (0.6.13)
69
+ rack (>= 1.0.0)
70
+ rack-test (0.5.4)
71
+ rack (>= 1.0)
72
+ rails (3.0.0)
73
+ actionmailer (= 3.0.0)
74
+ actionpack (= 3.0.0)
75
+ activerecord (= 3.0.0)
76
+ activeresource (= 3.0.0)
77
+ activesupport (= 3.0.0)
78
+ bundler (~> 1.0.0)
79
+ railties (= 3.0.0)
80
+ railties (3.0.0)
81
+ actionpack (= 3.0.0)
82
+ activesupport (= 3.0.0)
83
+ rake (>= 0.8.4)
84
+ thor (~> 0.14.0)
85
+ rake (0.8.7)
86
+ rspec (2.0.0.beta.22)
87
+ rspec-core (= 2.0.0.beta.22)
88
+ rspec-expectations (= 2.0.0.beta.22)
89
+ rspec-mocks (= 2.0.0.beta.22)
90
+ rspec-core (2.0.0.beta.22)
91
+ rspec-expectations (2.0.0.beta.22)
92
+ diff-lcs (>= 1.1.2)
93
+ rspec-mocks (2.0.0.beta.22)
94
+ rspec-core (= 2.0.0.beta.22)
95
+ rspec-expectations (= 2.0.0.beta.22)
96
+ rspec-rails (2.0.0.beta.22)
97
+ rspec (= 2.0.0.beta.22)
98
+ ruby-debug (0.10.3)
99
+ columnize (>= 0.1)
100
+ ruby-debug-base (~> 0.10.3.0)
101
+ ruby-debug-base (0.10.3)
102
+ linecache (>= 0.3)
103
+ rubycas-client (2.1.0)
104
+ activesupport
105
+ rubyforge (2.0.4)
106
+ json_pure (>= 1.1.7)
107
+ sham_rack (1.3.2)
108
+ shoulda (2.11.3)
109
+ sqlite3-ruby (1.3.1)
110
+ thor (0.14.1)
111
+ treetop (1.4.8)
112
+ polyglot (>= 0.3.1)
113
+ tzinfo (0.3.23)
114
+ warden (0.10.7)
115
+ rack (>= 1.0.0)
116
+ webrat (0.7.1)
117
+ nokogiri (>= 1.2.0)
118
+ rack (>= 1.0)
119
+ rack-test (>= 0.5.3)
120
+
121
+ PLATFORMS
122
+ ruby
123
+
124
+ DEPENDENCIES
125
+ devise (>= 1.0.6)
126
+ devise_cas_authenticatable!
127
+ jeweler
128
+ mocha
129
+ rails (= 3.0.0)
130
+ rspec (>= 2.0.0.beta.17)
131
+ rspec-rails (>= 2.0.0.beta.17)
132
+ ruby-debug
133
+ rubycas-client (~> 2.1.0)
134
+ sham_rack
135
+ shoulda
136
+ sqlite3-ruby
137
+ webrat
data/README.md CHANGED
@@ -24,10 +24,12 @@ Installation
24
24
 
25
25
  and in your config/environment.rb (on Rails 2.3):
26
26
 
27
+ config.gem 'devise', :version => '~> 1.0.6'
27
28
  config.gem 'devise_cas_authenticatable'
28
29
 
29
30
  or Gemfile (Rails 3.0):
30
31
 
32
+ gem 'devise', '~> 1.1.1'
31
33
  gem 'devise_cas_authenticatable'
32
34
 
33
35
  Example
data/Rakefile CHANGED
@@ -1,17 +1,12 @@
1
1
  require 'rake'
2
- require 'rake/testtask'
3
2
  require 'rake/rdoctask'
3
+ require 'rspec/mocks/version'
4
+ require 'rspec/core/rake_task'
4
5
 
5
- desc 'Default: run unit tests.'
6
- task :default => :test
6
+ RSpec::Core::RakeTask.new(:spec)
7
7
 
8
- desc 'Test the devise_cas_authenticatable plugin.'
9
- Rake::TestTask.new(:test) do |t|
10
- t.libs << 'lib'
11
- t.libs << 'test'
12
- t.pattern = 'test/**/*_test.rb'
13
- t.verbose = true
14
- end
8
+ desc 'Default: run specs.'
9
+ task :default => :spec
15
10
 
16
11
  desc 'Generate documentation for the devise_cas_authenticatable plugin.'
17
12
  Rake::RDocTask.new(:rdoc) do |rdoc|
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0.alpha3
1
+ 1.0.0.alpha4
@@ -1,4 +1,6 @@
1
1
  class Devise::CasSessionsController < Devise::SessionsController
2
+ unloadable
3
+
2
4
  def service
3
5
  if signed_in?(resource_name)
4
6
  redirect_to after_sign_in_path_for(resource_name)
@@ -5,18 +5,21 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{devise_cas_authenticatable}
8
- s.version = "1.0.0.alpha3"
8
+ s.version = "1.0.0.alpha4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nat Budin"]
12
- s.date = %q{2010-08-27}
12
+ s.date = %q{2010-09-23}
13
13
  s.description = %q{CAS authentication module for Devise}
14
14
  s.email = %q{natbudin@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "README.md"
17
17
  ]
18
18
  s.files = [
19
- ".project",
19
+ ".gitignore",
20
+ ".project",
21
+ "Gemfile",
22
+ "Gemfile.lock",
20
23
  "README.md",
21
24
  "Rakefile",
22
25
  "VERSION",
@@ -28,13 +31,58 @@ Gem::Specification.new do |s|
28
31
  "lib/devise_cas_authenticatable/routes.rb",
29
32
  "lib/devise_cas_authenticatable/schema.rb",
30
33
  "lib/devise_cas_authenticatable/strategy.rb",
31
- "rails/init.rb"
34
+ "rails/init.rb",
35
+ "spec/routes_spec.rb",
36
+ "spec/scenario/.gitignore",
37
+ "spec/scenario/app/controllers/application_controller.rb",
38
+ "spec/scenario/app/controllers/home_controller.rb",
39
+ "spec/scenario/app/models/user.rb",
40
+ "spec/scenario/app/views/layouts/application.html.erb",
41
+ "spec/scenario/config.ru",
42
+ "spec/scenario/config/application.rb",
43
+ "spec/scenario/config/boot.rb",
44
+ "spec/scenario/config/database.yml",
45
+ "spec/scenario/config/environment.rb",
46
+ "spec/scenario/config/environments/development.rb",
47
+ "spec/scenario/config/environments/production.rb",
48
+ "spec/scenario/config/environments/test.rb",
49
+ "spec/scenario/config/initializers/backtrace_silencers.rb",
50
+ "spec/scenario/config/initializers/inflections.rb",
51
+ "spec/scenario/config/initializers/mime_types.rb",
52
+ "spec/scenario/config/initializers/secret_token.rb",
53
+ "spec/scenario/config/initializers/session_store.rb",
54
+ "spec/scenario/config/locales/en.yml",
55
+ "spec/scenario/config/routes.rb",
56
+ "spec/scenario/db/migrate/20100401102949_create_tables.rb",
57
+ "spec/spec_helper.rb",
58
+ "spec/support/migrations.rb"
32
59
  ]
33
60
  s.homepage = %q{http://github.com/nbudin/devise_cas_authenticatable}
34
61
  s.rdoc_options = ["--charset=UTF-8"]
35
62
  s.require_paths = ["lib"]
36
63
  s.rubygems_version = %q{1.3.7}
37
64
  s.summary = %q{CAS authentication module for Devise}
65
+ s.test_files = [
66
+ "spec/routes_spec.rb",
67
+ "spec/scenario/app/controllers/application_controller.rb",
68
+ "spec/scenario/app/controllers/home_controller.rb",
69
+ "spec/scenario/app/models/user.rb",
70
+ "spec/scenario/config/application.rb",
71
+ "spec/scenario/config/boot.rb",
72
+ "spec/scenario/config/environment.rb",
73
+ "spec/scenario/config/environments/development.rb",
74
+ "spec/scenario/config/environments/production.rb",
75
+ "spec/scenario/config/environments/test.rb",
76
+ "spec/scenario/config/initializers/backtrace_silencers.rb",
77
+ "spec/scenario/config/initializers/inflections.rb",
78
+ "spec/scenario/config/initializers/mime_types.rb",
79
+ "spec/scenario/config/initializers/secret_token.rb",
80
+ "spec/scenario/config/initializers/session_store.rb",
81
+ "spec/scenario/config/routes.rb",
82
+ "spec/scenario/db/migrate/20100401102949_create_tables.rb",
83
+ "spec/spec_helper.rb",
84
+ "spec/support/migrations.rb"
85
+ ]
38
86
 
39
87
  if s.respond_to? :specification_version then
40
88
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
@@ -5,14 +5,14 @@ if ActionController::Routing.name =~ /ActionDispatch/
5
5
  protected
6
6
 
7
7
  def devise_cas_authenticatable(mapping, controllers)
8
- scope :controller => controllers[:cas_sessions], :as => :session do
8
+ resource :session, :only => [], :controller => controllers[:cas_sessions], :path => "" do
9
9
  # service endpoint for CAS server
10
10
  get "/", :to => "#{controllers[:cas_sessions]}#service"
11
11
 
12
- get :new, :path => mapping.path_names[:sign_in], :to => "#{controllers[:cas_sessions]}#create"
13
- get :create, :path => mapping.path_names[:sign_in], :as => ""
14
- get :destroy, :path => mapping.path_names[:sign_out]
15
- end
12
+ get :new, :path => mapping.path_names[:sign_in], :to => "#{controllers[:cas_sessions]}#create", :as => "new"
13
+ post :create, :path => mapping.path_names[:sign_in]
14
+ match :destroy, :path => mapping.path_names[:sign_out], :as => "destroy"
15
+ end
16
16
  end
17
17
  end
18
18
  else
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ describe Devise::CasSessionsController do
4
+ include RSpec::Rails::ControllerExampleGroup
5
+
6
+ it { should route(:get, "/users").to(:action => "service") }
7
+ it { should route(:get, "/users/sign_in").to(:action => "create") }
8
+ it { should route(:post, "/users/sign_in").to(:action => "create") }
9
+ it { should route(:get, "/users/sign_out").to(:action => "destroy") }
10
+
11
+ it "should have the right route names" do
12
+ controller.should respond_to("new_user_session_path", "user_session_path", "destroy_user_session_path")
13
+ controller.new_user_session_path.should == "/users/sign_in"
14
+ controller.user_session_path.should == "/users/sign_in"
15
+ controller.destroy_user_session_path.should == "/users/sign_out"
16
+ end
17
+ end
@@ -0,0 +1,4 @@
1
+ .bundle
2
+ db/*.sqlite3
3
+ log/*.log
4
+ tmp/**/*
@@ -0,0 +1,4 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+ before_filter :authenticate_user!
4
+ end
@@ -0,0 +1,5 @@
1
+ class HomeController < ApplicationController
2
+ def index
3
+ head(:ok)
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ class User < ActiveRecord::Base
2
+ devise :cas_authenticatable, :rememberable
3
+ end
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Scenario</title>
5
+ <%= stylesheet_link_tag :all %>
6
+ <%= javascript_include_tag :defaults %>
7
+ <%= csrf_meta_tag %>
8
+ </head>
9
+ <body>
10
+
11
+ <p class="alert"><%= alert %></p>
12
+ <p class="notice"><%= notice %></p>
13
+
14
+ <%= yield %>
15
+
16
+ </body>
17
+ </html>
@@ -0,0 +1,18 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require(:default, Rails.env) if defined?(Bundler)
6
+
7
+ require "devise"
8
+ require "devise_cas_authenticatable"
9
+
10
+ Devise.setup do |config|
11
+ require "devise/orm/active_record"
12
+ end
13
+
14
+ module Scenario
15
+ class Application < Rails::Application
16
+ config.active_support.deprecation = :stderr
17
+ end
18
+ end
@@ -0,0 +1,13 @@
1
+ require 'rubygems'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ gemfile = File.expand_path('../../Gemfile', __FILE__)
5
+ begin
6
+ ENV['BUNDLE_GEMFILE'] = gemfile
7
+ require 'bundler'
8
+ Bundler.setup
9
+ rescue Bundler::GemNotFound => e
10
+ STDERR.puts e.message
11
+ STDERR.puts "Try running `bundle install`."
12
+ exit!
13
+ end if File.exist?(gemfile)
@@ -0,0 +1,22 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3-ruby (not necessary on OS X Leopard)
3
+ development:
4
+ adapter: sqlite3
5
+ database: db/development.sqlite3
6
+ pool: 5
7
+ timeout: 5000
8
+
9
+ # Warning: The database defined as "test" will be erased and
10
+ # re-generated from your development database when you run "rake".
11
+ # Do not set this db to the same as development or production.
12
+ test:
13
+ adapter: sqlite3
14
+ database: db/test.sqlite3
15
+ pool: 5
16
+ timeout: 5000
17
+
18
+ production:
19
+ adapter: sqlite3
20
+ database: db/production.sqlite3
21
+ pool: 5
22
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Scenario::Application.initialize!
@@ -0,0 +1,26 @@
1
+ Scenario::Application.configure do
2
+ # Settings specified here will take precedence over those in config/environment.rb
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the webserver when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Log error messages when you accidentally call methods on nil.
10
+ config.whiny_nils = true
11
+
12
+ # Show full error reports and disable caching
13
+ config.consider_all_requests_local = true
14
+ config.action_view.debug_rjs = true
15
+ config.action_controller.perform_caching = false
16
+
17
+ # Don't care if the mailer can't send
18
+ config.action_mailer.raise_delivery_errors = false
19
+
20
+ # Print deprecation notices to the Rails logger
21
+ config.active_support.deprecation = :log
22
+
23
+ # Only use best-standards-support built into browsers
24
+ config.action_dispatch.best_standards_support = :builtin
25
+ end
26
+
@@ -0,0 +1,49 @@
1
+ Scenario::Application.configure do
2
+ # Settings specified here will take precedence over those in config/environment.rb
3
+
4
+ # The production environment is meant for finished, "live" apps.
5
+ # Code is not reloaded between requests
6
+ config.cache_classes = true
7
+
8
+ # Full error reports are disabled and caching is turned on
9
+ config.consider_all_requests_local = false
10
+ config.action_controller.perform_caching = true
11
+
12
+ # Specifies the header that your server uses for sending files
13
+ config.action_dispatch.x_sendfile_header = "X-Sendfile"
14
+
15
+ # For nginx:
16
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
17
+
18
+ # If you have no front-end server that supports something like X-Sendfile,
19
+ # just comment this out and Rails will serve the files
20
+
21
+ # See everything in the log (default is :info)
22
+ # config.log_level = :debug
23
+
24
+ # Use a different logger for distributed setups
25
+ # config.logger = SyslogLogger.new
26
+
27
+ # Use a different cache store in production
28
+ # config.cache_store = :mem_cache_store
29
+
30
+ # Disable Rails's static asset server
31
+ # In production, Apache or nginx will already do this
32
+ config.serve_static_assets = false
33
+
34
+ # Enable serving of images, stylesheets, and javascripts from an asset server
35
+ # config.action_controller.asset_host = "http://assets.example.com"
36
+
37
+ # Disable delivery errors, bad email addresses will be ignored
38
+ # config.action_mailer.raise_delivery_errors = false
39
+
40
+ # Enable threaded mode
41
+ # config.threadsafe!
42
+
43
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
44
+ # the I18n.default_locale when a translation can not be found)
45
+ config.i18n.fallbacks = true
46
+
47
+ # Send deprecation notices to registered listeners
48
+ config.active_support.deprecation = :notify
49
+ end
@@ -0,0 +1,35 @@
1
+ Scenario::Application.configure do
2
+ # Settings specified here will take precedence over those in config/environment.rb
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Log error messages when you accidentally call methods on nil.
11
+ config.whiny_nils = true
12
+
13
+ # Show full error reports and disable caching
14
+ config.consider_all_requests_local = true
15
+ config.action_controller.perform_caching = false
16
+
17
+ # Raise exceptions instead of rendering exception templates
18
+ config.action_dispatch.show_exceptions = false
19
+
20
+ # Disable request forgery protection in test environment
21
+ config.action_controller.allow_forgery_protection = false
22
+
23
+ # Tell Action Mailer not to deliver emails to the real world.
24
+ # The :test delivery method accumulates sent emails in the
25
+ # ActionMailer::Base.deliveries array.
26
+ config.action_mailer.delivery_method = :test
27
+
28
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
29
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
30
+ # like if you have constraints or database-specific column types
31
+ # config.active_record.schema_format = :sql
32
+
33
+ # Print deprecation notices to the stderr
34
+ config.active_support.deprecation = :stderr
35
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,10 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ Scenario::Application.config.secret_token = '70d2ec936ec5a91e883a9dc74bfeadd5a96cc242d3fd0857aa0151112ac71721475e01ae788e5c976a09ab62dd20240678cdc393c37cb777e872e59ea74adaad'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Scenario::Application.config.session_store :cookie_store, :key => '_scenario_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rake db:sessions:create")
8
+ # Scenario::Application.config.session_store :active_record_store
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,4 @@
1
+ Scenario::Application.routes.draw do
2
+ devise_for :users
3
+ root :to => "home#index"
4
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Scenario::Application
@@ -0,0 +1,14 @@
1
+ class CreateTables < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :users do |t|
4
+ t.cas_authenticatable
5
+ t.rememberable
6
+ t.string :email
7
+ t.timestamps
8
+ end
9
+ end
10
+
11
+ def self.down
12
+ drop_table :users
13
+ end
14
+ end
@@ -0,0 +1,19 @@
1
+ ENV["RAILS_ENV"] = "test"
2
+ $:.unshift File.dirname(__FILE__)
3
+ $:.unshift File.expand_path('../../lib', __FILE__)
4
+
5
+ require "scenario/config/environment"
6
+ require "rails/test_help"
7
+ require 'rspec/rails'
8
+ require 'sham_rack'
9
+
10
+ Webrat.configure do |config|
11
+ config.mode = :rails
12
+ config.open_error_files = false
13
+ end
14
+
15
+ RSpec.configure do |config|
16
+ config.mock_with :mocha
17
+ end
18
+
19
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
@@ -0,0 +1,4 @@
1
+ FileUtils.rm File.expand_path("../../scenario/db/*.sqlite3", __FILE__), :force => true
2
+ ActiveRecord::Base.logger = Logger.new(nil)
3
+ ActiveRecord::Migration.verbose = false
4
+ ActiveRecord::Migrator.migrate(File.expand_path("../../scenario/db/migrate/", __FILE__))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_cas_authenticatable
3
3
  version: !ruby/object:Gem::Version
4
- hash: -1710980575
4
+ hash: -1710980386
5
5
  prerelease: true
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
9
  - 0
10
- - alpha3
11
- version: 1.0.0.alpha3
10
+ - alpha4
11
+ version: 1.0.0.alpha4
12
12
  platform: ruby
13
13
  authors:
14
14
  - Nat Budin
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-08-27 00:00:00 -04:00
19
+ date: 2010-09-23 00:00:00 -04:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -60,7 +60,10 @@ extensions: []
60
60
  extra_rdoc_files:
61
61
  - README.md
62
62
  files:
63
+ - .gitignore
63
64
  - .project
65
+ - Gemfile
66
+ - Gemfile.lock
64
67
  - README.md
65
68
  - Rakefile
66
69
  - VERSION
@@ -73,6 +76,30 @@ files:
73
76
  - lib/devise_cas_authenticatable/schema.rb
74
77
  - lib/devise_cas_authenticatable/strategy.rb
75
78
  - rails/init.rb
79
+ - spec/routes_spec.rb
80
+ - spec/scenario/.gitignore
81
+ - spec/scenario/app/controllers/application_controller.rb
82
+ - spec/scenario/app/controllers/home_controller.rb
83
+ - spec/scenario/app/models/user.rb
84
+ - spec/scenario/app/views/layouts/application.html.erb
85
+ - spec/scenario/config.ru
86
+ - spec/scenario/config/application.rb
87
+ - spec/scenario/config/boot.rb
88
+ - spec/scenario/config/database.yml
89
+ - spec/scenario/config/environment.rb
90
+ - spec/scenario/config/environments/development.rb
91
+ - spec/scenario/config/environments/production.rb
92
+ - spec/scenario/config/environments/test.rb
93
+ - spec/scenario/config/initializers/backtrace_silencers.rb
94
+ - spec/scenario/config/initializers/inflections.rb
95
+ - spec/scenario/config/initializers/mime_types.rb
96
+ - spec/scenario/config/initializers/secret_token.rb
97
+ - spec/scenario/config/initializers/session_store.rb
98
+ - spec/scenario/config/locales/en.yml
99
+ - spec/scenario/config/routes.rb
100
+ - spec/scenario/db/migrate/20100401102949_create_tables.rb
101
+ - spec/spec_helper.rb
102
+ - spec/support/migrations.rb
76
103
  has_rdoc: true
77
104
  homepage: http://github.com/nbudin/devise_cas_authenticatable
78
105
  licenses: []
@@ -109,5 +136,23 @@ rubygems_version: 1.3.7
109
136
  signing_key:
110
137
  specification_version: 3
111
138
  summary: CAS authentication module for Devise
112
- test_files: []
113
-
139
+ test_files:
140
+ - spec/routes_spec.rb
141
+ - spec/scenario/app/controllers/application_controller.rb
142
+ - spec/scenario/app/controllers/home_controller.rb
143
+ - spec/scenario/app/models/user.rb
144
+ - spec/scenario/config/application.rb
145
+ - spec/scenario/config/boot.rb
146
+ - spec/scenario/config/environment.rb
147
+ - spec/scenario/config/environments/development.rb
148
+ - spec/scenario/config/environments/production.rb
149
+ - spec/scenario/config/environments/test.rb
150
+ - spec/scenario/config/initializers/backtrace_silencers.rb
151
+ - spec/scenario/config/initializers/inflections.rb
152
+ - spec/scenario/config/initializers/mime_types.rb
153
+ - spec/scenario/config/initializers/secret_token.rb
154
+ - spec/scenario/config/initializers/session_store.rb
155
+ - spec/scenario/config/routes.rb
156
+ - spec/scenario/db/migrate/20100401102949_create_tables.rb
157
+ - spec/spec_helper.rb
158
+ - spec/support/migrations.rb