class AwsEc2::Dotenv

Public Class Methods

dotenv_files() click to toggle source
  • `.env` - The Original®

  • `.env.development`, `.env.test`, `.env.production` - Environment-specific settings.

  • `.env.local` - Local overrides. This file is loaded for all environments except `test`.

  • `.env.development.local`, `.env.test.local`, `.env.production.local` - Local overrides of environment-specific settings.

# File lib/aws_ec2/dotenv.rb, line 17
def dotenv_files
  [
    root.join(".env.#{AwsEc2.env}.local"),
    (root.join(".env.local") unless AwsEc2.env == "test"),
    root.join(".env.#{AwsEc2.env}"),
    root.join(".env")
  ].compact
end
load!() click to toggle source
# File lib/aws_ec2/dotenv.rb, line 6
def load!
  ::Dotenv.load(*dotenv_files)
end
root() click to toggle source
# File lib/aws_ec2/dotenv.rb, line 26
def root
  AwsEc2.root || Pathname.new(ENV["AWS_EC2_ROOT"] || Dir.pwd)
end