summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-27 22:52:50 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-27 22:52:50 +0200
commit9a19a0494ef51cdac9a78e24d517ca48ba44c453 (patch)
tree8eaae12d8047a40e29d3ea7ff3116b5c869e04bd /bin
parent85a01e35274b8d4d4165a7b26bd7986e211246bb (diff)
parent1853082fcd8c067390c246f9daa01a9b47387497 (diff)
Migration from Rails 2.3.5 to Rails 8.1 successful.
Merging dev branch.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bundle3
-rwxr-xr-xbin/ci6
-rwxr-xr-xbin/dev2
-rwxr-xr-xbin/rails4
-rwxr-xr-xbin/rake4
-rwxr-xr-xbin/setup35
6 files changed, 54 insertions, 0 deletions
diff --git a/bin/bundle b/bin/bundle
new file mode 100755
index 0000000..66e9889
--- /dev/null
+++ b/bin/bundle
@@ -0,0 +1,3 @@
1#!/usr/bin/env ruby
2ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3load Gem.bin_path('bundler', 'bundle')
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
new file mode 100755
index 0000000..efc0377
--- /dev/null
+++ b/bin/rails
@@ -0,0 +1,4 @@
1#!/usr/bin/env ruby
2APP_PATH = File.expand_path("../config/application", __dir__)
3require_relative "../config/boot"
4require "rails/commands"
diff --git a/bin/rake b/bin/rake
new file mode 100755
index 0000000..4fbf10b
--- /dev/null
+++ b/bin/rake
@@ -0,0 +1,4 @@
1#!/usr/bin/env ruby
2require_relative "../config/boot"
3require "rake"
4Rake.application.run
diff --git a/bin/setup b/bin/setup
new file mode 100755
index 0000000..81be011
--- /dev/null
+++ b/bin/setup
@@ -0,0 +1,35 @@
1#!/usr/bin/env ruby
2require "fileutils"
3
4APP_ROOT = File.expand_path("..", __dir__)
5
6def system!(*args)
7 system(*args, exception: true)
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.
14
15 puts "== Installing dependencies =="
16 system("bundle check") || system!("bundle install")
17
18 # puts "\n== Copying sample files =="
19 # unless File.exist?("config/database.yml")
20 # FileUtils.cp "config/database.yml.sample", "config/database.yml"
21 # end
22
23 puts "\n== Preparing database =="
24 system! "bin/rails db:prepare"
25 system! "bin/rails db:reset" if ARGV.include?("--reset")
26
27 puts "\n== Removing old logs and tempfiles =="
28 system! "bin/rails log:clear tmp:clear"
29
30 unless ARGV.include?("--skip-server")
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
35end