Class: Wordmove::Deployer::SSH

Inherits:
Base
  • Object
show all
Defined in:
lib/wordmove/deployer/ssh.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#environment, #logger, #options

Instance Method Summary collapse

Methods inherited from Base

current_dir, deployer_for, #exclude_dir_contents, extract_available_envs, fetch_movefile, last_dir?, logger, #pull_wordpress, #push_wordpress, #remote_get_directory, #remote_put_directory, upper_dir

Constructor Details

#initialize(environment, options) ⇒ SSH

Returns a new instance of SSH.



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/wordmove/deployer/ssh.rb', line 9

def initialize(environment, options)
  super
  ssh_options = remote_options[:ssh]
  @copier = Photocopier::SSH.new(ssh_options).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_pathObject (readonly)

Returns the value of attribute local_backup_path.



4
5
6
# File 'lib/wordmove/deployer/ssh.rb', line 4

def local_backup_path
  @local_backup_path
end

#local_dump_pathObject (readonly)

Returns the value of attribute local_dump_path.



4
5
6
# File 'lib/wordmove/deployer/ssh.rb', line 4

def local_dump_path
  @local_dump_path
end

#local_gzipped_backup_pathObject (readonly)

Returns the value of attribute local_gzipped_backup_path.



4
5
6
# File 'lib/wordmove/deployer/ssh.rb', line 4

def local_gzipped_backup_path
  @local_gzipped_backup_path
end

#local_gzipped_dump_pathObject (readonly)

Returns the value of attribute local_gzipped_dump_path.



4
5
6
# File 'lib/wordmove/deployer/ssh.rb', line 4

def local_gzipped_dump_path
  @local_gzipped_dump_path
end