rack-simple_auth 0.1.2 → 0.1.3

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: ac6323039dc11e2c7a1a274c5771736806cfd79a
4
- data.tar.gz: 7a0d1b3f084440c583f281142d3a55c39069c2f5
3
+ metadata.gz: 8fa6b100a85c9fd7a4a16745a3669038ef8f48ce
4
+ data.tar.gz: fbf000d057d5df50733d04cc3d4afcda972ff192
5
5
  SHA512:
6
- metadata.gz: 7104b6d521fe419f683d0272e799e3f66b6f1327b96a7ca22ecd4964aac4fef5787dc26cb31aba3b74e04372b4690274623b00ddcbf88f73c090a2f51c44ce28
7
- data.tar.gz: be303c35b182ac1dc4cfad28ca7082a044b3a950bb12cfacd78f03b91f07f7f537464585c31e87ead239ccd437a56ecd0950458edda2a19b683b5653af1c272f
6
+ metadata.gz: ee7d6fb78ea972bdd943eda54f9056acf6d10e4b8754af7da87dcc626c7183ad92497d676eacc598a444acbf628695d0ad07ef368ac8f26175753755d7c869ed
7
+ data.tar.gz: 44d6c7373f234946f22246b5729ea14fbd47b942fb29a81db0d344ba8cc6f294b6ad5de842d245e8ab3649693500b15c0a9b1436495166550f7dab008052e9e1
data/README.md CHANGED
@@ -24,6 +24,7 @@ Or install it yourself as:
24
24
  [![Coverage Status](https://coveralls.io/repos/Benny1992/rack-simple_auth/badge.png?branch=master)](https://coveralls.io/r/Benny1992/rack-simple_auth?branch=master)
25
25
  [![Gem Version](https://badge.fury.io/rb/rack-simple_auth.png)](http://badge.fury.io/rb/rack-simple_auth)
26
26
  [![Dependency Status](https://gemnasium.com/Benny1992/rack-simple_auth.png)](https://gemnasium.com/Benny1992/rack-simple_auth)
27
+ [![Codeship](https://www.codeship.io/projects/f2d9d790-b0fe-0131-3fd5-025f180094b5/status)](https://www.codeship.io/projects/f2d9d790-b0fe-0131-3fd5-025f180094b5/status)
27
28
 
28
29
  ## Usage
29
30
 
@@ -68,6 +68,7 @@ module Rack
68
68
  def allowed_messages
69
69
  messages = []
70
70
 
71
+ @date = Time.now.to_i.freeze
71
72
  (-(@tolerance)..@tolerance).step(@steps) do |i|
72
73
  i = i.round(2)
73
74
  messages << OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), @secret, message(i))
@@ -80,8 +81,9 @@ module Rack
80
81
  # @param [Fixnum] delay [delay in timestamp format]
81
82
  # @return [Hash] message [message which will be encrypted]
82
83
  def message(delay = 0)
83
- date = Time.now.to_i + delay
84
+ date = @date + delay
84
85
  date = date.to_i if delay.eql?(0.0)
86
+ puts "Delay: #{delay}, Timestamp: #{date}"
85
87
 
86
88
  case @request.request_method
87
89
  when 'GET'
@@ -2,6 +2,6 @@ module Rack
2
2
  # Module which Contains different Authorization / Authentication Classes (HMAC, ..)
3
3
  module SimpleAuth
4
4
  # Current Gem Version
5
- VERSION = '0.1.2'
5
+ VERSION = '0.1.3'
6
6
  end
7
7
  end
data/task/floodtest.rake CHANGED
@@ -10,6 +10,7 @@ namespace :floodtest do
10
10
  1.upto(test_runs) do |i|
11
11
  puts "Running test #{i} of #{test_runs}"
12
12
  exit(-1) if !system('bundle exec rake test:unit')
13
+ Rake::Task['test:cleanup'].invoke
13
14
  end
14
15
  end
15
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-simple_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benny1992
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-25 00:00:00.000000000 Z
11
+ date: 2014-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack