sbsm 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,11 @@
1
+ === 1.0.2 / 09.12.2011
2
+
3
+ * Updated session.rb to be compatible for both Ruby 1.8 and 1.9.3-p0
4
+
5
+ === 1.0.1 / 08.12.2011
6
+
7
+ * Fix the number of argument error of DRbObject respond_to method
8
+
1
9
  === 1.0.0 / 16.12.2010
2
10
 
3
11
  * sbsm is now Ruby 1.9 ready.
data/lib/sbsm/index.rb CHANGED
@@ -23,7 +23,7 @@
23
23
  # Index -- sbsm -- 04.03.2003 -- hwyss@ywesee.com
24
24
 
25
25
  module SBSM
26
- VERSION = '1.0.1'
26
+ VERSION = '1.0.2'
27
27
  class Index
28
28
  def initialize
29
29
  @values = []
@@ -1,4 +1,4 @@
1
- #class CGI
2
- # remove_const 'Cookie'
3
- #end
4
- #load '/usr/lib/ruby19/1.9.1/cgi/cookie.rb'
1
+ class CGI
2
+ remove_const 'Cookie'
3
+ end
4
+ load '/usr/lib/ruby19/1.9.1/cgi/cookie.rb'
data/lib/sbsm/session.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # encoding: utf-8
2
3
  #
3
4
  # State Based Session Management
4
5
  # Copyright (C) 2004 Hannes Wyss
@@ -17,10 +18,11 @@
17
18
  # License along with this library; if not, write to the Free Software
18
19
  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
20
  #
20
- # ywesee - intellectual capital connected, Winterthurerstrasse 52, CH-8006 Z�rich, Switzerland
21
+ # ywesee - intellectual capital connected, Winterthurerstrasse 52, CH-8006 Zürich, Switzerland
21
22
  # hwyss@ywesee.com
22
23
  #
23
- # Session -- sbsm -- 22.10.2002 -- hwyss@ywesee.com
24
+ # SBSM::Session -- sbsm -- 09.12.2012 -- mhatakeyama@ywesee.com
25
+ # SBSM::Session -- sbsm -- 22.10.2002 -- hwyss@ywesee.com
24
26
 
25
27
  require 'sbsm/cgi'
26
28
  require 'sbsm/drb'
@@ -201,15 +203,17 @@ module SBSM
201
203
  end
202
204
  def import_cookies(request)
203
205
  reset_cookie()
204
- if(cuki = request.cookies[self::class::PERSISTENT_COOKIE_NAME])
205
- cuki.each { |cuki_str|
206
- CGI.parse(CGI.unescape(cuki_str)).each { |key, val|
207
- key = key.intern
208
- valid = @validator.validate(key, val.compact.last)
209
- @cookie_input.store(key, valid)
210
- }
211
- }
212
- end
206
+ if RUBY_VERSION < "1.9"
207
+ if(cuki = request.cookies[self::class::PERSISTENT_COOKIE_NAME])
208
+ cuki.each { |cuki_str|
209
+ CGI.parse(CGI.unescape(cuki_str)).each { |key, val|
210
+ key = key.intern
211
+ valid = @validator.validate(key, val.compact.last)
212
+ @cookie_input.store(key, valid)
213
+ }
214
+ }
215
+ end
216
+ end
213
217
  end
214
218
  @@hash_ptrn = /([^\[]+)((\[[^\]]+\])+)/
215
219
  @@index_ptrn = /[^\[\]]+/
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sbsm
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease:
4
+ prerelease: false
6
5
  segments:
7
6
  - 1
8
7
  - 0
9
- - 1
10
- version: 1.0.1
8
+ - 2
9
+ version: 1.0.2
11
10
  platform: ruby
12
11
  authors:
13
12
  - Masaomi Hatakeyama, Zeno R.R. Davatz
@@ -15,18 +14,16 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2011-11-23 00:00:00 +01:00
17
+ date: 2011-12-09 00:00:00 +01:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: hoe
23
22
  prerelease: false
24
23
  requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
24
  requirements:
27
25
  - - ">="
28
26
  - !ruby/object:Gem::Version
29
- hash: 41
30
27
  segments:
31
28
  - 2
32
29
  - 9
@@ -109,27 +106,23 @@ rdoc_options:
109
106
  require_paths:
110
107
  - lib
111
108
  required_ruby_version: !ruby/object:Gem::Requirement
112
- none: false
113
109
  requirements:
114
110
  - - ">="
115
111
  - !ruby/object:Gem::Version
116
- hash: 3
117
112
  segments:
118
113
  - 0
119
114
  version: "0"
120
115
  required_rubygems_version: !ruby/object:Gem::Requirement
121
- none: false
122
116
  requirements:
123
117
  - - ">="
124
118
  - !ruby/object:Gem::Version
125
- hash: 3
126
119
  segments:
127
120
  - 0
128
121
  version: "0"
129
122
  requirements: []
130
123
 
131
124
  rubyforge_project: sbsm
132
- rubygems_version: 1.4.2
125
+ rubygems_version: 1.3.6
133
126
  signing_key:
134
127
  specification_version: 3
135
128
  summary: Application framework for state based session management