Class: HandsomeFencer::CircleCI::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- HandsomeFencer::CircleCI::InstallGenerator
- Defined in:
- lib/generators/handsome_fencer/circle_c_i/install_generator.rb
Instance Method Summary collapse
- #copy_circle_templates ⇒ Object
- #copy_config_databas_yml ⇒ Object
- #copy_deploy_task ⇒ Object
- #copy_docker_compose ⇒ Object
- #insert_gitignores ⇒ Object
Instance Method Details
#copy_circle_templates ⇒ Object
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_yml ⇒ Object
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_task ⇒ Object
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_compose ⇒ Object
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_gitignores ⇒ Object
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 |