Class: Wordmove::Deployer
- Inherits:
-
Object
- Object
- Wordmove::Deployer
- Defined in:
- lib/wordmove/deployer.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Deployer
constructor
A new instance of Deployer.
- #pull ⇒ Object
- #push ⇒ Object
Constructor Details
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
12 13 14 |
# File 'lib/wordmove/deployer.rb', line 12 def logger @logger end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
11 12 13 |
# File 'lib/wordmove/deployer.rb', line 11 def @options end |
Instance Method Details
#pull ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/wordmove/deployer.rb', line 38 def pull informative_errors do unless .skip_db logger.info "Pulling the DB..." pull_db end remotely do |host| %w(uploads themes plugins).each do |step| unless .send("skip_#{step}") logger.info "Pulling wp-content/#{step}..." host.upload_dir remote_wpcontent_path(step), local_wpcontent_path(step) end end end end end |
#push ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/wordmove/deployer.rb', line 20 def push informative_errors do unless .skip_db logger.info "Pushing the DB..." push_db end remotely do |host| %w(uploads themes plugins).each do |step| unless .send("skip_#{step}") logger.info "Pushing wp-content/#{step}..." host.download_dir local_wpcontent_path(step), remote_wpcontent_path(step) end end end end end |