smaak 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/smaak/adaptors/rack_adaptor.rb +5 -1
- data/lib/smaak/server.rb +4 -0
- data/lib/smaak/version.rb +1 -1
- data/spec/lib/smaak/smaak_service_spec.rb +1 -2
- 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: 6176a9640dcdb10ed78ac51b33d272cfcce6b4a8
|
4
|
+
data.tar.gz: 0ccff319f89b625a988f4565a8d0d2bc9dc35d7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00b783a3d6db9dceb9f353b7c889a5bf595f6158d2594d13b87ac1a9dfddb57f8bbf47c754d19fc7b8f7908cee78e971e6affb451ed7adfd5ee99081e8796c96
|
7
|
+
data.tar.gz: 706a6ad29291fd7327bce6b803fcd7bb20f61696f7121a899b9150c0a692b4b263cfba7248f951b9c00caf241644cc1b9acd4bd6a2dfb517b903eb2574efa1a1
|
@@ -12,7 +12,11 @@ module Smaak
|
|
12
12
|
|
13
13
|
def header(header)
|
14
14
|
raise ArgumentError.new("Header must be a non-blank string") if not Smaak::Utils::non_blank_string?(header)
|
15
|
-
|
15
|
+
if header == "content-length"
|
16
|
+
value = @request.env["CONTENT_LENGTH"]
|
17
|
+
value = 0 if value.nil?
|
18
|
+
return value
|
19
|
+
end
|
16
20
|
return value = @request.env["REQUEST_METHOD"] if header == "request-method"
|
17
21
|
return @request.env["HTTP_#{header.upcase.gsub("-", "_")}"]
|
18
22
|
end
|
data/lib/smaak/server.rb
CHANGED
@@ -42,6 +42,10 @@ module Smaak
|
|
42
42
|
return false if not auth_message_unique?(auth_message)
|
43
43
|
return false if not auth_message.intended_for_recipient?(@key.export)
|
44
44
|
identifier = auth_message.identifier
|
45
|
+
if @association_store[identifier].nil?
|
46
|
+
puts "Unknown associate #{identifier}"
|
47
|
+
return false
|
48
|
+
end
|
45
49
|
psk = @association_store[identifier]['psk']
|
46
50
|
return false if not auth_message.verify(psk)
|
47
51
|
true
|
data/lib/smaak/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smaak
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ernst van Graan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: persistent-cache
|