Skip to content

Commit

Permalink
188693351 - rails upgrade to v8 (#9)
Browse files Browse the repository at this point in the history
* upgrade gems, ruby, rails

* upgrade github actions template

* fix test warning

* fix enum for rails 8

* update schema to rails 8

* add temporary fix for devise for rails 8

* add temporary fix for devise for development env

* update ruby and gems

* update config files to rails v8

* environments fixes

---------

Co-authored-by: Maciej Kocyła <[email protected]>
  • Loading branch information
kamtarnowski and maciejkocylapc authored Dec 31, 2024
1 parent 9e08d61 commit 647b84d
Show file tree
Hide file tree
Showing 28 changed files with 1,111 additions and 619 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on: [push]

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
services:
mysql:
image: mysql:8.0.33
image: mysql:8.0.40
env:
MYSQL_ROOT_PASSWORD: password
ports:
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand All @@ -48,7 +48,7 @@ jobs:
ruby-version: .ruby-version

- name: Setup cache key and directory for gems cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-use-ruby-${{ hashFiles('**/Gemfile.lock') }}
Expand All @@ -64,7 +64,7 @@ jobs:
DATABASE_PASSWORD: password
run: |
cp config/database.yml.github-actions config/database.yml
gem install bundler --version 2.4.10
gem install bundler --version 2.6.1
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.2
3.4.1
84 changes: 44 additions & 40 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,101 +1,105 @@
source "https://rubygems.org"
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "3.2.2"
ruby '3.4.1'

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.0.6"
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
gem 'rails', '~> 8.0.1'

# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem "sprockets-rails"
gem 'sprockets-rails', '~> 3.5.2'

# Use mysql as the database for Active Record
gem "mysql2", "~> 0.5"
gem 'mysql2', '~> 0.5.6'

# Use the Puma web server [https://github.com/puma/puma]
gem "puma", "~> 5.0"
gem 'puma', '~> 6.5.0'

# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
gem "importmap-rails"
gem 'importmap-rails', '~> 2.1.0'

# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
gem "turbo-rails"
gem 'turbo-rails', '~> 2.0.11'

# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
gem "stimulus-rails"
gem 'stimulus-rails', '~> 1.3.4'

# Use Tailwind CSS [https://github.com/rails/tailwindcss-rails]
gem "tailwindcss-rails"
gem 'tailwindcss-rails', '~> 3.1.0'

# Build JSON APIs with ease [https://github.com/rails/jbuilder]
gem "jbuilder"
gem 'jbuilder', '~> 2.13.0'

# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
# gem "kredis"
# gem 'kredis'

# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"
# gem 'bcrypt', '~> 3.1.7'

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
gem 'tzinfo-data', platforms: %i[ mingw mswin x64_mingw jruby ]

# Reduces boot times through caching; required in config/boot.rb
gem "bootsnap", require: false
gem 'bootsnap', '~> 1.18.4', require: false

# Use Sass to process CSS
# gem "sassc-rails"
# gem 'sassc-rails'

# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
# gem "image_processing", "~> 1.2"
# gem 'image_processing', '~> 1.2'

gem "redis", "~> 5.0"
gem 'redis', '~> 5.3.0'

# This is for the free version of Sidekiq.
gem 'sidekiq'
gem 'sidekiq', '~> 7.3.7'

# Use this for SideKiq Pro if you have our production keys
# source 'https://gems.contribsys.com/' do
# gem 'sidekiq-pro'
# end

gem 'devise'
gem 'devise-i18n'
gem 'devise', '~> 4.9.4'
gem 'devise-i18n', '~> 1.12.1'

gem 'kaminari'
gem 'kaminari', '~> 1.2.2'

gem 'wkhtmltopdf-binary'
gem 'wicked_pdf'
gem 'wkhtmltopdf-binary', '~> 0.12.6.8'
gem 'wicked_pdf', '~> 2.8.2'

gem 'attr_encrypted'
gem 'attr_encrypted', '~> 4.1.1'

# User browser detection
gem 'browser'
gem 'browser', '~> 6.2.0'

gem 'mutex_m', '~> 0.3.0'

gem 'nkf', '~> 0.2.0'

group :development, :test do
gem 'byebug', platforms: %i[mri mingw x64_mingw]
gem 'factory_bot_rails'
gem 'pry'
gem 'rubocop'
gem 'faker' #, git: 'https://github.com/faker-ruby/faker.git', branch: 'master'
gem 'factory_bot_rails', '~> 6.4.4'
gem 'pry', '~> 0.15.0'
gem 'rubocop', '~> 1.69.2'
gem 'faker', '~> 3.5.1'
end

group :development do
gem 'listen'
gem 'listen', '~> 3.9.0'
# Access an interactive console on exception pages or by calling 'console'
# anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'web-console', '~> 4.2.1'
# Spring speeds up development by keeping your application running in the
# background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'letter_opener_web'
gem 'spring', '~> 4.2.1'
gem 'spring-watcher-listen', '~> 2.1.0'
gem 'letter_opener_web', '~> 3.0.0'
end

group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
gem 'capybara', '~> 3.40.0'
gem 'selenium-webdriver', '~> 4.10.0'
# Easy installation and use of web drivers to run system tests with browsers
gem 'webdrivers'
gem 'minitest-spec-rails'
gem 'webdrivers', '~> 5.3.1'
gem 'minitest-spec-rails', '~> 7.4.1'
end
Loading

0 comments on commit 647b84d

Please sign in to comment.