<commit_before>rails_env = new_resource.environment['RAILS_ENV']

Chef::Log.info('Precompiling assets...')
execute 'precompile assets' do
  cwd release_path
  command 'RAILS_ENV=production bin/rake assets:precompile'
  user 'deploy'
  group 'www-data'
  only_if { rails_env == 'production' }
end<commit_msg>Update production deploy script to include secret key base as environment variable.<commit_after>rails_env = new_resource.environment['RAILS_ENV']
secret_key_base = new_resource.environment['SECRET_KEY_BASE']

Chef::Log.info('Precompiling assets...')
execute 'precompile assets' do
  cwd release_path
  command 'bin/rake assets:precompile'
  user 'deploy'
  group 'www-data'
  only_if { rails_env == 'production' }
  environment(
    'RAILS_ENV' => rails_env,
    'SECRET_KEY_BASE' => secret_key_base
  )
end
{'fraction_non_alphanumeric': 0.1116564417177914, 'fraction_numerical': 0.0, 'mean_word_length': 5.688524590163935, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '778895', 'n_tokens_mistral': 277, 'n_tokens_neox': 269, 'n_words': 60}