From 25ee6490e4e29a69b736ea95a2b198fcc7f98751 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Fri, 8 Nov 2024 10:00:48 +0100 Subject: Upgrade to Rails 8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- bin/brakeman | 9 +++++++++ bin/dev | 4 ++++ bin/rubocop | 10 ++++++++++ bin/setup | 9 +++++---- bin/thrust | 7 +++++++ 5 files changed, 35 insertions(+), 4 deletions(-) create mode 100755 bin/brakeman create mode 100755 bin/dev create mode 100755 bin/rubocop create mode 100755 bin/thrust (limited to 'bin') diff --git a/bin/brakeman b/bin/brakeman new file mode 100755 index 0000000..ae3a448 --- /dev/null +++ b/bin/brakeman @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +require 'rubygems' +require 'bundler/setup' + +ARGV.unshift('--ensure-latest') + +load Gem.bin_path('brakeman', 'brakeman') diff --git a/bin/dev b/bin/dev new file mode 100755 index 0000000..3925783 --- /dev/null +++ b/bin/dev @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +exec './bin/rails', 'server', *ARGV diff --git a/bin/rubocop b/bin/rubocop new file mode 100755 index 0000000..f45b065 --- /dev/null +++ b/bin/rubocop @@ -0,0 +1,10 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +require 'rubygems' +require 'bundler/setup' + +# explicit rubocop config increases performance slightly while avoiding config confusion. +ARGV.unshift('--config', File.expand_path('../.rubocop.yml', __dir__)) + +load Gem.bin_path('rubocop', 'rubocop') diff --git a/bin/setup b/bin/setup index 016b7e2..5e6d2fe 100755 --- a/bin/setup +++ b/bin/setup @@ -3,7 +3,6 @@ require 'fileutils' -# path to your application root. APP_ROOT = File.expand_path('..', __dir__) def system!(*) @@ -16,7 +15,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 ==" @@ -30,6 +28,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 diff --git a/bin/thrust b/bin/thrust new file mode 100755 index 0000000..78bfb7c --- /dev/null +++ b/bin/thrust @@ -0,0 +1,7 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('thruster', 'thrust') -- cgit v1.2.3