pebblebed 0.3.18 → 0.3.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pebblebed/sinatra.rb +4 -0
- data/lib/pebblebed/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3319d5bf3e94fb16abb5605493d10a3f031881e
|
4
|
+
data.tar.gz: e741ea44d9228b81723b03655d788f6a668b9c86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e4f6b9e80cc33a2db5a55259c3ea12a7a00668ec3de415701b1290f2050e1c48ca7546a438ff22a1b13b9b25cce9359df833fef131dd489d73af7c539a86b0c
|
7
|
+
data.tar.gz: 84a655055294e5d2ce69db6cef870a301938cfedbf357b896512697f666bd79aa4f8bf7fabc031d498644aa92615194bfee00659f175a63994846eb76b75eca9
|
data/lib/pebblebed/sinatra.rb
CHANGED
@@ -51,11 +51,14 @@ module Sinatra
|
|
51
51
|
cache_key = "identity-data-for-session-#{current_session}"
|
52
52
|
@current_identity_data = memcached.get(cache_key)
|
53
53
|
if @current_identity_data
|
54
|
+
logger.info "Using cached identity"
|
54
55
|
if memcached.respond_to?(:touch)
|
55
56
|
memcached.touch(cache_key, IDENTITY_CACHE_TTL)
|
56
57
|
end
|
57
58
|
return @current_identity_data
|
58
59
|
end
|
60
|
+
|
61
|
+
logger.info "Retrieving identity for caching"
|
59
62
|
@current_identity_data = pebbles.checkpoint.get("/identities/me")
|
60
63
|
if @current_identity_data['identity']
|
61
64
|
memcached.set(cache_key, @current_identity_data, IDENTITY_CACHE_TTL)
|
@@ -80,6 +83,7 @@ module Sinatra
|
|
80
83
|
|
81
84
|
def require_identity
|
82
85
|
unless current_identity
|
86
|
+
logger.warn "Current session (#{current_session}) has no identity"
|
83
87
|
halt 403, "No current identity."
|
84
88
|
end
|
85
89
|
end
|
data/lib/pebblebed/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pebblebed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katrina Owen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-07-
|
12
|
+
date: 2017-07-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|