Class: Kowl::TextFilesGenerator
- Inherits:
-
Generators::Base
- Object
- Rails::Generators::Base
- Generators::Base
- Kowl::TextFilesGenerator
- Defined in:
- lib/kowl/generators/text_files_generator.rb
Instance Method Summary collapse
-
#changelog ⇒ Object
Generate a changelog file for project developers.
-
#copy_markdown_files ⇒ Object
Generarte numerous project markdown files.
-
#copy_securitytxt ⇒ Object
Generate a security.txt file for application security contact information.
-
#public_txt_files ⇒ Object
Generate human.txt and robots.txt files for human readable project information.
-
#version ⇒ Object
Generate a project version file.
Methods inherited from Generators::Base
default_source_root, source_paths
Methods included from Docker
#alpine_docker_dependencies, #app_js_volumes, #app_volumes, #db_volumes, #debian_database_dependencies, #debian_docker_dependencies, #docker_app_command, #docker_compose_database_string, #docker_databases, #docker_depends_on, #docker_port_watcher, #docker_redis_service, #docker_sidekiq_service, #docker_variables, #docker_volumes, #docker_webpacker_service, #dockerfile_database_args, #dockerfile_migration_snip, #js_volumes, #mysql_volumes, #postgresql_volumes, #redis_volumes
Methods included from Actions
#add_extension_routes, #add_package, #append_to_file, #database_route, #dev_config, #dup_file, #file_exists?, #mailer_gems, #mailer_route, #mk_dir, #move_file, #pry_gems, #rails_cmd, #remove_dir, #remove_file, #remove_gem, #replace_string_in_file, #robocop_test_engine, #sidekiq_route, #template_linter_gems
Instance Method Details
#changelog ⇒ Object
Generate a changelog file for project developers
15 16 17 18 |
# File 'lib/kowl/generators/text_files_generator.rb', line 15 def changelog # Add a changelog file to the project template 'CHANGELOG.md.tt', 'CHANGELOG.md' end |
#copy_markdown_files ⇒ Object
Generarte numerous project markdown files
21 22 23 |
# File 'lib/kowl/generators/text_files_generator.rb', line 21 def copy_markdown_files %w[AUTHORS.md CODE_OF_CONDUCT.md TODO.md].map { |f| copy_file(f, f) } end |
#copy_securitytxt ⇒ Object
Generate a security.txt file for application security contact information
31 32 33 |
# File 'lib/kowl/generators/text_files_generator.rb', line 31 def copy_securitytxt copy_file('security.txt', 'public/.well-known/security.txt') end |
#public_txt_files ⇒ Object
Generate human.txt and robots.txt files for human readable project information
36 37 38 39 |
# File 'lib/kowl/generators/text_files_generator.rb', line 36 def public_txt_files template 'humans.txt.tt', 'public/humans.txt' template 'robots.txt.tt', 'public/robots.txt', force: true end |
#version ⇒ Object
Generate a project version file
26 27 28 |
# File 'lib/kowl/generators/text_files_generator.rb', line 26 def version copy_file('VERSION', 'VERSION') end |