[rspec-devel] [ rspec-Feature Requests-6519 ] Let RubyGems install dependencies instead of having to do it manually

noreply at rubyforge.org noreply at rubyforge.org
Tue Nov 7 05:31:08 EST 2006


Feature Requests item #6519, was opened at 2006-11-06 12:50
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6519&group_id=797

Category: None
Group: None
Status: Open
Priority: 3
Submitted By: Craig Demyanovich (cdemyanovich)
Assigned to: Nobody (None)
Summary: Let RubyGems install dependencies instead of having to do it manually

Initial Comment:
For release 0.7, ZenTest must be installed first. Instead of having to do this manually, it would be nicer if we could do this

$ gem install -y rspec

or 

$ gem update -y rspec

and let RubyGems do the work.

----------------------------------------------------------------------

>Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2006-11-07 05:31

Message:
It is possible to package generators in gems as long as the gem's name ends with _generator. Rails automatically discovers such gems. So if we want to go the gem way we have to name it rspec_generator or somesuch.

Actually, spec/rails was called rspec_generator back in the days when it used to be a gem.

I don't remember exactly why we chose to distribute it as a plugin and not package it as a gem. Does anyone else remember? I looked in the mail archives but couldn't find anything.

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2006-11-07 05:14

Message:
To be clear, I'm thinking that the 2nd gem comprises the 'spec/rails' library and expresses the dependencies on zentest and rspec:

gem install -y rspec_rails
=> installs zentest.gem
=> installs rspec.gem
=> installs rspec_rails.gem

At that point, the generators and spec_helper still need to be installed. That could be done via a command installed w/ rspec_rails or through script/plugin install.

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2006-11-07 02:41

Message:
spec/rails used to be a gem. we made it a plugin to make it easier to maintain install. maybe it's time to revisit the gem option - the structure has changed a bit and i think it's feasible.

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2006-11-06 23:16

Message:
The rails plugin is a plugin because of the generators. We could move the 'spec/rails' library to a gem. Then we'd have:

rspec.gem
rails_spec.gem

The latter could handle dependencies on the rspec and zentest gems.

Thoughts?

----------------------------------------------------------------------

Comment By: Craig Demyanovich (cdemyanovich)
Date: 2006-11-06 20:35

Message:
Thanks, Aslak, for clarifying the dependencies. I like your
idea.

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2006-11-06 20:26

Message:
Every release of RSpec is comprised of two artefacts (so far); The RSpec gem and the RSpec plugin. The former represents the core functionality (and vision) of RSpec and BDD in general. The second artefact is "distributed" as a rails plugin (via code tagged in subversion).

It is only the latter (the spec/rails Rails plugin) which depends upon ZenTest. RSpec core (the gem) does not.

For the sake of convenience, we *could* make the gem depend on ZenTest to make the spec/rails experience smoother.

However, I feel that an explicit dependency from the RSpec gem to ZenTest would imply an undesired intrusion of RSpec's desire to be simplistic and pristine (it does not depend on ZenTest).

Would it not be better if we implemented a mechanism in spec/rails that informs developers how they need to install a compatible version of ZenTest?

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6519&group_id=797


More information about the rspec-devel mailing list