Sha256: 29ea2aba2cf158e8cc222a31cc5414fa8bce2385adec080f3fdb29faf7942aa1

Contents?: true

Size: 661 Bytes

Versions: 8

Compression:

Stored size: 661 Bytes

Contents

desc 'Set up the environment for running your web application'
task :environment => :log do |task|
	require SITE_ROOT + 'config/environment'
	
	# We ensure this is part of the shell environment so if other commands are invoked they will work correctly.
	ENV['RACK_ENV'] = RACK_ENV.to_s if defined?(RACK_ENV)
	ENV['DATABASE_ENV'] = DATABASE_ENV.to_s if defined?(DATABASE_ENV)
	
	# This generates a consistent session secret if one was not already provided:
	if ENV['UTOPIA_SESSION_SECRET'].nil?
		require 'securerandom'
		
		Utopia.logger.warn 'Generating transient session key for development...'
		ENV['UTOPIA_SESSION_SECRET'] = SecureRandom.hex(32)
	end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
utopia-2.11.1 setup/site/tasks/environment.rake
utopia-2.11.0 setup/site/tasks/environment.rake
utopia-2.10.0 setup/site/tasks/environment.rake
utopia-2.9.5 setup/site/tasks/environment.rake
utopia-2.9.3 setup/site/tasks/environment.rake
utopia-2.9.2 setup/site/tasks/environment.rake
utopia-2.9.1 setup/site/tasks/environment.rake
utopia-2.9.0 setup/site/tasks/environment.rake