ruby-ore / ore

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

Templates to be moved out into installable templates #12

Closed postmodern closed 9 years ago

postmodern commented 12 years ago

Some templates are not needed by everyone and should probably be moved into installable templates under http://github.com/ruby-ore/ :

sundbp commented 12 years ago

I use gemspec.yml for all my projects, i dont use gemtest but probably should (though a lot of my stuff is internal), never used jeweler and i use rbenv instead of rvm. My 2c.

postmodern commented 12 years ago

@sundbp Good to hear! I'll keep gemspec_yml then, but not enabled by default (--gemspec-yml or add gemspec_yml: true to ~/.ore/options.yml) so the default project is as minimal as possible. I should ask more questions about the future of gem-test. Also, are there any project files needed for rbenv?

sundbp commented 12 years ago

Suits me fine.

rbenv doesnt need any files. If one wants to running "rbenv local xyz" will create a dotfile indicating which ruby to automatically use (taken care of via the shims). Not needed and not always wanted - sometimes i develop in mri to get some parts of pry accessible or before there was jruby support run less.rb, but deploy on jruby so fixing a version not always good. Not hard to manage rbenv outside of template as per user needs, so no need add work on that side imho. Pretty orthogonal.

benhamill commented 12 years ago

You might consider supporting the generation of a .ruby-version file instead or in addition to .rvmrc. I, too, use rvm, FWIW. I know rvm recognizes .ruby-version and so do a few others. It's under discussion with rbenv.

postmodern commented 12 years ago

Ah interesting, nice to see .ruby-version is catching on. Can you specify generic version requirements, such as >= ruby-1.9.1?

benhamill commented 12 years ago

I think you can only specify the specific version. This gist is the most authoritative document on it that I'm aware of. Come to think of it, I wonder is these kinds of files should even be committed for a gem. Like a Gemfile.lock, it would seem likely to cause false all-green tests or whatever. One can speficy ruby versions in the gemspec as ranges, right? Maybe ore needn't be that opinionated about it. Not sure.

postmodern commented 12 years ago

Yeah, I also don't agree with requiring a specific version of Ruby (down to the patch-level) for development. Ones project should work on all Rubies, unless otherwise stated. At least with a .rvmrc you can specify the gemset name and leave version open. Adding .rvmrc and .ruby_version to the SCM ignore file is a good idea.

The gemspec can specify a version requirement (>= 1.9.1) that's checked during installation.

postmodern commented 9 years ago

I've since moved majority of templates out into git submodules. This makes adding/removing them much easier.