Class: Kowl::Generators::Base

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Actions, Docker
Defined in:
lib/kowl/generators/base.rb

Class Method Summary collapse

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

Class Method Details

.default_source_rootObject

Resolve to using the default Rails gem templates as a fallback in case source_path doesn’t exist for generator NOTE: Do no enable this, as it tends to overwrite the default rails gem past for pulling templates from (ie: database stuff)



18
19
20
# File 'lib/kowl/generators/base.rb', line 18

def self.default_source_root
  File.expand_path(File.join('..', 'templates'), __dir__)
end

.source_pathsObject

Used for setting RAILS default source_path As well as adding the gems source_path to the generators src: github.com/solidusio/solidus/blob/master/core/lib/generators/spree/dummy/dummy_generator.rb#L15



25
26
27
28
29
30
# File 'lib/kowl/generators/base.rb', line 25

def self.source_paths
  super
  paths = superclass.source_paths
  paths << File.expand_path(File.join('..', 'templates'), __dir__)
  paths.flatten.uniq
end