casino 2.0.7 → 3.0.0.pre.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1 @@
1
1
  // Place all the behaviors and hooks related to the matching controller here.
2
- (function(win) {
3
- if(!win.CASino) {
4
- win.CASino = { baseUrl: '/' };
5
- }
6
-
7
- win.CASino.url = function(path) {
8
- return win.CASino.baseUrl + path;
9
- }
10
- })(this);
@@ -1,5 +1,5 @@
1
1
  (function(win, doc) {
2
- var url = win.CASino.url('login'),
2
+ var url = '/login',
3
3
  cookie_regex = /(^|;)\s*tgt=/,
4
4
  ready_bound = false;
5
5
 
@@ -8,6 +8,7 @@
8
8
  service = serviceEl ? serviceEl.getAttribute('value') : null;
9
9
 
10
10
  if(cookie_regex.test(doc.cookie)) {
11
+ url = '/login';
11
12
  if(service) {
12
13
  url += '?service=' + encodeURIComponent(service);
13
14
  }
@@ -1,5 +1,4 @@
1
1
  class CASino::LoginTicket < ActiveRecord::Base
2
- attr_accessible :ticket
3
2
  validates :ticket, uniqueness: true
4
3
 
5
4
  def self.cleanup
@@ -1,6 +1,5 @@
1
1
 
2
2
  class CASino::ProxyGrantingTicket < ActiveRecord::Base
3
- attr_accessible :iou, :ticket, :pgt_url
4
3
  validates :ticket, uniqueness: true
5
4
  validates :iou, uniqueness: true
6
5
  belongs_to :granter, polymorphic: true
@@ -1,7 +1,6 @@
1
1
  require 'addressable/uri'
2
2
 
3
3
  class CASino::ProxyTicket < ActiveRecord::Base
4
- attr_accessible :ticket, :service
5
4
  validates :ticket, uniqueness: true
6
5
  belongs_to :proxy_granting_ticket
7
6
  has_many :proxy_granting_tickets, as: :granter, dependent: :destroy
@@ -1,6 +1,5 @@
1
1
 
2
2
  class CASino::ServiceRule < ActiveRecord::Base
3
- attr_accessible :enabled, :order, :name, :url, :regex
4
3
  validates :name, presence: true
5
4
  validates :url, uniqueness: true, presence: true
6
5
 
@@ -1,7 +1,6 @@
1
1
  require 'addressable/uri'
2
2
 
3
3
  class CASino::ServiceTicket < ActiveRecord::Base
4
- attr_accessible :ticket, :service, :issued_from_credentials
5
4
  validates :ticket, uniqueness: true
6
5
  belongs_to :ticket_granting_ticket
7
6
  before_destroy :send_single_sign_out_notification, if: :consumed?
@@ -1,7 +1,6 @@
1
1
  require 'user_agent'
2
2
 
3
3
  class CASino::TicketGrantingTicket < ActiveRecord::Base
4
- attr_accessible :ticket, :user_agent, :awaiting_two_factor_authentication, :long_term
5
4
  validates :ticket, uniqueness: true
6
5
 
7
6
  belongs_to :user
@@ -1,7 +1,5 @@
1
1
 
2
2
  class CASino::TwoFactorAuthenticator < ActiveRecord::Base
3
- attr_accessible :secret
4
-
5
3
  belongs_to :user
6
4
 
7
5
  def self.cleanup
@@ -1,6 +1,5 @@
1
1
 
2
2
  class CASino::User < ActiveRecord::Base
3
- attr_accessible :authenticator, :username, :extra_attributes
4
3
  serialize :extra_attributes, Hash
5
4
 
6
5
  has_many :ticket_granting_tickets
@@ -4,7 +4,6 @@
4
4
  <title><%= CASino.config.frontend[:sso_name] %></title>
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
6
6
  <%= stylesheet_link_tag "application", :media => "all" %>
7
- <%= javascript_tag "window.CASino = { baseUrl: '#{root_path}' };" %>
8
7
  <%= javascript_include_tag "application" %>
9
8
  <%= csrf_meta_tags %>
10
9
  <%= favicon_link_tag 'favicon.png', type: 'image/png' %>
data/casino.gemspec CHANGED
@@ -32,7 +32,8 @@ Gem::Specification.new do |s|
32
32
  s.add_development_dependency 'webmock', '~> 1.9'
33
33
  s.add_development_dependency 'coveralls', '~> 0.7'
34
34
 
35
- s.add_runtime_dependency 'rails', '~> 3.2.9'
35
+ s.add_runtime_dependency 'rails', '~> 4.1.0'
36
+ s.add_runtime_dependency 'sass-rails', '~> 4.0.0'
36
37
  s.add_runtime_dependency 'http_accept_language', '~> 2.0.0.pre'
37
38
  s.add_runtime_dependency 'addressable', '~> 2.3'
38
39
  s.add_runtime_dependency 'terminal-table', '~> 1.4'
data/config/routes.rb CHANGED
@@ -26,7 +26,7 @@ CASino::Engine.routes.draw do
26
26
  end
27
27
  end
28
28
 
29
- root to: redirect('login')
29
+ root to: redirect('/login')
30
30
 
31
31
  # The priority is based upon order of creation:
32
32
  # first created -> highest priority.
@@ -1,3 +1,3 @@
1
1
  module CASino
2
- VERSION = '2.0.7'
2
+ VERSION = '3.0.0.pre.1'
3
3
  end
@@ -1,5 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
+ require 'casino/authenticator'
4
+
3
5
  describe CASino::Authenticator do
4
6
  subject {
5
7
  CASino::Authenticator.new
@@ -3,6 +3,7 @@ require File.expand_path('../boot', __FILE__)
3
3
  require 'rails/all'
4
4
 
5
5
  Bundler.require
6
+ require 'sass-rails'
6
7
  require 'casino'
7
8
 
8
9
  module Dummy
@@ -43,12 +44,6 @@ module Dummy
43
44
  # like if you have constraints or database-specific column types
44
45
  # config.active_record.schema_format = :sql
45
46
 
46
- # Enforce whitelist mode for mass assignment.
47
- # This will create an empty whitelist of attributes available for mass-assignment for all models
48
- # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
49
- # parameters by using an attr_accessible or attr_protected declaration.
50
- config.active_record.whitelist_attributes = true
51
-
52
47
  # Enable the asset pipeline
53
48
  config.assets.enabled = true
54
49
 
@@ -22,9 +22,6 @@ Dummy::Application.configure do
22
22
  # Only use best-standards-support built into browsers
23
23
  config.action_dispatch.best_standards_support = :builtin
24
24
 
25
- # Raise exception on mass assignment protection for Active Record models
26
- config.active_record.mass_assignment_sanitizer = :strict
27
-
28
25
  # Log the query plan for queries taking more than this (works
29
26
  # with SQLite, MySQL, and PostgreSQL)
30
27
  config.active_record.auto_explain_threshold_in_seconds = 0.5
@@ -7,13 +7,12 @@ Dummy::Application.configure do
7
7
  # and recreated between test runs. Don't rely on the data there!
8
8
  config.cache_classes = true
9
9
 
10
+ config.eager_load = false
11
+
10
12
  # Configure static asset server for tests with Cache-Control for performance
11
13
  config.serve_static_assets = true
12
14
  config.static_cache_control = "public, max-age=3600"
13
15
 
14
- # Log error messages when you accidentally call methods on nil
15
- config.whiny_nils = true
16
-
17
16
  # Show full error reports and disable caching
18
17
  config.consider_all_requests_local = true
19
18
  config.action_controller.perform_caching = false
@@ -29,9 +28,6 @@ Dummy::Application.configure do
29
28
  # ActionMailer::Base.deliveries array.
30
29
  config.action_mailer.delivery_method = :test
31
30
 
32
- # Raise exception on mass assignment protection for Active Record models
33
- config.active_record.mass_assignment_sanitizer = :strict
34
-
35
31
  # Print deprecation notices to the stderr
36
32
  config.active_support.deprecation = :stderr
37
33
  end
@@ -1,4 +1,4 @@
1
- require 'active_support/core_ext/hash/deep_dup'
1
+ require 'active_support/core_ext/object/deep_dup'
2
2
 
3
3
  RSpec.configure do |config|
4
4
  config.before do
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: casino
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.7
5
- prerelease:
4
+ version: 3.0.0.pre.1
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Nils Caspar
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-09-11 00:00:00.000000000 Z
14
+ date: 2014-04-17 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: capybara
@@ -148,7 +148,7 @@ dependencies:
148
148
  requirements:
149
149
  - - ~>
150
150
  - !ruby/object:Gem::Version
151
- version: 3.2.9
151
+ version: 4.1.0
152
152
  type: :runtime
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
@@ -156,7 +156,23 @@ dependencies:
156
156
  requirements:
157
157
  - - ~>
158
158
  - !ruby/object:Gem::Version
159
- version: 3.2.9
159
+ version: 4.1.0
160
+ - !ruby/object:Gem::Dependency
161
+ name: sass-rails
162
+ requirement: !ruby/object:Gem::Requirement
163
+ none: false
164
+ requirements:
165
+ - - ~>
166
+ - !ruby/object:Gem::Version
167
+ version: 4.0.0
168
+ type: :runtime
169
+ prerelease: false
170
+ version_requirements: !ruby/object:Gem::Requirement
171
+ none: false
172
+ requirements:
173
+ - - ~>
174
+ - !ruby/object:Gem::Version
175
+ version: 4.0.0
160
176
  - !ruby/object:Gem::Dependency
161
177
  name: http_accept_language
162
178
  requirement: !ruby/object:Gem::Requirement
@@ -265,7 +281,6 @@ files:
265
281
  - .gitignore
266
282
  - .rspec
267
283
  - .ruby-gemset
268
- - .ruby-version
269
284
  - .travis.yml
270
285
  - Gemfile
271
286
  - LICENSE.txt
@@ -515,9 +530,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
515
530
  required_rubygems_version: !ruby/object:Gem::Requirement
516
531
  none: false
517
532
  requirements:
518
- - - ! '>='
533
+ - - ! '>'
519
534
  - !ruby/object:Gem::Version
520
- version: '0'
535
+ version: 1.3.1
521
536
  requirements: []
522
537
  rubyforge_project:
523
538
  rubygems_version: 1.8.23
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 1.9.3-p194