smart_cookie_store 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/smart_cookie_store.rb +7 -7
  3. metadata +2 -2
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ PKG_FILES = FileList[
11
11
 
12
12
  spec = Gem::Specification.new do |s|
13
13
  s.name = "smart_cookie_store"
14
- s.version = "0.0.4"
14
+ s.version = "0.0.5"
15
15
  s.author = "Urban Hafner"
16
16
  s.email = "urban@bettong.net"
17
17
  s.homepage = "http://github.com/msales/smart_cookie_store"
@@ -16,7 +16,7 @@ class SmartCookieStore < ActionController::Session::CookieStore
16
16
  cookie = Hash.new
17
17
 
18
18
  session_keys = session_data.keys.reject {|k| k == :session_id }
19
- unless session_keys.empty? || session_keys.all? {|k| session_data[k].blank?}
19
+ if !session_keys.empty? && session_keys.any? {|k| session_data[k].present?}
20
20
  marshaled_session_data = marshal(session_data.to_hash)
21
21
 
22
22
  raise CookieOverflow if marshaled_session_data.size > MAX
@@ -25,12 +25,12 @@ class SmartCookieStore < ActionController::Session::CookieStore
25
25
  unless options[:expire_after].nil?
26
26
  cookie[:expires] = Time.now + options[:expire_after]
27
27
  end
28
- end
29
- cookie = build_cookie(@key, cookie.merge(options))
30
- unless headers[HTTP_SET_COOKIE].blank?
31
- headers[HTTP_SET_COOKIE] << "\n#{cookie}"
32
- else
33
- headers[HTTP_SET_COOKIE] = cookie
28
+ cookie = build_cookie(@key, cookie.merge(options))
29
+ unless headers[HTTP_SET_COOKIE].blank?
30
+ headers[HTTP_SET_COOKIE] << "\n#{cookie}"
31
+ else
32
+ headers[HTTP_SET_COOKIE] = cookie
33
+ end
34
34
  end
35
35
  end
36
36
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 4
9
- version: 0.0.4
8
+ - 5
9
+ version: 0.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Urban Hafner