mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-22 14:49:38 +02:00
18 lines
319 B
Ruby
18 lines
319 B
Ruby
|
class Upgrader::Config
|
||
|
attr_reader :env, :options
|
||
|
|
||
|
def initialize(options = {}, env: ENV)
|
||
|
@env = env
|
||
|
@options = options
|
||
|
end
|
||
|
|
||
|
def deployer
|
||
|
factory = Upgrader::Deployer
|
||
|
factory.for(hosting_platform)
|
||
|
end
|
||
|
|
||
|
def hosting_platform
|
||
|
options[:hosting_platform] || env["HOSTING_PLATFORM"]
|
||
|
end
|
||
|
end
|