ruby-ore / ore

Mine beautiful RubyGems from Ore
MIT License
241 stars 29 forks source link

Enable switching or redefining the base template #31

Closed cdlm closed 10 years ago

cdlm commented 11 years ago

My idea is to use ore to generate non-Ruby projects (e.g. LaTeX documents). I tried defining a template that has disable: [base] in its template.yml file; it seems to work.

It would be nice if this was made a feature: the base template could be specified when invoking mine, possibly keeping the Ruby base template as a default choice, and changing the base. I guess this implies disabling some other templates that don't make sense unless the ruby base template was instanciated, and that a LaTeX template cannot know about. What do you think?

elskwid commented 10 years ago

@cdlm - Couldn't you use the template features in Thor generators to get you there? I think you'd have to turn off so much of ore to almost make it not worth the trouble. Although, I'm guessing on that last bit.

cdlm commented 10 years ago

That is a possibility. Ore is the closest to what I'm looking for, but it still has rubyisms hardcoded (like the choice of different markups for READMEs and what variables are available to templates). Thor seems to be more generic, but provides less up front.

postmodern commented 10 years ago

Ore is explicitly designed for generating Ruby projects. It might be interesting to extend Ore for non-gem Ruby projects. @cdlm maybe when I refactor the template system Ore uses, I could extract it into a Thor library.