[ANN] Tattle - The Ruby Census

C

Chad Fowler

This is a great idea.

Are there plans to allow submission of a semi-anonymous collection of
internal census data from potentially thousands of internally managed
clients? Perhaps some way to submit to you directly a data file
containing a summation of the data submitted individually to tattle.

We've talked about that. Wouldn't be too hard. Just need to do it.

Chad
 
E

Eric Hodel

I think that's a fair question.

I'm not answering it, but it's a good question. ;)

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.
 
E

Eric Hodel

I think the question is "why is this neat tool useful only to the
gem's
developer required to install the gem on end-user systems?"

So... why is that?

rake test

PS: Nobody complains about hoe depending on rake which is 2.5 times
larger.
 
B

Ben Bleything

rake test

Makes sense, didn't think about that. Still, though, gem install -t
does the same thing and doesn't require dependencies.
PS: Nobody complains about hoe depending on rake which is 2.5 times
larger.

Rake is useful for more than just gem deployment.

I shouldn't need to install the rubyforge gem to install someone else's
library, but if they packaged it with hoe, I'm forced to. This doesn't
make sense.

I'm all for both of them being folded into gem, though. If they were
already there, nobody would have anything to complain about ;)

Ben
 
E

Eric Hodel

Makes sense, didn't think about that. Still, though, gem install -t
does the same thing and doesn't require dependencies.

This is not guaranteed to work. Currently gems is very lax in its
installation and doesn't rollback when you cancel on a dependency.
In the future it may not.
Rake is useful for more than just gem deployment.

Only if you are also developing. If you're just using libraries, it
is useless.
I shouldn't need to install the rubyforge gem to install someone
else's
library, but if they packaged it with hoe, I'm forced to. This
doesn't
make sense.

Same for rake, but nobody complains.
 
B

Ben Bleything

This is not guaranteed to work. Currently gems is very lax in its
installation and doesn't rollback when you cancel on a dependency. In
the future it may not.

Interesting, didn't know that. It's always worked where I've used it.
Only if you are also developing. If you're just using libraries, it
is useless.

Not true. I need rake to work with Rails, even though I'm not doing any
development on the Rails libraries. If it were packaged with Hoe, I'd
need to install hoe, but I'd never actually use the Hoe libraries again.
Same for rake, but nobody complains.

Not true at all:

commercial ~/projects/personal/plist > rake gem
(in /Users/bbleything/projects/personal/plist)
mkdir -p pkg
Successfully built RubyGem
Name: plist
Version: 3.0.0
File: plist-3.0.0.gem
mv plist-3.0.0.gem pkg/plist-3.0.0.gem

commercial ~/projects/personal/plist > sudo gem uninstall rake
You have requested to uninstall the gem:
rake-0.7.1
hoe-1.1.6 depends on [rake (> 0.0.0)]
gem_plugin-0.2.1 depends on [rake (>= 0.7)]
rails-1.1.6 depends on [rake (>= 0.7.1)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn] y
Successfully uninstalled rake version 0.7.1
Remove executables and scripts for
'rake' in addition to the gem? [Yn] y
Removing rake

commercial ~...personal/plist/pkg > cd pkg
commercial ~...personal/plist/pkg > ls
plist-3.0.0.gem

commercial ~...personal/plist/pkg > sudo gem install plist-3.0.0.gem
Successfully installed plist, version 3.0.0
Installing ri documentation for plist-3.0.0...
Installing RDoc documentation for plist-3.0.0...

Ben
 
R

Ryan Davis

I think the question is "why is this neat tool useful only to the
gem's
developer required to install the gem on end-user systems?"

% du -sk */*hoe*
12 cache/hoe-1.1.7.gem
104 doc/hoe-1.1.7
40 gems/hoe-1.1.7
4 specifications/hoe-1.1.7.gemspec

In other words, who cares?!?

It sounds like you're complaining simply because it offends your
sensibilities. If you have a problem with the way gems does
dependencies, then file a bug with rubygems and/or offer them a well
tested patch. Otherwise, drop it as it doesn't matter one bit.
 
D

Devin Mullins

Ryan said:
% du -sk */*hoe*
12 cache/hoe-1.1.7.gem
104 doc/hoe-1.1.7
40 gems/hoe-1.1.7
4 specifications/hoe-1.1.7.gemspec

In other words, who cares?!?

It sounds like you're complaining simply because it offends your
sensibilities. If you have a problem with the way gems does
dependencies, then file a bug with rubygems and/or offer them a well
tested patch. Otherwise, drop it as it doesn't matter one bit.

Maybe instead of complaining for a paragraph about this guy's behavior,
you could answer his question (in case you've forgotten: "Why?"), as
Eric demonstrated.
 
B

Ben Bleything

On Wed, Jan 10, 2007, Ryan Davis wrote:

In other words, who cares?!?

At least one other person than me, apparently, since I didn't ask this
question originally.
It sounds like you're complaining simply because it offends your
sensibilities. If you have a problem with the way gems does
dependencies, then file a bug with rubygems and/or offer them a well
tested patch. Otherwise, drop it as it doesn't matter one bit.

I'm not really complaining, just asking. And nobody has answered my
question yet.

It's not a problem with the way gem handles dependencies. It's a
problem with hoe injecting itself as a dependency on any gem it creates.
And it's not really a problem, I just want to know why. You're acting
like I'm insulting your sister, but I'm really just asking a question.

Ben
 
J

Jeremy McAnally

I found this strange, too. I love hoe, I'm just puzzled as to why
it's required by the gems it creates.

Not a dealbreaker; just a curiousity. :)

--Jeremy

On Wed, Jan 10, 2007, Ryan Davis wrote:



At least one other person than me, apparently, since I didn't ask this
question originally.


I'm not really complaining, just asking. And nobody has answered my
question yet.

It's not a problem with the way gem handles dependencies. It's a
problem with hoe injecting itself as a dependency on any gem it creates.
And it's not really a problem, I just want to know why. You're acting
like I'm insulting your sister, but I'm really just asking a question.

Ben


--
My free Ruby e-book:
http://www.humblelittlerubybook.com/book/

My blogs:
http://www.mrneighborly.com/
http://www.rubyinpractice.com/
 
R

Ryan Davis

It's not a problem with the way gem handles dependencies. It's a
problem with hoe injecting itself as a dependency on any gem it
creates.
And it's not really a problem, I just want to know why.

No, hoe is acting absolutely properly when it injects itself into the
dependency list. Any gem should FULLY list all of its dependencies it
requires to work (defined broadly by rubygems but could be summarized
as "something mentioned by 'require'"). That would include rake if
you have a Rakefile. Since a Rakefile is just software (a
specification for automated behavior), it too can have dependencies.
Since hoe projects are just rakefiles that use hoe, it has a
dependency on hoe... Without hoe as a dependency, the software
packaged in a hoe-based gem doesn't work 100%. But... you're a smart
guy. You knew that.
 
E

Evan Weaver

Ryan said:
No, hoe is acting absolutely properly when it injects itself into the
dependency list. Any gem should FULLY list all of its dependencies it
requires to work (defined broadly by rubygems but could be summarized
as "something mentioned by 'require'").

There is a difference of opinion here. Ryan thinks dependencies should
include meta-dependencies. Many people, though, do not. The question has
come up before:

http://rubyforge.org/tracker/index.php?func=detail&aid=5993&group_id=1513&atid=5921
http://rubyforge.org/tracker/index.php?func=detail&aid=7118&group_id=1513&atid=5922

I agree with those who want to avoid installing meta-dependencies on
production servers. So, here is Echoe, a Hoe 1.1.6 fork.

sudo gem install echoe

http://rubyforge.org/frs/?group_id=2835

To use Echoe properly in a Rakefile, load it conditionally, like so:

require 'rubygems'
require 'rake'
begin
require 'echoe'
# all your regular Echoe config
rescue LoadError => boom
puts "You are missing a dependency required for meta-operations on
this gem."
puts "#{boom.to_s.capitalize}."
desc 'No effect.'
task :default; end
# if you still want tests when Echoe is not present
desc 'Run the test suite.'
task :test do
system "ruby -Ibin:lib:test some_tests_test.rb" # or whatever
end
end

Personally, I hate Echoe. There is no reason to fork. But I think that
there is a need here, and if the Hoe developers refuse to acknowledge
it, we have no choice.

Evan Weaver

PS. Ryan, I submitted a patch against Rubyforge 0.4.0 for some stuff.
http://rubyforge.org/tracker/index.php?func=detail&aid=7727&group_id=1024&atid=4027
 
P

Pit Capitain

Ryan said:
Uh... because hoe is the single most awesome thing for ruby project
development in the last 6 years? It is used in 5% of all rubygems.
Get over it.

Plus this answer to Ben:
It sounds like you're complaining simply because it offends your
sensibilities. If you have a problem with the way gems does
dependencies, then file a bug with rubygems and/or offer them a well
tested patch. Otherwise, drop it as it doesn't matter one bit.
And:

... Without hoe as a dependency, the software packaged in a hoe-based
gem doesn't work 100%. But... you're a smart guy. You knew that.

Ho, ho, ho, calm down, Ryan, I didn't want to step on your toes or your
"most awesome" project.

I haven't used hoe yet. From the little I remember of the announcements,
it looked to me like a tool for the gem developer, not for the gem user.
That's why I asked the question, just out of interest. Why did you think
I was complaining? All I needed was a little "gem uninstall hoe" after
running tattle. This is a small price to pay compared to all the work
the rubygems people are doing. No problem for me.

After all the posts in this thread I still haven't got a clear answer to
my original question yet. (So much for the signal to noise ratio.)

Eric wrote that hoe is necessary to be able to say "rake test", and that
"gem install -t" doesn't work reliably. (BTW: I'm sure you've given him
the same advice you gave Ben, namely to file a bug with rubygems, didn't
you?) I'm not sure where I, as a tattle user, should execute "rake
test", but I assume it is in the installation directory of the tattle
gem. But in this directory I can also simply enter "testrb test" to run
all the tattle tests. So it seems hoe is of not much use in this case.

You wrote that a gem developed with hoe needs hoe at runtime to work
100%. I did a little test:

gem install tattle (plus hoe, plus rubyforge)
remove the hoe dependency from the tattle gemspec
gem uninstall hoe
gem uninstall rubyforge
run tattle unit tests (with "testrb test")
run tattle report
run tattle

It seems all is working well, even without hoe. So I'm still curious
what services hoe offers to gems at runtime.
... Without hoe as a dependency, the software packaged in a hoe-based
gem doesn't work 100%. But... you're a smart guy. You knew that.

Seems I'm not. I'm still not knowing it.

Regards,
Pit
 
J

James Edward Gray II

Any gem should FULLY list all of its dependencies it requires to
work (defined broadly by rubygems but could be summarized as
"something mentioned by 'require'"). That would include rake if you
have a Rakefile.

I don't agree with that.

FasterCSV, for example, has a Rakefile. It makes my life as a
developer easier. I can run tests easier, create releases easier,
etc. It has absolutely nothing to do with running FasterCSV. Rake
is not needed for that, so I think adding it as a dependency is wrong.

If you want to play with FasterCSV's source, you have two options.
First, you can make sure rake is installed and use all the easy
shortcuts I do. Or, you can do things the slightly longer way. I
even document this. Here's an excerpt from the FasterCSV documentation:

== Running the Tests

If you would like to run FasterCSV's test suite on your system before
installing and you have Rake installed, just issue the following
command from the root of the project directory:

$ rake

If you do not have rake, use the following command instead:

$ ruby -I lib:test test/ts_all.rb

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Remember, rake and hoe just automate some commands that can always be
issued manually.

Thinking about it another way, how many precompiled extensions, for
Windows let's say, include a Makefile? What the heck do you need
that for and how likely is make to be installed?

James Edward Gray II
 
A

Austin Ziegler

I don't agree with that.

I didn't used to. Now, as I get back into Ruby development, I will be
ensuring that the Rakefiles that I use to deploy software are also
included with my gems because of idempotency. Mauricio convinced me of
the value of that.

What we *need* to resolve this is recommended dependencies; currently,
RubyGems dependencies are mandatory if present. Hoe should be a
recommended, but not mandatory, dependency.

-austin
 
J

James Edward Gray II

I didn't used to. Now, as I get back into Ruby development, I will be
ensuring that the Rakefiles that I use to deploy software are also
included with my gems because of idempotency.

My Rakefile is included. I just don't make rake a dependency.
What we *need* to resolve this is recommended dependencies; currently,
RubyGems dependencies are mandatory if present. Hoe should be a
recommended, but not mandatory, dependency.

That makes sense to me.

James Edward Gray II
 
M

M. Edward (Ed) Borasky

Austin said:
I didn't used to. Now, as I get back into Ruby development, I will be
ensuring that the Rakefiles that I use to deploy software are also
included with my gems because of idempotency. Mauricio convinced me of
the value of that.

What we *need* to resolve this is recommended dependencies; currently,
RubyGems dependencies are mandatory if present. Hoe should be a
recommended, but not mandatory, dependency.

-austin
I find "recommended dependencies" a pain in the behind, as well as being
an oxymoron. If I install a package, I want to know I'm getting what's
*required* and *only* what's required. Remember the YAGNI principle --
You Ain't Gonna Need It!

I work with three package management systems -- RubyGems, Gentoo's
Portage and the R language package management system. R automatically
installs recommended packages, and I end up having to uninstall them in
some cases. And yet R does *not* tell me when I don't have an underlying
*Linux* dependency missing! The way I find that out is by looking at the
log files from a failed install, usually in the configure step. :(
 
J

James Edward Gray II

I find "recommended dependencies" a pain in the behind, as well as
being an oxymoron.

I think there is a very real need for them. With HighLine, we would
love the make termios a dependency, because our libraries
functionality is so much better on Unix with it. Unfortunately we
can't, since it breaks the install process on Windows. A recommended
dependency could help us with this.

James Edward Gray II
 
D

Devin Mullins

Pit said:
Seems I'm not. I'm still not knowing it.

He was applying that cleverist of humor devices known as sarcasm. He was
insulting you. See, by typing "you're a smart guy" after typing an
explanation he considered to be unnecessary, that's his was of saying
that you're not a smart guy. Oh, Ryan, you scoundrel!

Devin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top