Module: Wordmove::WpcliHelpers

Extended by:
ActiveSupport::Concern
Included in:
Actions::AdaptLocalDb, Actions::AdaptRemoteDb
Defined in:
lib/wordmove/wpcli.rb

Overview

This class is a sort of mini-wrapper around the wp-cli executable. It’s responsible to run or produce wp-cli commands.

Class Method Summary collapse

Class Method Details

.get_config(config, config_path:) ⇒ Object



81
82
83
# File 'lib/wordmove/wpcli.rb', line 81

def self.get_config(config, config_path:)
  `wp config get #{config} --allow-root --path=#{config_path}`.chomp
end

.get_option(option, config_path:) ⇒ Object



77
78
79
# File 'lib/wordmove/wpcli.rb', line 77

def self.get_option(option, config_path:)
  `wp option get #{option} --allow-root --path=#{config_path}`.chomp
end