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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39327bf4044936bb06e935ec7e1d35dd2c67a1fe
4
- data.tar.gz: 18adcc536adf29a44a3267303943e94d9f9a9226
3
+ metadata.gz: 6176a9640dcdb10ed78ac51b33d272cfcce6b4a8
4
+ data.tar.gz: 0ccff319f89b625a988f4565a8d0d2bc9dc35d7f
5
5
  SHA512:
6
- metadata.gz: dbd9d13568b816a111e91e01be82a7c1fa714f72bc5bbbcc27e1a6df1eab928936b5a40fe266aea49abe024117d021d302c94081fdb182fd8950f357a7d96f7e
7
- data.tar.gz: e94dd4e70f3635042f315876a456d594c3ac9bcc0ba17ea89fb5f4487e483e32fc4659407698b4986683cc44b2895bab27be137445b8cc631a235ed1206a05ec
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
- return value = @request.env["CONTENT_LENGTH"] if header == "content-length"
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
@@ -1,3 +1,3 @@
1
1
  module Smaak
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -11,8 +11,7 @@ class Tester < Smaak::SmaakService
11
11
  @@instance
12
12
  end
13
13
 
14
- def configure_service(configuration = nil)
15
- super
14
+ def configure_services(configuration = nil)
16
15
  @configured = true
17
16
  end
18
17
  end
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.5
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-04 00:00:00.000000000 Z
11
+ date: 2015-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: persistent-cache