1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-24 17:04:43 +00:00

Upgraded to rails 8.0.2, moved from dalli to solid cache, moved from delayed_job to solid queue, and add solid cable. deploy/rails-dev-run.sh no longer needs to chmod. Fixed finished_at callback for matches. Migrated from Devise to built in rails auth. Added view tests for the bracket page testing that all bout numbers render for all matches in each bracket type.

This commit is contained in:
2025-04-08 17:54:42 -04:00
parent 9c25a6cc39
commit 2d433b680a
118 changed files with 4921 additions and 1341 deletions

4
bin/dev Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env ruby
# Start Rails server with defaults
exec "bin/rails", "server", *ARGV

6
bin/jobs Executable file
View File

@@ -0,0 +1,6 @@
#!/usr/bin/env ruby
require_relative "../config/environment"
require "solid_queue/cli"
SolidQueue::Cli.start(ARGV)

View File

@@ -2,14 +2,19 @@
project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))"
USER_ID=$(id -u ${USER})
# Get group id for username
GROUP_ID=$(cut -d: -f3 < <(getent group ${USER}))
# Get group id for username - fixed to correctly retrieve numeric GID
GROUP_ID=$(id -g ${USER})
if [ $# != 1 ]; then
echo "Please enter docker image name for the rails development environment"
exit 1
fi
docker build -t $1 -f ${project_dir}/deploy/rails-dev-Dockerfile ${project_dir}
docker run --rm -it -p 3000:3000 -v ${project_dir}:/rails $1 /bin/bash
sudo chown -R ${USER_ID}:${USER_ID} ${project_dir}
docker build -t $1 -f ${project_dir}/deploy/rails-dev-Dockerfile \
--build-arg USER_ID=$USER_ID \
--build-arg GROUP_ID=$GROUP_ID \
${project_dir}
docker run --rm -it -p 3000:3000 \
-v ${project_dir}:/rails \
$1 /bin/bash

View File

@@ -1,7 +1,6 @@
#!/usr/bin/env ruby
require "fileutils"
# path to your application root.
APP_ROOT = File.expand_path("..", __dir__)
def system!(*args)
@@ -14,7 +13,6 @@ FileUtils.chdir APP_ROOT do
# Add necessary setup steps to this file.
puts "== Installing dependencies =="
system! "gem install bundler --conservative"
system("bundle check") || system!("bundle install")
# puts "\n== Copying sample files =="
@@ -28,6 +26,9 @@ FileUtils.chdir APP_ROOT do
puts "\n== Removing old logs and tempfiles =="
system! "bin/rails log:clear tmp:clear"
puts "\n== Restarting application server =="
system! "bin/rails restart"
unless ARGV.include?("--skip-server")
puts "\n== Starting development server =="
STDOUT.flush # flush the output before exec(2) so that it displays
exec "bin/dev"
end
end

5
bin/thrust Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env ruby
require "rubygems"
require "bundler/setup"
load Gem.bin_path("thruster", "thrust")