cassiopeia 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -7,7 +7,8 @@
7
7
  - Yet another custom CAS client/server implementation. This plugin allows you to perform single-server authorization between two different rails applications.
8
8
 
9
9
  = Changelog:
10
- - 0.1.0: Multiple requests storing fixed. Workarounds for concurrent requests processing applied.
10
+ - 0.1.1: Lesser bug with concurrent requests restoring fixed.
11
+ - 0.1.0: Multiple requests storing implemented. Workarounds for concurrent requests processing applied.
11
12
  - 0.0.9: The bug with multiple concurrent requests processing fixed.
12
13
  - 0.0.8: Full request saving support via rack middleware.
13
14
  - 0.0.7: Some code for redirection added. Added webpath prefix support.
@@ -43,7 +44,9 @@
43
44
  <b>Add this line to application_controller.rb:</b>
44
45
  use_cas_authorization
45
46
 
46
- This will force your application to request authorization from cassiopeia server.
47
+ This will force your application to request authorization from cassiopeia server. This also will add new method "current_user" to your controllers.
48
+ Then you can easily make the helper method to use in your views by adding:
49
+ helper_method :current_user
47
50
  You can also check required roles to access some controllers. To do this, you should add the following line to your controller:
48
51
  cas_require_roles :doctor, :admin
49
52
 
@@ -92,8 +95,8 @@ Generate new controller named Cas. Generate new model named CasTicket. Create mi
92
95
  end
93
96
  Add the following lines to your cas_controller:
94
97
  acts_as_cas_controller do |c|
95
- c.ticketClass = CasTicket
96
- c.rolesMethod = :roles_array #add this line only if your user model doesn't have :roles method
98
+ c.ticketClass = CasTicket (default: Ticket)
99
+ c.rolesMethod = :roles_array #add this line only if your user model doesn't have :roles method (default: roles)
97
100
  end
98
101
  Add the following lines to your CasTicket:
99
102
  acts_as_cas_ticket
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ PKG_FILES = FileList[ '[a-zA-Z]*', 'lib/**/*' ]
10
10
 
11
11
  spec = Gem::Specification.new do |s|
12
12
  s.name = "cassiopeia"
13
- s.version = "0.1.0"
13
+ s.version = "0.1.1"
14
14
  s.author = "smecsia"
15
15
  s.email = "smecsia@gmail.com"
16
16
  #s.homepage = ""
@@ -39,7 +39,7 @@ module Cassiopeia
39
39
  end
40
40
 
41
41
  def restore_headers_required?(env)
42
- env[CAS_QUERY_STRING_KEY] && env[CAS_QUERY_STRING_KEY].match(CAS_TICKET_ID_KEY.to_s) && env[CAS_RACK_SESSION_KEY] && env[CAS_RACK_SESSION_KEY][CAS_RACK_SESSION_STORE]
42
+ env[CAS_QUERY_STRING_KEY] && env[CAS_QUERY_STRING_KEY].match(CAS_TICKET_ID_KEY.to_s) && env[CAS_RACK_SESSION_KEY]
43
43
  end
44
44
 
45
45
  def store_headers_required?(env)
data/lib/cassiopeia.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
  module Cassiopeia
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  autoload :User, 'cassiopeia/user'
6
6
  autoload :Base, 'cassiopeia/base'
7
7
  autoload :Exception, 'cassiopeia/base'
@@ -21,7 +21,7 @@ module Cassiopeia
21
21
  ActiveRecord::Base.send :extend, ActiveRecordServerMixin
22
22
  ActionController::Base.send :extend, ActionControllerClientMixin
23
23
  Rails.configuration.middleware.use RackRestoreRequest if CONFIG[:service_id]
24
- puts "Cassiopeia 0.1.0 enabled"
24
+ puts "Cassiopeia #{VERSION} enabled"
25
25
  end
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cassiopeia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - smecsia
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-04-13 00:00:00 +04:00
12
+ date: 2010-04-14 00:00:00 +04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency