class HeimdallAuth::Generators::DotenvGenerator

Public Instance Methods

add_dot_env_support() click to toggle source
# File lib/generators/heimdall_auth/dotenv/dotenv_generator.rb, line 6
def add_dot_env_support
  gem_group :development, :test do
    # Load ENV variables from .env file development and test
    gem 'dotenv-rails'
  end
end
create_example_file() click to toggle source
# File lib/generators/heimdall_auth/dotenv/dotenv_generator.rb, line 13
def create_example_file
  copy_file "dot-env.example", ".env.example"
end
ignore_dot_env_file() click to toggle source
# File lib/generators/heimdall_auth/dotenv/dotenv_generator.rb, line 17
def ignore_dot_env_file
  inject_into_file '.gitignore', after: "/.bundle\n" do
    "/.env\n"
  end
end