mina-whenever-env 1.0.2 → 1.0.3

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: 4375af0604452d471b772d027230bfc10610bdd775e7c742553ec3fa7f2bc0ed
4
- data.tar.gz: 8817d53750f78d6d51235f8cdf65169ff9756a57fec388ee9a2262f8b9c03bcf
3
+ metadata.gz: 7bab4d892005ed9797e5561f9412c5408a70b4a8166eb9874f515d12f767f605
4
+ data.tar.gz: 5e07713827bf9b239a2b2c77fd5e0ff3656f1743b0814eb14e857582c5d46423
5
5
  SHA512:
6
- metadata.gz: bba1bf1bcdb8da68a71a7ca41ac7e30c3f6390e5195af53dab80f9467f545382820ae22a64023706015cc66232ca6cc79f0f918821d3be1cdbce15283c07971c
7
- data.tar.gz: 138664e64969d888acb3c0680722ab4f29aed41071a76ebc6093023b5392bd187e33d23f387296a50a7a096e9c1af0e92fd83faf13d976ca69b87b0ec2e64e0c
6
+ metadata.gz: fa3d9e379a6e9ba3c3a4d859b69768e28974066ed22609ad071f617fb892c4897b71ba1452dd663f8bac7d65c7ecf241a7c701dea1b1727a1ebec245c3cba6f7
7
+ data.tar.gz: 1f859d668ebca696ba5f6662e22fb9e369b3f906229c68291f141c472e393fdea86bae3f13089c6b22dfb4ce4e12911e914afcc67b3aa66683537113a7021d14
@@ -1,3 +1,5 @@
1
+ set :whenever_environment_variable, -> { fetch(:environment_variable) || 'RAILS_ENV' }
2
+ set :whenever_environment, -> { fetch(fetch(:environment_variable).downcase.to_sym) }
1
3
  set :whenever_name, -> { "#{fetch(:application_name)}_#{fetch(:rails_env)}" }
2
4
 
3
5
  namespace :whenever do
@@ -5,7 +7,7 @@ namespace :whenever do
5
7
  task clear: :remote_environment do
6
8
  comment "Clear contrab for #{fetch(:whenever_name)}"
7
9
  in_path fetch(:current_path) do
8
- command "#{fetch(:bundle_bin)} exec whenever --clear-crontab #{fetch(:whenever_name)} --set 'environment=#{fetch(:rails_env)}&path=#{fetch(:current_path)}'"
10
+ command "#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)} #{fetch(:bundle_bin)} exec whenever --clear-crontab #{fetch(:whenever_name)}"
9
11
  end
10
12
  end
11
13
 
@@ -13,7 +15,7 @@ namespace :whenever do
13
15
  task update: :remote_environment do
14
16
  comment "Update crontab for #{fetch(:whenever_name)}"
15
17
  in_path fetch(:current_path) do
16
- command "#{fetch(:bundle_bin)} exec whenever --update-crontab #{fetch(:whenever_name)} --set 'environment=#{fetch(:rails_env)}&path=#{fetch(:current_path)}'"
18
+ command "#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)} #{fetch(:bundle_bin)} exec whenever --update-crontab #{fetch(:whenever_name)}"
17
19
  end
18
20
  end
19
21
 
@@ -21,7 +23,7 @@ namespace :whenever do
21
23
  task write: :remote_environment do
22
24
  comment "Write crontab for #{fetch(:whenever_name)}"
23
25
  in_path fetch(:current_path) do
24
- command "#{fetch(:bundle_bin)} exec whenever --write-crontab #{fetch(:whenever_name)} --set 'environment=#{fetch(:rails_env)}&path=#{fetch(:current_path)}'"
26
+ command "#{fetch(:whenever_environment_variable)}=#{fetch(:rails_env)} #{fetch(:bundle_bin)} exec whenever --write-crontab #{fetch(:whenever_name)}"
25
27
  end
26
28
  end
27
29
  end
@@ -1,5 +1,5 @@
1
1
  module Mina
2
2
  module Whenever
3
- VERSION = '1.0.2'
3
+ VERSION = '1.0.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mina-whenever-env
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ray Rao