capistrano-wearerequired 1.1.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.editorconfig +3 -0
- data/CHANGELOG.md +54 -0
- data/CONTRIBUTING.md +12 -0
- data/README.md +1 -30
- data/capistrano-wearerequired.gemspec +3 -3
- data/lib/capistrano/wearerequired.rb +1 -0
- data/lib/capistrano/wearerequired/slackistrano.rb +1 -0
- data/lib/capistrano/wearerequired/slackistrano_extended_git_messaging.rb +1 -1
- data/lib/capistrano/wearerequired/slackistrano_messaging_elements.rb +2 -25
- data/lib/capistrano/wearerequired/tasks/slackistrano.rake +10 -0
- data/lib/capistrano/wearerequired/tasks/wordpress.rake +11 -6
- data/lib/capistrano/wearerequired/version.rb +1 -1
- metadata +16 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d8850e56ca3a348ee82454e4c8f6b6b74f856fff5050e2ab52ceab5e1ad49712
|
4
|
+
data.tar.gz: 500a81e6f113dffef245b77bf517cde57de2a63a80dbf65c8b36823ca25b02e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 277436b1262a674a3d750885d47778b89b050f43a4935f05f517d65e075da2ad77f11c3150b16ef2240c467887335588834a7642afef0cb74e7aa6beed0a0b45
|
7
|
+
data.tar.gz: 0cf7dd9078e0337f6ad489fa757102ccd0d2b126b6133e3aeb106c5e67e22ae33cd8252ea13a7566b72b5f0db915d98a066ee7e47772f2c8a86c9f30ee5cfffb
|
data/.editorconfig
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 2.0.1
|
4
|
+
* Update dependencies (slackistrano, bundler & rake)
|
5
|
+
* Skip Yoast SEO plugin when installing language packages as it caused issues with translated rewrite rules
|
6
|
+
* Correct author icon path
|
7
|
+
|
8
|
+
## 2.0.0
|
9
|
+
* Requires WP-CLI 2.1.0 and newer
|
10
|
+
WP-CLI 2.1.0 introduced the `--all` flag for installing translations for all installed plugins/themes.
|
11
|
+
* Changed event from `deploy:finishing` to `deploy:updated` to install and update translations before publishing a new release without translations.
|
12
|
+
|
13
|
+
## 1.3.1
|
14
|
+
|
15
|
+
* Correct Slackistrano defaults tasks hook.
|
16
|
+
|
17
|
+
## 1.3.0
|
18
|
+
|
19
|
+
* Improve defaults for Slackistrano
|
20
|
+
Prevents warnings when not using Slack notifications at all.
|
21
|
+
* Improve WP-CLI error handling
|
22
|
+
Prevents clutter and early deployment fails when WP-CLI language commands error.
|
23
|
+
|
24
|
+
## 1.2.0
|
25
|
+
|
26
|
+
* Support WP-CLI 2.0.0 and newer
|
27
|
+
In WP-CLI 2.0.0 the `wp language plugin` and `wp language theme` commands were introduced.
|
28
|
+
|
29
|
+
## 1.1.0
|
30
|
+
|
31
|
+
* Support WP-CLI 1.2.0 and newer
|
32
|
+
In WP-CLI v1.2.0 the `wp core language` command was changed to `wp language core`.
|
33
|
+
* Get deployer's name from Git config in `SlackistranoMessagingElements`
|
34
|
+
|
35
|
+
## 1.0.0
|
36
|
+
|
37
|
+
* Renamed to `Capistrano::Wearerequired` and published on [rubygems.org](https://rubygems.org/gems/capistrano-wearerequired).
|
38
|
+
* Added `wordpress:clear_opcache` task.
|
39
|
+
* Added new messaging classes for Slackistrano for more informative notifications.
|
40
|
+
* Moved support for custom icon (via `icon_url` or `icon_emoji`) and bot name (via `username`) to its own class `SlackistranoMessagingElements`.
|
41
|
+
* `SlackistranoExpandedGitMessaging` extends `SlackistranoMessagingColors` which extends `SlackistranoMessagingElements`.
|
42
|
+
|
43
|
+
## 0.3.0
|
44
|
+
|
45
|
+
* Added `deploy:cleanup_all` task.
|
46
|
+
* Added `wordpress:install_translations` and `wordpress:update_translations` tasks.
|
47
|
+
|
48
|
+
## 0.2.0
|
49
|
+
|
50
|
+
* Added `composer:clear_cache` task.
|
51
|
+
|
52
|
+
## 0.1.0
|
53
|
+
|
54
|
+
* Initial version.
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
## Release Checklist
|
4
|
+
|
5
|
+
To build and ship a new version of this gem, you need to follow these steps:
|
6
|
+
|
7
|
+
1. Update changelog.
|
8
|
+
2. Change version in `lib/capistrano/wearerequired/version.rb`.
|
9
|
+
3. Build new gem using `gem build capistrano-wearerequired.gemspec`.
|
10
|
+
4. Publish gem using `gem push capistrano-wearerequired-<version>.gem`, e.g. `gem push capistrano-wearerequired-1.3.0.gem`.
|
11
|
+
5. Tag latest commit with `v<version>`, e,g. `v1.3.0`.
|
12
|
+
6. Merge `master` branch into `stable`
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ Capistrano::Wearerequired is a collection of recipes and tasks specialized on Wo
|
|
8
8
|
1. Add this line to your application's Gemfile to install the latest stable version:
|
9
9
|
|
10
10
|
```ruby
|
11
|
-
gem 'capistrano-wearerequired', '~>
|
11
|
+
gem 'capistrano-wearerequired', '~> 2.0'
|
12
12
|
```
|
13
13
|
|
14
14
|
2. Execute:
|
@@ -112,32 +112,3 @@ cap staging wordpress:clear_opcache
|
|
112
112
|
|
113
113
|
(Requires the [WP-CLI Clear OPcache](https://packagist.org/packages/wearerequired/wp-cli-clear-opcache) plugin.)
|
114
114
|
|
115
|
-
|
116
|
-
## Changelog
|
117
|
-
|
118
|
-
### 1.1.0
|
119
|
-
|
120
|
-
* Support WP-CLI 1.2.0 and newer
|
121
|
-
In WP-CLI v1.2.0 the `wp core language` command was changed to `wp language core`.
|
122
|
-
* Get deployer's name from Git config in `SlackistranoMessagingElements`
|
123
|
-
|
124
|
-
### 1.0.0
|
125
|
-
|
126
|
-
* Renamed to `Capistrano::Wearerequired` and published on [rubygems.org](https://rubygems.org/gems/capistrano-wearerequired).
|
127
|
-
* Added `wordpress:clear_opcache` task.
|
128
|
-
* Added new messaging classes for Slackistrano for more informative notifications.
|
129
|
-
* Moved support for custom icon (via `icon_url` or `icon_emoji`) and bot name (via `username`) to its own class `SlackistranoMessagingElements`.
|
130
|
-
* `SlackistranoExpandedGitMessaging` extends `SlackistranoMessagingColors` which extends `SlackistranoMessagingElements`.
|
131
|
-
|
132
|
-
### 0.3.0
|
133
|
-
|
134
|
-
* Added `deploy:cleanup_all` task.
|
135
|
-
* Added `wordpress:install_translations` and `wordpress:update_translations` tasks.
|
136
|
-
|
137
|
-
### 0.2.0
|
138
|
-
|
139
|
-
* Added `composer:clear_cache` task.
|
140
|
-
|
141
|
-
### 0.1.0
|
142
|
-
|
143
|
-
* Initial version.
|
@@ -18,9 +18,9 @@ Gem::Specification.new do |spec|
|
|
18
18
|
|
19
19
|
spec.required_ruby_version = ">= 2.0"
|
20
20
|
spec.add_dependency "capistrano", "~> 3.6"
|
21
|
-
spec.add_dependency "slackistrano", "~> 3.
|
21
|
+
spec.add_dependency "slackistrano", "~> 3.8"
|
22
22
|
spec.add_dependency "capistrano-composer", "~> 0.0.6"
|
23
23
|
|
24
|
-
spec.add_development_dependency "bundler", "~>
|
25
|
-
spec.add_development_dependency "rake", "~>
|
24
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
25
|
+
spec.add_development_dependency "rake", "~> 12.3.3"
|
26
26
|
end
|
@@ -5,6 +5,7 @@ module Capistrano
|
|
5
5
|
end
|
6
6
|
end
|
7
7
|
|
8
|
+
require "capistrano/wearerequired/slackistrano.rb"
|
8
9
|
require "capistrano/wearerequired/slackistrano_messaging_elements"
|
9
10
|
require "capistrano/wearerequired/slackistrano_messaging_colors"
|
10
11
|
require "capistrano/wearerequired/slackistrano_extended_git_messaging"
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path('../tasks/slackistrano.rake', __FILE__)
|
@@ -63,7 +63,7 @@ module Capistrano
|
|
63
63
|
end
|
64
64
|
|
65
65
|
def author_icon
|
66
|
-
"https://required.com/content/themes/required-valencia/img/character-%{name}-300x300.png" % { name: deployer.downcase }
|
66
|
+
"https://required.com/content/themes/required-valencia/assets/img/character-%{name}-300x300.png" % { name: deployer.downcase }
|
67
67
|
end
|
68
68
|
|
69
69
|
def author_link
|
@@ -4,31 +4,8 @@ module Capistrano
|
|
4
4
|
module Wearerequired
|
5
5
|
class SlackistranoMessagingElements < Slackistrano::Messaging::Base
|
6
6
|
|
7
|
-
def initialize(
|
8
|
-
super(
|
9
|
-
@icon_url = icon_url
|
10
|
-
@icon_emoji = icon_emoji
|
11
|
-
@username = username
|
12
|
-
end
|
13
|
-
|
14
|
-
def icon_url
|
15
|
-
if @icon_url.nil?
|
16
|
-
super
|
17
|
-
else
|
18
|
-
@icon_url
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def icon_emoji
|
23
|
-
@icon_emoji
|
24
|
-
end
|
25
|
-
|
26
|
-
def username
|
27
|
-
if @username.nil?
|
28
|
-
super
|
29
|
-
else
|
30
|
-
@username
|
31
|
-
end
|
7
|
+
def initialize(options = {})
|
8
|
+
super(options)
|
32
9
|
end
|
33
10
|
|
34
11
|
# Override the deployer helper to pull the best name available (git, password file, env vars).
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'shellwords'
|
2
|
+
|
1
3
|
namespace :wordpress do
|
2
4
|
|
3
5
|
desc <<-DESC
|
@@ -5,12 +7,13 @@ namespace :wordpress do
|
|
5
7
|
DESC
|
6
8
|
task :install_translations do
|
7
9
|
next unless fetch(:wp_languages).any?
|
10
|
+
languages = fetch(:wp_languages).shelljoin
|
8
11
|
|
9
12
|
on roles(:app) do
|
10
13
|
within release_path do
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
+
execute :wp, "language core install #{languages} --skip-plugins=wordpress-seo"
|
15
|
+
execute :wp, "language plugin install --all #{languages} --format=csv --skip-plugins=wordpress-seo"
|
16
|
+
execute :wp, "language theme install --all #{languages} --format=csv --skip-plugins=wordpress-seo"
|
14
17
|
end
|
15
18
|
end
|
16
19
|
end
|
@@ -23,7 +26,9 @@ namespace :wordpress do
|
|
23
26
|
|
24
27
|
on roles(:app) do
|
25
28
|
within release_path do
|
26
|
-
execute :wp, "language core update"
|
29
|
+
execute :wp, "language core update --quiet"
|
30
|
+
execute :wp, "language plugin update --all --quiet"
|
31
|
+
execute :wp, "language theme update --all --quiet"
|
27
32
|
end
|
28
33
|
end
|
29
34
|
end
|
@@ -42,8 +47,8 @@ namespace :wordpress do
|
|
42
47
|
end
|
43
48
|
end
|
44
49
|
|
45
|
-
after 'deploy:
|
46
|
-
after 'deploy:
|
50
|
+
after 'deploy:updated', 'wordpress:install_translations'
|
51
|
+
after 'deploy:updated', 'wordpress:update_translations'
|
47
52
|
after 'deploy:finishing', 'wordpress:clear_opcache'
|
48
53
|
end
|
49
54
|
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-wearerequired
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- wearerequired
|
8
8
|
- Pascal Birchler
|
9
9
|
- Ulrich Pogson
|
10
10
|
- Dominik Schilling
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2020-08-04 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: capistrano
|
@@ -33,14 +33,14 @@ dependencies:
|
|
33
33
|
requirements:
|
34
34
|
- - "~>"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: '3.
|
36
|
+
version: '3.8'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '3.
|
43
|
+
version: '3.8'
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: capistrano-composer
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
@@ -61,28 +61,28 @@ dependencies:
|
|
61
61
|
requirements:
|
62
62
|
- - "~>"
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: '
|
64
|
+
version: '2.0'
|
65
65
|
type: :development
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
69
|
- - "~>"
|
70
70
|
- !ruby/object:Gem::Version
|
71
|
-
version: '
|
71
|
+
version: '2.0'
|
72
72
|
- !ruby/object:Gem::Dependency
|
73
73
|
name: rake
|
74
74
|
requirement: !ruby/object:Gem::Requirement
|
75
75
|
requirements:
|
76
76
|
- - "~>"
|
77
77
|
- !ruby/object:Gem::Version
|
78
|
-
version:
|
78
|
+
version: 12.3.3
|
79
79
|
type: :development
|
80
80
|
prerelease: false
|
81
81
|
version_requirements: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
83
|
- - "~>"
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version:
|
85
|
+
version: 12.3.3
|
86
86
|
description: Capistrano::Wearerequired is a collection of recipes and tasks specialized
|
87
87
|
on WordPress deployment.
|
88
88
|
email: info@required.ch
|
@@ -92,6 +92,8 @@ extra_rdoc_files: []
|
|
92
92
|
files:
|
93
93
|
- ".editorconfig"
|
94
94
|
- ".gitignore"
|
95
|
+
- CHANGELOG.md
|
96
|
+
- CONTRIBUTING.md
|
95
97
|
- Gemfile
|
96
98
|
- LICENSE.txt
|
97
99
|
- README.md
|
@@ -100,11 +102,13 @@ files:
|
|
100
102
|
- lib/capistrano/wearerequired.rb
|
101
103
|
- lib/capistrano/wearerequired/capistrano.rb
|
102
104
|
- lib/capistrano/wearerequired/composer.rb
|
105
|
+
- lib/capistrano/wearerequired/slackistrano.rb
|
103
106
|
- lib/capistrano/wearerequired/slackistrano_extended_git_messaging.rb
|
104
107
|
- lib/capistrano/wearerequired/slackistrano_messaging_colors.rb
|
105
108
|
- lib/capistrano/wearerequired/slackistrano_messaging_elements.rb
|
106
109
|
- lib/capistrano/wearerequired/tasks/capistrano.rake
|
107
110
|
- lib/capistrano/wearerequired/tasks/composer.rake
|
111
|
+
- lib/capistrano/wearerequired/tasks/slackistrano.rake
|
108
112
|
- lib/capistrano/wearerequired/tasks/wordpress.rake
|
109
113
|
- lib/capistrano/wearerequired/version.rb
|
110
114
|
- lib/capistrano/wearerequired/wordpress.rb
|
@@ -112,7 +116,7 @@ homepage: https://github.com/wearerequired/capistrano-wearerequired
|
|
112
116
|
licenses:
|
113
117
|
- GPL-2.0+
|
114
118
|
metadata: {}
|
115
|
-
post_install_message:
|
119
|
+
post_install_message:
|
116
120
|
rdoc_options: []
|
117
121
|
require_paths:
|
118
122
|
- lib
|
@@ -127,9 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
131
|
- !ruby/object:Gem::Version
|
128
132
|
version: '0'
|
129
133
|
requirements: []
|
130
|
-
|
131
|
-
|
132
|
-
signing_key:
|
134
|
+
rubygems_version: 3.1.2
|
135
|
+
signing_key:
|
133
136
|
specification_version: 4
|
134
137
|
summary: Recipes for Capistrano used by required gmbh
|
135
138
|
test_files: []
|