rack-redis-session-store 2.0.3 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6b92694592164facffa121a611d0dc3d91ec136
4
- data.tar.gz: 4f26f80bba4017629352c698d6c2b5099993e434
3
+ metadata.gz: ebfa370ef2a8405445ce7f00e255cfbfd145f6c1
4
+ data.tar.gz: 49e849375d8356444e5ddedd1ff807a60aee0f16
5
5
  SHA512:
6
- metadata.gz: 1156d282e92feb912eb5a2e549bb2dbbb1dfb1a7e4bfceb18e50f6532831ef0b5ebc54e3e02f0840fbe8ee361c47d911499584db41962ae2a649d5c39bcadaf1
7
- data.tar.gz: b88e3ec0c62d51653c700d422b332f89e22d0ed9ad1d9358a955ebe445e8291801becde4f0d918b2c1964d40ac1df90997769434bdeb2e57ecb8b6d5ec893e4c
6
+ metadata.gz: 3c4f56d062a70435b1901b0c941cd46f8e1fc671ffac0a5a22d03ff73ccee7e2bf6aee1de28937abd96017bfa243bd415265a2c4e318b0d7b5d0d1845d39d6c5
7
+ data.tar.gz: 6384d17d7501558fddb326deba3194d63ee51f189d95e81aaad1f2d9672fbddeb5718bddbb9692722ed4e7de2f9b00a9b2c8404ee598df4b952104be875fbe14
@@ -25,7 +25,7 @@ module ActionDispatch
25
25
 
26
26
  def get_session(env, sid)
27
27
  @redis.with do |redis|
28
- unless sid and session = JSON.parse(redis.get(sid))
28
+ unless sid and session = MultiJson.load(redis.get(sid) || '{}')
29
29
  sid, session = generate_sid, {}
30
30
  end
31
31
  [sid, session]
@@ -37,9 +37,7 @@ module ActionDispatch
37
37
  expiry = expiry.nil? ? 0 : expiry + 1
38
38
 
39
39
  @redis.with do |redis|
40
- json = Jbuilder.encode do |json|
41
- json.(new_session, *new_session.keys)
42
- end
40
+ json = MultiJson.dump(new_session)
43
41
  redis.setex session_id, expiry,json
44
42
  session_id
45
43
  end
data/lib/version.rb CHANGED
@@ -1 +1 @@
1
- VERSION = '2.0.3'
1
+ VERSION = '2.1.0'
@@ -22,5 +22,5 @@ Gem::Specification.new do |spec|
22
22
  spec.add_dependency "connection_pool"
23
23
  spec.add_dependency "redis"
24
24
  spec.add_dependency "hiredis"
25
- spec.add_dependency "jbuilder"
25
+ spec.add_dependency 'multi_json', '~> 1.0'
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-redis-session-store
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Le Duc Duy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-01 00:00:00.000000000 Z
11
+ date: 2013-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -67,19 +67,19 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: jbuilder
70
+ name: multi_json
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '1.0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: '1.0'
83
83
  description: Multi-threaded Redis store for rack ID-based session (connection pooled
84
84
  with option for maximum redis connection)
85
85
  email: