# 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:** 4

<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 10, 2007, 10:25pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/61 "2007-01-10T22:25:35Z")

</div>

On 1/10/07, James Edward G. II [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > like to `gem install` any of them?"  
> > \</naïve\>  
> > That’s an interesting idea. Does gems support post-install scripts?

Only by pretending to be an extension that cheats and uses a  
makefile/rakefile to build. I would prefer not to have gems execute  
arbitrary code on installation.

-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 10, 2007, 10:35pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/62 "2007-01-10T22:35:36Z")

</div>

On Jan 10, 2007, at 13:31, Austin Z. wrote:

> > do so.
> 
> Again, this is a Gem problem, not a tattle, hoe, or rubyforge problem.  
> The correct solution is to increase the amount of metadata that gems  
> keep and provide hoe with a way of indicating that it is an  
> idempotency dependency, not a run-time dependency. hoe-generated gems  
> are absolutely correct, IMO, in indicating that they depend on hoe for  
> idempotency. Gems is not correct in not providing this.

Exactly.

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

I LIT YOUR GEM ON FIRE!

---

<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 10, 2007, 10:32pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/63 "2007-01-10T22:32:36Z")

</div>

On 1/10/07, Evan W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Eric H. wrote:
> 
> > By “build” I mean work on, not compile. ZenTest is a build-time  
> > dependency for some of my gems because I use its assertion library  
> > when I’m building (adding features to or fixing bugs in) that gem.  
> > You do not mean what I mean when you say “build-time”. I think it is  
> > good for a gem to include everything necessary to modify and redeploy  
> > it. I do not think that should extend as far as forcing the user to  
> > install external packages that they would only need if they decided to  
> > do so.

Again, this is a Gem problem, not a tattle, hoe, or rubyforge problem.  
The correct solution is to increase the amount of metadata that gems  
keep and provide hoe with a way of indicating that it is an  
idempotency dependency, not a run-time dependency. hoe-generated gems  
are absolutely correct, IMO, in indicating that they depend on hoe for  
idempotency. Gems is not correct in not providing this.

-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 10, 2007, 10:46pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/64 "2007-01-10T22:46:38Z")

</div>

On 1/10/07, Austin Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> idempotency.  
> Austin-

Thank you - that explains a lot. I did not understand (nor could I  
find documented) that idempotency was a design goal of hoe.

I think the discussion came about because some administrators would  
consider that a mis-feature for production deployment, and hence the  
hoe dependency was unexpected. This may also explain why there has not  
been a clamor for idempotency meta-data in RubyGems; it’s not a  
well-explored or popular use case.

Perhaps a future enhancement to hoe would allow for deploy-only  
(non-idempotent) gemspec construction.

-Alex

---

<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 10, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/65 "2007-01-10T22:42:37Z")

</div>

Eric H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> Directing complaints at Hoe is the wrong target. Directing feature  
> requests and/or patches at RubyGems is the right target.

In the mean time, you can circumvent this for your own gems like this:

begin  
require ‘hoe’  
rescue LoadError  
# replacement tasks, if any  
else  
hoe = Hoe.new(…) do |p|  
p.extra\_deps = [] # or only your deps.  
end  
end

I request to keep this behavior, intentional or not.

---

<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 10, 2007, 10:58pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/66 "2007-01-10T22:58:40Z")

</div>

Christian N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> ```
> # replacement tasks, if any
> 
> ```
> 
> else  
> hoe = Hoe.new(…) do |p|  
> p.extra\_deps = [] # or only your deps.  
> end  
> end
> 
> I request to keep this behavior, intentional or not.

Too bad. For hoe 1.1.7, use:

begin  
require ‘hoe’  
rescue LoadError  
# replacement tasks, if any  
else  
hoe = Hoe.new(…) do |p|  
p.extra\_deps = [] # or only your deps.  
end  
hoe.spec.dependencies.delete\_if { |dep| dep.name == “hoe” }  
end

Or really use Echoe.

---

<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 10, 2007, 10:54pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/67 "2007-01-10T22:54:39Z")

</div>

Austin Z. wrote:

> On 1/10/07, Evan W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Eric H. wrote:
> > 
> > > By “build” I mean work on, not compile. ZenTest is a build-time  
> > > dependency for some of my gems because I use its assertion library  
> > > when I’m building (adding features to or fixing bugs in) that gem.  
> > > You do not mean what I mean when you say “build-time”. I think it is  
> > > good for a gem to include everything necessary to modify and redeploy  
> > > it. I do not think that should extend as far as forcing the user to  
> > > install external packages that they would only need if they decided to  
> > > do so.
> 
> Again, this is a Gem problem, not a tattle, hoe, or rubyforge problem.  
> The correct solution is to increase the amount of metadata that gems  
> keep and provide hoe with a way of indicating that it is an  
> idempotency dependency, not a run-time dependency. hoe-generated gems  
> are absolutely correct, IMO, in indicating that they depend on hoe for  
> idempotency. Gems is not correct in not providing this.
> 
> -austin

This most definitely seems to be the minority opinion. The majority  
sees this as a strange unexpected behavior of hoe.

---

<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 10, 2007, 11:01pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/68 "2007-01-10T23:01:40Z")

</div>

“Austin Z.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> Again, this is a Gem problem, not a tattle, hoe, or rubyforge problem.

It is easy to write a rakefile that downgrades itself. Possible gem  
hackers will have hoe installed anyway, there is no need to declare  
this dependency.

No dependency is still the best solution.

---

<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 10, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/69 "2007-01-10T23:06:43Z")

</div>

On Jan 10, 2007, at 4:00 PM, Christian N. wrote:

> No dependency is still the best solution.

I agree, even after reading everything that has been said.

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:** [January 11, 2007, 12:05am UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/70 "2007-01-11T00:05:54Z")

</div>

On Jan 10, 2007, at 4:28 PM, Austin Z. wrote:

> Eric means run-time dependencies and idempotency dependencies. Hoe is  
> required so that someone could take an existing installed gem and  
> package or repackage it just like the original author does. That’s  
> idempotency.

Don’t worry Eric. It happens to everyone once in a while… _pat’s back_

---

<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, 1:07am UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/71 "2007-01-11T01:07:00Z")

</div>

On 1/10/07, Nathaniel T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> FYI, I originally stripped the hoe dependency from cooloptions, and

My gems do not have the Rakefile included, nor do they depend on Hoe /  
RubyForge gems even though I use them and think they are great. Tests  
I keep because they can be run from the gem, and it’s a nice check if  
something goes awry.

When we build and deploy our C++ applications here at work, we do not  
distribute the Makefiles or any of our supporting scripts. Same  
analogy applies to the Rakefiles and supporting gems.

That being said, it really does not matter one way or the other what  
you put in your gem. Unless your gem is full of crap, and then people  
won’t download it. Hoe and RubyForge are “not crap” ™. It’s just  
surprising to some people when they are required.

My rule of thumb is to remove as much as possible from the gem and  
still have it work.

Blessings,  
TwP

---

<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, 12:15am UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/72 "2007-01-11T00:15:57Z")

</div>

On 1/10/07, Christian N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> It is easy to write a rakefile that downgrades itself. Possible gem  
> hackers will have hoe installed anyway, there is no need to declare  
> this dependency.

Yes, but in order for the Rakefile to do _anything_, rake would have  
to be installed, which it wouldn’t necessarily be unless Hoe is a  
dependency.

FYI, I originally stripped the hoe dependency from cooloptions, and  
have since added it back after further consideration. I’d love to have  
development dependencies separated out from runtime dependencies, but  
until then, the hoe stays in.

A thought: if code that’s not used at runtime is such an issue,  
shouldn’t we be stripping tests, Rakefiles and the like from our  
libraries before gem’ing them? I don’t see the difference between  
those files and the hoe dependency.

Just my $0.02,

–  
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 11, 2007, 1:17am UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/73 "2007-01-11T01:17:08Z")

</div>

On 1/10/07, Tim P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > FYI, I originally stripped the hoe dependency from cooloptions, and  
> > I keep because they can be run from the gem, and it’s a nice check if  
> > something goes awry.

> When we build and deploy our C++ applications here at work, we do not  
> distribute the Makefiles or any of our supporting scripts. Same  
> analogy applies to the Rakefiles and supporting gems.

If your C++ application is distributed as source for others to build,  
you do. Conisder it this way: if having full idempotency makes it that  
much easier for repackagers to consider using something that is  
(otherwise) only available as a gem, is it a bad thing?

And yes, I know my opinion on downstream repackagers; by and large, it  
hasn’t changed.

-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 11, 2007, 3:55am UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/74 "2007-01-11T03:55:29Z")

</div>

Evan W. wrote:

> 

IMHO it’s about YAGNI.

–  
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)  
[http://borasky-research.blogspot.com/](http://borasky-research.blogspot.com/)

If God had meant for carrots to be eaten cooked, He would have given  
rabbits fire.

---

<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, 9:14am UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/75 "2007-01-11T09:14:53Z")

</div>

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

> A thought: if code that’s not used at runtime is such an issue,  
> shouldn’t we be stripping tests, Rakefiles and the like from our  
> libraries before gem’ing them? I don’t see the difference between  
> those files and the hoe dependency.

No, you should ship them, but _document_ rather than hard-enforce the  
dependency on make. Likewise, packages that ship with both source and  
a precompiled binary in the tarball don’t insist that you have gcc  
installed before you can install them.

martin

---

<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, 12:08pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/76 "2007-01-11T12:08:50Z")

</div>

On Thu, 2007-01-11 at 17:07 +0900, Pit C. wrote:

> So: can any gem developer who consciously includes hoe as a dependency,  
> explain to me what this allows the gem _user_ to do what he couldn’t do  
> otherwise?

Yeah… I don’t quite understand this either. I use Gruff to draw  
pretty charts for my Rails app. Gruff depends on hoe, so if I uninstall  
hoe, my charts stop working. But Gruff isn’t using hoe while it’s  
drawing bar graphs.

Yours,

Tom

---

<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, 9:11am UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/77 "2007-01-11T09:11:53Z")

</div>

Austin Z. schrieb:

> On 1/10/07, Tim P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > When we build and deploy our C++ applications here at work, we do not  
> > distribute the Makefiles or any of our supporting scripts. Same  
> > analogy applies to the Rakefiles and supporting gems.
> 
> If your C++ application is distributed as source for others to build,  
> you do. Conisder it this way: if having full idempotency makes it that  
> much easier for repackagers to consider using something that is  
> (otherwise) only available as a gem, is it a bad thing?

When you ship your application with Makefiles, you sure don’t ship it  
with make and gcc and all the other things that are required to  
_execute_ the Makefile, do you?

The same applies here: I don’t mind if gems are shipped with rakefiles,  
even rakefiles which depend on hoe. But why do you think you need to  
ship everything needed to execute those rakefiles? As I have proved with  
the tattle gem, they absolutely aren’t needed to use tattle.

So: can any gem developer who consciously includes hoe as a dependency,  
explain to me what this allows the gem _user_ to do what he couldn’t do  
otherwise?

Regards,  
Pit

---

<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:06pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/78 "2007-01-11T15:06:51Z")

</div>

“Nathaniel T.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> On 1/10/07, Christian N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > It is easy to write a rakefile that downgrades itself. Possible gem  
> > hackers will have hoe installed anyway, there is no need to declare  
> > this dependency.
> 
> Yes, but in order for the Rakefile to do _anything_, rake would have  
> to be installed, which it wouldn’t necessarily be unless Hoe is a  
> dependency.

Why would I want to run the Rakefile if I don’t have rake?

The Rakefile merely provides convenience for developers. The software  
itself doesn’t need it, and therefore it’s not a real dependency.

---

<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:11pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/79 "2007-01-11T15:11:03Z")

</div>

On 1/10/07, Austin Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > do so.  
> > Austin Z. \* removed\_email\_address@domain.invalid \* [http://www.halostatue.ca/](http://www.halostatue.ca/)  
> > \* removed\_email\_address@domain.invalid \* [You are in a maze of twisty little passages, all alike. // halo • statue](http://www.halostatue.ca/feed/)  
> > \* removed\_email\_address@domain.invalid

The problem is that Gem dependencies currently _are_ run-time  
dependencies,  
and hoe is using them differently. It seems to me that hoe should  
respect  
the current definition and uses of dependencies in Gem, rather than act  
like  
a requested change has already been made. Like it or not, hoe has chosen  
to  
make itself a run-time dependency, because that’s the only kind there is  
right now.

If and when Gems do differentiate between different sorts of  
dependencies,  
then and only then would it be appropriate for hoe to add itself as a  
(non-runtime) dependency.

And going back to an earlier question about whether hoe should be merged  
into Gem itself, I would hope that this would not make it any more  
difficult  
to create and install gems that are intended for an internal corporate  
gem  
server rather than rubyforge.

Thanks,

---

<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, 4:08pm UTC](https://www.ruby-forum.com/t/tattle-the-ruby-census/81407/80 "2007-01-11T16:08:20Z")

</div>

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

> When you ship your application with Makefiles, you sure don’t ship it  
> with make and gcc and all the other things that are required to  
> _execute_ the Makefile, do you?

Well, on Debian at least, gcc, autoconf and the like would be build  
dependencies. But point taken.

> The same applies here: I don’t mind if gems are shipped with rakefiles,  
> even rakefiles which depend on hoe. But why do you think you need to  
> ship everything needed to execute those rakefiles? As I have proved with  
> the tattle gem, they absolutely aren’t needed to use tattle.
> 
> So: can any gem developer who consciously includes hoe as a dependency,  
> explain to me what this allows the gem _user_ to do what he couldn’t do  
> otherwise?

I guess for me this comes down to the lack of a “compile-time” in Ruby

- for a typical user, hoe doesn’t do anything. However, as soon as you  
want to start interacting with gems on an automated, programatic (we  
might even say “meta”) level, which I would argue is one “use” of  
them, then it becomes much more important.

Lets say, for instance, that I’m a sysadmin and I want to  
automatically run the unit tests for all installed gems across a bunch  
of machines. 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.

I suppose if you think of gems as a static, compiled representation of  
Ruby code, hoe becomes a big deal. However, I tend to think of a gem  
as more of an object that I can interact with on multiple levels  
rather than a ‘compiled’ library that I’m not supposed to touch after  
install. It’s probably just my Ruby-addled brain - “But it’s _all_  
runtime, I tell you!”

Now, those who think rubygems should’ve been changed to add  
development dependencies _first_ (rather than hoe using the existing  
uncategorized dependencies for the time being) have a point, and  
should probably not use hoe until that happens. But c’mon people -  
it’s a little convenience library, not something anyone is forced in  
any way to use. If you feel that strongly about it, just boycott gems  
that depend on it.

I just figured it out - you’re all really shills for Zed, aren’t you?  
He’s worried about mongrel’s spot in the gem download stats, and he’s  
mobilized you all to ensure that hoe doesn’t bump it off! “King of the  
Internet” indeed! 😉

Ruby on,

–  
Nathaniel T.

\<:((\>\<

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

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