Mercurial > hg > soundsoftware-site
comparison .svn/pristine/ac/ac80a0a0728af94588c2f8cce1549e26340e25ff.svn-base @ 1296:038ba2d95de8 redmine-2.2
Fix redmine-2.2 branch update (add missing svn files)
author | Chris Cannam |
---|---|
date | Fri, 14 Jun 2013 09:05:06 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1294:3e4c3460b6ca | 1296:038ba2d95de8 |
---|---|
1 desc 'Generates a secret token for the application.' | |
2 | |
3 file 'config/initializers/secret_token.rb' do | |
4 path = File.join(Rails.root, 'config', 'initializers', 'secret_token.rb') | |
5 secret = SecureRandom.hex(40) | |
6 File.open(path, 'w') do |f| | |
7 f.write <<"EOF" | |
8 # This file was generated by 'rake generate_secret_token', and should | |
9 # not be made visible to public. | |
10 # If you have a load-balancing Redmine cluster, you will need to use the | |
11 # same version of this file on each machine. And be sure to restart your | |
12 # server when you modify this file. | |
13 # | |
14 # Your secret key for verifying cookie session data integrity. If you | |
15 # change this key, all old sessions will become invalid! Make sure the | |
16 # secret is at least 30 characters and all random, no regular words or | |
17 # you'll be exposed to dictionary attacks. | |
18 RedmineApp::Application.config.secret_token = '#{secret}' | |
19 EOF | |
20 end | |
21 end | |
22 | |
23 desc 'Generates a secret token for the application.' | |
24 task :generate_secret_token => ['config/initializers/secret_token.rb'] |