Extract common method to configure bundle
This commit is contained in:
committed by
Jorge Manrubia
parent
5d32e40756
commit
fb9aa5dfac
@@ -24,9 +24,7 @@ end
|
||||
require "rubygems"
|
||||
|
||||
require_relative "../lib/fizzy"
|
||||
if Fizzy.saas?
|
||||
ENV["BUNDLE_WITH"] = [ ENV["BUNDLE_WITH"], "saas" ].compact.join(",")
|
||||
end
|
||||
Fizzy.configure_bundle
|
||||
|
||||
require "bundler/setup"
|
||||
|
||||
|
||||
@@ -2,10 +2,7 @@
|
||||
APP_PATH = File.expand_path("../config/application", __dir__)
|
||||
|
||||
require_relative "../lib/fizzy"
|
||||
|
||||
if Fizzy.saas?
|
||||
ENV["BUNDLE_WITH"] = [ ENV["BUNDLE_WITH"] , "saas" ].compact.join(",")
|
||||
end
|
||||
Fizzy.configure_bundle
|
||||
|
||||
require_relative "../config/boot"
|
||||
|
||||
|
||||
@@ -8,6 +8,12 @@ module Fizzy
|
||||
def db_adapter
|
||||
@db_adapter ||= DbAdapter.new ENV.fetch("DATABASE_ADAPTER", saas? ? "mysql" : "sqlite")
|
||||
end
|
||||
|
||||
def configure_bundle
|
||||
if saas?
|
||||
ENV["BUNDLE_WITH"] = [ENV["BUNDLE_WITH"], "saas"].compact.join(",")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class DbAdapter
|
||||
|
||||
Reference in New Issue
Block a user