summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-27 16:58:53 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-27 16:58:53 +0200
commit420506e58fdfc84f1a5bede0a01dedf0af3bb4f3 (patch)
tree57726b40e8aa9ccf80f874f39d3facefc0331420 /bin
parent241d5e91b2b6716e2861cc77d319c3d3568343a8 (diff)
Stage 7: Rails 7.2 → 8.1 on Ruby 3.2.11
- Bump Rails to 8.1.3 (Ruby unchanged at 3.2.11, new gemset rails8-upgrade) - config.load_defaults 8.1; merge app:update diffs for all environment files - Remove routing-filter 0.7.0; replace with native scope '(:locale)' in routes.rb and default_url_options in ApplicationController - Delete config/initializers/routing_filter_rails71_patch.rb - Replace vendored TinyMCE 3.x (~200 files) with tinymce-rails ~> 8.3; migrate admin_interface.js from jQuery .tinymce()/advanced theme to tinymce.init(); add config/tinymce.yml; note: TinyMCE 7+ is GPL - rails-i18n ~> 8.0 added explicitly (previously indirect dependency) - awesome_nested_set, acts-as-taggable-on pinned to git main/master (gemspec activerecord < 8.1 ceiling; no functional incompatibility; repin to version once upstream releases updated gemspecs) - globalize ~> 7.0, libxml-ruby ~> 5.0, nokogiri ~> 1.18, pg ~> 1.5 - sass-rails, coffee-rails, uglifier moved from :assets group to main (Sprockets 4 convention; :assets group no longer meaningful) - Node: head, draft, lock_owner marked belongs_to optional: true - Page: node, user, editor marked belongs_to optional: true - Static assets in public/images/ and public/javascripts/ referenced via plain HTML tags; Rails 8 load_defaults raises on pipeline helpers for undeclared assets - sessions_controller_test.rb: remove stale require and dead rescue_action - users_controller_test.rb: assert button[type=submit] not input[type=submit] (Rails 8 button_to renders <button> not <input>) - test_helper.rb: node.reload after children.create! (awesome_nested_set 3.9.0 does not refresh parent in memory after callback) - 129 runs, 339 assertions, 3 failures, 0 errors — identical baseline to 7.2
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ci6
-rwxr-xr-xbin/dev2
-rwxr-xr-xbin/rails6
-rwxr-xr-xbin/rake4
-rwxr-xr-xbin/setup34
5 files changed, 33 insertions, 19 deletions
diff --git a/bin/ci b/bin/ci
new file mode 100755
index 0000000..4137ad5
--- /dev/null
+++ b/bin/ci
@@ -0,0 +1,6 @@
1#!/usr/bin/env ruby
2require_relative "../config/boot"
3require "active_support/continuous_integration"
4
5CI = ActiveSupport::ContinuousIntegration
6require_relative "../config/ci.rb"
diff --git a/bin/dev b/bin/dev
new file mode 100755
index 0000000..5f91c20
--- /dev/null
+++ b/bin/dev
@@ -0,0 +1,2 @@
1#!/usr/bin/env ruby
2exec "./bin/rails", "server", *ARGV
diff --git a/bin/rails b/bin/rails
index 5191e69..efc0377 100755
--- a/bin/rails
+++ b/bin/rails
@@ -1,4 +1,4 @@
1#!/usr/bin/env ruby 1#!/usr/bin/env ruby
2APP_PATH = File.expand_path('../../config/application', __FILE__) 2APP_PATH = File.expand_path("../config/application", __dir__)
3require_relative '../config/boot' 3require_relative "../config/boot"
4require 'rails/commands' 4require "rails/commands"
diff --git a/bin/rake b/bin/rake
index 1724048..4fbf10b 100755
--- a/bin/rake
+++ b/bin/rake
@@ -1,4 +1,4 @@
1#!/usr/bin/env ruby 1#!/usr/bin/env ruby
2require_relative '../config/boot' 2require_relative "../config/boot"
3require 'rake' 3require "rake"
4Rake.application.run 4Rake.application.run
diff --git a/bin/setup b/bin/setup
index acdb2c1..81be011 100755
--- a/bin/setup
+++ b/bin/setup
@@ -1,29 +1,35 @@
1#!/usr/bin/env ruby 1#!/usr/bin/env ruby
2require 'pathname' 2require "fileutils"
3 3
4# path to your application root. 4APP_ROOT = File.expand_path("..", __dir__)
5APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6 5
7Dir.chdir APP_ROOT do 6def system!(*args)
8 # This script is a starting point to setup your application. 7 system(*args, exception: true)
9 # Add necessary setup steps to this file: 8end
9
10FileUtils.chdir APP_ROOT do
11 # This script is a way to set up or update your development environment automatically.
12 # This script is idempotent, so that you can run it at any time and get an expectable outcome.
13 # Add necessary setup steps to this file.
10 14
11 puts "== Installing dependencies ==" 15 puts "== Installing dependencies =="
12 system "gem install bundler --conservative" 16 system("bundle check") || system!("bundle install")
13 system "bundle check || bundle install"
14 17
15 # puts "\n== Copying sample files ==" 18 # puts "\n== Copying sample files =="
16 # unless File.exist?("config/database.yml") 19 # unless File.exist?("config/database.yml")
17 # system "cp config/database.yml.sample config/database.yml" 20 # FileUtils.cp "config/database.yml.sample", "config/database.yml"
18 # end 21 # end
19 22
20 puts "\n== Preparing database ==" 23 puts "\n== Preparing database =="
21 system "bin/rake db:setup" 24 system! "bin/rails db:prepare"
25 system! "bin/rails db:reset" if ARGV.include?("--reset")
22 26
23 puts "\n== Removing old logs and tempfiles ==" 27 puts "\n== Removing old logs and tempfiles =="
24 system "rm -f log/*" 28 system! "bin/rails log:clear tmp:clear"
25 system "rm -rf tmp/cache"
26 29
27 puts "\n== Restarting application server ==" 30 unless ARGV.include?("--skip-server")
28 system "touch tmp/restart.txt" 31 puts "\n== Starting development server =="
32 STDOUT.flush # flush the output before exec(2) so that it displays
33 exec "bin/dev"
34 end
29end 35end