Sha256: 74bea91febb0d053e2addc78d2b40fff10c52c0644eac1001710c7c6a48b1b7d
Contents?: true
Size: 611 Bytes
Versions: 16
Compression:
Stored size: 611 Bytes
Contents
module AlephExecutables class ImportEnvFile ENV_YML = 'env.yml' # if a env.yml exists in the config path, try to write an .env file def self.execute!(config_path, rails_env = 'development') env_yaml_path = File.join(config_path, ENV_YML) return nil unless File.exists?(File.expand_path(env_yaml_path)) env_writer = EnvWriter.new(rails_env) env_data = YAML.load_file(env_yaml_path) env_writer.merge(aleph_config_path: config_path) env_data.each do |k, v| env_writer.merge({ k.downcase.to_sym => v }) end env_writer.write! end end end
Version data entries
16 entries across 16 versions & 1 rubygems