capistrano-trellis-bedrock-wpcli 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +34 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +38 -0
- data/LICENSE +21 -0
- data/README.md +155 -0
- data/Rakefile +2 -0
- data/capistrano-trellis-bedrock-wpcli.gemspec +27 -0
- data/lib/capistrano-trellis-bedrock-wpcli.rb +0 -0
- data/lib/capistrano/tasks/wpdb.rake +132 -0
- data/lib/capistrano/tasks/wpuploads.rake +46 -0
- data/lib/capistrano/wpcli.rb +5 -0
- data/lib/capistrano/wpcli/version.rb +5 -0
- metadata +113 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d70cce220f8b7147408ed6b1736da6d079f184c3
|
4
|
+
data.tar.gz: e49c475596e26202735be2452e9f8b97a6b70734
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8cdc94d9844ad45ca2f01ac718e4dea2b03def36cc1c467e09d40f369d4cfb30e9050918af72279993f4ea90aa940aef9dccda5672410542081055501b62cd18
|
7
|
+
data.tar.gz: 031fe3ebcfd7c1d497badb9431684ac068d1d8f60a4e3370fbd50dae9fc8588f0daa6586eebdccf8aaf77e360f3ff979518b08c659bc3a29e637ceb6fc1b3999
|
data/.gitignore
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
|
12
|
+
## Specific to RubyMotion:
|
13
|
+
.dat*
|
14
|
+
.repl_history
|
15
|
+
build/
|
16
|
+
|
17
|
+
## Documentation cache and generated files:
|
18
|
+
/.yardoc/
|
19
|
+
/_yardoc/
|
20
|
+
/doc/
|
21
|
+
/rdoc/
|
22
|
+
|
23
|
+
## Environment normalisation:
|
24
|
+
/.bundle/
|
25
|
+
/lib/bundler/man/
|
26
|
+
|
27
|
+
# for a library or gem, you might want to ignore these files since the code is
|
28
|
+
# intended to run in multiple environments; otherwise, check them in:
|
29
|
+
# Gemfile.lock
|
30
|
+
# .ruby-version
|
31
|
+
# .ruby-gemset
|
32
|
+
|
33
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
34
|
+
.rvmrc
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
capistrano-trellis-bedrock-wpcli (1.0.0)
|
5
|
+
capistrano (~> 3.6.0)
|
6
|
+
sshkit (~> 1.11.1)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
airbrussh (1.1.0)
|
12
|
+
sshkit (>= 1.6.1, != 1.7.0)
|
13
|
+
capistrano (3.6.0)
|
14
|
+
airbrussh (>= 1.0.0)
|
15
|
+
capistrano-harrow
|
16
|
+
i18n
|
17
|
+
rake (>= 10.0.0)
|
18
|
+
sshkit (>= 1.9.0)
|
19
|
+
capistrano-harrow (0.5.3)
|
20
|
+
i18n (0.7.0)
|
21
|
+
net-scp (1.2.1)
|
22
|
+
net-ssh (>= 2.6.5)
|
23
|
+
net-ssh (3.2.0)
|
24
|
+
rake (11.2.2)
|
25
|
+
sshkit (1.11.2)
|
26
|
+
net-scp (>= 1.1.2)
|
27
|
+
net-ssh (>= 2.8.0)
|
28
|
+
|
29
|
+
PLATFORMS
|
30
|
+
ruby
|
31
|
+
|
32
|
+
DEPENDENCIES
|
33
|
+
bundler (~> 1.12.5)
|
34
|
+
capistrano-trellis-bedrock-wpcli!
|
35
|
+
rake (~> 11.2.2)
|
36
|
+
|
37
|
+
BUNDLED WITH
|
38
|
+
1.12.5
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Ensoul
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,155 @@
|
|
1
|
+
# Capistrano::WPCLI
|
2
|
+
|
3
|
+
[](https://www.versioneye.com/user/projects/561c9bfda193340f2f001728)
|
4
|
+
|
5
|
+
**Note: this plugin works only with Capistrano 3.**
|
6
|
+
|
7
|
+
Provides command line tools to facilitate Wordpress database and uploads deploy.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
gem 'capistrano-wpcli'
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install capistrano-wpcli
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
All you need to do is put the following in `Capfile` file:
|
26
|
+
|
27
|
+
require 'capistrano/wpcli'
|
28
|
+
|
29
|
+
### How it works (Tasks)
|
30
|
+
|
31
|
+
cap staging wpcli:db:push
|
32
|
+
|
33
|
+
Pushes the local WP database to the remote server and replaces the urls.
|
34
|
+
|
35
|
+
Optionally backs up the remote database before pushing (if `wpcli_backup_db` is set to true, see Configuration).
|
36
|
+
|
37
|
+
- - -
|
38
|
+
|
39
|
+
cap staging wpcli:db:pull
|
40
|
+
|
41
|
+
Pulls the remote server WP database to local and replaces the urls.
|
42
|
+
|
43
|
+
- - -
|
44
|
+
|
45
|
+
cap staging wpcli:db:backup:remote
|
46
|
+
|
47
|
+
Pulls the remote server WP database to localhost, uses `wpcli_local_db_backup_dir` to define the location of the export.
|
48
|
+
|
49
|
+
- - -
|
50
|
+
|
51
|
+
cap development wpcli:db:backup:local
|
52
|
+
|
53
|
+
Backs up the local WP database to localhost, uses `wpcli_local_db_backup_dir` to define the location of the export.
|
54
|
+
|
55
|
+
- - -
|
56
|
+
|
57
|
+
cap staging wpcli:uploads:rsync:push
|
58
|
+
|
59
|
+
Push local uploads delta to remote machine using rsync.
|
60
|
+
|
61
|
+
- - -
|
62
|
+
|
63
|
+
cap staging wpcli:uploads:rsync:pull
|
64
|
+
|
65
|
+
Pull remote uploads delta to local machine using rsync.
|
66
|
+
|
67
|
+
### Configuration
|
68
|
+
|
69
|
+
This plugin needs some configuration to work properly. You can put all your configs in Capistrano stage files i.e. `config/deploy/production.rb`.
|
70
|
+
|
71
|
+
Here's the list of options and the defaults for each option:
|
72
|
+
|
73
|
+
- - -
|
74
|
+
|
75
|
+
set :wpcli_remote_url
|
76
|
+
|
77
|
+
Url of the WP root installation on the remote server (used by search-replace command).
|
78
|
+
|
79
|
+
- - -
|
80
|
+
|
81
|
+
set :wpcli_local_url
|
82
|
+
|
83
|
+
Url of the WP root installation on the local server (used by search-replace command).
|
84
|
+
|
85
|
+
- - -
|
86
|
+
|
87
|
+
set :local_tmp_dir
|
88
|
+
|
89
|
+
Absolute path to local directory temporary directory which is read and writeable.
|
90
|
+
|
91
|
+
Defaults to `/tmp`
|
92
|
+
|
93
|
+
- - -
|
94
|
+
|
95
|
+
set :wpcli_backup_db
|
96
|
+
|
97
|
+
Set to true if you would like to create backups of databases on each push. Defaults to false.
|
98
|
+
|
99
|
+
- - -
|
100
|
+
|
101
|
+
set :wpcli_local_db_backup_dir
|
102
|
+
|
103
|
+
Absolute or relative path to local directory for storing database backups which is read and writeable.
|
104
|
+
|
105
|
+
Defaults to `config/backup`
|
106
|
+
|
107
|
+
**IMPORTANT: Make sure to add the folder to .gitignore to prevent db backups from being in version control.**
|
108
|
+
|
109
|
+
- - -
|
110
|
+
|
111
|
+
set :wpcli_local_uploads_dir
|
112
|
+
|
113
|
+
Absolute or relative path to local WP uploads directory.
|
114
|
+
|
115
|
+
Defaults to `web/app/uploads/`.
|
116
|
+
|
117
|
+
**IMPORTANT: Add trailing slash!**
|
118
|
+
|
119
|
+
- - -
|
120
|
+
|
121
|
+
set :wpcli_remote_uploads_dir
|
122
|
+
|
123
|
+
Absolute path to remote wordpress uploads directory.
|
124
|
+
|
125
|
+
Defaults to `#{shared_path.to_s}/web/app/uploads/`
|
126
|
+
|
127
|
+
**IMPORTANT: Add trailing slash!**
|
128
|
+
|
129
|
+
### FAQ
|
130
|
+
|
131
|
+
- What if i want to use a custom port for rsync?
|
132
|
+
You can by setting your port somewhere inside the :ssh_options precedence.
|
133
|
+
See here: http://capistranorb.com/documentation/advanced-features/properties/#precedence
|
134
|
+
|
135
|
+
### Vagrant
|
136
|
+
|
137
|
+
If you are using another machine as a development server (Vagrant for example), you should define a `dev` role and indicate the path where the project lives on that server. This normally goes on `deploy.rb` file. Here's an example:
|
138
|
+
|
139
|
+
server "example.dev", user: 'vagrant', password: 'vagrant', roles: %w{dev}
|
140
|
+
|
141
|
+
set :dev_path, '/srv/www/example.dev/current'
|
142
|
+
|
143
|
+
## Contributing
|
144
|
+
|
145
|
+
1. Fork it ( https://github.com/lavmeiker/capistrano-wpcli/fork )
|
146
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
147
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
148
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
149
|
+
5. Create a new Pull Request
|
150
|
+
|
151
|
+
|
152
|
+
# READ AND APPLY THE ISTRUCTIONS BELOW ONLY IF STAGING AND PRODUCTION ARE ON THE SAME SERVER
|
153
|
+
# These parameters need first to be moved into production.rb and staging.rb and then replace #{fetch(:bedrock_folder)} with the name of production and staging bedrock folder
|
154
|
+
set :deploy_to, -> { "/srv/www/#{fetch(:bedrock_folder)}" }
|
155
|
+
set :wpcli_remote_uploads_dir, -> { "/srv/www/#{fetch(:bedrock_folder)}/current/web/app/uploads/" }
|
data/Rakefile
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'capistrano/wpcli/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "capistrano-trellis-bedrock-wpcli"
|
8
|
+
spec.version = Capistrano::Wpcli::VERSION
|
9
|
+
spec.authors = ["Ensoul"]
|
10
|
+
spec.email = ["hello@ensoul.it"]
|
11
|
+
spec.summary = %q{Simple Capistrano wrapper around WP-CLI for Trellis and Bedrock}
|
12
|
+
spec.description = %q{Provides command line tools to facilitate WordPress uploads and database deploy with Trellis and Bedrock.}
|
13
|
+
spec.homepage = "https://github.com/itsensoul/capistrano-trellis-bedrock-wpcli"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency 'capistrano', '~> 3.6.0'
|
22
|
+
spec.add_dependency 'sshkit', '~> 1.11.1'
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.12.5"
|
25
|
+
spec.add_development_dependency "rake", "~> 11.2.2"
|
26
|
+
|
27
|
+
end
|
File without changes
|
@@ -0,0 +1,132 @@
|
|
1
|
+
namespace :load do
|
2
|
+
|
3
|
+
task :defaults do
|
4
|
+
|
5
|
+
# The url under which the wordpress installation is
|
6
|
+
# available on the remote server
|
7
|
+
set :wpcli_remote_url, "http://example.com"
|
8
|
+
|
9
|
+
# The url under which the wordpress installation is
|
10
|
+
# available on the local server
|
11
|
+
set :wpcli_local_url, "http://example.dev"
|
12
|
+
|
13
|
+
# A local temp dir which is read and writeable
|
14
|
+
set :local_tmp_dir, "/tmp"
|
15
|
+
|
16
|
+
# Use current time for annotating the backup file
|
17
|
+
set :current_time, -> {Time.now.strftime("%Y_%m_%d_%H_%M")}
|
18
|
+
|
19
|
+
# Boolean to determine wether the database should be backed up or not
|
20
|
+
set :wpcli_backup_db, false
|
21
|
+
|
22
|
+
# Set the location of the db backup files. This is relative to the local project root path.
|
23
|
+
set :wpcli_local_db_backup_dir, "config/backup"
|
24
|
+
|
25
|
+
# Temporary db dumps path
|
26
|
+
set :wpcli_remote_db_file, -> {"#{fetch(:tmp_dir)}/wpcli_database.sql.gz"}
|
27
|
+
set :wpcli_local_db_file, -> {"#{fetch(:local_tmp_dir)}/wpcli_database.sql.gz"}
|
28
|
+
|
29
|
+
# Backup file filenames
|
30
|
+
set :wpcli_remote_db_backup_filename, -> {"db_#{fetch(:bedrock_folder)}_#{fetch(:stage)}_#{fetch(:current_time)}.sql.gz"}
|
31
|
+
set :wpcli_local_db_backup_filename, -> {"db_#{fetch(:bedrock_folder)}_development_#{fetch(:current_time)}.sql.gz"}
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
namespace :wpcli do
|
38
|
+
|
39
|
+
namespace :db do
|
40
|
+
|
41
|
+
desc "Pull the remote database"
|
42
|
+
task :pull do
|
43
|
+
on roles(:web) do
|
44
|
+
within current_path do
|
45
|
+
execute :wp, :db, :export, "- |", :gzip, ">", fetch(:wpcli_remote_db_file)
|
46
|
+
download! fetch(:wpcli_remote_db_file), fetch(:wpcli_local_db_file)
|
47
|
+
execute :rm, fetch(:wpcli_remote_db_file)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
on roles(:dev) do
|
51
|
+
within fetch(:dev_path) do
|
52
|
+
local_tmp_file = fetch(:wpcli_local_db_file).gsub(/\.gz$/, "")
|
53
|
+
upload! fetch(:wpcli_local_db_file), fetch(:wpcli_local_db_file)
|
54
|
+
execute :gunzip, "-c", fetch(:wpcli_local_db_file), ">", local_tmp_file
|
55
|
+
execute :wp, :db, :import, local_tmp_file
|
56
|
+
execute :rm, fetch(:wpcli_local_db_file), local_tmp_file
|
57
|
+
execute :wp, "search-replace", fetch(:wpcli_remote_url), fetch(:wpcli_local_url), fetch(:wpcli_args) || "--skip-columns=guid", "--url=" + fetch(:wpcli_remote_url)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
run_locally do
|
61
|
+
execute :rm, fetch(:wpcli_local_db_file)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
desc "Push the local database"
|
66
|
+
task :push do
|
67
|
+
on roles(:dev) do
|
68
|
+
within fetch(:dev_path) do
|
69
|
+
execute :wp, :db, :export, "- |", :gzip, ">", fetch(:wpcli_local_db_file)
|
70
|
+
download! fetch(:wpcli_local_db_file), fetch(:wpcli_local_db_file)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
on roles(:web) do
|
74
|
+
upload! fetch(:wpcli_local_db_file), fetch(:wpcli_remote_db_file)
|
75
|
+
within current_path do
|
76
|
+
remote_tmp_file = fetch(:wpcli_remote_db_file).gsub(/\.gz$/, "")
|
77
|
+
execute :gunzip, "-c", fetch(:wpcli_remote_db_file), ">", remote_tmp_file
|
78
|
+
execute :wp, :db, :import, remote_tmp_file
|
79
|
+
execute :rm, fetch(:wpcli_remote_db_file), remote_tmp_file
|
80
|
+
execute :wp, "search-replace", fetch(:wpcli_local_url), fetch(:wpcli_remote_url), fetch(:wpcli_args) || "--skip-columns=guid", "--url=" + fetch(:wpcli_local_url)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
on roles(:dev) do
|
84
|
+
within fetch(:dev_path) do
|
85
|
+
execute :rm, fetch(:wpcli_local_db_file)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
run_locally do
|
89
|
+
execute :rm, fetch(:wpcli_local_db_file)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
namespace :backup do
|
94
|
+
|
95
|
+
desc "Checking / Creating backup directory"
|
96
|
+
task :create_backup_dir do
|
97
|
+
run_locally do
|
98
|
+
unless test("[ -d #{fetch(:wpcli_local_db_backup_dir)} ]")
|
99
|
+
execute :mkdir, Pathname.new(fetch(:wpcli_local_db_backup_dir)).to_s
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
desc "Backup the remote database"
|
105
|
+
task :remote do
|
106
|
+
on roles(:web) do
|
107
|
+
within current_path do
|
108
|
+
execute :wp, :db, :export, "- |", :gzip, ">", fetch(:wpcli_remote_db_file)
|
109
|
+
download! fetch(:wpcli_remote_db_file), Pathname.new(fetch(:wpcli_local_db_backup_dir)).join(fetch(:wpcli_remote_db_backup_filename)).to_s
|
110
|
+
execute :rm, fetch(:wpcli_remote_db_file)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
desc "Backup the local database"
|
116
|
+
task :local do
|
117
|
+
on roles(:dev) do
|
118
|
+
within fetch(:dev_path) do
|
119
|
+
execute :wp, :db, :export, "- |", :gzip, ">", fetch(:wpcli_local_db_file)
|
120
|
+
download! fetch(:wpcli_local_db_file), Pathname.new(fetch(:wpcli_local_db_backup_dir)).join(fetch(:wpcli_local_db_backup_filename)).to_s
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
before :push, 'backup:remote' if :wpcli_backup_db
|
126
|
+
before :pull, 'backup:local' if :wpcli_backup_db
|
127
|
+
before :local, :create_backup_dir
|
128
|
+
before :remote, :create_backup_dir
|
129
|
+
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
namespace :load do
|
2
|
+
task :defaults do
|
3
|
+
|
4
|
+
# These options are passed directly to rsync
|
5
|
+
# Append your options, overwriting the defaults may result in malfunction
|
6
|
+
# Ex: --recursive --delete --exclude .git*
|
7
|
+
set :wpcli_rsync_options, "-aivz --rsh=ssh --progress --stats --delete --exclude=.DS_Store"
|
8
|
+
|
9
|
+
# Local dir where WP stores the uploads
|
10
|
+
# IMPORTANT: Add trailing slash!
|
11
|
+
set :wpcli_local_uploads_dir, "web/app/uploads/"
|
12
|
+
|
13
|
+
# Remote dir where WP stores the uploads
|
14
|
+
# IMPORTANT: Add trailing slash!
|
15
|
+
set :wpcli_remote_uploads_dir, -> {"#{shared_path.to_s}/uploads/"}
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
namespace :wpcli do
|
21
|
+
namespace :uploads do
|
22
|
+
namespace :rsync do
|
23
|
+
|
24
|
+
desc "Push local uploads delta to remote machine"
|
25
|
+
task :push do
|
26
|
+
roles(:web).each do |role|
|
27
|
+
puts role.netssh_options[:port]
|
28
|
+
port = role.netssh_options[:port] || 22
|
29
|
+
set :wpcli_rsync_options, fetch(:wpcli_rsync_options) + (" -e 'ssh -p #{port}'")
|
30
|
+
run_locally do
|
31
|
+
execute :rsync, fetch(:wpcli_rsync_options), fetch(:wpcli_local_uploads_dir), "#{role.user}@#{role.hostname}:#{fetch(:wpcli_remote_uploads_dir)}"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
desc "Pull remote uploads delta to local machine"
|
37
|
+
task :pull do
|
38
|
+
roles(:web).each do |role|
|
39
|
+
run_locally do
|
40
|
+
execute :rsync, fetch(:wpcli_rsync_options), "#{role.user}@#{role.hostname}:#{fetch(:wpcli_remote_uploads_dir)}", fetch(:wpcli_local_uploads_dir)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
metadata
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-trellis-bedrock-wpcli
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ensoul
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-08-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: capistrano
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.6.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.6.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: sshkit
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.11.1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.11.1
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.12.5
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.12.5
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 11.2.2
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 11.2.2
|
69
|
+
description: Provides command line tools to facilitate WordPress uploads and database
|
70
|
+
deploy with Trellis and Bedrock.
|
71
|
+
email:
|
72
|
+
- hello@ensoul.it
|
73
|
+
executables: []
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".gitignore"
|
78
|
+
- Gemfile
|
79
|
+
- Gemfile.lock
|
80
|
+
- LICENSE
|
81
|
+
- README.md
|
82
|
+
- Rakefile
|
83
|
+
- capistrano-trellis-bedrock-wpcli.gemspec
|
84
|
+
- lib/capistrano-trellis-bedrock-wpcli.rb
|
85
|
+
- lib/capistrano/tasks/wpdb.rake
|
86
|
+
- lib/capistrano/tasks/wpuploads.rake
|
87
|
+
- lib/capistrano/wpcli.rb
|
88
|
+
- lib/capistrano/wpcli/version.rb
|
89
|
+
homepage: https://github.com/itsensoul/capistrano-trellis-bedrock-wpcli
|
90
|
+
licenses:
|
91
|
+
- MIT
|
92
|
+
metadata: {}
|
93
|
+
post_install_message:
|
94
|
+
rdoc_options: []
|
95
|
+
require_paths:
|
96
|
+
- lib
|
97
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
requirements: []
|
108
|
+
rubyforge_project:
|
109
|
+
rubygems_version: 2.5.1
|
110
|
+
signing_key:
|
111
|
+
specification_version: 4
|
112
|
+
summary: Simple Capistrano wrapper around WP-CLI for Trellis and Bedrock
|
113
|
+
test_files: []
|