Class: Angus::Generator
- Inherits:
-
Thor
- Object
- Thor
- Angus::Generator
- Includes:
- Thor::Actions
- Defined in:
- lib/angus/generator.rb
Constant Summary collapse
- RESOURCES_DIR =
'resources'- DEFINITIONS_DIR =
'definitions'- SERVICES_DIR =
'services'- NEW_APP_DIRECTORIES =
%W(#{DEFINITIONS_DIR} #{RESOURCES_DIR} #{SERVICES_DIR})
- NEW_APP_FILES =
%w( Gemfile.erb config.ru.erb services/service.rb.erb definitions/messages.yml definitions/representations.yml definitions/service.yml.erb )
- FILE_MAPPINGS =
{ 'services/service.rb.erb' => -> command, app_name { File.join(SERVICES_DIR, "#{command.underscore(command.classify(app_name))}.rb") }, 'resources/resource.rb.erb' => -> command, name { "#{command.underscore(command.classify(name))}.rb" }, 'definitions/operations.yml.erb' => -> command, _ { File.join(command.resource_name, 'operations.yml') } }