Skip to content

Commit

Permalink
try to upgrade to ruby 3.3.4
Browse files Browse the repository at this point in the history
- update dockerfile, .ruby-version and gemfile
- remove uses of File.exists? since it's been deprecated and removed
Ben Lerner committed Sep 16, 2024
1 parent 2cc24df commit f497820
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2
3.3.4
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM phusion/passenger-ruby30:2.5.1
FROM phusion/passenger-ruby33:3.0.8-arm64
RUN apt-get update && apt-get upgrade -y -o Dpkg::Options::="--force-confold"

RUN rm -f /etc/service/nginx/down
@@ -15,8 +15,6 @@ RUN apt-get update -qq && apt-get install -y nodejs postgresql-client
WORKDIR /home/app/hourglass
COPY Gemfile /home/app/hourglass/Gemfile
COPY Gemfile.lock /home/app/hourglass/Gemfile.lock
RUN bash -lc 'rvm install ruby-3.0.2'
RUN bash -lc 'rvm --default use ruby-3.0.2'
RUN bundle config set --local without 'test development'
RUN bundle install

2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.0.2'
ruby '3.3.4'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.1'
8 changes: 5 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -87,6 +87,7 @@ GEM
erubi (>= 1.0.0)
rack (>= 0.9.0)
rouge (>= 1.0.0)
bigdecimal (3.1.8)
bindex (0.8.1)
binding_of_caller (1.0.1)
debug_inspector (>= 1.2.0)
@@ -138,7 +139,7 @@ GEM
logger
faraday-net_http (3.3.0)
net-http
ffi (1.17.0)
ffi (1.17.0-x86_64-linux-gnu)
globalid (1.2.1)
activesupport (>= 6.1)
graphql (1.12.24)
@@ -188,7 +189,8 @@ GEM
minitest (>= 5.0)
ruby-progressbar
msgpack (1.7.2)
multi_xml (0.6.0)
multi_xml (0.7.1)
bigdecimal (~> 3.1)
net-http (0.4.1)
uri
net-imap (0.4.16)
@@ -419,7 +421,7 @@ DEPENDENCIES
webpacker (~> 6.0.0.rc.5)

RUBY VERSION
ruby 3.0.2p107
ruby 3.3.4p94

BUNDLED WITH
2.5.6
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ class Application < Rails::Application
env_file = File.join(Rails.root, 'config', "#{Rails.env}_local_env.yml")
YAML.load(File.open(env_file)).each do |key, value|
ENV[key.to_s] = value
end if File.exists?(env_file)
end if File.exist?(env_file)
end

# Add subdirectories of models
2 changes: 1 addition & 1 deletion config/initializers/graphql_schema_updater.rb
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
HourglassSchema.write_graphql!
end

if File.exists?(Rails.root.join('config/schemas/graphql-queries.json'))
if File.exist?(Rails.root.join('config/schemas/graphql-queries.json'))
STATIC_GRAPHQL_QUERIES = JSON.parse(File.read(Rails.root.join('config/schemas/graphql-queries.json')))
KNOWN_GRAPHQL_QUERIES = STATIC_GRAPHQL_QUERIES.invert
else
2 changes: 1 addition & 1 deletion config/initializers/secret_token.rb
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
if Rails.env.production?
require 'securerandom'
key_file = File.expand_path("~/.rails_key").to_s
unless File.exists?(key_file)
unless File.exist?(key_file)
kk = File.open(key_file, 'wb')
6.times do
kk.write(SecureRandom.urlsafe_base64)

0 comments on commit f497820

Please sign in to comment.