Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wordmove push --all #39

Merged
merged 1 commit into from
Apr 3, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ staging:
Just not use the `remote.ssh.password` field on your `Movefile`. Easy peasy.

### If you want to specify SSH password on the Movefile
Please take a look at the various gotchas of the underlying [`photocopier` gem](https://github.com/stefanoverna/photocopier#password-gotchas).
Please take a look at the various gotchas of the underlying [`photocopier` gem](https://github.com/welaika/photocopier#password-gotchas).

### How the heck you are able to sync the DB via FTP?
We're glad you asked! We basically upload via FTP a PHP script that performs the various
Expand Down
26 changes: 16 additions & 10 deletions lib/wordmove/deployer/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,30 @@ def remote_put_directory(directory); end
end
end

def get_options_for_wordpress(type)
{
:local_path => local_options[:wordpress_path],
:remote_path => remote_options[:wordpress_path],
:exclude_paths => paths_to_exclude.push(send("#{type}_wp_content_dir").relative_path)
}
def exclude_dir_contents(path)
"#{path}/*"
end

def push_wordpress
logger.task "Pushing wordpress core"
options = get_options_for_wordpress("local")
remote_put_directory(options[:local_path], options[:remote_path], options[:exclude_paths])

local_path = local_options[:wordpress_path]
remote_path = remote_options[:wordpress_path]
exclude_wp_content = exclude_dir_contents(local_wp_content_dir.relative_path)
exclude_paths = paths_to_exclude.push(exclude_wp_content)

remote_put_directory(local_path, remote_path, exclude_paths)
end

def pull_wordpress
logger.task "Pulling wordpress core"
options = get_options_for_wordpress("remote")
remote_get_directory(options[:remote_path], options[:local_path], options[:exclude_paths])

local_path = local_options[:wordpress_path]
remote_path = remote_options[:wordpress_path]
exclude_wp_content = exclude_dir_contents(remote_wp_content_dir.relative_path)
exclude_paths = paths_to_exclude.push(exclude_wp_content)

remote_get_directory(remote_path, local_path, exclude_paths)
end

protected
Expand Down
2 changes: 1 addition & 1 deletion lib/wordmove/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Wordmove
VERSION = "1.0.9"
VERSION = "1.0.10"
end
2 changes: 1 addition & 1 deletion wordmove.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
gem.add_dependency "thor"
gem.add_dependency "activesupport"
gem.add_dependency "i18n"
gem.add_dependency "photocopier", ">= 0.0.6"
gem.add_dependency "photocopier", ">= 0.0.7"

gem.add_development_dependency "rspec"
gem.add_development_dependency "cucumber"
Expand Down