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] Rails 4.2 ➜ 7.1 | Ruby 2.5.9 ➜ Ruby 3.2.3 | Upgrade #70

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
70b2839
Create rubyonrails.yml (#57)
kigster Mar 11, 2024
38d4774
Raills 6.0.6.1 & Ruby 3.2.2 (#56)
kigster Mar 11, 2024
44f7801
WIP [ALT]: Rails 4.2 → Rails 6, Ruby 3.2.3 Upgrade (direct to main) (…
kigster Mar 12, 2024
041609e
WIP: rails 6, ruby 3.2
kigster Mar 12, 2024
6b30327
Simplify CI flow
kigster Mar 16, 2024
aa8208d
WIP: fixing more specs and models
kigster Mar 17, 2024
3da49ac
Add postgresql-client-16
kigster Mar 17, 2024
909d6c6
Run rspec in progress mode without backtrace
kigster Mar 17, 2024
f8679ca
Updating README - hoping to sign with gpg key
kigster Mar 17, 2024
0a78299
Sign with GPG goddamit
kigster Mar 17, 2024
593db08
Fix the SimpleCSS link
kigster Mar 17, 2024
b3463be
Fixing submission link generation instructions
kigster Mar 17, 2024
dc0cce7
Fix site admin specs
kigster Mar 24, 2024
4a9588a
Fix payment mailer specs, add eald spec
kigster Mar 24, 2024
cdd0077
Update site_admin_spec.rb
kigster Mar 25, 2024
90212a2
Only Controller tests are remaining
kigster Mar 26, 2024
c5dc38a
Switch to type: :controller, 6/174 specs remaining
kigster Mar 26, 2024
a7c24cc
Deleting redundant FactoryBot Helper
kigster Mar 26, 2024
7fea72b
Fix rubocop
kigster Mar 26, 2024
bf691df
Adding db:seed task
kigster Mar 26, 2024
71eb7dc
Adding a two more tests to EventsController
kigster Mar 27, 2024
2233b0e
Fix observer/ventable specs
kigster Apr 5, 2024
071ac34
Just 5 specs left to fix
kigster Apr 5, 2024
8848fb9
Fixing rubocop
kigster Apr 6, 2024
8f4db64
Fixing asset pipeline
kigster Apr 8, 2024
3f19a12
Fix link colors
kigster Apr 8, 2024
ba274af
Fix rubocop
kigster Apr 8, 2024
ada5568
Updating README & bin/boot-up
kigster Apr 8, 2024
3d1e77f
Fixing rubocop
kigster Apr 8, 2024
b5ee39c
Fix rspec warning
kigster Apr 8, 2024
e0d181b
Rails 7 Upgrade
kigster Apr 9, 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
17 changes: 17 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# vim: ft=bash

PATH_add bin
PATH_add /opt/homebrew/bin

pg_pkg=$(brew list -1 | grep postgresql | sort -n | tail -1)

[[ -n ${pg_pkg} ]] && PATH_add /opt/homebrew/opt/${pg_pkg}/bin

export brew_prefix="$(brew --prefix)"
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

export V8HOME=$(brew --prefix [email protected])

export CFLAGS="-Wno-error=implicit-function-declaration -Wno-error=no-compound-token-split-by-macro"
export CPPFLAGS="$CPPFLAGS -I ${brew_prefix}/include -I ${V8HOME}/include"
export LDFLAGS="$LDFLAGS -L ${brew_prefix}/lib -L ${V8HOME}/lib"

export RUBY_CPPFLAGS="$CPPFLAGS"
export RUBY_CFLAGS="$CFLAGS"

[[ -f .envrc.local ]] && source .envrc.local
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# .github/workflows/main.yaml
name: "TicketBooth CI: Lint"

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
main:
name: RuboCop
runs-on: ubuntu-latest
steps:
- run: sudo apt-get update -yqq
- run: sudo apt-get install -yqq netcat libpq-dev

- uses: actions/checkout@v4

- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.3'
bundler-cache: true

- name: RuboCop
run: bin/rubocop --parallel
68 changes: 68 additions & 0 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# .github/workflows/main.yaml
name: "TicketBooth CI: RSpec"

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
main:
name: RSpec
runs-on: ubuntu-latest

# If you need DB like MySQL then define service below.
# Example for PostgreSQL and Redis can be found here:
# https://github.com/actions/example-services/tree/master/.github/workflows
services:
postgresql:
image: postgres
env:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: ""
POSTGRES_HOST_AUTH_METHOD: "trust"
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5

redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- uses: niden/actions-memcached@v7

- run: sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
- run: wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
- run: sudo apt-get update -yqq
- run: sudo apt-get install -yqq netcat libpq-dev postgresql-client-16

- name: "Verify Memcached is running"
run: echo -e "stats\nquit" | nc localhost 11211 | grep -e "accepting_conns 1" -q

- uses: actions/checkout@v4

- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.3'
bundler-cache: true

- name: "Create and migrate the DB"
run: |
bin/rails db:create
bin/rails db:migrate
bin/rails db:test:prepare

- name: "Run Rspec"
run: bundle exec rspec
25 changes: 0 additions & 25 deletions .github/workflows/rubocop.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/ruby.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
**/.DS_Store
.idea
.vscode
/log
/log/*.log
/tmp

# Ignore file uploads in development
Expand Down
2 changes: 1 addition & 1 deletion .rspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
--color
--order rand
--profile 5
--require spec_helper
--require rails_helper
120 changes: 12 additions & 108 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,111 +2,15 @@ inherit_from: .rubocop_todo.yml
AllCops:
NewCops: enable

Gemspec/DateAssignment: # new in 1.10
Enabled: true
Gemspec/RequireMFA: # new in 1.23
Enabled: true
Layout/LineEndStringConcatenationIndentation: # new in 1.18
Enabled: true
Layout/SpaceBeforeBrackets: # new in 1.7
Enabled: true
Lint/AmbiguousAssignment: # new in 1.7
Enabled: true
Lint/AmbiguousOperatorPrecedence: # new in 1.21
Enabled: true
Lint/AmbiguousRange: # new in 1.19
Enabled: true
Lint/DeprecatedConstants: # new in 1.8
Enabled: true
Lint/DuplicateBranch: # new in 1.3
Enabled: true
Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
Enabled: true
Lint/EmptyBlock: # new in 1.1
Enabled: true
Lint/EmptyClass: # new in 1.3
Enabled: true
Lint/EmptyInPattern: # new in 1.16
Enabled: true
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
Enabled: true
Lint/LambdaWithoutLiteralBlock: # new in 1.8
Enabled: true
Lint/NoReturnInBeginEndBlocks: # new in 1.2
Enabled: true
Lint/NumberedParameterAssignment: # new in 1.9
Enabled: true
Lint/OrAssignmentToConstant: # new in 1.9
Enabled: true
Lint/RedundantDirGlobSort: # new in 1.8
Enabled: true
Lint/RefinementImportMethods: # new in 1.27
Enabled: true
Lint/RequireRelativeSelfPath: # new in 1.22
Enabled: true
Lint/SymbolConversion: # new in 1.9
Enabled: true
Lint/ToEnumArguments: # new in 1.1
Enabled: true
Lint/TripleQuotes: # new in 1.9
Enabled: true
Lint/UnexpectedBlockArity: # new in 1.5
Enabled: true
Lint/UnmodifiedReduceAccumulator: # new in 1.1
Enabled: true
Lint/UselessRuby2Keywords: # new in 1.23
Enabled: true
Naming/BlockForwarding: # new in 1.24
Enabled: true
Security/IoMethods: # new in 1.22
Enabled: true
Style/ArgumentsForwarding: # new in 1.1
Enabled: true
Style/CollectionCompact: # new in 1.2
Enabled: true
Style/DocumentDynamicEvalDefinition: # new in 1.1
Enabled: true
Style/EndlessMethod: # new in 1.8
Enabled: true
Style/FileRead: # new in 1.24
Enabled: true
Style/FileWrite: # new in 1.24
Enabled: true
Style/HashConversion: # new in 1.10
Enabled: true
Style/HashExcept: # new in 1.7
Enabled: true
Style/IfWithBooleanLiteralBranches: # new in 1.9
Enabled: true
Style/InPatternThen: # new in 1.16
Enabled: true
Style/MapToHash: # new in 1.24
Enabled: true
Style/MultilineInPatternThen: # new in 1.16
Enabled: true
Style/NegatedIfElseCondition: # new in 1.2
Enabled: true
Style/NestedFileDirname: # new in 1.26
Enabled: true
Style/NilLambda: # new in 1.3
Enabled: true
Style/NumberedParameters: # new in 1.22
Enabled: true
Style/NumberedParametersLimit: # new in 1.22
Enabled: true
Style/OpenStructUse: # new in 1.23
Enabled: true
Style/QuotedSymbols: # new in 1.16
Enabled: true
Style/RedundantArgument: # new in 1.4
Enabled: true
Style/RedundantInitialize: # new in 1.27
Enabled: true
Style/RedundantSelfAssignmentBranch: # new in 1.19
Enabled: true
Style/SelectByRegexp: # new in 1.22
Enabled: true
Style/StringChars: # new in 1.12
Enabled: true
Style/SwapValues: # new in 1.1
Enabled: true
require:
- rubocop-factory_bot
- rubocop-rails
- rubocop-rake
- rubocop-rspec
- rubocop-rspec_rails

Style/IfUnlessModifier:
Enabled: false

RSpecRails/InferredSpecType:
Enabled: false
Loading
Loading