Commit 7d5196352000d1cefc0fe68944f196ead509d403

Authored by Vitalii Khustochka
1 parent 2b49f5d3
Exists in master and in 1 other branch production

Ignore SECRET_TOKEN absense during assets:precompile

This is necessary because Heroku environment variables
are not available during assets precompile stage.
Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
config/initializers/secret_token.rb
@@ -13,7 +13,8 @@ else @@ -13,7 +13,8 @@ else
13 if ENV['SECRET_TOKEN'].present? 13 if ENV['SECRET_TOKEN'].present?
14 Errbit::Application.config.secret_token = ENV['SECRET_TOKEN'] 14 Errbit::Application.config.secret_token = ENV['SECRET_TOKEN']
15 15
16 - else 16 + # Do not raise an error if secret token is not available dureng assets precompilation
  17 + elsif ENV['RAILS_GROUPS'] != 'assets'
17 raise <<-ERROR 18 raise <<-ERROR
18 19
19 You must generate a unique secret token for your Errbit instance. 20 You must generate a unique secret token for your Errbit instance.