Discussion:
[feature request] Pull in DSL with require 'rake/dsl'
James M. Lawrence
2010-01-11 22:42:47 UTC
Permalink
With the new DSL separation, two lines are needed to get the top-level
DSL inside a regular ruby program,

require 'rake'
include Rake::DSL

I suggest making this equivalent to

require 'rake/dsl'

This would not affect the present behavior of require 'rake'.

I am essentially requesting that you follow a convention which is
convenient and already in use (at least by me, e.g. pure/dsl,
cond/dsl). It's also my last chance to speak up before the existing
dsl.rb makes the feature backward-incompatible.

There are also other precedents for require 'project/feature' to
produce side effects needed by 'feature', for example spec/autorun and
minitest/autorun.

See pull request on github.

P.S. I was accepted to the Rake group on pivotal but I didn't see how
to create a feature request (or to do anything other than export CSV).
Jim Weirich
2010-01-11 23:25:50 UTC
Permalink
Post by James M. Lawrence
With the new DSL separation, two lines are needed to get the top-level
DSL inside a regular ruby program,
require 'rake'
include Rake::DSL
I suggest making this equivalent to
require 'rake/dsl'
This would not affect the present behavior of require 'rake'.
I have no issue with the basics of this request. We would have to
move the guts of the DSL module to a different file (since rake itself
requires 'rake/dsl', this would put the DSL commands back at top level).
Post by James M. Lawrence
P.S. I was accepted to the Rake group on pivotal but I didn't see how
to create a feature request (or to do anything other than export CSV).
By default, I add all tracker requests as viewers. The other choice,
"member", allows complete editing of all the story details. I would
really like a "request new feature/report bug" role, but pivotal
doesn't seem to support that.
--
-- Jim Weirich
-- ***@gmail.com
James M. Lawrence
2010-01-11 23:46:34 UTC
Permalink
I have no issue with the basics of this request.  We would have to move the
guts of the DSL module to a different file (since rake itself requires
'rake/dsl', this would put the DSL commands back at top level).
Yes, that's in the pull request.

Loading...