Class: HeimdallAuth::Generators::DotenvGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- HeimdallAuth::Generators::DotenvGenerator
- Defined in:
- lib/generators/heimdall_auth/dotenv/dotenv_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_dot_env_support ⇒ Object
6 7 8 9 10 11 |
# 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 ⇒ Object
13 14 15 |
# 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 ⇒ Object
17 18 19 20 21 |
# 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 |