annotate .svn/pristine/ac/ac80a0a0728af94588c2f8cce1549e26340e25ff.svn-base @ 1524:82fac3dcf466 redmine-2.5-integration

Fix failure to interpret Javascript when autocompleting members for project
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 11 Sep 2014 10:24:38 +0100
parents 038ba2d95de8
children
rev   line source
Chris@1296 1 desc 'Generates a secret token for the application.'
Chris@1296 2
Chris@1296 3 file 'config/initializers/secret_token.rb' do
Chris@1296 4 path = File.join(Rails.root, 'config', 'initializers', 'secret_token.rb')
Chris@1296 5 secret = SecureRandom.hex(40)
Chris@1296 6 File.open(path, 'w') do |f|
Chris@1296 7 f.write <<"EOF"
Chris@1296 8 # This file was generated by 'rake generate_secret_token', and should
Chris@1296 9 # not be made visible to public.
Chris@1296 10 # If you have a load-balancing Redmine cluster, you will need to use the
Chris@1296 11 # same version of this file on each machine. And be sure to restart your
Chris@1296 12 # server when you modify this file.
Chris@1296 13 #
Chris@1296 14 # Your secret key for verifying cookie session data integrity. If you
Chris@1296 15 # change this key, all old sessions will become invalid! Make sure the
Chris@1296 16 # secret is at least 30 characters and all random, no regular words or
Chris@1296 17 # you'll be exposed to dictionary attacks.
Chris@1296 18 RedmineApp::Application.config.secret_token = '#{secret}'
Chris@1296 19 EOF
Chris@1296 20 end
Chris@1296 21 end
Chris@1296 22
Chris@1296 23 desc 'Generates a secret token for the application.'
Chris@1296 24 task :generate_secret_token => ['config/initializers/secret_token.rb']