cassiopeia 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -7,6 +7,7 @@
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
11
  - 0.0.9: The bug with multiple concurrent requests processing fixed.
11
12
  - 0.0.8: Full request saving support via rack middleware.
12
13
  - 0.0.7: Some code for redirection added. Added webpath prefix support.
@@ -35,7 +36,8 @@
35
36
  server_url: "https://localhost" # Url of cassiopeia server in your environment
36
37
  service_url: "https://localhost/myservice/" # Url of your application (for cas to redirect back)
37
38
  service_id: "myservice" # Identification of your service (for informational and security purpose)
38
- webpath_prefix: "/myservice" # This is used just for correct redirection if you use proxy (default: empty)
39
+ requests_save_enabled: true # Set this value to true if you want your application to save and restore the previous request when redirecting to cassiopeia (default: true)
40
+
39
41
 
40
42
  ==== Usage:
41
43
  <b>Add this line to application_controller.rb:</b>
@@ -52,6 +54,25 @@ This will raise the Cassiopeia::Exception::AccessDenied if user try to access th
52
54
  redirect_to root_path
53
55
  end
54
56
 
57
+ If you set requests_save_enabled to true then you should create the new migration to create
58
+ the cassiopeia_requests table for storing requests. This is very important if you want to use
59
+ redirections on the requests that are differ from GET. So, create this migration:
60
+ class AddCassiopeia < ActiveRecord::Migration
61
+ def self.up
62
+ create_table :cassiopeia_requests do |t|
63
+ t.string :uid
64
+ t.binary :data
65
+ t.datetime :expires_at
66
+ t.timestamps
67
+ end
68
+ end
69
+ def self.down
70
+ drop_table :cassiopeia_requests
71
+ end
72
+ end
73
+
74
+
75
+
55
76
  === Server configuration
56
77
  Create a file named config/cassiopeia.yml:
57
78
  ticket_max_lifetime: 5 # Ticket max lifetime (in minutes, default: 120)
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.0.9"
13
+ s.version = "0.1.0"
14
14
  s.author = "smecsia"
15
15
  s.email = "smecsia@gmail.com"
16
16
  #s.homepage = ""
@@ -5,13 +5,13 @@ module Cassiopeia
5
5
  ::CAS_USER_KEY = Cassiopeia::CONFIG[:current_user_key]
6
6
  ::CAS_TICKET_ID_KEY = Cassiopeia::CONFIG[:ticket_id_key]
7
7
  ::CAS_TICKET_KEY = Cassiopeia::CONFIG[:ticket_key]
8
- ::CAS_WEBPATH_PREFIX = Cassiopeia::CONFIG[:webpath_prefix]
9
- ::CAS_RETURN_TO_KEY = Cassiopeia::CONFIG[:return_to_key]
8
+ ::CAS_UNIQUE_REQ_KEY = Cassiopeia::CONFIG[:rack_unique_req_key]
10
9
  def cas_current_ticket
11
10
  session[CAS_TICKET_KEY] || params[CAS_TICKET_KEY]
12
11
  end
13
12
  def cas_current_ticket_id
14
- params[CAS_TICKET_ID_KEY] || session[CAS_TICKET_ID_KEY]
13
+ return session[CAS_TICKET_ID_KEY] if (params[CAS_TICKET_ID_KEY].nil? || params[CAS_TICKET_ID_KEY].empty?)
14
+ return params[CAS_TICKET_ID_KEY]
15
15
  end
16
16
  def cas_store_current_user(ticket, user)
17
17
  session[CAS_TICKET_KEY] = ticket
@@ -26,15 +26,8 @@ module Cassiopeia
26
26
  logger.debug "\nCurrent ticket valid: #{DateTime.parse(cas_current_ticket[:expires_at])} >= #{DateTime.now}\n" + "="*50 if cas_current_ticket && cas_current_ticket[:expires_at]
27
27
  cas_current_ticket && DateTime.parse(cas_current_ticket[:expires_at]) >= DateTime.now if cas_current_ticket && cas_current_ticket[:expires_at]
28
28
  end
29
- def cas_store_location
30
- session[CAS_RETURN_TO_KEY] = "#{CAS_WEBPATH_PREFIX}#{request.request_uri}"
31
- end
32
- def cas_redirect_back_or_default(default)
33
- redirect_to(session[CAS_RETURN_TO_KEY] || default)
34
- session[CAS_RETURN_TO_KEY] = nil
35
- end
36
29
  def cas_request_ticket_id
37
- cas_store_location
30
+ logger.debug "\nStoring current request:...#{params[CAS_UNIQUE_REQ_KEY]} \n" + "="*50
38
31
  redirect_to Cassiopeia::Client::instance.cas_check_url(session, params)
39
32
  end
40
33
  def cas_request_current_user
@@ -44,7 +37,7 @@ module Cassiopeia
44
37
  @current_user = Cassiopeia::User.new(@ticket[:user])
45
38
  logger.debug "\nCurrent user identified (#{@current_user.login}), storing to session\n" + "="*50
46
39
  cas_store_current_user(@ticket, @current_user)
47
- logger.debug "\nTicket_id is in request, should process the old request... #{session[:return_to]}\n" + "="*50
40
+ logger.debug "\nTicket_id is in request, should process the old request...#{params[CAS_UNIQUE_REQ_KEY]} \n" + "="*50
48
41
  end
49
42
  def cas_required_roles
50
43
  self.class.cas_required_roles if self.class.respond_to? :cas_required_roles
@@ -3,8 +3,10 @@ module Cassiopeia
3
3
 
4
4
  module ActionControllerServerMixin
5
5
  module ActionControllerMethods
6
+ private
6
7
  def cas_ticket_id
7
- params[@ticket_id_key] || session[@ticket_id_key]
8
+ return session[@ticket_id_key] if (params[@ticket_id_key].nil? || params[@ticket_id_key].empty?)
9
+ return params[@ticket_id_key]
8
10
  end
9
11
  def cas_service_url
10
12
  params[@service_url_key] || session[@service_url_key]
@@ -51,11 +53,11 @@ module Cassiopeia
51
53
  end
52
54
 
53
55
  def cas_current_ticket_exists?
54
- Cassiopeia::CONFIG[:ticketClass].exists?(cas_ticket_id) if cas_ticket_id > ""
56
+ Cassiopeia::CONFIG[:ticketClass].exists?(cas_ticket_id)
55
57
  end
56
58
 
57
59
  def cas_current_ticket_valid?
58
- logger.debug "\nTicketValid = #{cas_current_ticket.valid_for?(cas_service_id)}\n" + "="*50 if cas_current_ticket_exists?
60
+ logger.debug("\nTicketValid = #{cas_current_ticket.valid_for?(cas_service_id)}\n" + "="*50) if cas_current_ticket_exists?
59
61
  cas_current_ticket.valid_for?(cas_service_id) if cas_current_ticket_exists?
60
62
  end
61
63
 
@@ -93,23 +95,34 @@ module Cassiopeia
93
95
  redirect_to url
94
96
  end
95
97
 
96
- def cas_proceed_auth
97
- service_url = Cassiopeia::Server::instance.service_url(session, params)
98
- if cas_current_ticket_valid? && current_user
99
- logger.debug "\nCurrentTicketValid, current_user exists redirecting to service...\n" + "="*50
100
- return cas_redirect_to service_url
101
- elsif current_user
102
- logger.debug "\nCurrentTicketInvalid, but current_user exists, should create new ticket...\n" + "="*50
103
- cas_current_ticket.destroy if cas_current_ticket_exists?
104
- cas_create_or_find_ticket
105
- return cas_redirect_to service_url
106
- elsif cas_current_ticket_exists?
107
- logger.debug "\nCurrentTicketInvalid, but current_user exists, destroying ticket, redirecting to login...\n" + "="*50
108
- cas_current_ticket.destroy
98
+ def cas_service_url_build
99
+ Cassiopeia::Server::instance.service_url(session, params)
100
+ end
101
+
102
+ def cas_proceed_auth
103
+ Thread.exclusive do
104
+ if cas_current_ticket_valid? && current_user
105
+ logger.debug "\nCurrentTicketValid, current_user exists redirecting to service...\n" + "="*50
106
+ return cas_redirect_to cas_service_url_build
107
+ elsif current_user
108
+ logger.debug "\nCurrentTicketInvalid, but current_user exists, should create new ticket...\n" + "="*50
109
+ cas_current_ticket.destroy if cas_current_ticket_exists?
110
+ cas_create_or_find_ticket
111
+ return cas_redirect_to cas_service_url_build
112
+ elsif cas_current_ticket_exists?
113
+ logger.debug "\nCurrentTicketInvalid, but current_user exists, destroying ticket, redirecting to login...\n" + "="*50
114
+ cas_current_ticket.destroy
115
+ end
109
116
  end
110
117
  cas_redirect_to login_url
111
118
  end
112
119
 
120
+ def cas_remove_expired_tickets
121
+ Cassiopeia::CONFIG[:ticketClass].delete_all(:conditions => ["expired_at <= '?'", Time.now.utc])
122
+ end
123
+
124
+ public
125
+
113
126
  def create
114
127
  cas_process_request
115
128
  end
@@ -2,23 +2,20 @@ require 'uuidtools'
2
2
 
3
3
  module Cassiopeia
4
4
  module ActiveRecordServerMixin
5
- def self.cassiopeia_ticketClass=(c)
6
- @@cassiopeia_ticketClass = c
7
- end
8
5
  # cas ticket
9
6
  def acts_as_cas_ticket
10
7
  class_eval do
11
8
  def valid_for?(service)
12
9
  return false unless identity && user
13
- (ticket = self.for_service service) && ticket.expires_at >= DateTime.now
10
+ (ticket = self.for_service(service)) && ticket.expires_at.utc >= Time.now.utc
14
11
  end
15
12
  def for_service(service)
16
- @@cassiopeia_ticketClass.find(:first, :conditions => {:service => service, :user_id => user.id })
13
+ Cassiopeia::CONFIG[:ticketClass].find(:first, :conditions => {:service => service, :user_id => user.id, :identity=>identity })
17
14
  end
18
15
  end
19
16
  instance_eval do
20
17
  def generate_expiration
21
- DateTime.now() + Cassiopeia::CONFIG[:ticket_max_lifetime] / 24.0 / 60.0
18
+ Time.now.utc + Cassiopeia::CONFIG[:ticket_max_lifetime].to_i.minute
22
19
  end
23
20
  def generate_uuid
24
21
  UUIDTools::UUID.timestamp_create.to_s
@@ -16,6 +16,8 @@ module Cassiopeia
16
16
  end
17
17
 
18
18
  module Exception
19
+ class MissConfiguration < Object::Exception
20
+ end
19
21
  class ConfigRequired < Object::Exception
20
22
  end
21
23
  class AccessDenied < Object::Exception
@@ -0,0 +1,61 @@
1
+ require(File.join(RAILS_ROOT,"config/environment")) unless defined?(Rails)
2
+ module Cassiopeia
3
+ class BaseRack < Base
4
+ CAS_RACK_SESSION_STORE = Cassiopeia::CONFIG[:rack_session_store]
5
+ CAS_RACK_SESSION_KEY = Cassiopeia::CONFIG[:rack_session_key]
6
+ CAS_TICKET_ID_KEY = Cassiopeia::CONFIG[:ticket_id_key]
7
+ CAS_TICKET_KEY = Cassiopeia::CONFIG[:ticket_key]
8
+ CAS_REQUEST_URI_KEY = Cassiopeia::CONFIG[:rack_request_uri_key]
9
+ CAS_QUERY_STRING_KEY = Cassiopeia::CONFIG[:rack_query_string_key]
10
+ CAS_SAVE_KEYS = Cassiopeia::CONFIG[:rack_save_keys]
11
+ CAS_UNIQUE_REQ_KEY = Cassiopeia::CONFIG[:rack_unique_req_key]
12
+ CAS_REQ_EXPIRES_AT_KEY = Cassiopeia::CONFIG[:rack_session_store_expires_at_key]
13
+ CAS_REQ_TIMEOUT = Cassiopeia::CONFIG[:rack_session_store_timeout]
14
+
15
+ def session(env)
16
+ env[CAS_RACK_SESSION_KEY]
17
+ end
18
+
19
+ def cas_current_ticket(env)
20
+ session(env)[CAS_TICKET_KEY]
21
+ end
22
+
23
+ def cas_current_ticket_valid?(env)
24
+ @ticket = cas_current_ticket(env)
25
+ @ticket && DateTime.parse(@ticket[:expires_at]) >= DateTime.now if @ticket && @ticket[:expires_at]
26
+ end
27
+
28
+ def enabled
29
+ Cassiopeia::CONFIG[:requests_save_enabled]
30
+ end
31
+
32
+ def initialize( app )
33
+ @app = app
34
+ end
35
+
36
+ def response( env )
37
+ @status, @headers, @body = @app.call env
38
+ [@status, @headers, @body]
39
+ end
40
+
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]
43
+ end
44
+
45
+ def store_headers_required?(env)
46
+ !cas_current_ticket_valid?(env)
47
+ end
48
+
49
+ def generate_expiration
50
+ DateTime.now() + CAS_REQ_TIMEOUT / 24.0 / 60.0
51
+ end
52
+
53
+ def generate_req_key
54
+ UUIDTools::UUID.timestamp_create.to_s
55
+ end
56
+
57
+ def raise_missconfiguration(msg)
58
+ raise Cassiopeia::Exception::MissConfiguration.new "Cannot modify or delete cassiopeia request instance! Please, create table casssiopeia_requests[:uid, :expires_at, :data] or disable requests saving in configuration! (#{msg})"
59
+ end
60
+ end
61
+ end
@@ -7,6 +7,9 @@ require 'rexml/document'
7
7
  # Client
8
8
  ##################
9
9
  module Cassiopeia
10
+ class CassiopeiaRequest < ActiveRecord::Base
11
+ end
12
+
10
13
  class Client < Base
11
14
  SERVICE_URL = Cassiopeia::CONFIG[:service_url]
12
15
  SERVICE_ID = Cassiopeia::CONFIG[:service_id]
@@ -11,8 +11,6 @@ module Cassiopeia
11
11
  :service_url_key => "cas_service_url",
12
12
  :server_url => nil,
13
13
  :service_url => nil,
14
- :webpath_prefix => "",
15
- :return_to_key => "cas_return_to",
16
14
  :service_id => nil,
17
15
  :current_user_key => "current_user",
18
16
  :format => "js",
@@ -23,7 +21,8 @@ module Cassiopeia
23
21
  :rack_session_key => "rack.session",
24
22
  :rack_unique_req_key => "cas_req_key",
25
23
  :rack_session_store_timeout => 1,
26
- :rack_session_store_expires_at_key => "cas_req_expires"
24
+ :rack_session_store_expires_at_key => "cas_req_expires",
25
+ :requests_save_enabled => true
27
26
  }
28
27
  CONFIG_PATH = "#{RAILS_ROOT}/config/cassiopeia.yml"
29
28
  @@conf = {}
@@ -1,110 +1,80 @@
1
1
  module Cassiopeia
2
- class RackRestoreRequest
3
- CAS_RACK_SESSION_STORE = Cassiopeia::CONFIG[:rack_session_store]
4
- CAS_RACK_SESSION_KEY = Cassiopeia::CONFIG[:rack_session_key]
5
- CAS_TICKET_ID_KEY = Cassiopeia::CONFIG[:ticket_id_key]
6
- CAS_REQUEST_URI_KEY = Cassiopeia::CONFIG[:rack_request_uri_key]
7
- CAS_QUERY_STRING_KEY = Cassiopeia::CONFIG[:rack_query_string_key]
8
- CAS_SAVE_KEYS = Cassiopeia::CONFIG[:rack_save_keys]
9
- CAS_UNIQUE_REQ_KEY = Cassiopeia::CONFIG[:rack_unique_req_key]
10
- CAS_REQ_EXPIRES_AT_KEY = Cassiopeia::CONFIG[:rack_session_store_expires_at_key]
11
- CAS_REQ_TIMEOUT = Cassiopeia::CONFIG[:rack_session_store_timeout]
12
-
13
- def initialize( app )
14
- @app = app
15
- end
16
-
2
+ class RackRestoreRequest < BaseRack
17
3
  def call( env )
18
- if restore_headers_required?(env)
19
- env = restore_headers(env)
20
- else
21
- save_headers(env)
22
- end
23
- @status, @headers, @body = @app.call env
24
- [@status, @headers, @body]
25
- end
26
-
27
- def query_to_hash(query)
28
- CGI.parse(query)
29
- end
30
-
31
- def hash_to_query(hash)
32
- pairs = []
33
- hash.each do |k, vals|
34
- vals = [vals] unless vals.kind_of? Array
35
- vals.each {|v| pairs << "#{CGI.escape(k.to_s)}=#{(v)?CGI.escape(v.to_s):''}"}
4
+ if enabled
5
+ if restore_headers_required?(env)
6
+ env = restore_old_request(env)
7
+ elsif store_headers_required?(env)
8
+ remove_expired_requests
9
+ store_current_request(env)
10
+ end
36
11
  end
37
- pairs.join("&")
38
- end
39
-
40
- def restore_headers_required?(env)
41
- 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]
12
+ response(env)
42
13
  end
43
14
 
44
- def remove_expired_headers(env)
45
- if(env[CAS_RACK_SESSION_KEY] && env[CAS_RACK_SESSION_KEY][CAS_RACK_SESSION_STORE])
46
- stores = env[CAS_RACK_SESSION_KEY][CAS_RACK_SESSION_STORE]
47
- stores.each do |key, store|
48
- if store && store[CAS_REQ_EXPIRES_AT_KEY] && store[CAS_REQ_EXPIRES_AT_KEY] >= DateTime.now
49
- stores.delete key
15
+ def store_current_request(env)
16
+ begin
17
+ request = CassiopeiaRequest.new({:uid => store_req_key(env), :expires_at => generate_expiration})
18
+ store = {}
19
+ env.each do |key,value|
20
+ if env[key] && (key.is_a? String) && (key.match("HTTP_") || CAS_SAVE_KEYS.match(key))
21
+ store[key] = value
50
22
  end
51
23
  end
24
+ request.data = Marshal.dump(store)
25
+ request.save!
26
+ rescue Exception => e
27
+ raise_missconfiguration(e)
52
28
  end
53
29
  end
54
30
 
55
- def generate_expiration
56
- DateTime.now() + CAS_REQ_TIMEOUT / 24.0 / 60.0
57
- end
58
31
 
59
- def save_headers(env)
60
- if(env[CAS_RACK_SESSION_KEY])
61
- remove_expired_headers(env)
62
- req_key = store_req_key(env)
63
- env[CAS_RACK_SESSION_KEY][CAS_RACK_SESSION_STORE] = {} unless env[CAS_RACK_SESSION_KEY][CAS_RACK_SESSION_STORE]
64
- store = env[CAS_RACK_SESSION_KEY][CAS_RACK_SESSION_STORE]
65
- store[req_key] = { CAS_REQ_EXPIRES_AT_KEY => generate_expiration }
66
- env.each do |key,value|
67
- if env[key] && (key.is_a? String) && (key.match("HTTP_") || CAS_SAVE_KEYS.match(key))
68
- store[req_key][key] = value
32
+ def restore_old_request(env)
33
+ begin
34
+ key = restore_req_key(env)
35
+ request = CassiopeiaRequest.find_by_uid(key)
36
+ stored_keys = Marshal.load(request.data)
37
+ stored_keys.each do |key,value|
38
+ if(key.match(CAS_QUERY_STRING_KEY))
39
+ add_ticket_id_to_req(env,key,value)
40
+ else
41
+ env[key] = value
69
42
  end
70
43
  end
44
+ request.delete
45
+ rescue Exception => e
46
+ raise_missconfiguration(e)
71
47
  end
48
+ env
72
49
  end
73
50
 
74
- def add_ticket_id_to_req(env, key, value)
75
- newparams = query_to_hash(value)
76
- params = query_to_hash(env[key])
77
- newparams[CAS_TICKET_ID_KEY] = params[CAS_TICKET_ID_KEY]
78
- newparams.delete CAS_UNIQUE_REQ_KEY
79
- env[key] = hash_to_query(newparams)
80
- end
81
-
82
- def restore_req_key(env)
83
- newparams = query_to_hash(env[CAS_QUERY_STRING_KEY])
84
- newparams[CAS_UNIQUE_REQ_KEY]
51
+ def remove_expired_requests
52
+ begin
53
+ CassiopeiaRequest.delete_all(["expires_at <= ?", Time.now.utc])
54
+ rescue Exception => e
55
+ raise_missconfiguration(e)
56
+ end
85
57
  end
86
58
 
87
59
  def store_req_key(env)
88
60
  params = query_to_hash(env[CAS_QUERY_STRING_KEY])
89
- params[CAS_UNIQUE_REQ_KEY] = UUIDTools::UUID.timestamp_create.to_s
61
+ params[CAS_UNIQUE_REQ_KEY] = generate_req_key
90
62
  env[CAS_QUERY_STRING_KEY] = hash_to_query(params)
91
63
  params[CAS_UNIQUE_REQ_KEY]
92
64
  end
93
65
 
94
- def restore_headers(env)
95
- current_req_key = restore_req_key(env)
96
- stored_keys = env[CAS_RACK_SESSION_KEY][CAS_RACK_SESSION_STORE][current_req_key.to_s]
97
- if(env[CAS_RACK_SESSION_KEY] && stored_keys)
98
- stored_keys.each do |key,value|
99
- if(key.match(CAS_QUERY_STRING_KEY))
100
- add_ticket_id_to_req(env,key,value)
101
- else
102
- env[key] = value
103
- end
104
- end
105
- env[CAS_RACK_SESSION_KEY][CAS_RACK_SESSION_STORE].delete current_req_key.to_s
106
- end
107
- env
66
+
67
+ def restore_req_key(env)
68
+ newparams = query_to_hash(env[CAS_QUERY_STRING_KEY])
69
+ newparams[CAS_UNIQUE_REQ_KEY]
70
+ end
71
+
72
+ def add_ticket_id_to_req(env, key, value)
73
+ newparams = query_to_hash(value)
74
+ params = query_to_hash(env[key])
75
+ newparams[CAS_TICKET_ID_KEY] = params[CAS_TICKET_ID_KEY]
76
+ newparams.delete CAS_UNIQUE_REQ_KEY
77
+ env[key] = hash_to_query(newparams)
108
78
  end
109
79
  end
110
80
  end
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.0.9'
4
+ VERSION = '0.1.0'
5
5
  autoload :User, 'cassiopeia/user'
6
6
  autoload :Base, 'cassiopeia/base'
7
7
  autoload :Exception, 'cassiopeia/base'
@@ -12,6 +12,8 @@ module Cassiopeia
12
12
  autoload :ActionControllerServerMixin, 'cassiopeia/action_controller_server_mixin'
13
13
  autoload :ActionControllerClientMixin, 'cassiopeia/action_controller_client_mixin'
14
14
  autoload :RackRestoreRequest, 'cassiopeia/rack_restore_request'
15
+ autoload :BaseRack, 'cassiopeia/base_rack'
16
+ autoload :CassiopeiaRequest, 'cassiopeia/client'
15
17
 
16
18
  class << self
17
19
  def enable
@@ -19,7 +21,7 @@ module Cassiopeia
19
21
  ActiveRecord::Base.send :extend, ActiveRecordServerMixin
20
22
  ActionController::Base.send :extend, ActionControllerClientMixin
21
23
  Rails.configuration.middleware.use RackRestoreRequest if CONFIG[:service_id]
22
- puts "Cassiopeia 0.0.9 enabled"
24
+ puts "Cassiopeia 0.1.0 enabled"
23
25
  end
24
26
  end
25
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.0.9
4
+ version: 0.1.0
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-09 00:00:00 +04:00
12
+ date: 2010-04-13 00:00:00 +04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -55,6 +55,7 @@ files:
55
55
  - Rakefile
56
56
  - lib/cassiopeia.rb
57
57
  - lib/cassiopeia/active_record_server_mixin.rb
58
+ - lib/cassiopeia/base_rack.rb
58
59
  - lib/cassiopeia/action_controller_server_mixin.rb
59
60
  - lib/cassiopeia/config.rb
60
61
  - lib/cassiopeia/server.rb