Sha256: eedebf7e8d4de8bdd955628aecdbb02afbe03cf9b96d67d6512a7975a7198bd7
Contents?: true
Size: 649 Bytes
Versions: 2
Compression:
Stored size: 649 Bytes
Contents
module LoadEnv class Generator def initialize(env_path) @env_path = env_path end def generate env_files = %w(development production) env_files.each do |file_name| full_path = env_files.join(file_name) if File.exists? full_path warn '[skip] #{file_name} already exists' else File.open(full_path, 'w+') do |f| f.write(env_file_template) end end end end private def env_file_template ' Please export your environment variables in following format \n # export BASE_URL="someurl" ' end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
load_env-0.1.1 | lib/load_env/generator.rb |
load_env-0.1.0 | lib/load_env/generator.rb |