soar_smaak 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/soar_smaak/router.rb +16 -2
- data/lib/soar_smaak/version.rb +1 -1
- data/soar_smaak.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3eb60f4c977a6bc07e04e009fae8b0c5c7b6595
|
4
|
+
data.tar.gz: b95e4fd543d50f35d44527797d8560d9157f6d61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 293acf2b827380f7ecbfa98a273dd4168c9bf8f7ad12828e45016de2d494fc753c792b7f01d3f88edb65c061891d666e5de36b107bc53707b158971753517216
|
7
|
+
data.tar.gz: 5c50d647f80e9cc173529999450175a18aa86d5f20b340b65796c033d145e2ede285448529018d7ccab19682da0db64e6d60a3fc114c140279d37ae42ba5a9ce
|
data/lib/soar_smaak/router.rb
CHANGED
@@ -31,8 +31,7 @@ module SoarSmaak
|
|
31
31
|
end
|
32
32
|
return [403, {}, [" 403 - Not authorized"]] if not auth_message or not auth_message.identifier
|
33
33
|
@auditing.debug("Smaak: request authorized for #{auth_message.identifier}")
|
34
|
-
session = request
|
35
|
-
session['user'] = auth_message.identifier if session
|
34
|
+
session = update_session_with_smaak(request)
|
36
35
|
env["rack.input"] = body
|
37
36
|
else
|
38
37
|
@auditing.debug("routing non-smaak request")
|
@@ -54,6 +53,21 @@ module SoarSmaak
|
|
54
53
|
|
55
54
|
private
|
56
55
|
|
56
|
+
def update_session_with_smaak(request)
|
57
|
+
session = request.session
|
58
|
+
|
59
|
+
if session
|
60
|
+
if session['user']
|
61
|
+
session['route_info'] = auth_message.identifier
|
62
|
+
else
|
63
|
+
session['user'] = auth_message.identifier
|
64
|
+
end
|
65
|
+
return session
|
66
|
+
else
|
67
|
+
debug("No session?")
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
57
71
|
def debug(message)
|
58
72
|
if @auditing
|
59
73
|
@auditing.debug(message)
|
data/lib/soar_smaak/version.rb
CHANGED
data/soar_smaak.gemspec
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
|
30
|
-
spec.add_dependency "rack", '>= 1.6.4', '<
|
30
|
+
spec.add_dependency "rack", '>= 1.6.4', '< 2.0.0'
|
31
31
|
spec.add_dependency "smaak", "~> 0.2.0"
|
32
32
|
|
33
33
|
spec.add_development_dependency "bundler", "~> 1.12"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soar_smaak
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ernst Van Graan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 1.6.4
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 2.0.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 1.6.4
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 2.0.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: smaak
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|