capdrupal 3.0.0 → 3.0.2
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 +4 -4
- data/.gitignore +3 -0
- data/CHANGELOG.md +9 -0
- data/README.md +5 -2
- data/capdrupal.gemspec +1 -1
- data/docs/maintainers.md +1 -0
- data/lib/capdrupal.rb +11 -13
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84051b7cfc562b0ada6947c8d24c38449319a7577fa4f569d91cb02a5bc3a511
|
4
|
+
data.tar.gz: 7a544994a5c5af01dd6099e0dc9af8cd7454d3f8bc34a2a511d2743a398998a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3512b71d331a6d6c885c715c103bd2f70c6641698cedb137ad101931ee5d7928ec620c2cd97d6c768d1f278d2b5ab55908ac4b7e206a6398de234453205679a4
|
7
|
+
data.tar.gz: 9ad4303413fdd2a278718b1a373f1b704c0cafb7856f77b237eddd6c7647018bd58426dd05db755d5fac69f7254a49c67ae8fa0fce491a7d9bae4ddd731bf3f7
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Capdrupal Changelog
|
2
2
|
|
3
|
+
## NEXT RELEASE
|
4
|
+
|
5
|
+
## 3.0.2 (2022-12-22)
|
6
|
+
- Allow Site directory to be configured
|
7
|
+
- Optimize permissions related tasks
|
8
|
+
|
9
|
+
## 3.0.1 (2020-08-07)
|
10
|
+
- Update the command `drupal:cache:clear` to be re-runnable after invoke
|
11
|
+
|
3
12
|
## 3.0.0 (2020-08-07)
|
4
13
|
- Support for Drupal 8 & Drupal 9
|
5
14
|
- Complete code refactoring
|
data/README.md
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
This gem provides a number of tasks which are useful for deploying & managing Drupal projects with [Capistrano](https://github.com/capistrano/capistrano).
|
4
4
|
|
5
|
+
[](https://badge.fury.io/rb/capdrupal)
|
6
|
+
[](https://codeclimate.com/github/antistatique/capdrupal/maintainability)
|
7
|
+
|
5
8
|
# Capdrupal version
|
6
9
|
|
7
10
|
Capdrupal Gem Version | Branch | Capistrano Version | Drupal Version
|
@@ -22,7 +25,7 @@ You may add Drush as a dependency using `composer require drush/drush` in your D
|
|
22
25
|
Add this line to your application's Gemfile:
|
23
26
|
|
24
27
|
```ruby
|
25
|
-
gem 'capdrupal', '~>
|
28
|
+
gem 'capdrupal', '~>3.0'
|
26
29
|
```
|
27
30
|
|
28
31
|
And then execute:
|
@@ -75,7 +78,7 @@ require 'capistrano/deploy'
|
|
75
78
|
require 'capistrano/composer'
|
76
79
|
|
77
80
|
# Drupal Tasks.
|
78
|
-
require 'capdrupal
|
81
|
+
require 'capdrupal'
|
79
82
|
|
80
83
|
# Load custom tasks from `lib/capistrano/tasks` if you have any defined.
|
81
84
|
Dir.glob('config/capistrano/tasks/*.rake').each { |r| import r }
|
data/capdrupal.gemspec
CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = 'capdrupal'
|
6
|
-
spec.version = '3.0.
|
6
|
+
spec.version = '3.0.2'
|
7
7
|
spec.authors = ['Kevin Wenger', 'Yann Lugrin', 'Gilles Doge', 'Toni Fisler', 'Simon Perdrisat', 'Robert Wohleb', 'Kim Pepper']
|
8
8
|
spec.email = ['hello@antistatique.net']
|
9
9
|
|
data/docs/maintainers.md
CHANGED
@@ -9,6 +9,7 @@ Checklist for making a release:
|
|
9
9
|
|
10
10
|
- Write changelog
|
11
11
|
- Update version number in `capdrupal.gemspec`
|
12
|
+
- Commit those 2 changes and create a new tag with the version number
|
12
13
|
- Make a [new release with GitHub](https://github.com/antistatique/capdrupal/releases/new)
|
13
14
|
- Build the gem with `gem build capdrupal.gemspec`
|
14
15
|
- Push the gem to rubygems.org: `gem push capdrupal-X.X.X.gem`
|
data/lib/capdrupal.rb
CHANGED
@@ -2,6 +2,7 @@ namespace :load do
|
|
2
2
|
task :defaults do
|
3
3
|
set :app_path, 'web'
|
4
4
|
set :config_path, 'config/sync'
|
5
|
+
set :site_path, 'default'
|
5
6
|
set :backup_path, 'backups'
|
6
7
|
set :keep_backups, 5
|
7
8
|
set :enable_modules, []
|
@@ -110,6 +111,7 @@ namespace :drupal do
|
|
110
111
|
execute :drush, 'cr'
|
111
112
|
end
|
112
113
|
end
|
114
|
+
Rake::Task['drupal:cache:clear'].reenable
|
113
115
|
end
|
114
116
|
end
|
115
117
|
|
@@ -209,11 +211,9 @@ namespace :drupal do
|
|
209
211
|
task :recommended do
|
210
212
|
on roles(:app) do
|
211
213
|
within release_path.join(fetch(:app_path)) do
|
212
|
-
execute :chmod, '-R', '555', '.'
|
213
|
-
|
214
214
|
# Remove execution for files, keep execution on folder.
|
215
|
-
execute
|
216
|
-
execute
|
215
|
+
execute :find, './', '-type f ! -perm 444 -exec chmod 444 {} \;'
|
216
|
+
execute :find, './', '-type d ! -perm 555 -exec chmod 555 {} \;'
|
217
217
|
end
|
218
218
|
end
|
219
219
|
end
|
@@ -247,12 +247,10 @@ namespace :drupal do
|
|
247
247
|
task :writable_shared do
|
248
248
|
on roles(:app) do
|
249
249
|
within shared_path do
|
250
|
-
# "web/sites/default/files" is a shared dir and should be writable.
|
251
|
-
execute :chmod, '-R', '775', "#{fetch(:app_path)}/sites/default/files"
|
252
|
-
|
253
250
|
# Remove execution for files, keep execution on folder.
|
254
|
-
|
255
|
-
execute
|
251
|
+
# "web/sites/defaults/files" is a shared dir and should be writable.
|
252
|
+
execute :find, './', '-type f ! -perm 664 -exec chmod 664 {} \;'
|
253
|
+
execute :find, './', '-type d ! -perm 2775 -exec chmod 2775 {} \;'
|
256
254
|
end
|
257
255
|
end
|
258
256
|
end
|
@@ -265,8 +263,8 @@ namespace :drupal do
|
|
265
263
|
on release_roles :app do |server|
|
266
264
|
ask(:answer, "Do you really want to download the files on the server to your local files? Nothings will be deleted but files can be ovewrite. (y/N)");
|
267
265
|
if fetch(:answer) == 'y' then
|
268
|
-
remote_files_dir = "#{shared_path}/#{(fetch(:app_path))}/sites/
|
269
|
-
local_files_dir = "#{(fetch(:app_path))}/sites/
|
266
|
+
remote_files_dir = "#{shared_path}/#{(fetch(:app_path))}/sites/#{fetch(:site_path)}/files/"
|
267
|
+
local_files_dir = "#{(fetch(:app_path))}/sites/#{fetch(:site_path)}/files/"
|
270
268
|
system("rsync --recursive --times --rsh=ssh --human-readable --progress --exclude='.*' --exclude='css' --exclude='js' #{server.user}@#{server.hostname}:#{remote_files_dir} #{local_files_dir}")
|
271
269
|
end
|
272
270
|
end
|
@@ -278,8 +276,8 @@ namespace :drupal do
|
|
278
276
|
on release_roles :app do |server|
|
279
277
|
ask(:answer, "Do you really want to upload your local files to the server? Nothings will be deleted but files can be ovewrite. (y/N)");
|
280
278
|
if fetch(:answer) == 'y' then
|
281
|
-
remote_files_dir = "#{shared_path}/#{(fetch(:app_path))}/sites/
|
282
|
-
local_files_dir = "#{(fetch(:app_path))}/sites/
|
279
|
+
remote_files_dir = "#{shared_path}/#{(fetch(:app_path))}/sites/#{fetch(:site_path)}/files/"
|
280
|
+
local_files_dir = "#{(fetch(:app_path))}/sites/#{fetch(:site_path)}/files/"
|
283
281
|
system("rsync --recursive --times --rsh=ssh --human-readable --progress --exclude='.*' --exclude='css' --exclude='js' #{local_files_dir} #{server.user}@#{server.hostname}:#{remote_files_dir}")
|
284
282
|
end
|
285
283
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capdrupal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Wenger
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date:
|
17
|
+
date: 2022-12-22 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: capistrano
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
112
|
requirements: []
|
113
|
-
rubygems_version: 3.1.
|
113
|
+
rubygems_version: 3.1.6
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: A set of tasks for deploying and managing Drupal projects with Capistrano
|