* Get rid of early pathname requirement * Use require_relative where approciate * Drop unused files * Imported new application.rb, environment.rb and environments/* from fresh Rails app * Cleaned up boot.rb * Load config in boot.rb * Deduplicate environments/integration*.rb * Move username blacklist into defaults.yml * Ruby 1.9 Hash syntax everywhere * Reorganize lib/diaspora/markdownify to match conventions * Get rid of full path requires where possible * Add dummy content to production section diaspora.yml.example to prevent warning * Drop sqlite? method * Move postgres? method into ConfigurationMethods * Drop token authentication from User
6 lines
281 B
Ruby
6 lines
281 B
Ruby
if AppConfig.heroku?
|
|
Rails.application.config.secret_token = AppConfig.secret_token
|
|
elsif !Rails.root.join('config', 'initializers', 'secret_token.rb').exist?
|
|
`bundle exec rake generate:secret_token`
|
|
require Rails.root.join('config', 'initializers', 'secret_token.rb')
|
|
end
|