Class: Wordmove::Organizers::Ssh::Pull
- Inherits:
-
Object
- Object
- Wordmove::Organizers::Ssh::Pull
- Extended by:
- LightService::Organizer
- Includes:
- Actions::Helpers, Actions::Ssh::Helpers
- Defined in:
- lib/wordmove/organizers/ssh/pull.rb
Class Method Summary collapse
- .actions ⇒ Object
-
.call(cli_options, movefile) ⇒ Object
Can’t use keyword arguments since LightService still has some problems with modern ruby syntax: github.com/adomokos/light-service/pull/224.
Class Method Details
.actions ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/wordmove/organizers/ssh/pull.rb', line 32 def self.actions [ Wordmove::Actions::RunBeforePullHook, Wordmove::Actions::FilterAndSetupTasksToRun, reduce_if( lambda(&:wordpress_task), [Wordmove::Actions::Ssh::PullWordpress] ), iterate(:folder_tasks, [Wordmove::Actions::Ssh::GetDirectory]), reduce_if(lambda(&:database_task), [ Wordmove::Actions::SetupContextForDb, Wordmove::Actions::BackupLocalDb, Wordmove::Actions::Ssh::DownloadRemoteDb, Wordmove::Actions::AdaptRemoteDb, Wordmove::Actions::Ssh::CleanupAfterAdapt ]), Wordmove::Actions::RunAfterPullHook ] end |
.call(cli_options, movefile) ⇒ Object
Can’t use keyword arguments since LightService still has some problems with modern ruby syntax: github.com/adomokos/light-service/pull/224
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/wordmove/organizers/ssh/pull.rb', line 11 def self.call(, movefile) logger = Logger.new($stdout, movefile.secrets).tap { |l| l.level = Logger::DEBUG } = movefile.[movefile.environment] ssh_opts = (remote_options:, simulate: [:simulate]) LightService::Configuration.logger = ::Logger.new($stdout) if [:debug] with( cli_options:, global_options: movefile.[:global], local_options: movefile.[:local], remote_options:, movefile:, guardian: Wordmove::Guardian.new(cli_options:, action: :pull), logger:, photocopier: Photocopier::SSH .new(ssh_opts) .tap { |c| c.logger = logger } ).reduce(actions) end |