This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# License: WTFPL (http://sam.zoy.org/wtfpl/) | |
# | |
namespace :secret do | |
desc 'Replace the secure secret key in your secret_token.rb' | |
task :replace do | |
pattern = /(\.secret_token *= *')\w+(')/ | |
secret = SecureRandom.hex(64) | |
filepath = "#{Rails.root}/config/initializers/secret_token.rb" |
NewerOlder