Class: Wordmove::Actions::Ssh::PushWordpress
- Inherits:
-
Object
- Object
- Wordmove::Actions::Ssh::PushWordpress
- Extended by:
- LightService::Action
- Includes:
- Helpers, WordpressDirectory::LocalHelperMethods
- Defined in:
- lib/wordmove/actions/ssh/push_wordpress.rb
Overview
Syncs wordpress folder (usually root folder), exluding wp-content/ folder, over SSH protocol from local host to the remote server
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 |
# File 'lib/wordmove/actions/ssh/push_wordpress.rb', line 25 executed do |context| local_path = context.[:wordpress_path] remote_path = context.[:wordpress_path] wp_content_relative_path = local_wp_content_dir( local_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::Ssh::PutDirectory.execute( photocopier: context.photocopier, logger: context.logger, command_args: [local_path, remote_path, exclude_paths], folder_task: :wordpress, local_options: context., remote_options: context., cli_options: context. ) context.fail!(result.) if result.failure? end |