capistrano-exfel 0.0.10 → 0.0.11

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
  SHA1:
3
- metadata.gz: 940b676c1ff4c9f1f49fc2b0a1fcf9812d4f6880
4
- data.tar.gz: a9a7290a6770b58cbfccf17d66406eec646a6b40
3
+ metadata.gz: ddbd8c8afa8131b2f98ce4971c1a7ca35284f3cb
4
+ data.tar.gz: 6c9e2fbd5a8efb408e92830e74a1361157fd9cb1
5
5
  SHA512:
6
- metadata.gz: 99e372a8ed014f5747a0a3f2de9add1bd612a382fe0e17da55f1f787df9a6cc089fa091d7f1ceb6acdc3dcc27ae8872f902dd8afe0832b749bdb7b0101ef7850
7
- data.tar.gz: c219a0949e5bfa8862ec833212dc1320230651968e2d3b56d5604af1c012079ce227692b4b809ba762f1158a3fb3a6c36c9441babd159af14e8ef40abee18656
6
+ metadata.gz: 2189e6e380c9eafc21e872a5bdaa89709a75bb515e9c9c506db738f5c39bb75c0b30555db6ff9fa0375f619d2cb650871048b4e323966164013b7a22b11a8db1
7
+ data.tar.gz: 02ce4e676abe924264abc4e9cf9e7dfbed54b604e11eae23b5e72357df82e5710a716c826ddb24e62cbbb564d9de23331567a9aa576b2f1a353905b72fa51dd2
data/README.md CHANGED
@@ -12,7 +12,7 @@ Add these lines to your application's Gemfile:
12
12
  gem 'capistrano', '~> 3.4.0'
13
13
  gem 'capistrano-rails', '~> 1.1.2'
14
14
  gem 'capistrano-rvm', '~> 0.1.2'
15
- gem 'capistrano-exfel', '~> 0.0.10'
15
+ gem 'capistrano-exfel', '~> 0.0.11'
16
16
 
17
17
  And then execute:
18
18
 
@@ -79,7 +79,7 @@ The most important configurable options and their defaults:options can be added
79
79
  # set :app_name_uri, 'my_app_uri'
80
80
 
81
81
  # Set git repository information
82
- set :repo_url, 'exflgit:/data/git/calibration' # 'git@example.com:me/my_repo.git'
82
+ set :repo_url, 'exfl_git_server:/my_app_repo_path' # 'git@example.com:me/my_repo.git'
83
83
 
84
84
  # Default branch is :master
85
85
  # ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call
@@ -1,6 +1,6 @@
1
1
  module Capistrano
2
2
  # Capistrano::Exfel version information
3
3
  module Exfel
4
- VERSION = '0.0.10'
4
+ VERSION = '0.0.11'
5
5
  end
6
6
  end
@@ -71,23 +71,32 @@ namespace :app_home do
71
71
  desc 'Correct shared folder permissions'
72
72
  task :correct_shared_permissions do
73
73
  on roles(:app), in: :sequence, wait: 5 do
74
- sudo_cmd = "echo #{fetch(:password)} | sudo -S"
74
+ within release_path do
75
+ sudo_cmd = "echo #{fetch(:password)} | sudo -S"
75
76
 
76
- debug '#' * 50
77
+ debug '#' * 50
77
78
 
78
- # Needs access to the folder due to the first write and log rotation
79
- debug "chown -R nobody.#{fetch(:app_group_owner)} #{fetch(:shared_path)}/log"
80
- execute "#{sudo_cmd} chown -R nobody.#{fetch(:app_group_owner)} #{fetch(:shared_path)}/log"
79
+ # Needs access to the folder due to the first write and log rotation
80
+ debug "chown -R nobody.#{fetch(:app_group_owner)} #{fetch(:shared_path)}/log"
81
+ execute "#{sudo_cmd} chown -R nobody.#{fetch(:app_group_owner)} #{fetch(:shared_path)}/log"
81
82
 
82
- # Needs write permissions
83
- debug "chown -R nobody.#{fetch(:app_group_owner)} #{fetch(:shared_path)}/tmp/"
84
- execute "#{sudo_cmd} chown -R nobody.#{fetch(:app_group_owner)} #{fetch(:shared_path)}/tmp/"
83
+ # Needs write permissions
84
+ debug "chown -R nobody.#{fetch(:app_group_owner)} #{fetch(:shared_path)}/tmp/"
85
+ execute "#{sudo_cmd} chown -R nobody.#{fetch(:app_group_owner)} #{fetch(:shared_path)}/tmp/"
85
86
 
86
- # Give write permissions to groups
87
- debug "chmod g+ws #{fetch(:shared_config_path)}"
88
- execute "#{sudo_cmd} chmod -Rf g+w #{fetch(:shared_path)}/tmp/"
87
+ # Since the cache is local to any App instalation it's necessary to update their permissions
88
+ app_cache_folder = release_path.join('tmp/cache')
89
89
 
90
- debug '#' * 50
90
+ # Give write permissions to groups
91
+ debug "chmod g+ws #{app_cache_folder}"
92
+ execute "#{sudo_cmd} chmod -Rf g+w #{app_cache_folder}"
93
+
94
+ # Phusion Passenger (as nobody) needs write permissions to cache folder
95
+ debug "chown -R nobody.#{fetch(:app_group_owner)} #{app_cache_folder}"
96
+ execute "#{sudo_cmd} chown -R nobody.#{fetch(:app_group_owner)} #{app_cache_folder}"
97
+
98
+ debug '#' * 50
99
+ end
91
100
  end
92
101
  end
93
102
 
@@ -33,10 +33,8 @@ namespace :application do
33
33
  # The consequence is that users will be logged out automatically from the Application after the upgrade.
34
34
  # This is important to avoid errors with old validity_token in forms
35
35
  invoke 'secrets:update_app_secret'
36
- invoke 'app_home:correct_shared_permissions'
37
-
38
36
  invoke :deploy
39
- invoke 'app_home:clear_tmp_files'
37
+ invoke 'app_home:correct_shared_permissions'
40
38
  invoke 'application:restart'
41
39
  end
42
40
  end
@@ -139,7 +137,7 @@ namespace :load do
139
137
  set :linked_files, -> { %w(config/database.yml config/secrets.yml) }
140
138
 
141
139
  # Default value for linked_dirs is []
142
- set :linked_dirs, -> { %w(log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system) }
140
+ set :linked_dirs, -> { %w(log tmp/pids tmp/sockets vendor/bundle public/system) }
143
141
 
144
142
  # Default value for keep_releases is 5
145
143
  set :keep_releases, -> { 5 }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-exfel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis Maia
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  version: '0'
89
89
  requirements: []
90
90
  rubyforge_project:
91
- rubygems_version: 2.4.3
91
+ rubygems_version: 2.4.6
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: Deploy Ruby on Rails 4 Applications in European-XFEL Virtual Machines