macaroons 0.6.0 → 0.6.1

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: fd23deb2d08621d3bbcfeef61d2f7794449edfdf
4
- data.tar.gz: 3eba43c3203ba0ab589d7485fdf94dece7139be7
3
+ metadata.gz: 61aeeeaea180fcc432d17c1f67833722e026c1c1
4
+ data.tar.gz: 225fce2387e850a3e104bdc1a35af4fb4de1b3eb
5
5
  SHA512:
6
- metadata.gz: 9758e651d2904b58c0d7983b854699dff193e83741e711e34b344007554cfd9730e10cda29869e09a21f178418c4b471d3360c93ef047008598adee2f8f883cf
7
- data.tar.gz: 8abda61eb01699323fd8b4e11462ac0997af03e624d98c82690b65ef99e59b83f4f9aaf109c1d83adcd43ff180a1b205a8aa637a7ec1c81f0eb8f8588f0b366d
6
+ metadata.gz: f380163e8b5b86416b2e9344220e9907053a8ad5686fcbbed710f083fff35dc656e313d8a9f8d7b17780e15af853ae6590dc12d012f8af935ad97aabd986e678
7
+ data.tar.gz: 03f87801b3c936bf974657a201e155d3fc504db0eb3cdc22cdde6ebb55de28e6d558fc52c764665bccb44c8952cc96a92a221c6f483100dae0204e786f46ba2c
data/.travis.yml CHANGED
@@ -2,7 +2,6 @@ language: ruby
2
2
  rvm:
3
3
  - 2.1.0
4
4
  - 2.0.0
5
- - ruby-head
6
5
  before_install:
7
6
  - wget https://github.com/jedisct1/libsodium/releases/download/0.7.0/libsodium-0.7.0.tar.gz
8
7
  - tar xzvf libsodium-0.7.0.tar.gz
data/README.md CHANGED
@@ -86,7 +86,7 @@ m.add_third_party_caveat(caveat_key, identifier, 'http://auth.mybank/')
86
86
  discharge = Macaroon.new(
87
87
  location: 'http://auth.mybank/',
88
88
  identifier: identifier,
89
- caveat: Ocaveat_key
89
+ key: caveat_key
90
90
  )
91
91
  discharge.add_first_party_caveat('time < 2015-01-01T00:00')
92
92
 
@@ -73,7 +73,7 @@ module Macaroons
73
73
  end
74
74
 
75
75
  def bind_signature(signature)
76
- key = Utils.truncate_or_pad('0')
76
+ key = Utils.truncate_or_pad("\0")
77
77
  hash1 = Utils.hmac(key, Utils.unhexlify(self.signature))
78
78
  hash2 = Utils.hmac(key, Utils.unhexlify(signature))
79
79
  Utils.hmac(key, hash1 + hash2)
@@ -19,8 +19,8 @@ module Macaroons
19
19
  size = size.nil? ? 32 : size
20
20
  if string.length > size
21
21
  string[0, size]
22
- elsif string.length > size
23
- string + '\0'*(size-string.length)
22
+ elsif string.length < size
23
+ string + "\0"*(size-string.length)
24
24
  else
25
25
  string
26
26
  end
@@ -1,3 +1,3 @@
1
1
  module Macaroons
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: macaroons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Cordell
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-05-12 00:00:00.000000000 Z
13
+ date: 2015-08-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json