capdrupal 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c44d744004a0b49a0e7034222558aba3899026837f5b1dfcf6e994f9262e08eb
4
- data.tar.gz: 95957676e7e161041ed66fd5f56af9ce7aa071077f289e3a7864273996e5e4d7
3
+ metadata.gz: 84051b7cfc562b0ada6947c8d24c38449319a7577fa4f569d91cb02a5bc3a511
4
+ data.tar.gz: 7a544994a5c5af01dd6099e0dc9af8cd7454d3f8bc34a2a511d2743a398998a9
5
5
  SHA512:
6
- metadata.gz: 73243af2f5674c4f7b9b9a4421e3f377222d00630f43586c6f4d9690e9175d645821af8caa9c94d9512fd2a7aa9fc318bf9b00c629046290a4cd1457b6d0d45c
7
- data.tar.gz: '08f3121798682e048c27a75cb6f0242ebcd4d4516aeed292ccaa5f1a2612a636c501bd757984d82b18c7073c2af8c726d2712fbdf38003bfbaf61bf579db95a3'
6
+ metadata.gz: 3512b71d331a6d6c885c715c103bd2f70c6641698cedb137ad101931ee5d7928ec620c2cd97d6c768d1f278d2b5ab55908ac4b7e206a6398de234453205679a4
7
+ data.tar.gz: 9ad4303413fdd2a278718b1a373f1b704c0cafb7856f77b237eddd6c7647018bd58426dd05db755d5fac69f7254a49c67ae8fa0fce491a7d9bae4ddd731bf3f7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
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
+
3
9
  ## 3.0.1 (2020-08-07)
4
10
  - Update the command `drupal:cache:clear` to be re-runnable after invoke
5
11
 
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.1'
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/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, []
@@ -210,11 +211,9 @@ namespace :drupal do
210
211
  task :recommended do
211
212
  on roles(:app) do
212
213
  within release_path.join(fetch(:app_path)) do
213
- execute :chmod, '-R', '555', '.'
214
-
215
214
  # Remove execution for files, keep execution on folder.
216
- execute 'find', './ -type f -executable -exec chmod -x {} \;'
217
- execute 'find', './ -type d -exec chmod +x {} \;'
215
+ execute :find, './', '-type f ! -perm 444 -exec chmod 444 {} \;'
216
+ execute :find, './', '-type d ! -perm 555 -exec chmod 555 {} \;'
218
217
  end
219
218
  end
220
219
  end
@@ -248,12 +247,10 @@ namespace :drupal do
248
247
  task :writable_shared do
249
248
  on roles(:app) do
250
249
  within shared_path do
251
- # "web/sites/default/files" is a shared dir and should be writable.
252
- execute :chmod, '-R', '775', "#{fetch(:app_path)}/sites/default/files"
253
-
254
250
  # Remove execution for files, keep execution on folder.
255
- execute 'find', "#{fetch(:app_path)}/sites/default/files", '-type f -executable -exec chmod -x {} \;'
256
- execute 'find', "#{fetch(:app_path)}/sites/default/files", '-type d -exec chmod +sx {} \;'
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 {} \;'
257
254
  end
258
255
  end
259
256
  end
@@ -266,8 +263,8 @@ namespace :drupal do
266
263
  on release_roles :app do |server|
267
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)");
268
265
  if fetch(:answer) == 'y' then
269
- remote_files_dir = "#{shared_path}/#{(fetch(:app_path))}/sites/default/files/"
270
- local_files_dir = "#{(fetch(:app_path))}/sites/default/files/"
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/"
271
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}")
272
269
  end
273
270
  end
@@ -279,8 +276,8 @@ namespace :drupal do
279
276
  on release_roles :app do |server|
280
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)");
281
278
  if fetch(:answer) == 'y' then
282
- remote_files_dir = "#{shared_path}/#{(fetch(:app_path))}/sites/default/files/"
283
- local_files_dir = "#{(fetch(:app_path))}/sites/default/files/"
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/"
284
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}")
285
282
  end
286
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.1
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: 2021-09-09 00:00:00.000000000 Z
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.2
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