nwops / puppet-retrospec

The only tool you need to generate puppet code, tests, modules, facts, types, providers, data and everything else.
https://www.retrospec-puppet.com/
GNU Affero General Public License v3.0
137 stars 27 forks source link

allow new templates to be easily added without changing code #12

Closed logicminds closed 9 years ago

logicminds commented 9 years ago

Currently if a new template is added to the template directory there is no way for the user (without updating the code) to have this template applied. The code should be changed to look in specific directories for erb files and copy all of those files instead of creating snowflake methods.

Example:

safe_create_module_root_files()
safe_create_spec_root_files()  

Where the template directory layout would be:

templates/
├── module_root
│   └── gemfile.erb
└── spec_root
    └── spec_helper.rb.erb

This way all one would have to do is create a erb file and place in the directory and retrospec would create the file automatically. Some methods like safe_create_resource_spec_files may still be required since they are special.

logicminds commented 9 years ago

fixed in master.