diff --git a/Gemfile b/Gemfile index bdd047171..65b7be293 100644 --- a/Gemfile +++ b/Gemfile @@ -76,6 +76,9 @@ group :test do gem "mocha" end -group :saas do +require_relative "lib/fizzy" +if Fizzy.saas? + gem "activeresource", require: "active_resource" + gem "queenbee", git: "https://github.com/basecamp/queenbee-plugin" gem "fizzy-saas", path: "gems/fizzy-saas" end diff --git a/Gemfile.lock b/Gemfile.lock index 6b7771fd3..e2c03955c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -122,14 +122,6 @@ GIT tsort (>= 0.2) zeitwerk (~> 2.6) -PATH - remote: gems/fizzy-saas - specs: - fizzy-saas (0.1.0) - queenbee - rails (>= 8.1.0.beta1) - rails_structured_logging - GEM remote: https://rubygems.org/ specs: @@ -377,8 +369,6 @@ GEM public_suffix (7.0.0) puma (7.1.0) nio4r (~> 2.0) - queenbee (1.5.1) - json (> 1.8) raabro (1.4.0) racc (1.8.1) rack (3.2.4) @@ -587,7 +577,6 @@ DEPENDENCIES capybara debug faker - fizzy-saas! geared_pagination (~> 1.2) image_processing (~> 1.14) importmap-rails diff --git a/lib/fizzy.rb b/lib/fizzy.rb index 2a3b6e221..7bda12252 100644 --- a/lib/fizzy.rb +++ b/lib/fizzy.rb @@ -1,5 +1,6 @@ module Fizzy def self.saas? - defined?(Fizzy::Saas::Engine) + return @saas if defined?(@saas) + @saas = !!(ENV["SAAS"] || File.exist?(File.expand_path("../../tmp/saas.txt", __dir__))) end end