wordpress-capistrano 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 +15 -0
- data/.gitignore +18 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +27 -0
- data/LICENSE +20 -0
- data/README.md +78 -0
- data/lib/capistrano/tasks/wordpress.rake +62 -0
- data/lib/capistrano/wordpress.rb +1 -0
- data/lib/wordpress-capistrano.rb +0 -0
- data/wordpress-capistrano.gemspec +24 -0
- metadata +95 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ODg2ZDhkZjQ1MmNkYmJlYjgxODFhYmI1ZjhmYTI3M2Y1YWU0NzIzYQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZGJmOGE0ZTIxMjE0YjI0MjQ2ODY2ZTZmYWE5ZTA4ODI2ZGYwNGMxNQ==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NzdhMmRjMzA0M2I1N2FiNTEyMjYxMDIwMmViNDgyMDMyMTExZjIxM2RlMmNm
|
10
|
+
YjAyZjNiZDRlNTdjN2E2YTYxZjdkZWQ1MzEzMDY0MmMxOWMwNGQ2ZTcxMDdk
|
11
|
+
OWM3MmQ2MGI3NTVkZjUxNTRkZTdjODJjNzA4MDRiOTcyZDdhOTI=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MjE2YmU5NWU3OGMxOWFjYTIzYzUzNWY4OGRkYzNkMDBiOTgxYzVhNDNhMDg0
|
14
|
+
ZTg3ZGQ4NGY4NDcyY2IwMDAyMDJhNDUwNzAwM2JlZWQ2NThkOTc3YWI2NTIx
|
15
|
+
MzZmNjE4ODczYzFiNmVlMjI0NDNmNmZkZDMyYTc1NTdkZTcwMjI=
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
capistrano (3.1.0)
|
5
|
+
i18n
|
6
|
+
rake (>= 10.0.0)
|
7
|
+
sshkit (~> 1.3)
|
8
|
+
capistrano-composer (0.0.3)
|
9
|
+
capistrano (>= 3.0.0.pre)
|
10
|
+
i18n (0.6.9)
|
11
|
+
net-scp (1.1.2)
|
12
|
+
net-ssh (>= 2.6.5)
|
13
|
+
net-ssh (2.8.0)
|
14
|
+
rake (10.1.1)
|
15
|
+
sshkit (1.3.0)
|
16
|
+
net-scp (>= 1.1.2)
|
17
|
+
net-ssh
|
18
|
+
term-ansicolor
|
19
|
+
term-ansicolor (1.3.0)
|
20
|
+
tins (~> 1.0)
|
21
|
+
tins (1.0.0)
|
22
|
+
|
23
|
+
PLATFORMS
|
24
|
+
ruby
|
25
|
+
|
26
|
+
DEPENDENCIES
|
27
|
+
capistrano-composer
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2014 Craig Morris
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
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, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
# Capistrano::Composer
|
2
|
+
|
3
|
+
A set of recipes for working with WordPress (via WP CLI) and Capistrano 3.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'capistrano', '~> 3.0.0'
|
11
|
+
gem 'wordpress-capistrano'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install wordpress-capistrano
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
Require the module in your `Capfile`:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
require 'wordpress/capistrano'
|
28
|
+
```
|
29
|
+
|
30
|
+
`wordpress/capistrano` comes with 4 tasks:
|
31
|
+
|
32
|
+
* wordpress:push_db
|
33
|
+
* wordpress:pull_db
|
34
|
+
* wordpress:deploy_db
|
35
|
+
* wordpress:sync_content
|
36
|
+
|
37
|
+
The `wordpress:deploy_db` and `wordpress:sync_content` tasks will run before deploy:updated as part of
|
38
|
+
Capistrano's default deploy, or can be run in isolation with:
|
39
|
+
|
40
|
+
```bash
|
41
|
+
$ cap production wordpress:deploy_db
|
42
|
+
$ cap production wordpress:sync_content
|
43
|
+
```
|
44
|
+
|
45
|
+
### Other Recommended Settings
|
46
|
+
|
47
|
+
This gem does not have libraries to perform common tasks like symlinking wp-content/uploads or symlinking database
|
48
|
+
configuration files. Some recommended settings to go along with your deploy.rb are below.
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
set :url, 'http://www.wordpress.org'
|
52
|
+
set :local_url, 'lid0043.localhost'
|
53
|
+
set :wp_path, '.'
|
54
|
+
```
|
55
|
+
|
56
|
+
### Configuration
|
57
|
+
|
58
|
+
Configurable options, shown here with defaults:
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
set :url, 'http://www.wordpress.org'
|
62
|
+
set :local_url, 'lid0043.localhost'
|
63
|
+
```
|
64
|
+
|
65
|
+
## Contributing
|
66
|
+
|
67
|
+
1. Fork it
|
68
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
69
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
70
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
71
|
+
5. Create new Pull Request
|
72
|
+
|
73
|
+
Also, please ask the owner of the capistrano-wordpress gem to give up his name!
|
74
|
+
|
75
|
+
## Credits
|
76
|
+
|
77
|
+
* https://github.com/herrkris/wordpress-capistrano
|
78
|
+
* https://github.com/capistrano/composer
|
@@ -0,0 +1,62 @@
|
|
1
|
+
namespace :composer do
|
2
|
+
desc <<-DESC
|
3
|
+
Installs composer.phar to the shared directory
|
4
|
+
In order to use the .phar file, the composer command needs to be mapped:
|
5
|
+
SSHKit.config.command_map[:composer] = "\#{shared_path.join("composer.phar")}"
|
6
|
+
This is best used before deploy:starting:
|
7
|
+
namespace :deploy do
|
8
|
+
before :starting, 'composer:install_executable'
|
9
|
+
end
|
10
|
+
DESC
|
11
|
+
task :install_executable do
|
12
|
+
on roles fetch(:composer_roles) do
|
13
|
+
within shared_path do
|
14
|
+
unless test "[", "-e", "composer.phar", "]"
|
15
|
+
execute :curl, "-s", fetch(:composer_download_url), "|", :php
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
task :run, :command do |t, args|
|
22
|
+
args.with_defaults(:command => :list)
|
23
|
+
on roles fetch(:composer_roles) do
|
24
|
+
within release_path do
|
25
|
+
execute :composer, args[:command], *args.extras
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
desc <<-DESC
|
31
|
+
Install the project dependencies via Composer. By default, require-dev \
|
32
|
+
dependencies will not be installed.
|
33
|
+
|
34
|
+
You can override any of the defaults by setting the variables shown below.
|
35
|
+
|
36
|
+
set :composer_flags, '--no-dev --no-scripts --quiet --optimize-autoloader'
|
37
|
+
set :composer_roles, :all
|
38
|
+
DESC
|
39
|
+
task :install do
|
40
|
+
invoke "composer:run", :install, fetch(:composer_install_flags)
|
41
|
+
end
|
42
|
+
|
43
|
+
task :dump_autoload do
|
44
|
+
invoke "composer:run", :dumpautoload, fetch(:composer_dump_autoload_flags)
|
45
|
+
end
|
46
|
+
|
47
|
+
desc "Run the self-update command for composer.phar"
|
48
|
+
task :self_update do
|
49
|
+
invoke "composer:run", :selfupdate
|
50
|
+
end
|
51
|
+
|
52
|
+
before 'deploy:updated', 'composer:install'
|
53
|
+
end
|
54
|
+
|
55
|
+
namespace :load do
|
56
|
+
task :defaults do
|
57
|
+
set :composer_install_flags, '--no-dev --no-scripts --quiet --optimize-autoloader'
|
58
|
+
set :composer_roles, :all
|
59
|
+
set :composer_dump_autoload_flags, '--optimize'
|
60
|
+
set :composer_download_url, "https://getcomposer.org/installer"
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path('../tasks/wordpress.rake', __FILE__)
|
File without changes
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'wordpress-capistrano'
|
7
|
+
spec.version = '0.1'
|
8
|
+
spec.authors = ['Craig Morris']
|
9
|
+
spec.email = ['craig.michael.morris@gmail.com']
|
10
|
+
spec.description = %q{WordPress support for Capistrano 3.x}
|
11
|
+
spec.summary = %q{WordPress support for Capistrano 3.x}
|
12
|
+
spec.homepage = 'https://github.com/morrislaptop/wordpress-composer'
|
13
|
+
spec.license = 'MIT'
|
14
|
+
|
15
|
+
spec.files = `git ls-files`.split($/)
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
#spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ['lib']
|
19
|
+
|
20
|
+
spec.add_dependency 'capistrano', '>= 3.0.0.pre'
|
21
|
+
|
22
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
23
|
+
spec.add_development_dependency 'rake'
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: wordpress-capistrano
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.1'
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Craig Morris
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-02-16 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.0.0.pre
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.0.0.pre
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.3'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: WordPress support for Capistrano 3.x
|
56
|
+
email:
|
57
|
+
- craig.michael.morris@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- .gitignore
|
63
|
+
- Gemfile
|
64
|
+
- Gemfile.lock
|
65
|
+
- LICENSE
|
66
|
+
- README.md
|
67
|
+
- lib/capistrano/tasks/wordpress.rake
|
68
|
+
- lib/capistrano/wordpress.rb
|
69
|
+
- lib/wordpress-capistrano.rb
|
70
|
+
- wordpress-capistrano.gemspec
|
71
|
+
homepage: https://github.com/morrislaptop/wordpress-composer
|
72
|
+
licenses:
|
73
|
+
- MIT
|
74
|
+
metadata: {}
|
75
|
+
post_install_message:
|
76
|
+
rdoc_options: []
|
77
|
+
require_paths:
|
78
|
+
- lib
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ! '>='
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ! '>='
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
requirements: []
|
90
|
+
rubyforge_project:
|
91
|
+
rubygems_version: 2.1.11
|
92
|
+
signing_key:
|
93
|
+
specification_version: 4
|
94
|
+
summary: WordPress support for Capistrano 3.x
|
95
|
+
test_files: []
|