mina-whenever-env 1.0.4 → 1.0.5
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 +4 -3
- 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: 7bc42c3f39f787d515e3fe6e59df6924e5cd9b659f514d5e3e6cc5b8e3a26979
|
4
|
+
data.tar.gz: 8bda72948a034fcdfd0567385c0e67db015e78fcb7e7172ac3e744ad98888cd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60fe20ec05e5dbde3c14d2e6f0c9bc92baa7e079c9860ee9634476ff1a5913d14f9d4582cd93eb3eefa3d5624b02750271e847bb21c6aac4992af5971cc8d562
|
7
|
+
data.tar.gz: cbbd837643409efbb4bf3f0de362eb82febccb36c5ac6aacca424c97ad8e1970f919c1e3d3cbad1ddb3c104d5cdf122297f575337b15e6e9f08288a91bfa1c2f
|
data/lib/mina/whenever/tasks.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
set :whenever_environment_variable, -> { fetch(:environment_variable) || 'RAILS_ENV' }
|
2
2
|
set :whenever_environment, -> { fetch(fetch(:environment_variable).downcase.to_sym) }
|
3
3
|
set :whenever_name, -> { "#{fetch(:application_name)}_#{fetch(:rails_env)}" }
|
4
|
+
set :whenever_variables, -> { "'environment=#{fetch(:rails_env)}&path=#{fetch(:current_path)}'" }
|
4
5
|
|
5
6
|
namespace :whenever do
|
6
7
|
desc 'Clear crontab'
|
@@ -8,7 +9,7 @@ namespace :whenever do
|
|
8
9
|
comment "-----Clear contrab for #{fetch(:whenever_name)}-----"
|
9
10
|
comment "-----#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)}-----"
|
10
11
|
in_path fetch(:current_path) do
|
11
|
-
command "#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)} #{fetch(:bundle_bin)} exec whenever --clear-crontab #{fetch(:whenever_name)} --set
|
12
|
+
command "#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)} #{fetch(:bundle_bin)} exec whenever --clear-crontab #{fetch(:whenever_name)} --set #{fetch(:whenever_variables)}"
|
12
13
|
end
|
13
14
|
end
|
14
15
|
|
@@ -17,7 +18,7 @@ namespace :whenever do
|
|
17
18
|
comment "-----Update crontab for #{fetch(:whenever_name)}-----"
|
18
19
|
comment "-----#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)}-----"
|
19
20
|
in_path fetch(:current_path) do
|
20
|
-
command "#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)} #{fetch(:bundle_bin)} exec whenever --update-crontab #{fetch(:whenever_name)} --set
|
21
|
+
command "#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)} #{fetch(:bundle_bin)} exec whenever --update-crontab #{fetch(:whenever_name)} --set #{fetch(:whenever_variables)}"
|
21
22
|
end
|
22
23
|
end
|
23
24
|
|
@@ -26,7 +27,7 @@ namespace :whenever do
|
|
26
27
|
comment "-----Write crontab for #{fetch(:whenever_name)}-----"
|
27
28
|
comment "-----#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)}-----"
|
28
29
|
in_path fetch(:current_path) do
|
29
|
-
command "#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)} #{fetch(:bundle_bin)} exec whenever --write-crontab #{fetch(:whenever_name)} --set
|
30
|
+
command "#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)} #{fetch(:bundle_bin)} exec whenever --write-crontab #{fetch(:whenever_name)} --set #{fetch(:whenever_variables)}"
|
30
31
|
end
|
31
32
|
end
|
32
33
|
end
|