Skip to content

Commit

Permalink
upgrade to ruby 3.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
wendelfabianchinsamy committed Apr 11, 2024
1 parent 6032337 commit 611dae2
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 25 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ jobs:
AWS_REGION: ${{ secrets.AWS_REGION }}
steps:
- uses: actions/checkout@v3
- name: Set up Ruby 2.6
- name: Set up Ruby 3.1.4
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
ruby-version: 3.1.4
- uses: actions/cache@v3
with:
path: vendor/bundle
Expand All @@ -66,8 +66,8 @@ jobs:
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
run: |
cp .env.build .env
gem install rubygems-update -v 3.4.22
gem install bundler:2.4.20
gem install rubygems-update -v 3.5.6
gem install bundler:2.5.6
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
sudo /etc/init.d/mysql start
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM phusion/passenger-full:2.1.0
FROM phusion/passenger-full:2.5.1
LABEL maintainer="[email protected]"
LABEL maintainer_name="Kristian Garza"

Expand All @@ -13,8 +13,8 @@ RUN usermod -a -G docker_env app
# Use baseimage-docker's init process.
CMD ["/sbin/my_init"]

# Install Ruby 2.6.9
RUN bash -lc 'rvm --default use ruby-2.6.9'
# Install Ruby 3.1.4
RUN bash -lc 'rvm --default use ruby-3.1.4'

# Update installed APT packages
RUN apt-get update && apt-get upgrade -y -o Dpkg::Options::="--force-confold" && \
Expand Down Expand Up @@ -46,8 +46,8 @@ RUN mkdir -p /home/app/webapp/tmp/pids && \

# Install Ruby gems
WORKDIR /home/app/webapp
RUN gem install rubygems-update -v 3.4.22 && \
gem install bundler:2.4.20 && \
RUN gem install rubygems-update -v 3.5.6 && \
gem install bundler:2.5.6 && \
/sbin/setuser app bundle config set --local path 'vendor/bundle' && \
/sbin/setuser app bundle install

Expand Down
4 changes: 1 addition & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gem 'equivalent-xml', '~> 0.6.0'
gem 'nokogiri', '~> 1.13.6'
gem 'iso8601', '~> 0.12.1'
gem 'maremma', '~> 4.9.6'
gem "dalli", "~> 2.7.6"
gem "dalli", "~> 3.2", ">= 3.2.8"
gem "lograge", "~> 0.11.2"
gem "logstash-event", "~> 1.2", ">= 1.2.02"
gem "logstash-logger", "~> 0.26.1"
Expand All @@ -29,7 +29,6 @@ gem 'shoryuken', '~> 3.2', '>= 3.2.2'
gem "aws-sdk-s3", require: false
gem 'aws-sdk-sqs', '~> 1.22'
gem 'iso_country_codes'
# gem "rack-timeout"
gem 'sentry-raven', '~> 2.9'
gem 'git', '~> 1.5'
gem "sprockets", "~> 3.7", ">= 3.7.2"
Expand All @@ -41,7 +40,6 @@ group :development, :test do
gem 'rubocop', '~> 0.77.0'
gem 'rubocop-performance', '~> 1.5', '>= 1.5.1'
gem 'rubocop-rails', '~> 2.4'
#gem "better_errors"
gem "binding_of_caller"
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
Expand Down
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ GEM
aws-sigv4 (~> 1.1)
aws-sigv4 (1.5.1)
aws-eventstream (~> 1, >= 1.0.2)
base32-url (0.5)
base32-url (0.7.0)
uuidtools (~> 2.1, >= 2.1.5)
bcrypt (3.1.18)
binding_of_caller (1.0.0)
debug_inspector (>= 0.0.1)
Expand All @@ -115,7 +116,7 @@ GEM
crack (0.4.5)
rexml
crass (1.0.6)
dalli (2.7.11)
dalli (3.2.8)
database_cleaner (2.0.1)
database_cleaner-active_record (~> 2.0.0)
database_cleaner-active_record (2.0.1)
Expand Down Expand Up @@ -182,10 +183,9 @@ GEM
mime-types
mimemagic (~> 0.3.0)
terrapin (~> 0.6.0)
listen (3.1.5)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
lograge (0.11.2)
actionpack (>= 4)
activesupport (>= 4)
Expand Down Expand Up @@ -310,7 +310,6 @@ GEM
rubocop-rspec (1.41.0)
rubocop (>= 0.68.1)
ruby-progressbar (1.11.0)
ruby_dep (1.5.0)
sentry-raven (2.13.0)
faraday (>= 0.7.6, < 1.0)
shoryuken (3.3.1)
Expand Down Expand Up @@ -342,6 +341,7 @@ GEM
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
unicode-display_width (1.6.1)
uuidtools (2.2.0)
vcr (3.0.3)
webmock (3.17.1)
addressable (>= 2.8.0)
Expand Down Expand Up @@ -370,7 +370,7 @@ DEPENDENCIES
cancancan (~> 3.0)
capybara
codeclimate-test-reporter (~> 1.0.0)
dalli (~> 2.7.6)
dalli (~> 3.2, >= 3.2.8)
database_cleaner
dotenv
equivalent-xml (~> 0.6.0)
Expand Down Expand Up @@ -414,4 +414,4 @@ DEPENDENCIES
webmock (~> 3.1)

BUNDLED WITH
2.3.10
2.5.6
2 changes: 1 addition & 1 deletion app/models/heartbeat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def services_up?

def memcached_up?
host = ENV["MEMCACHE_SERVERS"]
memcached_client = Dalli::Client.new("#{host}:11211")
memcached_client = Dalli::Client.new(ENV["MEMCACHE_SERVERS"])
memcached_client.alive!
true
rescue
Expand Down
2 changes: 1 addition & 1 deletion bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ chdir APP_ROOT do
# Add necessary setup steps to this file.

puts '== Installing dependencies =='
system! 'gem install bundler --conservative'
system! 'gem install bundle -v 2.5.6 r --conservative'
system('bundle check') || system!('bundle install')


Expand Down
2 changes: 1 addition & 1 deletion bin/update
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ chdir APP_ROOT do
# Add necessary update steps to this file.

puts '== Installing dependencies =='
system! 'gem install bundler --conservative'
system! 'gem install bundler -v 2.5.6 --conservative'
system('bundle check') || system!('bundle install')

puts "\n== Updating database =="
Expand Down
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Application < Rails::Application
end

# configure caching
config.cache_store = :dalli_store, nil, { :namespace => ENV['APPLICATION'] }
config.cache_store = :mem_cache_store, ENV["MEMCACHE_SERVERS"], { namespace: ENV["APPLICATION"] }

# raise error with unpermitted parameters
config.action_controller.action_on_unpermitted_parameters = :raise
Expand Down
2 changes: 1 addition & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

# config.action_controller.perform_caching = true
config.action_controller.perform_caching = true
config.cache_store = :dalli_store
config.cache_store = :mem_cache_store, ENV["MEMCACHE_SERVERS"], { namespace: ENV["APPLICATION"] }

HttpLog.configure do |config|
config.enabled = false
Expand Down
2 changes: 1 addition & 1 deletion config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.cache_store = :dalli_store
config.cache_store = :mem_cache_store, ENV["MEMCACHE_SERVERS"], { namespace: ENV["APPLICATION"] }


# Raise exceptions instead of rendering exception templates.
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: "2"

services:
web:
build: .

0 comments on commit 611dae2

Please sign in to comment.