[Rubygems-developers] __FILE__ hacks -was: Re: [...] Adoption
eivind at FreeBSD.org
Fri Oct 22 10:03:14 EDT 2004
On Fri, Oct 22, 2004 at 06:45:55AM -0400, Jim Weirich wrote:
> In David HH's RubyConf talk, he mentioned that Rails promotes conformity by
> making the conforming "golden" path easy and the non-conforming paths
> difficult. I see this suggestion, along with careful selection of defaults
> in the gem spec as being part of the "golden path" strategy. If you use "gem
> initialize-directory" and a very minimal gemspec, you could have a working
> gem project.
> I think providing documentation about this "golden path" is good too. Make
> using a properly designed directory structure easy and a improper one
> inconvenient and most people will automatically follow your lead
I agree. If I were to do this for RubyGems, I think I'd start with the
gem setup <projectname>
Setup would set up a new project (proving templates for important files,
creating directories, etc).
Lint would verify that stuff looked policy-wise OK (correct directories,
grep for hacks, etc). Give errors for serious stuff, warnings for less
serious stuff. We've had great success with a tool like this for the
FreeBSD ports collection.
Then I'd add more doc on how to be compatible to the RubyGems Wiki -
probably I'd just start by pointing at the RPA GoodPractices page
In order to ensure that gems support directory splitting (this is
necessary for some systems), I'd at some point add the command
or similar, to install a gem in non-single-directory manner for testing.
This helps make it easy for developers (and testers) to test that gem
packages actually work in the relevant context.
More information about the Rubygems-developers