Class: Rsg::Generators::Dotenv::InstallGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/rsg/generators/dotenv/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_dotenvObject



6
7
8
9
10
11
12
# File 'lib/rsg/generators/dotenv/install_generator.rb', line 6

def add_dotenv
  append_gem "dotenv-rails",
    version: "< 3",
    after: "rails",
    group: [:development, :test],
    require: "dotenv/rails-now"
end


2
3
4
# File 'lib/rsg/generators/dotenv/install_generator.rb', line 2

def banner
  say "Configuring dotenv-rails in development and test environments"
end

#configure_dotenvObject



14
15
16
17
# File 'lib/rsg/generators/dotenv/install_generator.rb', line 14

def configure_dotenv
  copy_file "env.development", ".env.development"
  copy_file "env.test", ".env.test"
end