Sha256: 06ac82145fd766552653002c6e30969b3b79270ab1c7c3b33da0fb84fdfbb695
Contents?: true
Size: 490 Bytes
Versions: 11
Compression:
Stored size: 490 Bytes
Contents
module Tako class Config class << self def shards_yml YAML.load(ERB.new(File.read(yml_path)).result).with_indifferent_access end def env defined?(::Rails.env) ? Rails.env : (ENV['RAILS_ENV'] || :default) end private def yml_path File.join(directory, ENV['TAKO_CONFIG_FILE_PATH'] || "config/shards.yml") end def directory defined?(::Rails.root) ? Rails.root.to_s : Dir.pwd end end end end
Version data entries
11 entries across 11 versions & 1 rubygems