diff bin/setup @ 255:eda83610b65c

Update rails and stuff
author nanaya <me@nanaya.net>
date Sun, 15 Dec 2024 22:45:33 +0900
parents 89f6c0016bab
children
line wrap: on
line diff
--- a/bin/setup	Tue Sep 03 19:21:25 2024 +0900
+++ b/bin/setup	Sun Dec 15 22:45:33 2024 +0900
@@ -2,7 +2,6 @@
 require "fileutils"
 
 APP_ROOT = File.expand_path("..", __dir__)
-APP_NAME = "rsstweet"
 
 def system!(*args)
   system(*args, exception: true)
@@ -14,16 +13,14 @@
   # Add necessary setup steps to this file.
 
   puts "== Installing dependencies =="
-  system! "gem install bundler --conservative"
   system("bundle check") || system!("bundle install")
 
   puts "\n== Removing old logs and tempfiles =="
   system! "bin/rails log:clear tmp:clear"
 
-  puts "\n== Restarting application server =="
-  system! "bin/rails restart"
-
-  # puts "\n== Configuring puma-dev =="
-  # system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}"
-  # system "curl -Is https://#{APP_NAME}.test/up | head -n 1"
+  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