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 3 #1260

Merged
merged 35 commits into from
Oct 18, 2024
Merged

Ruby 3 #1260

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
fa48004
Updated gems for ruby 3
Dantemss Oct 4, 2024
861e54f
Rails 6 update (still need to do something about rails-settings-cache…
Dantemss Oct 4, 2024
df4a172
Removed rails-settings-ui but kept rails-settings-cached
Dantemss Oct 4, 2024
fe8f166
Updated to Rails 6.1, updated gems, fixed most warnings
Dantemss Oct 8, 2024
7bdfb96
Updated config to 6.1, fixed more warnings
Dantemss Oct 8, 2024
e6a5259
Updated more gems, restored missing access policies inside an after_i…
Dantemss Oct 9, 2024
970c116
Fixed a bunch of tests, removed render_anywhere
Dantemss Oct 9, 2024
12e2a43
Fix settings and manifest again
Dantemss Oct 10, 2024
5ca8acf
Removed spring, removed some legacy tests, fixed database cleaner config
Dantemss Oct 10, 2024
e3858f9
More test fixes
Dantemss Oct 14, 2024
16ddf9b
Fixed more tests
Dantemss Oct 14, 2024
4b0085c
Added migration for the Doorkeeper update
Dantemss Oct 15, 2024
cf40366
Update the Doorkeeper tokens and grants in batches
Dantemss Oct 15, 2024
a4fe4a7
Fixed a bunch more tests
Dantemss Oct 15, 2024
908887d
Fixed more tests, updated openstax_rescue_from
Dantemss Oct 16, 2024
3c07dcf
Updated lev, transaction_retry and transaction_isolation to fix more …
Dantemss Oct 16, 2024
d0bf854
Fixed remaining tests, normalize describe calls, include ActiveJob::T…
Dantemss Oct 16, 2024
3751dd0
Added comment about Newflow vs legacy behavior
Dantemss Oct 16, 2024
4df163e
Attempt to fix bundler error in GH actions
Dantemss Oct 16, 2024
76a8d15
Lock ffi since the latest version has some issue in GH actions
Dantemss Oct 16, 2024
b7097b7
Attempt to fix popup console test
Dantemss Oct 17, 2024
6aa5ef7
Puma's nakayoshi_fork option was removed
Dantemss Oct 17, 2024
6f633d8
Fix puma crash on OS X
Dantemss Oct 17, 2024
aeb637b
Make belongs_to required by default
Dantemss Oct 17, 2024
958b57c
Attempt to fix migration test when updating ruby version
Dantemss Oct 17, 2024
29f532c
Moved puma config around to prevent warning, re-enabled spring, unloc…
Dantemss Oct 17, 2024
8c85e06
Added comment about gssencmode
Dantemss Oct 17, 2024
06e9b91
Removed spring config that's no longer needed
Dantemss Oct 17, 2024
d1566fb
Updated web-console gem, simplified ErrorPageBuilder
Dantemss Oct 17, 2024
0e6b732
Fix error page precompilation in non-prod
Dantemss Oct 17, 2024
dd3005d
Make RescueFrom config match Rails app config for errors
Dantemss Oct 17, 2024
bdd6657
Don't ignore rescue_from by default in the test env
Dantemss Oct 17, 2024
ffa22d0
Removed is_real_production?, moved the check to the OSU initializer
Dantemss Oct 17, 2024
b8170b5
Added rexml gem to Gemfile
Dantemss Oct 18, 2024
6a29991
Update to ruby 3.1 but keep Psych 3 for now
Dantemss Oct 18, 2024
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
7 changes: 6 additions & 1 deletion .github/workflows/migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

- run: git checkout HEAD^

# Install ruby
# Install base commit ruby version
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
Expand All @@ -56,6 +56,11 @@ jobs:
bundle exec rails runner '3.times { FactoryBot.create :user }'
git checkout --force -

# Install PR ruby version
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true

# Migrate the data
- name: Migrate
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
run: |
bundle install --jobs 4 --retry 3
bundle exec rake parallel:create parallel:load_schema parallel:seed --trace
bundle exec rspec ./spec
WORKERS=4 bundle exec rake parallel:spec
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.4
3.1.6
68 changes: 36 additions & 32 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ git_source(:github) do |repo_name|
end

# Rails framework
gem 'rails', '~> 5.2'
gem 'rails-i18n', '~> 5'
gem 'rails', '6.1.7.8'
gem 'rails-i18n'

# Psych 4 (included in Ruby 3.1) breaks Rails < 7
# Remove this entry completely when updating to Rails 7
gem 'psych', '< 4'

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', require: false
Expand All @@ -16,7 +20,7 @@ gem 'bootsnap', require: false
gem 'dotenv-rails'

# Threaded application server
gem 'puma', '~> 5.6.0'
gem 'puma'

# Prevent server memory from growing until OOM
gem 'puma_worker_killer'
Expand All @@ -29,35 +33,40 @@ gem 'pattern-library', git: 'https://github.com/openstax/pattern-library.git', r

# Lev framework
# - introduces two new concepts: Routines and Handlers
gem 'lev', '~> 10.1.0'

# Bootstrap front-end framework
gem 'bootstrap-sass', '~> 3.4.1'
gem 'lev', github: 'lml/lev', ref: 'a33c93c83afea63c80b5da6317efec4bfd357df5'
gem 'openstax_transaction_retry', github: 'openstax/transaction_retry', ref: '36e26d0a068756c334b9d1c671d40773bbfc9300'
gem 'openstax_transaction_isolation', github: 'openstax/transaction_isolation', ref: '7387fa091462118704967a7c4b2821cd0f5d9e01'

# SCSS stylesheets
gem 'sass-rails', '~> 5.0'
gem 'sass-rails'

# Bootstrap front-end framework
gem 'bootstrap-sass'

# Compass stylesheets
gem 'compass-rails', '~> 3.1.0'
gem 'compass-rails'

# Prevent deprecation warning coming from Compass in Sass 3.4.20
gem 'sass', '3.4.19'
gem 'ffi', '< 1.17'

# CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '5.0.0'
gem 'coffee-rails'

# JavaScript asset compiler
gem 'mini_racer'

# JavaScript asset compressor
gem 'uglifier', '>= 1.3.0'
gem 'uglifier'

# Nicely-styled static error pages
gem 'error_page_assets'
gem 'render_anywhere', require: false

# Password hashing
gem 'bcrypt', '~> 3.1.7'
gem 'bcrypt'

# OAuth provider
gem 'doorkeeper', '~> 5.1.0'
gem 'doorkeeper'

# OAuth clients
gem 'omniauth', '~> 1.9'
Expand Down Expand Up @@ -97,6 +106,7 @@ gem 'smarter_csv'
# API documentation
gem 'apipie-rails'
gem 'maruku'
gem 'rexml'

gem 'jbuilder'

Expand All @@ -110,13 +120,13 @@ gem 'delayed_job_worker_pool'
gem 'delayed_job_heartbeat_plugin'

# JSON Api builder
gem 'representable', '~> 3.0.0'
gem 'representable'

# Keyword search
gem 'keyword_search', '~> 1.5.0'

# ToS/PP management
gem 'fine_print'
gem 'fine_print', github: 'lml/fine_print', ref: '636023f68e95196dffaf295bfad3ad8051c23542'

# Send users back to the correct page after login
gem 'action_interceptor'
Expand Down Expand Up @@ -151,16 +161,13 @@ gem 'awesome_print'
gem 'whenever', require: false

# Admin toggles
gem 'rails-settings-ui'

gem 'rails-settings-cached', '0.7.2'
gem 'dry-validation', '0.12.3'
gem 'rails-settings-cached'

# Respond to ELB healthchecks in /ping and /ping/
gem 'openstax_healthcheck'

# Allow Accounts routes to be accessed under an /accounts prefix (for use in CloudFront)
gem "openstax_path_prefixer", github: "openstax/path_prefixer", ref: "8298c40ec38f132fc23ea946b2b20e855fe73a49"
gem 'openstax_path_prefixer', github: 'openstax/path_prefixer', ref: 'e3edfc70589bc90fcffba63b417260a88c1377d7'

# JWE library used by the SSO cookie
gem 'json-jwt'
Expand All @@ -172,7 +179,7 @@ gem 'intl-tel-input-rails', git: 'https://github.com/openstax/intl-tel-input-rai
gem 'http_accept_language'

# Fast JSON parsing
gem 'oj', '~> 3.7.12'
gem 'oj'

# Replace JSON with Oj
gem 'oj_mimic_json'
Expand All @@ -183,9 +190,6 @@ gem 'rack-cors'
# Data visualization and query
gem 'blazer'

# temp fix until we update old dependencies
# gem "net-http"

group :development, :test do
# Run specs in parallel
gem 'parallel_tests'
Expand All @@ -197,9 +201,9 @@ group :development, :test do
#
# Call 'debugger' anywhere in the code to stop execution and get a debugger console
gem 'byebug', require: false
# Debug in VS Code
gem 'ruby-debug-ide', require: false
gem 'debase', require: false
# Debug in VS Code - these do not install properly on the latest OS X
# gem 'ruby-debug-ide', require: false
# gem 'debase', require: false

# Use RSpec for tests
gem 'rspec-rails'
Expand All @@ -223,7 +227,7 @@ group :development, :test do
gem 'spring'
gem 'spring-commands-rspec'
gem 'guard-rspec'
gem 'guard-livereload', '~> 2.5', require: false
gem 'guard-livereload', require: false

# Stubs HTTP requests
gem 'webmock'
Expand All @@ -232,7 +236,7 @@ group :development, :test do
gem 'vcr'

# Lint ruby files
gem 'rubocop', '~> 0.76.0', require: false
gem 'rubocop', require: false

# Lint RSpec files
gem 'rubocop-rspec'
Expand All @@ -247,7 +251,7 @@ group :development do
gem 'listen'

# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 3.7'
gem 'web-console'

gem 'i18n-tasks'

Expand All @@ -263,7 +267,7 @@ group :test do
gem 'cgi'

# RSpec matchers for convenience
gem 'shoulda-matchers', '~> 3.1'
gem 'shoulda-matchers'

# Test database cleanup gem with multiple strategies
gem 'database_cleaner'
Expand Down
Loading
Loading