File: secret_token.rb

package info (click to toggle)
ruby-font-awesome-rails 4.7.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,316 kB
  • sloc: ruby: 268; sh: 41; makefile: 5
file content (22 lines) | stat: -rw-r--r-- 1,013 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Be sure to restart your server when you modify this file.

# Your secret key for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
#
# avoid deprecation warnings if building against older versions of Rails

# secret_token migrated to secret_key_base in Rails 4
SKB_VERSION = Gem::Version.new('4.0.0')

# Get the current Rails version.
RAILS_VERSION = Rails.respond_to?(:version) ? Gem::Version.new(Rails.version) : Gem::Version.new('3.22')

# if we're running an old version of Rails
if RAILS_VERSION < SKB_VERSION 
  Dummy::Application.config.secret_token    = 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
else
  Dummy::Application.config.secret_key_base = 'deadbeef' if Dummy::Application.config.respond_to?(:secret_key_base)
end