Class: Figaro::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/figaro/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_configurationObject



6
7
8
# File 'lib/generators/figaro/install/install_generator.rb', line 6

def create_configuration
  copy_file("application.yml", "config/application.yml")
end

#ignore_configurationObject



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/generators/figaro/install/install_generator.rb', line 10

def ignore_configuration
  if File.exists?(".gitignore")
    append_to_file(".gitignore") do
      <<-EOF.strip_heredoc

      # Ignore application configuration
      /config/application.yml
      EOF
    end
  end
end