mina-whenever-env 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mina/whenever/tasks.rb +9 -6
- data/lib/mina/whenever/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b262ff666d116957ef99ef361270031d9f828a751ef13f224d4eead953dfeac1
|
4
|
+
data.tar.gz: c9e409ad96d335f779c16db2aeca3d9c141ca72e47b13768f8bca9dc35bef556
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31db26a7fb32b5358cf70653607fffd0f83c4512f85b6a0fc9229a6f3cf73f76181ef786fd978564ebae3966fbf944a8f36b393527dac6978da38f4c81e9c759
|
7
|
+
data.tar.gz: 95efd7afb69d5e447ec1562476460b00d84039c774222a1c0a8fb96d3d9cef6913af1548f88f330097ed9885ba298e29b046f3093ef90c1750e3a812afd9cd93
|
data/lib/mina/whenever/tasks.rb
CHANGED
@@ -5,25 +5,28 @@ set :whenever_name, -> { "#{fetch(:application_name)}_#{fetch(:rails_env)}" }
|
|
5
5
|
namespace :whenever do
|
6
6
|
desc 'Clear crontab'
|
7
7
|
task clear: :remote_environment do
|
8
|
-
comment "Clear contrab for #{fetch(:whenever_name)}"
|
8
|
+
comment "-----Clear contrab for #{fetch(:whenever_name)}-----"
|
9
|
+
comment "-----#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)}-----"
|
9
10
|
in_path fetch(:current_path) do
|
10
|
-
command "#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)} #{fetch(:bundle_bin)} exec whenever --clear-crontab #{fetch(:whenever_name)}"
|
11
|
+
command "#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)} #{fetch(:bundle_bin)} exec whenever --clear-crontab #{fetch(:whenever_name)} --set 'environment=#{fetch(:rails_env)}&path=#{fetch(:current_path)}'"
|
11
12
|
end
|
12
13
|
end
|
13
14
|
|
14
15
|
desc 'Update crontab'
|
15
16
|
task update: :remote_environment do
|
16
|
-
comment "Update crontab for #{fetch(:whenever_name)}"
|
17
|
+
comment "-----Update crontab for #{fetch(:whenever_name)}-----"
|
18
|
+
comment "-----#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)}-----"
|
17
19
|
in_path fetch(:current_path) do
|
18
|
-
command "#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)} #{fetch(:bundle_bin)} exec whenever --update-crontab #{fetch(:whenever_name)}"
|
20
|
+
command "#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)} #{fetch(:bundle_bin)} exec whenever --update-crontab #{fetch(:whenever_name)} --set 'environment=#{fetch(:rails_env)}&path=#{fetch(:current_path)}'"
|
19
21
|
end
|
20
22
|
end
|
21
23
|
|
22
24
|
desc 'Write crontab'
|
23
25
|
task write: :remote_environment do
|
24
|
-
comment "Write crontab for #{fetch(:whenever_name)}"
|
26
|
+
comment "-----Write crontab for #{fetch(:whenever_name)}-----"
|
27
|
+
comment "-----#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)}-----"
|
25
28
|
in_path fetch(:current_path) do
|
26
|
-
command "#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)} #{fetch(:bundle_bin)} exec whenever --write-crontab #{fetch(:whenever_name)}"
|
29
|
+
command "#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)} #{fetch(:bundle_bin)} exec whenever --write-crontab #{fetch(:whenever_name)} --set 'environment=#{fetch(:rails_env)}&path=#{fetch(:current_path)}'"
|
27
30
|
end
|
28
31
|
end
|
29
32
|
end
|