Add rake task for bundle install and binstubs
Assisted-by: Owl Alpha via pi
change zmvsttkpqtqlkzyplmlumxrtpmoupnly
commit 00fdef934895dd6a3e5724747a260fbeaaa79f7a
author Alpha Chen <alpha@kejadlen.dev>
date
parent wykwyzro
diff --git a/.gitignore b/.gitignore
index e069230..42d225a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /db/*.db
+.bundle/installed
diff --git a/Rakefile b/Rakefile
index de53127..c0f2304 100644
--- a/Rakefile
+++ b/Rakefile
@@ -3,6 +3,17 @@
 require "rake/testtask"
 require_relative "lib/db"
 
+BUNDLE_INSTALL_MARKER = Pathname.new(".bundle/installed")
+
+file BUNDLE_INSTALL_MARKER do
+  sh "bundle install"
+  sh "bundle binstubs --all"
+  mkdir_p BUNDLE_INSTALL_MARKER.dirname
+  touch BUNDLE_INSTALL_MARKER
+end
+
+task setup: BUNDLE_INSTALL_MARKER
+
 Rake::TestTask.new(:test) do |t|
   t.libs << "test"
   t.libs << "lib"