Class: Wordmove::Actions::Ftp::PullWordpress
- Inherits:
-
Object
- Object
- Wordmove::Actions::Ftp::PullWordpress
- Extended by:
- LightService::Action
- Includes:
- Helpers, WordpressDirectory::RemoteHelperMethods
- Defined in:
- lib/wordmove/actions/ftp/pull_wordpress.rb
Overview
Syncs wordpress folder (usually root folder), exluding wp-content/ folder, over FTP protocol from the remote server to local host
Class Method Summary collapse
-
.execute ⇒ LightService::Context
Action’s context.
Class Method Details
.execute ⇒ LightService::Context
Returns Action’s context.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/wordmove/actions/ftp/pull_wordpress.rb', line 25 executed do |context| local_path = context.[:wordpress_path] remote_path = context.[:wordpress_path] wp_content_relative_path = remote_wp_content_dir( remote_options: context. ).relative_path exclude_wp_content = exclude_dir_contents( path: wp_content_relative_path ) exclude_paths = paths_to_exclude( remote_options: context. ).push(exclude_wp_content) result = Wordmove::Actions::Ftp::GetDirectory.execute( photocopier: context.photocopier, logger: context.logger, command_args: [remote_path, local_path, exclude_paths], folder_task: :wordpress, local_options: context., remote_options: context., cli_options: context. ) context.fail!(result.) if result.failure? end |