tfa 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 414adc245dc71f49bbb95a5458410235771fe475
4
- data.tar.gz: 0e6000d5e9a261ab11281be9927e0038d6de2af2
3
+ metadata.gz: 9a4ebff8bb56416e64852152dbcbfb0b9dd3d0fc
4
+ data.tar.gz: cf0d9758601f1253a8bdd1e22edd65efea632c0d
5
5
  SHA512:
6
- metadata.gz: 5645d6a5f42cebf8923148d85fc5be2b20e7f26666cc3075972d8ff4ce93ec66ff647b5c6544fb7dd6ed5ce3410cf0bc5879b48f40b44ceb0976dd6d7019fff9
7
- data.tar.gz: 111d469cf45c8a343fd451b3c890f1b14d2c79533ec5be96a93ee5a31ed042a5d54f07ec1446bc3e2304317def1a1c7ab649fa609aa3c26a4c6a7b374846bf38
6
+ metadata.gz: a6c7d6ddcd7961d5fd040871525d46807ab44c8c1bf81f3ea73f246a7a24b7c5a49a16fcc95337f1278f65677058c83068e6b0d7d1765db348a865c0824c79e0
7
+ data.tar.gz: a402ef2d8702b1793e98fb04a6e3b4a5f83fae2226e1776262e19b41f99c93370fdeaf6f49eb0a8d808e29b243813aa36847cb1bb321c3e8a4b28efd663ce2ef
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # In
1
+ # tfa
2
2
 
3
3
  [![Build Status](https://travis-ci.org/mokhan/tfa.svg?branch=v0.0.2)](https://travis-ci.org/mokhan/tfa)
4
4
 
data/lib/tfa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module TFA
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  module TFA
2
2
  describe ShowCommand do
3
3
  subject { ShowCommand.new(storage) }
4
- let(:storage) { Storage.new(Tempfile.new('blah').path) }
4
+ let(:storage) { Storage.new(SecureRandom.uuid) }
5
5
 
6
6
  describe "#run" do
7
7
  context "when looking up the secret for a specific key" do
@@ -1,8 +1,8 @@
1
1
  module TFA
2
2
  describe TotpCommand do
3
3
  subject { TotpCommand.new(storage) }
4
- let(:secret) { ::ROTP::Base32.random_base32 }
5
4
  let(:storage) { Storage.new(Tempfile.new('test').path) }
5
+ let(:storage) { Storage.new(SecureRandom.uuid) }
6
6
 
7
7
  def code_for(secret)
8
8
  ::ROTP::TOTP.new(secret).now
@@ -10,6 +10,8 @@ module TFA
10
10
 
11
11
  describe "#run" do
12
12
  context "when a single key is given" do
13
+ let(:secret) { ::ROTP::Base32.random_base32 }
14
+
13
15
  it "returns a time based one time password for the authentication secret given" do
14
16
  storage.save('development', secret)
15
17
  expect(subject.run(["development"])).to eql(code_for(secret))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tfa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - mo khan