# Tattle - The Ruby Census

**URL:** <https://www.ruby-forum.com/t/tattle-the-ruby-census/81407>\
**Category:** Ruby\
**Created:** [January 8, 2007, 10:01pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407 "2007-01-08T22:01:49Z")\
**Posts on this page:** 20\
**Page:** 5

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [January 11, 2007, 3:32pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/81 "2007-01-11T15:32:08Z")

</div>

To sum up –

For:

- Idempotency – include everything necessary to allow the gem to be  
rebuilt and regemified.
- Repackagers – make it easier for repackagers by including the  
necessary package-time dependencies.
- Developers – make it easier for developers by including the  
dependencies required to run, say, rake test.
- RubyGems – make hoe a run-time dependency until RubyGems supports  
develop-time dependencies.
- seattle.rb – help up their download stats on rubyforge.

Against:

- Users – don’t waste the time and space of people who aren’t in the  
above list.
- Sysadmins – don’t add another to the list of software they have to  
audit.
- Developers – don’t insult their intelligence. They’re doing something  
outside the scope of a typical user, and know how to read a README and  
gem install hoe.
- RubyGems – don’t abuse the “run-time dependency” list just to get  
around the lack of a develop-time one.

Did I miss anything? Now, all I think is necessary is a web poll  
somewhere, and the dead horse will have been thoroughly beaten.

Devin

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [January 19, 2007, 4:29pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/82 "2007-01-19T16:29:55Z")

</div>

On 1/11/07, Jeremy H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> (Actually I think that the test-driven philosophy should encourage  
> developers to think of the tests as just part of the product and  
> package them as such whenever it is reasonably possible. But there  
> are bound to be occasions when this is not practical.)

Given your last paragraph, why would idempotency dependencies be any  
different than dependencies necessary to run the tests? If I were to  
switch all of my unit tests to rspec, would it be appropriate to mark  
my gem as depending on rspec? After all, only the people who are going  
to run the tests will need it, just as only people who are going to  
interact with the gem on a meta-level will need hoe.

-austin

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [January 19, 2007, 4:29pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/83 "2007-01-19T16:29:38Z")

</div>

On 2007-01-11, Nathaniel T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’d much rather not have to manually go through each gem, figure out  
> what it needs so that I can run its tests, store that somehow (since  
> it’s not in the spec), install the dependencies since they aren’t  
> already, and all that to just automatically run tests for the gems.

Maybe a simple convention is all that’s needed. (Echoing myself in  
another thread.) If the full test set for “foo” is too cumbersome,  
release it as “foo-test”. It should be easy to write a script that  
installs “foo-test” for every installed gem “foo”.

(Actually I think that the test-driven philosophy should encourage  
developers to think of the tests as just part of the product and  
package them as such whenever it is reasonably possible. But there  
are bound to be occasions when this is not practical.)

Jeremy H.

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [January 19, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/84 "2007-01-19T16:30:33Z")

</div>

Devin M. wrote:

> develop-time dependencies.  
> around the lack of a develop-time one.
> 
> Did I miss anything?

You forgot to discuss Unicode issues. JOKING!!!

> Now, all I think is necessary is a web poll  
> somewhere, and the dead horse will have been thoroughly beaten.

Well, could this be made configurable within Hoe itself?

spec.idempotent = true

Regards,

Dan

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [January 19, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/85 "2007-01-19T16:31:33Z")

</div>

Austin Z. wrote:

> > 
> 
> interact with the gem on a meta-level will need hoe.  
> How about:

spec = Gem::Specification.new do |gem|  
gem.add\_dependency(“something”, “\>= 1.2.0”)  
gem.add\_optional(“rspec”, “Test suite only”, “\>= 0.5.0”)  
…  
end

And, at the command prompt:

C:\gem install something

Install required dependency something? [Yn]  
Install optional dependency rspec (Test suite only) [Yn]  
…

And the API would simply be:

Gem#add\_optional(gem, comment, \*requirements)

Regards,

Dan

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [September 25, 2007, 10:31pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/86 "2007-09-25T22:31:21Z")

</div>

On 1/11/07, Daniel B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> C:\gem install something
> 
> Install required dependency something? [Yn]  
> Install optional dependency rspec (Test suite only) [Yn]  
> …
> 
> And the API would simply be:
> 
> Gem#add\_optional(gem, comment, \*requirements)

The comment/description idea is excellent, and addresses my main  
complaint with generic optional dependencies. Ship it! 🙂

–  
Nathaniel T.

\<:((\>\<

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [January 19, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/87 "2007-01-19T16:31:53Z")

</div>

On 2007-01-11, Devin M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> - Users – don’t waste the time and space of people who aren’t in  
> the above list.

+1 . Surely the point of a packaging system is to serve people who  
just want to “wash and go”. Why compromise that because someone else  
has a problem? “Do one thing, do it well.”

> - Sysadmins – don’t add another to the list of software they have  
> to audit.

+1 . (I’m a sysadmin.)

> - Developers – don’t insult their intelligence. They’re doing  
> something outside the scope of a typical user, and know how to read  
> a README and gem install hoe.

+1 . To make it even easier, why not have a “foo” gem for users and a  
“foo-dev” gem for developers? Maybe a simple packaging convention is  
good enough.

> - RubyGems – don’t abuse the “run-time dependency” list just to get  
> around the lack of a develop-time one.

+1 . Fix the real problem, don’t break something else trying to paper  
it over.

Regards,

Jeremy H.

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [September 25, 2007, 10:32pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/88 "2007-09-25T22:32:39Z")

</div>

Daniel B. wrote, On 1/11/2007 12:35 PM:

> C:\gem install something
> 
> Install required dependency something? [Yn]  
> Install optional dependency rspec (Test suite only) [Yn]

The problem I see with that is similar to removing programs in Windows.  
Often, it says something to the effect of “it appears no programs are  
using the xxxxxx.dll file. Do you want to remove that too?” Well, how  
would I know? I don’t know what it does. I think any optional  
dependencies would need a good description of what it is and why you  
would want it. Something better than a small phrase, anyway.

-Sam

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [September 25, 2007, 10:35pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/89 "2007-09-25T22:35:44Z")

</div>

> > Default: no prompt, no install  
> > -Y: no prompt, install  
> > –optional-dependencies: prompt
> 
> A way to install the optional dependencies for an already-installed  
> gem would be great, too. I’m not thinking of a great syntax off the  
> top of my head, though.

–only-dependencies

?

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [September 25, 2007, 10:35pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/90 "2007-09-25T22:35:44Z")

</div>

On Jan 9, 2007, at 9:55 AM, Bil K. wrote:

> Pit C. wrote:
> 
> > Chad, why does tattle depend on the hoe and rubyforge gems?
> 
> Or alternatively, why isn’t hoe and rubyforge /in/ rubygems?

Good question!

Chad? 😛

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [September 25, 2007, 10:36pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/91 "2007-09-25T22:36:36Z")

</div>

Chris C. schrieb:

> So if I were to spend this weekend getting optional/developer-time  
> dependencies into RubyGems, would people want optional dependencies to  
> always be prompted, only prompted when a flag is given, or never  
> prompted?

I suggest looking at Debian’s way of doing it. They have “recommends”  
and “suggests” dependencies. (after all, apt is probably the mother of  
dependency management systems, and gem is intellectually based on  
apt-get)

The “aptitude” utility thus has “–with-suggests” and  
“–with-recommends”, as well as “–without-…”.

[http://people.debian.org/~dburrows/aptitude-doc/en/rn01re01.html](http://people.debian.org/~dburrows/aptitude-doc/en/rn01re01.html)

Of course, debian also has “build-dependencies” which aren’t installed  
with “apt-get install”, but “apt-get build-dep”. So a fusion of these  
two concepts should do the trick.

FWIW, I’d much appreciate adding such a notion to gem.

Paulus

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [September 25, 2007, 10:36pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/92 "2007-09-25T22:36:37Z")

</div>

Daniel B. wrote:

> Sammy L. wrote:
> 
> > The problem I see with that is similar to removing programs in Windows.  
> > … I think any optional  
> > dependencies would need a good description of what it is and why you  
> > would want it. Something better than a small phrase, anyway.
> 
> Ok, so we do the same thing for uninstalls:

I think the uninstall thing was just an analogy. I believe he was  
referring to those types of messages being cryptic in general. “Test  
suite only? Why yes, I write unit tests! I guess I have to get rspec,  
too.” Or say you’re installing some logger package… “win32console (for  
color messages)? What if I want some in color and some not?”

Meh, those are bad examples. For that matter, I’m not positive a good  
example exists. Meh, whatever. I _do_ remember that a Gentoo USE  
variable of (say) +SSL meant many, many, many different things depending  
on what you were installing, but that’s neither here nor there.

Devin

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [September 25, 2007, 10:37pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/93 "2007-09-25T22:37:46Z")

</div>

FWIW, my solution involves adding a couple of lines:

remote\_installer:548  
next if ‘hoe’ == dependency.name  
installer.rb:120  
return true if dependency.name == ‘hoe’

Works flawlessly for me.

And for the record, I’ve always found loop { `gem install snow; gem uninstall snow` } to be the best way to inflate my download counts.

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [September 25, 2007, 10:37pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/94 "2007-09-25T22:37:54Z")

</div>

M. Edward (Ed) Borasky wrote:

> Yes, it’s a great idea … but … you are going to get _very_ biased  
> statistics, because many Ruby users will be prohibited, either  
> electronically or by organizational policy, from uploading such  
> information.

Our place is medium-paranoid, and after doing a “tattle report”,  
I was comfortable doing a “tattle”. So far, our IT Security folks  
haven’t rained down upon me like the CDA in Monsters Inc.

Regards,

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [September 25, 2007, 10:38pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/95 "2007-09-25T22:38:07Z")

</div>

Sammy L. wrote:

> > 
> 
> dependencies would need a good description of what it is and why you  
> would want it. Something better than a small phrase, anyway.

Ok, so we do the same thing for uninstalls:

C:\gem uninstall rspec

something-0.1.0 has an optional dependency on [rspec (\>= 0.5.0)] (Test  
suite only)  
Continue with Uninstall? [Yn]

We could also include the optional dependency’s description at this  
point.

Regards,

Dan

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [September 25, 2007, 10:38pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/96 "2007-09-25T22:38:03Z")

</div>

On Jan 8, 2007, at 10:25 PM, Bil K. wrote:

> So far, our IT Security folks  
> haven’t rained down upon me like the CDA in Monsters Inc.

I love that movie.

James Edward G. II

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [September 25, 2007, 10:38pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/97 "2007-09-25T22:38:25Z")

</div>

On 1/12/07, Jeremy McAnally [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> But the question is would the hoe developers use this? They seem  
> fairly stuck on this whole idempotentence kick.

I’m pretty sure that one of the messages in the last ~90 or so  
indicated that were optional dependencies available, hoe would use it.

It wouldn’t help for anyone who already has hoe-generated gems, of  
course.

You may not realize it, but you want idempotence, too. One of the  
things that can be done with an idempotent gem is that you can  
validate a gem on a development server, and then you can repackage and  
redeploy that gem on a production server without redownloading it from  
the original site.

There’s still some work to be done on RubyGems to make this truly  
possible without hacks (local installs don’t really handle  
dependencies well, plus a few other things), but without idempotence,  
you’re not guaranteed to have everything you need to do that.

-austin

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [September 25, 2007, 10:38pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/98 "2007-09-25T22:38:15Z")

</div>

But the question is would the hoe developers use this? They seem  
fairly stuck on this whole idempotentence kick.

–Jeremy

On 1/11/07, Gregory B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Gem#add\_optional(gem, comment, \*requirements)
> 
> Dan, Excellent approach. I’d love to see this.

–  
My free Ruby e-book:  
[http://www.humblelittlerubybook.com/book/](http://www.humblelittlerubybook.com/book/)

My blogs:

> **[Site not found · DreamHost](http://www.mrneighborly.com/)**
>
> The owner of this domain has not yet uploaded their website.

[http://www.rubyinpractice.com/](http://www.rubyinpractice.com/)

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [September 25, 2007, 10:39pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/99 "2007-09-25T22:39:40Z")

</div>

On 1/12/07, Gregory S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Default: no prompt, no install  
> -Y: no prompt, install  
> –optional-dependencies: prompt

+1

but also, maybe --all-dependencies and --require-dependencies-only or  
something as well.  
(to aid scripting / aliases)

---

<div class="post-metadata">

**Author:** ![Chad\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@Chad\_F](https://www.ruby-forum.com/u/Chad_F)\
**Post date:** [September 25, 2007, 10:41pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/100 "2007-09-25T22:41:40Z")

</div>

On Jan 9, 2007, at 09:47, Chad F. wrote:

> Seriously, worth a chat on rubygems-developers, I think.  
> Hoe hasn’t finished evolving yet. At present a new Hoe feature can  
> be released less than ten minutes from commit time. With RubyGems  
> that takes a month (so far).

Another way to look at it is:

Ten releases of Hoe in three months.

One release of RubyGems in eighteen months.

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)

I LIT YOUR GEM ON FIRE!

[Previous page](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407.md?page=4)

[Next page](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407.md?page=6)
