rotp 6.3.0 → 6.3.1
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 +4 -4
- data/.devcontainer/devcontainer.json +11 -30
- data/.github/dependabot.yml +6 -0
- data/.github/workflows/release.yaml +2 -2
- data/.github/workflows/test.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/rotp/arguments.rb +11 -2
- data/lib/rotp/cli.rb +2 -2
- data/lib/rotp/version.rb +1 -1
- data/spec/lib/rotp/hotp_spec.rb +1 -0
- metadata +7 -7
- data/.devcontainer/Dockerfile +0 -19
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7c2b1404b98062478370f77b91348c5480783bbf6353fcc4d1beea0603bea63f
|
|
4
|
+
data.tar.gz: 2134d1e2ce2af29a4b72f75a8c7b8bea073b215f2ace05be9e3cefd2f10e7587
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1b787d125aa066e36a2f905bd9e707253c77f75a8abe189ca6eb6f160fa4203960064089ec6ba15ea3e16d83826d6f2346528b95942681226fca32b47a09763a
|
|
7
|
+
data.tar.gz: 1396bb30353567e42df1ecd602b6c93c88034d9755be47a1848b70200ceb1111cf35fcad0abd8c5d44881563821ae3d555be222153141da6723b1648072895c3
|
|
@@ -1,41 +1,22 @@
|
|
|
1
|
-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
|
2
|
-
// https://github.com/
|
|
1
|
+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
|
2
|
+
// README at: https://github.com/devcontainers/templates/tree/main/src/ruby
|
|
3
3
|
{
|
|
4
4
|
"name": "Ruby",
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
// Use -bullseye variants on local on arm64/Apple Silicon.
|
|
11
|
-
"VARIANT": "3-bullseye",
|
|
12
|
-
// Options
|
|
13
|
-
"NODE_VERSION": "16"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
5
|
+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
|
6
|
+
"image": "mcr.microsoft.com/devcontainers/ruby:1-3.3-bullseye"
|
|
7
|
+
|
|
8
|
+
// Features to add to the dev container. More info: https://containers.dev/features.
|
|
9
|
+
// "features": {},
|
|
16
10
|
|
|
17
|
-
// Configure tool-specific properties.
|
|
18
|
-
"customizations": {
|
|
19
|
-
// Configure properties specific to VS Code.
|
|
20
|
-
"vscode": {
|
|
21
|
-
// Add the IDs of extensions you want installed when the container is created.
|
|
22
|
-
"extensions": [
|
|
23
|
-
"rebornix.Ruby"
|
|
24
|
-
]
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
|
|
28
11
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
|
29
12
|
// "forwardPorts": [],
|
|
30
13
|
|
|
31
14
|
// Use 'postCreateCommand' to run commands after the container is created.
|
|
32
15
|
// "postCreateCommand": "ruby --version",
|
|
33
16
|
|
|
34
|
-
//
|
|
35
|
-
"
|
|
36
|
-
"features": {
|
|
37
|
-
"ghcr.io/devcontainers-contrib/features/act:1": {},
|
|
38
|
-
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
|
|
39
|
-
}
|
|
17
|
+
// Configure tool-specific properties.
|
|
18
|
+
// "customizations": {},
|
|
40
19
|
|
|
20
|
+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
|
21
|
+
// "remoteUser": "root"
|
|
41
22
|
}
|
|
@@ -8,14 +8,14 @@ jobs:
|
|
|
8
8
|
release:
|
|
9
9
|
runs-on: ubuntu-latest
|
|
10
10
|
steps:
|
|
11
|
-
- uses: google-github-actions/release-please-action@
|
|
11
|
+
- uses: google-github-actions/release-please-action@v4
|
|
12
12
|
id: release
|
|
13
13
|
with:
|
|
14
14
|
release-type: ruby
|
|
15
15
|
package-name: rotp
|
|
16
16
|
version-file: "lib/rotp/version.rb"
|
|
17
17
|
# Checkout code if release was created
|
|
18
|
-
- uses: actions/checkout@
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
19
|
if: ${{ steps.release.outputs.release_created }}
|
|
20
20
|
# Setup ruby if a release was created
|
|
21
21
|
- uses: ruby/setup-ruby@v1
|
data/.github/workflows/test.yaml
CHANGED
|
@@ -4,7 +4,7 @@ on:
|
|
|
4
4
|
push:
|
|
5
5
|
branches: [ main ]
|
|
6
6
|
pull_request:
|
|
7
|
-
|
|
7
|
+
branches: [ main ]
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
10
|
test:
|
|
@@ -12,11 +12,11 @@ jobs:
|
|
|
12
12
|
runs-on: ubuntu-latest
|
|
13
13
|
|
|
14
14
|
strategy:
|
|
15
|
+
# Include '3.5.0-preview1' to test compatibility with the upcoming Ruby 3.5 release.
|
|
15
16
|
matrix:
|
|
16
|
-
ruby-version: ['3.2', '3.0', '2.7', '2.3', truffleruby-head]
|
|
17
|
-
|
|
17
|
+
ruby-version: ['3.5.0-preview1', '3.4', '3.3', '3.2', '3.0', '2.7', '2.3', 'truffleruby-head']
|
|
18
18
|
steps:
|
|
19
|
-
- uses: actions/checkout@
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
20
|
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
21
21
|
uses: ruby/setup-ruby@v1
|
|
22
22
|
with:
|
data/CHANGELOG.md
CHANGED
data/lib/rotp/arguments.rb
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
require 'optparse'
|
|
2
|
-
require 'ostruct'
|
|
3
2
|
|
|
4
3
|
module ROTP
|
|
5
4
|
class Arguments
|
|
5
|
+
Options = Struct.new(:time, :counter, :mode, :digest, :secret, :warnings)
|
|
6
|
+
|
|
6
7
|
def initialize(filename, arguments)
|
|
7
8
|
@filename = filename
|
|
8
9
|
@arguments = Array(arguments)
|
|
@@ -26,7 +27,15 @@ module ROTP
|
|
|
26
27
|
end
|
|
27
28
|
|
|
28
29
|
def default_options
|
|
29
|
-
|
|
30
|
+
o = Options.new
|
|
31
|
+
o.time = true
|
|
32
|
+
o.counter = 0
|
|
33
|
+
o.mode = :time
|
|
34
|
+
o
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def to_h
|
|
38
|
+
options!.to_h
|
|
30
39
|
end
|
|
31
40
|
|
|
32
41
|
def parse
|
data/lib/rotp/cli.rb
CHANGED
|
@@ -31,9 +31,9 @@ module ROTP
|
|
|
31
31
|
return arguments.to_s if options.mode == :help
|
|
32
32
|
|
|
33
33
|
if options.mode == :time
|
|
34
|
-
ROTP::TOTP.new(options.secret, options).now
|
|
34
|
+
ROTP::TOTP.new(options.secret, options.to_h).now
|
|
35
35
|
elsif options.mode == :hmac
|
|
36
|
-
ROTP::HOTP.new(options.secret, options).at options.counter
|
|
36
|
+
ROTP::HOTP.new(options.secret, options.to_h).at options.counter
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
data/lib/rotp/version.rb
CHANGED
data/spec/lib/rotp/hotp_spec.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rotp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.3.
|
|
4
|
+
version: 6.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mark Percival
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-10-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -74,9 +74,9 @@ executables:
|
|
|
74
74
|
extensions: []
|
|
75
75
|
extra_rdoc_files: []
|
|
76
76
|
files:
|
|
77
|
-
- ".devcontainer/Dockerfile"
|
|
78
77
|
- ".devcontainer/devcontainer.json"
|
|
79
78
|
- ".dockerignore"
|
|
79
|
+
- ".github/dependabot.yml"
|
|
80
80
|
- ".github/workflows/release.yaml"
|
|
81
81
|
- ".github/workflows/test.yaml"
|
|
82
82
|
- ".gitignore"
|
|
@@ -113,7 +113,7 @@ homepage: https://github.com/mdp/rotp
|
|
|
113
113
|
licenses:
|
|
114
114
|
- MIT
|
|
115
115
|
metadata: {}
|
|
116
|
-
post_install_message:
|
|
116
|
+
post_install_message:
|
|
117
117
|
rdoc_options: []
|
|
118
118
|
require_paths:
|
|
119
119
|
- lib
|
|
@@ -128,8 +128,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
128
128
|
- !ruby/object:Gem::Version
|
|
129
129
|
version: '0'
|
|
130
130
|
requirements: []
|
|
131
|
-
rubygems_version: 3.
|
|
132
|
-
signing_key:
|
|
131
|
+
rubygems_version: 3.5.22
|
|
132
|
+
signing_key:
|
|
133
133
|
specification_version: 4
|
|
134
134
|
summary: A Ruby library for generating and verifying one time passwords
|
|
135
135
|
test_files: []
|
data/.devcontainer/Dockerfile
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.238.1/containers/ruby/.devcontainer/base.Dockerfile
|
|
2
|
-
|
|
3
|
-
# [Choice] Ruby version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.1, 3.0, 2, 2.7, 3-bullseye, 3.1-bullseye, 3.0-bullseye, 2-bullseye, 2.7-bullseye, 3-buster, 3.1-buster, 3.0-buster, 2-buster, 2.7-buster
|
|
4
|
-
ARG VARIANT="3.1-bullseye"
|
|
5
|
-
FROM mcr.microsoft.com/vscode/devcontainers/ruby:0-${VARIANT}
|
|
6
|
-
|
|
7
|
-
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
|
|
8
|
-
ARG NODE_VERSION="none"
|
|
9
|
-
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
|
|
10
|
-
|
|
11
|
-
# [Optional] Uncomment this section to install additional OS packages.
|
|
12
|
-
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
|
13
|
-
# && apt-get -y install --no-install-recommends <your-package-list-here>
|
|
14
|
-
|
|
15
|
-
# [Optional] Uncomment this line to install additional gems.
|
|
16
|
-
# RUN gem install <your-gem-names-here>
|
|
17
|
-
|
|
18
|
-
# [Optional] Uncomment this line to install global node packages.
|
|
19
|
-
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
|