diff --git a/app/models/activity_feed.rb b/app/models/activity_feed.rb index 5bee6ecc8..94542662c 100644 --- a/app/models/activity_feed.rb +++ b/app/models/activity_feed.rb @@ -1,9 +1,9 @@ class ActivityFeed < ActiveRecord::Base - CODE = ['git_delete_branch_notification', 'git_new_push_notification', 'new_comment_commit_notification'] - TRACKER = ['issue_assign_notification', 'new_comment_notification', 'new_issue_notification'] - BUILD = ['build_list_notification'] - WIKI = ['wiki_new_commit_notification'] + CODE = %w(git_delete_branch_notification git_new_push_notification new_comment_commit_notification) + TRACKER = %w(issue_assign_notification new_comment_notification new_issue_notification) + BUILD = %w(build_list_notification) + WIKI = %w(wiki_new_commit_notification) belongs_to :user serialize :data diff --git a/config/application.yml.sample b/config/application.yml.sample index f2824c609..f977e5114 100644 --- a/config/application.yml.sample +++ b/config/application.yml.sample @@ -16,8 +16,10 @@ common: &common key_pair_secret_key: 'key_pair_secret_key' airbrake_api_key: 'airbrake_api_key' logentries_key: 'logentries_key' - devise_pepper: 'devise_pepper' secret_token: 'secret_token' + devise: + pepper: 'devise_pepper' + secret: 'devise_secret' github: id: 'APP_ID' secret: 'APP_SECRET' diff --git a/config/application.yml.travis b/config/application.yml.travis index 6715379ef..8e9c95e0d 100644 --- a/config/application.yml.travis +++ b/config/application.yml.travis @@ -17,6 +17,9 @@ common: &common airbrake_api_key: 'airbrake_api_key' devise_pepper: 'e295a79fb7966e94a6e8b184ba65791a' secret_token: 'e295a79fb7966e94a6e8b184ba65791a' + devise: + pepper: 'e295a79fb7966e94a6e8b184ba65791a' + secret: '82e10b58b3f4a764f551fb104aa76808f539380f82da75d3f29edfc09ed9c3a153c22ceacc87890a9b19d0ad89bb6484481f4e021e0ecf942d80c34d930829e9' github: id: 'APP_ID' secret: 'APP_SECRET' diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 07e9fe5a9..c959ab48d 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -69,7 +69,7 @@ Devise.setup do |config| config.stretches = Rails.env.test? ? 1 : 10 # Setup a pepper to generate the encrypted password. - config.pepper = APP_CONFIG['keys']['devise_pepper'] + config.pepper = APP_CONFIG['keys']['devise']['pepper'] # ==> Configuration for :confirmable # A period that the user is allowed to access the website even without @@ -205,5 +205,5 @@ Devise.setup do |config| # manager.default_strategies(:scope => :user).unshift :some_external_strategy # end - config.secret_key = APP_CONFIG['keys']['devise_secret'] + config.secret_key = APP_CONFIG['keys']['devise']['secret'] end