Class: HandsomeFencer::CircleCI::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_circle_templatesObject



9
10
11
# File 'lib/generators/handsome_fencer/circle_c_i/install_generator.rb', line 9

def copy_circle_templates
  directory "circleci", "./.circleci", recursive: true
end

#copy_config_databas_ymlObject



21
22
23
# File 'lib/generators/handsome_fencer/circle_c_i/install_generator.rb', line 21

def copy_config_databas_yml
  copy_file "config/database.yml", "config/database.yml"
end

#copy_deploy_taskObject



13
14
15
# File 'lib/generators/handsome_fencer/circle_c_i/install_generator.rb', line 13

def copy_deploy_task
  directory 'lib/', 'lib', recursive: true
end

#copy_docker_composeObject



17
18
19
# File 'lib/generators/handsome_fencer/circle_c_i/install_generator.rb', line 17

def copy_docker_compose
  copy_file "docker-compose.yml", "docker-compose.yml"
end

#insert_gitignoresObject



26
27
28
29
30
# File 'lib/generators/handsome_fencer/circle_c_i/install_generator.rb', line 26

def insert_gitignores
  create_file '.gitignore' if File.exist? '.gitignore'
  append_to_file '.gitignore', "\n.circleci/**/*.env"
  append_to_file '.gitignore', "\n.circleci/**/*.key"
end