Sha256: c82eefe2987eba1b30e9e5f3244940097c49b66e5aa0e8bb8ae9f731926abf4e
Contents?: true
Size: 1.19 KB
Versions: 40
Compression:
Stored size: 1.19 KB
Contents
module Fulmar module Infrastructure module Service # Implements Flow commands class FlowService # @param [Fulmar::Infrastructure::Service::ShellService] shell # @param [Hash] config def initialize(shell, config) @remote_shell = shell @config = config test_config end def cache_clear execute('flow:cache:flush --force') end def cache_warmup execute('flow:cache:warmup') end def site_export(filename = export_filename) execute("typo3.neos:site:export --filename \"#{filename}\"") filename end def site_import(filename) execute("./flow typo3.neos:site:import --filename \"#{filename}\"") end def execute(command) @remote_shell.run "FLOW_CONTEXT=\"#{@config[:neos][:environment]}\" ./flow #{command}" end protected def export_filename "export_#{Time.now.strftime('%Y-%m-%dT%H%M%S')}.xml" end def test_config fail 'Neos environment is not set.' unless @config[:neos] && @config[:neos][:environment] end end end end end
Version data entries
40 entries across 40 versions & 1 rubygems