Module: Locomotive::Wagon::SteamConcern

Included in:
PushCommand
Defined in:
lib/locomotive/wagon/commands/concerns/steam_concern.rb

Instance Method Summary collapse

Instance Method Details

#steam_servicesObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/locomotive/wagon/commands/concerns/steam_concern.rb', line 7

def steam_services
  return @steam_services if @steam_services

  Locomotive::Steam.configure do |config|
    config.mode           = :test
    config.adapter        = { name: :filesystem, path: path, env: options[:env]&.to_sym || :local }
    config.asset_path     = File.expand_path(File.join(path, 'public'))
    config.minify_assets  = false
  end

  @steam_services = Locomotive::Steam::Services.build_instance.tap do |services|
    repositories = services.repositories
    services.set_site(repositories.site.all.first)
    services.locale = services.current_site.default_locale
  end
end