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

Upgrade app to use Rails 7.2 and Ruby 3.3 #1

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
47 changes: 47 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Ruby

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:latest
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: cfp_app_test

steps:
- uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.0

- name: Install dependencies
run: bundle install --jobs 4 --retry 3

- name: Create database
run: |
sudo apt-get install -y postgresql-client
psql -h localhost -U postgres -c 'create database cfp_app_test;'

- name: Run tests
run: bundle exec rake
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.1
3.3.0
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

12 changes: 7 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
ruby '2.3.1'
ruby '3.3.0'

gem 'rails', '4.2.5'
gem 'rails', '7.2.0'
gem 'puma', '~> 2.13'

gem 'pg'
Expand All @@ -16,7 +16,7 @@ gem 'bootstrap-sass', '~> 3.3.6'
gem 'rails-assets-momentjs', source: 'https://rails-assets.org'
gem 'selectize-rails'

gem 'devise', '~> 4.1.1'
gem 'devise', '~> 4.8.0'
gem 'omniauth-github'
gem 'omniauth-twitter'

Expand All @@ -28,7 +28,7 @@ gem 'coderay', '~> 1.0'
gem 'bootstrap-multiselect-rails', '~> 0.9.9'
gem 'active_model_serializers', '~> 0.8.1'
gem 'draper'
gem 'simple_form', '3.1.1'
gem 'simple_form', '>= 5.1.0'
gem 'zeroclipboard-rails'
gem 'responders', '~> 2.0'
gem 'pundit'
Expand All @@ -46,7 +46,7 @@ group :development do
gem 'binding_of_caller'
gem 'foreman'
gem 'launchy'
gem 'quiet_assets'
gem 'quiet_assets', '>= 1.2.0'
gem 'rack-mini-profiler'
gem 'haml-rails'
gem 'spring-commands-rspec', require: false
Expand All @@ -71,3 +71,5 @@ group :development, :test do
gem 'pry-rescue'
gem 'pry-remote'
end

gem 'bundler', '>= 2.6'
65 changes: 33 additions & 32 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ GEM
remote: https://rubygems.org/
remote: https://rails-assets.org/
specs:
actionmailer (4.2.5)
actionpack (= 4.2.5)
actionview (= 4.2.5)
activejob (= 4.2.5)
actionmailer (7.2.0)
actionpack (= 7.2.0)
actionview (= 7.2.0)
activejob (= 7.2.0)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.5)
actionview (= 4.2.5)
activesupport (= 4.2.5)
actionpack (7.2.0)
actionview (= 7.2.0)
activesupport (= 7.2.0)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.5)
activesupport (= 4.2.5)
actionview (7.2.0)
activesupport (= 7.2.0)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
Expand All @@ -35,17 +35,17 @@ GEM
rails
active_model_serializers (0.8.3)
activemodel (>= 3.0)
activejob (4.2.5)
activesupport (= 4.2.5)
activejob (7.2.0)
activesupport (= 7.2.0)
globalid (>= 0.3.0)
activemodel (4.2.5)
activesupport (= 4.2.5)
activemodel (7.2.0)
activesupport (= 7.2.0)
builder (~> 3.1)
activerecord (4.2.5)
activemodel (= 4.2.5)
activesupport (= 4.2.5)
activerecord (7.2.0)
activemodel (= 7.2.0)
activesupport (= 7.2.0)
arel (~> 6.0)
activesupport (4.2.5)
activesupport (7.2.0)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
Expand Down Expand Up @@ -245,16 +245,16 @@ GEM
rack-test (0.6.3)
rack (>= 1.0)
rack-timeout (0.2.4)
rails (4.2.5)
actionmailer (= 4.2.5)
actionpack (= 4.2.5)
actionview (= 4.2.5)
activejob (= 4.2.5)
activemodel (= 4.2.5)
activerecord (= 4.2.5)
activesupport (= 4.2.5)
rails (7.2.0)
actionmailer (= 7.2.0)
actionpack (= 7.2.0)
actionview (= 7.2.0)
activejob (= 7.2.0)
activemodel (= 7.2.0)
activerecord (= 7.2.0)
activesupport (= 7.2.0)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.5)
railties (= 7.2.0)
sprockets-rails
rails-assets-momentjs (2.15.1)
rails-deprecated_sanitizer (1.0.3)
Expand All @@ -270,9 +270,9 @@ GEM
rails_stdout_logging
rails_serve_static_assets (0.0.4)
rails_stdout_logging (0.0.4)
railties (4.2.5)
actionpack (= 4.2.5)
activesupport (= 4.2.5)
railties (7.2.0)
actionpack (= 7.2.0)
activesupport (= 7.2.0)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.5.0)
Expand All @@ -287,6 +287,7 @@ GEM
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
rspec-mocks (~> 3.4.0)
rspec-support (~> 3.4.0)
rspec-core (3.4.1)
rspec-support (~> 3.4.0)
rspec-expectations (3.4.0)
Expand Down Expand Up @@ -396,7 +397,7 @@ DEPENDENCIES
quiet_assets
rack-mini-profiler
rack-timeout (~> 0.2.4)
rails (= 4.2.5)
rails (= 7.2.0)
rails-assets-momentjs!
rails_12factor
redcarpet (~> 3.0.0)
Expand All @@ -414,7 +415,7 @@ DEPENDENCIES
zeroclipboard-rails

RUBY VERSION
ruby 2.3.1p112
ruby 3.3.0

BUNDLED WITH
1.13.6
2.6.0
3 changes: 3 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@ class Application < Rails::Application

# Do not swallow errors in after_commit/after_rollback callbacks.
config.active_record.raise_in_transactional_callbacks = true

# Specify Rails version
config.load_defaults 7.2
end
end
3 changes: 3 additions & 0 deletions config/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@

# Initialize the Rails application.
Rails.application.initialize!

# Specify Rails version
config.load_defaults 7.2
3 changes: 3 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@
I18n.enforce_available_locales = false

config.time_zone = ENV['TIMEZONE'] || "Pacific Time (US & Canada)"

# Specify Rails version
config.load_defaults 7.2
end
3 changes: 3 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,7 @@
config.time_zone = ENV['TIMEZONE'] || "Pacific Time (US & Canada)"

Rack::Timeout.timeout = 15

# Specify Rails version
config.load_defaults 7.2
end
5 changes: 4 additions & 1 deletion config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
config.action_controller.perform_caching = false

# Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = false
config.action_dispatch.show_exceptions = :rescuable

# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false
Expand All @@ -46,4 +46,7 @@
I18n.enforce_available_locales = false

config.assets.debug = true

# Specify Rails version
config.load_defaults 7.2
end
2 changes: 1 addition & 1 deletion db/migrate/20130920220456_create_events.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateEvents < ActiveRecord::Migration
class CreateEvents < ActiveRecord::Migration[7.2]
def change
create_table :events do |t|
t.string :name, :slug
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20130920225539_create_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateUsers < ActiveRecord::Migration
class CreateUsers < ActiveRecord::Migration[7.2]
def change
create_table :users do |t|
t.string :name
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20130920225910_create_teammates.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateTeammates < ActiveRecord::Migration
class CreateTeammates < ActiveRecord::Migration[7.2]
def change
create_table :teammates do |t|
t.references :event, index: true
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20130920230118_create_proposals.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateProposals < ActiveRecord::Migration
class CreateProposals < ActiveRecord::Migration[7.2]
def change
create_table :proposals do |t|
t.references :event, index: true
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20130920230159_create_taggings.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateTaggings < ActiveRecord::Migration
class CreateTaggings < ActiveRecord::Migration[7.2]
def change
create_table :taggings do |t|
t.references :proposal, index: true
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20130920230737_create_ratings.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateRatings < ActiveRecord::Migration
class CreateRatings < ActiveRecord::Migration[7.2]
def change
create_table :ratings do |t|
t.references :proposal, index: true
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20130920230819_create_comments.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateComments < ActiveRecord::Migration
class CreateComments < ActiveRecord::Migration[7.2]
def change
create_table :comments do |t|
t.references :proposal, index: true
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20130920231655_create_speakers.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateSpeakers < ActiveRecord::Migration
class CreateSpeakers < ActiveRecord::Migration[7.2]
def change
create_table :speakers do |t|
t.references :user, index: true
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20130922231603_create_invitations.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateInvitations < ActiveRecord::Migration
class CreateInvitations < ActiveRecord::Migration[7.2]
def change
create_table :invitations do |t|
t.references :proposal, index: true
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20140131170125_create_rooms.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateRooms < ActiveRecord::Migration
class CreateRooms < ActiveRecord::Migration[7.2]
def change
create_table :rooms do |t|
t.references :event, index: true
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20140131174158_create_time_slots.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateTimeSlots < ActiveRecord::Migration
class CreateTimeSlots < ActiveRecord::Migration[7.2]
def change
create_table :time_slots do |t|
t.references :program_session, index: true
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20140131183945_create_tracks.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateTracks < ActiveRecord::Migration
class CreateTracks < ActiveRecord::Migration[7.2]
def change
create_table :tracks do |t|
t.references :event, index: true
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20140312163812_create_notifications.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateNotifications < ActiveRecord::Migration
class CreateNotifications < ActiveRecord::Migration[7.2]
def change
create_table :notifications do |t|
t.references :user, index: true
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160614162404_create_session_formats.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateSessionFormats < ActiveRecord::Migration
class CreateSessionFormats < ActiveRecord::Migration[7.2]
def change
create_table :session_formats do |t|
t.references :event, index: true
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160713174249_create_program_sessions.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateProgramSessions < ActiveRecord::Migration
class CreateProgramSessions < ActiveRecord::Migration[7.2]
def change
create_table :program_sessions do |t|
t.references :event, index: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateNonUniqueUserIndexes < ActiveRecord::Migration
class CreateNonUniqueUserIndexes < ActiveRecord::Migration[7.2]
def change
remove_index :users, :email
remove_index :users, :reset_password_token
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160923182207_add_info_to_program_sessions.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddInfoToProgramSessions < ActiveRecord::Migration
class AddInfoToProgramSessions < ActiveRecord::Migration[7.2]
def change
add_column :program_sessions, :info, :text
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160927205019_add_time_slot_track.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddTimeSlotTrack < ActiveRecord::Migration
class AddTimeSlotTrack < ActiveRecord::Migration[7.2]
def change
add_reference :time_slots, :track
end
Expand Down
Loading