Skip to content

Commit 642deba

Browse files
authored
Fix: Fix tests breaking in latest Ruby, update devcontainer to 3.3 (#143)
* Fix: Update to Ruby 3.3/3.4 and fix broken tests due to bad import * Chore: Update devcontainer to ruby 3.3
1 parent 1fbd30d commit 642deba

File tree

4 files changed

+14
-52
lines changed

4 files changed

+14
-52
lines changed

.devcontainer/Dockerfile

-19
This file was deleted.

.devcontainer/devcontainer.json

+11-30
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,22 @@
1-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2-
// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.1/containers/ruby
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
33
{
44
"name": "Ruby",
5-
"build": {
6-
"dockerfile": "Dockerfile",
7-
"args": {
8-
// Update 'VARIANT' to pick a Ruby version: 3, 3.1, 3.0, 2, 2.7
9-
// Append -bullseye or -buster to pin to an OS version.
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": {},
1610

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-
2811
// Use 'forwardPorts' to make a list of ports inside the container available locally.
2912
// "forwardPorts": [],
3013

3114
// Use 'postCreateCommand' to run commands after the container is created.
3215
// "postCreateCommand": "ruby --version",
3316

34-
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
35-
"remoteUser": "vscode",
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": {},
4019

20+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
21+
// "remoteUser": "root"
4122
}

.github/workflows/test.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [ main ]
66
pull_request:
7-
types: [opened, reopened, synchronize]
7+
branches: [ main ]
88

99
jobs:
1010
test:
@@ -13,8 +13,7 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
ruby-version: ['3.2', '3.0', '2.7', '2.3', truffleruby-head]
17-
16+
ruby-version: ['3.4', '3.3', '3.2', '3.0', '2.7', '2.3', truffleruby-head]
1817
steps:
1918
- uses: actions/checkout@v4
2019
- name: Set up Ruby ${{ matrix.ruby-version }}

spec/lib/rotp/hotp_spec.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require 'spec_helper'
2+
require 'uri'
23

34
RSpec.describe ROTP::HOTP do
45
let(:counter) { 1234 }

0 commit comments

Comments
 (0)