potp 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/bin/potp +1 -1
- data/lib/potp/foreign/supplement.rb +1 -1
- data/lib/potp/totp.rb +2 -5
- data/lib/potp/version.rb +1 -1
- data/potp.gemspec +6 -5
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d2b61f010b1f9a9e5b0d2a1d878abe5c913e6bd46a2821a59ec063baed5c136
|
4
|
+
data.tar.gz: a28abecf2c51b234512f3b5b5799a40c19e5ebe2fbdd049e774f5c03c3550a96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75af955f1f116a0c2ecd1e8862ff523e5a25767bd17ce21c5031efca79d8a4f908e3ba80ab8e11d66a02992a0304e4110fa62344002fab9b8ecaca5a202beecb
|
7
|
+
data.tar.gz: 7f2a3394b5c2dcb31e103d321be1d637f3d74a897474c500189bb956231971f80165dfd624fd6a6aff1a1b53cc23afa072c26f4ddb2070b73cc6404755e28c42
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# BSD-2-clause license, extended by language use conditions
|
2
2
|
|
3
|
-
Copyright (C)
|
3
|
+
Copyright (C) 2025, Bertram Scharpf <software@bertram-scharpf.de>.
|
4
4
|
All rights reserved.
|
5
5
|
|
6
6
|
Redistribution and use in source and binary forms, with or without
|
data/README.md
CHANGED
data/bin/potp
CHANGED
@@ -19,7 +19,7 @@ class POTP::Appl < Application
|
|
19
19
|
NAME = "potp"
|
20
20
|
VERSION = POTP::VERSION
|
21
21
|
SUMMARY = "Plain One Time Password Tool"
|
22
|
-
COPYRIGHT = "(C)
|
22
|
+
COPYRIGHT = "(C) 2025 Bertram Scharpf <software@bertram-scharpf.de>"
|
23
23
|
LICENSE = "BSD-2-Clause+"
|
24
24
|
AUTHOR = "Bertram Scharpf <software@bertram-scharpf.de>"
|
25
25
|
|
data/lib/potp/totp.rb
CHANGED
@@ -15,8 +15,6 @@ module POTP
|
|
15
15
|
|
16
16
|
attr_reader :interval
|
17
17
|
|
18
|
-
# @option options [Integer] interval (30) the time interval in seconds for OTP
|
19
|
-
# This defaults to 30 which is standard.
|
20
18
|
def initialize secret, interval: nil, **kwargs
|
21
19
|
@interval = interval || DEFAULT_INTERVAL
|
22
20
|
super secret, **kwargs
|
@@ -29,9 +27,8 @@ module POTP
|
|
29
27
|
fin = now = timeint at||Time.now
|
30
28
|
now -= drift_behind if drift_behind
|
31
29
|
fin += drift_ahead if drift_ahead
|
32
|
-
if after then
|
33
|
-
after
|
34
|
-
now = after if now < after
|
30
|
+
if after and now < after then
|
31
|
+
now = after + @interval
|
35
32
|
end
|
36
33
|
now -= now % @interval
|
37
34
|
while now < fin do
|
data/lib/potp/version.rb
CHANGED
data/potp.gemspec
CHANGED
@@ -26,10 +26,11 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.add_dependency "appl", "~>1"
|
27
27
|
end
|
28
28
|
|
29
|
-
s.require_paths
|
30
|
-
s.extensions
|
31
|
-
s.files
|
32
|
-
s.executables
|
33
|
-
s.extra_rdoc_files
|
29
|
+
s.require_paths = %w(lib)
|
30
|
+
s.extensions = %w()
|
31
|
+
s.files = Dir[ "lib/**/*.rb", "bin/*", ]
|
32
|
+
s.executables = %w(potp)
|
33
|
+
s.extra_rdoc_files = %w(LICENSE README.md potp.gemspec)
|
34
|
+
|
34
35
|
end
|
35
36
|
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: potp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bertram Scharpf
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies: []
|
13
12
|
description: |
|
14
13
|
A Ruby library for generating and verifying one time passwords,
|
@@ -39,7 +38,6 @@ homepage: https://github.com/BertramScharpf/ruby-potp
|
|
39
38
|
licenses:
|
40
39
|
- LicenseRef-LICENSE
|
41
40
|
metadata: {}
|
42
|
-
post_install_message:
|
43
41
|
rdoc_options: []
|
44
42
|
require_paths:
|
45
43
|
- lib
|
@@ -55,8 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
55
53
|
version: '0'
|
56
54
|
requirements:
|
57
55
|
- Just Ruby and some more if you like
|
58
|
-
rubygems_version: 3.
|
59
|
-
signing_key:
|
56
|
+
rubygems_version: 3.6.2
|
60
57
|
specification_version: 4
|
61
58
|
summary: Plain One Time Password Tool
|
62
59
|
test_files: []
|