Add rake tasks for enabling/disabling saas mode

This commit is contained in:
Jorge Manrubia
2025-11-23 20:26:03 +01:00
parent 9496a20736
commit a5b02755b2
3 changed files with 19 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/basecamp/fizzy-saas
revision: 7b096f10526ac797ec9e14314a4752c1482c9152
revision: f901a455ecc8c313bdba7be89619d289fa7e112c
specs:
fizzy-saas (0.1.0)
queenbee
-1
View File
@@ -7,4 +7,3 @@ Fizzy.configure_bundle
require_relative "../config/boot"
require "rails/commands"
+18
View File
@@ -0,0 +1,18 @@
namespace :saas do
SAAS_FILE_PATH = "tmp/saas.txt"
desc "Enable SaaS mode"
task :enable => :environment do
file_path = Rails.root.join(SAAS_FILE_PATH)
FileUtils.mkdir_p(File.dirname(file_path))
FileUtils.touch(file_path)
puts "SaaS mode enabled (#{file_path} created)"
end
desc "Disable SaaS mode"
task :disable => :environment do
file_path = Rails.root.join(SAAS_FILE_PATH)
FileUtils.rm_f(file_path)
puts "SaaS mode disabled (#{file_path} removed)"
end
end