Sha256: 2ed19b3e76465d938d66a848cc387af90050c6312b3010869f2c026ef17a99cf
Contents?: true
Size: 1.07 KB
Versions: 5
Compression:
Stored size: 1.07 KB
Contents
ENV['RAILS_ENV'] = (ENV['RAILS_ENV'] || 'development').dup # RAILS_ROOT isn't defined yet, so figure it out. rails_root_dir = "#{File.dirname(File.expand_path(__FILE__))}/../../../../" SOLR_PATH = "#{File.dirname(File.expand_path(__FILE__))}/../solr" unless defined? SOLR_PATH SOLR_LOGS_PATH = "#{rails_root_dir}/log" unless defined? SOLR_LOGS_PATH SOLR_PIDS_PATH = "#{rails_root_dir}/tmp/pids" unless defined? SOLR_PIDS_PATH SOLR_DATA_PATH = "#{rails_root_dir}/solr/#{ENV['RAILS_ENV']}" unless defined? SOLR_DATA_PATH unless defined? SOLR_PORT config = YAML::load_file(rails_root_dir+'/config/solr.yml') SOLR_PORT = ENV['PORT'] || URI.parse(config[ENV['RAILS_ENV']]['url']).port end SOLR_JVM_OPTIONS = config[ENV['RAILS_ENV']]['jvm_options'] unless defined? SOLR_JVM_OPTIONS if ENV['RAILS_ENV'] == 'test' DB = (ENV['DB'] ? ENV['DB'] : 'mysql') unless defined?(DB) MYSQL_USER = (ENV['MYSQL_USER'].nil? ? 'root' : ENV['MYSQL_USER']) unless defined? MYSQL_USER require File.join(File.dirname(File.expand_path(__FILE__)), '..', 'test', 'db', 'connections', DB, 'connection.rb') end
Version data entries
5 entries across 5 versions & 2 rubygems