From 4fe62c8ed6cefeb03a56f458c87f9958c61d775b Mon Sep 17 00:00:00 2001 From: Dan Barber Date: Thu, 22 Jan 2015 16:49:46 +0000 Subject: [PATCH] Switch to secrets.yml. --- config/initializers/secret_token.rb | 7 ------- config/secrets.yml | 22 ++++++++++++++++++++++ db/schema.rb | 9 +++++---- 3 files changed, 27 insertions(+), 11 deletions(-) delete mode 100644 config/initializers/secret_token.rb create mode 100644 config/secrets.yml diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb deleted file mode 100644 index c62dbff..0000000 --- a/config/initializers/secret_token.rb +++ /dev/null @@ -1,7 +0,0 @@ -# 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. -DanBarberPhoto::Application.config.secret_key_base = ENV['SECRET_KEY_BASE'] diff --git a/config/secrets.yml b/config/secrets.yml new file mode 100644 index 0000000..49ee3b4 --- /dev/null +++ b/config/secrets.yml @@ -0,0 +1,22 @@ +# Be sure to restart your server when you modify this file. + +# Your secret key is used 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. +# You can use `rake secret` to generate a secure secret key. + +# Make sure the secrets in this file are kept private +# if you're sharing your code publicly. + +development: + secret_key_base: ed88c5a5ab6469781e1cd4a0fb4f635acc78cf836fcbf7d0ea313920ca36c0209de58731ae7a9069d62e0eaf351960f0d70a338b6659f21fb4e05192883d016c + +test: + secret_key_base: c592502f083b17f4e02f7f9057e314b598213c7f0c83dfaedcaa3b2f02473de445b60d6f7432ef048adce0ac2b693dd597c304db995207a39b3d512393773382 + +# Do not keep production secrets in the repository, +# instead read values from the environment. +production: + secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> diff --git a/db/schema.rb b/db/schema.rb index 799df15..46e35bb 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -17,12 +17,12 @@ ActiveRecord::Schema.define(version: 20140308082639) do enable_extension "plpgsql" create_table "admin_users", force: true do |t| - t.string "email", default: "", null: false - t.string "encrypted_password", limit: 128, default: "", null: false + t.string "email", default: "", null: false + t.string "encrypted_password", default: "", null: false t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" - t.integer "sign_in_count", default: 0 + t.integer "sign_in_count", default: 0 t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" t.string "current_sign_in_ip" @@ -30,7 +30,8 @@ ActiveRecord::Schema.define(version: 20140308082639) do t.string "confirmation_token" t.datetime "confirmed_at" t.datetime "confirmation_sent_at" - t.integer "failed_attempts", default: 0 + t.string "unconfirmed_email" + t.integer "failed_attempts", default: 0 t.string "unlock_token" t.datetime "locked_at" t.datetime "created_at"