Class: Wordmove::Deployer::SSH
- Defined in:
- lib/wordmove/deployer/ssh.rb
Direct Known Subclasses
Wordmove::Deployer::Ssh::DefaultSqlAdapter, Wordmove::Deployer::Ssh::WpcliSqlAdapter
Instance Attribute Summary collapse
-
#local_backup_path ⇒ Object
readonly
Returns the value of attribute local_backup_path.
-
#local_dump_path ⇒ Object
readonly
Returns the value of attribute local_dump_path.
-
#local_gzipped_backup_path ⇒ Object
readonly
Returns the value of attribute local_gzipped_backup_path.
-
#local_gzipped_dump_path ⇒ Object
readonly
Returns the value of attribute local_gzipped_dump_path.
Attributes inherited from Base
#environment, #logger, #options
Instance Method Summary collapse
-
#initialize(environment, options) ⇒ SSH
constructor
A new instance of SSH.
Methods inherited from Base
current_dir, deployer_for, #exclude_dir_contents, logger, #pull_wordpress, #push_wordpress, #remote_get_directory, #remote_put_directory
Constructor Details
#initialize(environment, options) ⇒ SSH
Returns a new instance of SSH.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/wordmove/deployer/ssh.rb', line 11 def initialize(environment, ) super(environment, ) = [:ssh] if simulate? && [:rsync_options] [:rsync_options].concat(" --dry-run") elsif simulate? [:rsync_options] = "--dry-run" end @copier = Photocopier::SSH.new().tap { |c| c.logger = logger } @local_dump_path = local_wp_content_dir.path("dump.sql") @local_backup_path = local_wp_content_dir.path("local-backup-#{Time.now.to_i}.sql") @local_gzipped_dump_path = local_dump_path + '.gz' @local_gzipped_backup_path = local_wp_content_dir .path("#{environment}-backup-#{Time.now.to_i}.sql.gz") end |
Instance Attribute Details
#local_backup_path ⇒ Object (readonly)
Returns the value of attribute local_backup_path.
6 7 8 |
# File 'lib/wordmove/deployer/ssh.rb', line 6 def local_backup_path @local_backup_path end |
#local_dump_path ⇒ Object (readonly)
Returns the value of attribute local_dump_path.
6 7 8 |
# File 'lib/wordmove/deployer/ssh.rb', line 6 def local_dump_path @local_dump_path end |
#local_gzipped_backup_path ⇒ Object (readonly)
Returns the value of attribute local_gzipped_backup_path.
6 7 8 |
# File 'lib/wordmove/deployer/ssh.rb', line 6 def local_gzipped_backup_path @local_gzipped_backup_path end |
#local_gzipped_dump_path ⇒ Object (readonly)
Returns the value of attribute local_gzipped_dump_path.
6 7 8 |
# File 'lib/wordmove/deployer/ssh.rb', line 6 def local_gzipped_dump_path @local_gzipped_dump_path end |