cookieless 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/cookieless.rb +2 -2
- metadata +21 -34
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/lib/cookieless.rb
CHANGED
@@ -45,7 +45,7 @@ module Rack
|
|
45
45
|
return nil if session_id.blank?
|
46
46
|
|
47
47
|
cache_id = generate_cookie_id(session_id, env)
|
48
|
-
return nil unless Rails.cache.exist?(cache_id)
|
48
|
+
return nil unless session_id.present? and Rails.cache.exist?(cache_id)
|
49
49
|
return [session_id, cache_store.read(cache_id)]
|
50
50
|
end
|
51
51
|
|
@@ -55,7 +55,7 @@ module Rack
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def generate_cookie_id(session_id, env)
|
58
|
-
Digest::SHA1.hexdigest(session_id + env["HTTP_USER_AGENT"].to_s + env["REMOTE_ADDR"].to_s)
|
58
|
+
Digest::SHA1.hexdigest(session_id.to_s + env["HTTP_USER_AGENT"].to_s + env["REMOTE_ADDR"].to_s)
|
59
59
|
end
|
60
60
|
|
61
61
|
def process_body(body, session_id)
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cookieless
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
4
|
+
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
8
|
+
- 2
|
9
|
+
version: 0.2.2
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Jinzhu
|
@@ -15,69 +14,61 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2011-
|
17
|
+
date: 2011-10-23 00:00:00 +08:00
|
19
18
|
default_executable:
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
-
none: false
|
21
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
25
22
|
requirements:
|
26
23
|
- - ">="
|
27
24
|
- !ruby/object:Gem::Version
|
28
|
-
hash: 3
|
29
25
|
segments:
|
30
26
|
- 0
|
31
27
|
version: "0"
|
32
|
-
name: nokogiri
|
33
|
-
version_requirements: *id001
|
34
28
|
prerelease: false
|
29
|
+
requirement: *id001
|
30
|
+
name: nokogiri
|
31
|
+
type: :runtime
|
35
32
|
- !ruby/object:Gem::Dependency
|
36
|
-
|
37
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
-
none: false
|
33
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
39
34
|
requirements:
|
40
35
|
- - ~>
|
41
36
|
- !ruby/object:Gem::Version
|
42
|
-
hash: 23
|
43
37
|
segments:
|
44
38
|
- 1
|
45
39
|
- 0
|
46
40
|
- 0
|
47
41
|
version: 1.0.0
|
48
|
-
name: bundler
|
49
|
-
version_requirements: *id002
|
50
42
|
prerelease: false
|
51
|
-
|
43
|
+
requirement: *id002
|
44
|
+
name: bundler
|
52
45
|
type: :development
|
53
|
-
|
54
|
-
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
55
48
|
requirements:
|
56
49
|
- - ~>
|
57
50
|
- !ruby/object:Gem::Version
|
58
|
-
hash: 7
|
59
51
|
segments:
|
60
52
|
- 1
|
61
53
|
- 6
|
62
54
|
- 4
|
63
55
|
version: 1.6.4
|
64
|
-
name: jeweler
|
65
|
-
version_requirements: *id003
|
66
56
|
prerelease: false
|
67
|
-
|
57
|
+
requirement: *id003
|
58
|
+
name: jeweler
|
68
59
|
type: :development
|
69
|
-
|
70
|
-
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
71
62
|
requirements:
|
72
63
|
- - ">="
|
73
64
|
- !ruby/object:Gem::Version
|
74
|
-
hash: 3
|
75
65
|
segments:
|
76
66
|
- 0
|
77
67
|
version: "0"
|
78
|
-
name: rcov
|
79
|
-
version_requirements: *id004
|
80
68
|
prerelease: false
|
69
|
+
requirement: *id004
|
70
|
+
name: rcov
|
71
|
+
type: :development
|
81
72
|
description: Cookieless is a rack middleware to make your application works with cookie-less devices/browsers without change your application
|
82
73
|
email: wosmvp@gmail.com
|
83
74
|
executables: []
|
@@ -108,27 +99,23 @@ rdoc_options: []
|
|
108
99
|
require_paths:
|
109
100
|
- lib
|
110
101
|
required_ruby_version: !ruby/object:Gem::Requirement
|
111
|
-
none: false
|
112
102
|
requirements:
|
113
103
|
- - ">="
|
114
104
|
- !ruby/object:Gem::Version
|
115
|
-
hash: 3
|
116
105
|
segments:
|
117
106
|
- 0
|
118
107
|
version: "0"
|
119
108
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
|
-
none: false
|
121
109
|
requirements:
|
122
110
|
- - ">="
|
123
111
|
- !ruby/object:Gem::Version
|
124
|
-
hash: 3
|
125
112
|
segments:
|
126
113
|
- 0
|
127
114
|
version: "0"
|
128
115
|
requirements: []
|
129
116
|
|
130
117
|
rubyforge_project:
|
131
|
-
rubygems_version: 1.6
|
118
|
+
rubygems_version: 1.3.6
|
132
119
|
signing_key:
|
133
120
|
specification_version: 3
|
134
121
|
summary: Cookieless is a rack middleware to make your application works with cookie-less devices/browsers without change your application
|