Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby 2.6.10 upgrade #323

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ steps:
event: tag

- name: api_tests
image: ruby:2.3.8-alpine
image: ruby:2.6.10-alpine
environment:
PHUB_DB_HOST: postgres
commands:
Expand Down
2 changes: 1 addition & 1 deletion platform-hub-api/.ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.8
2.6.10p210
2 changes: 1 addition & 1 deletion platform-hub-api/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

ruby '2.3.8'
ruby '2.6.10'

gem 'rails', '~> 5.0.0', '>= 5.0.7.2'
gem 'pg', '~> 0.21.0'
Expand Down
4 changes: 2 additions & 2 deletions platform-hub-api/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ DEPENDENCIES
with_model (~> 2.0)

RUBY VERSION
ruby 2.3.8p459
ruby 2.6.10p210

BUNDLED WITH
2.1.4
2.3.14
8 changes: 7 additions & 1 deletion platform-hub-api/app/services/encryptor_service.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
class EncryptorService
def initialize(secret_key_base)
@encryptor = ActiveSupport::MessageEncryptor.new(secret_key_base)
# (shaun-scaling) MessageEncryptor always truncates to keylen. In newer versions of ruby
# This now throws an error if the key is != key_len. Previously it was
# just swallowed silently. Default is 'aes-256-gcm' which has a 256bit/32byte key len.
# https://api.rubyonrails.org/classes/ActiveSupport/MessageEncryptor.html#method-c-new
# https://github.com/ruby/ruby/commit/ce63526
# https://github.com/rails/rails/issues/25185
@encryptor = ActiveSupport::MessageEncryptor.new(secret_key_base[0, ActiveSupport::MessageEncryptor.key_len])
end

def encrypt(plaintext)
Expand Down
6 changes: 4 additions & 2 deletions platform-hub-api/db/structure.sql
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-
--
-- PostgreSQL database dump
--

-- Dumped from database version 12.5 (Debian 12.5-1.pgdg100+1)
-- Dumped by pg_dump version 12.9 (Ubuntu 12.9-2.pgdg20.04+1)
-- Dumped by pg_dump version 13.8 (Debian 13.8-0+deb11u1)

SET statement_timeout = 0;
SET lock_timeout = 0;
Expand Down Expand Up @@ -1294,3 +1294,5 @@ INSERT INTO "schema_migrations" (version) VALUES
('20181109123528'),
('20181114155258'),
('20181204101525');


2 changes: 1 addition & 1 deletion platform-hub-api/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh

# Source local env variables for test execution
source .env.test
Expand Down
2 changes: 1 addition & 1 deletion platform-hub-web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# NOTE: this dockerfile expects that a built/optimized version of the web app is
# already available within `./dist`.

FROM alpine:3.12
FROM alpine:3.16.2

COPY dist /app/
WORKDIR /app