[Ruby] hoe and Manifest.txt
Aaron Patterson
aaron_patterson at speakeasy.net
Sat Oct 28 14:31:08 PDT 2006
On Sat, Oct 28, 2006 at 01:29:59PM -0700, Ryan Davis wrote:
>
> On Oct 28, 2006, at 12:25 PM, Aaron Patterson wrote:
>
> > Hi,
> >
> > I've started converting all of my projects to Hoe, but the
> > Manifest.txt
> > file kind of bugs me. I don't want to update it every time I add a
> > file
> > to my package. Does anyone see anything wrong with programmatically
> > determining which files should be released?
>
> Yes, I see something terribly horribly wrong with programmatically
> determining which files should be released. To start, use the
> dictionary:
>
> manifest 2 |ˌmønəˈfɛst| |ˌmanɪfɛst|
> noun
> a document giving comprehensive details of a ship and its cargo and
> other contents, passengers, and crew for the use of customs officers.
> • a list of passengers or cargo in an aircraft.
> • a list of the cars forming a freight train.
>
> In other words, a list of contents used to verify what should and
> should not be on board. Among other things, this makes it easy to
> verify that an individual is or is not a stowaway and should or
> should not be on the ship. This is a Good Thing and really must have
> human eyeballs on it to verify that the contents are correct.
>
> Releasing software is the real deal. Just like ships and planes,
> there are checklists that you must go through to ensure you have a
> quality release. For me that involves: verifying everything is under
> perforce/svn and is fully checked in, all tests pass, version number
> is updated, history file documents changes, manifest is up to date,
> gem works / installs locally, and files are branched into version
> branch. At that stage, I get to release. That is another checklist:
> package, upload, announce.
>
> Hoe addresses: manifests, gems, versions (sorta), packaging,
> uploading, announcing. It doesn't address anything to do with your
> version control system (it is a one trick pony on purpose).
> Eventually it'll cover pretty much everything but the branching bit.
>
> > For example, when I create a new Hoe object I could do this:
> > Hoe.new("blah", "1.0.0") do |p|
> > ...
> > p.files = (Dir.glob("{bin,lib,doc}/**/*").delete_if {|item|
> > item.include?(".svn") } << Dir.glob("*.txt")).flatten
> > ...
> > end
>
> If you think about this for a bit I bet you can come up with any
> number of problems with this code. How many different types of files
> will it let through that it shouldn't? For me, I can see that it
> already adds all my editor's backup files, patch files/diffs, and
> misses my Rakefile, history file, readme, and much more.
Yes. This code doesn't work for you. You can change it. You'll also
notice that my patch lets you use Manifest.txt if you don't want to use
that code. I can screw up whether it is in my Manifest.txt or the code
to determine the files to be released.
>
> > Then I don't need to remember to update Manifest.txt. Below is my
> > patch
> > that gives hoe this functionality.
>
> Do you have the same complaints about your source revision control
> system? Does adding a file to that cause you pain/annoyance? If so,
> why? If not, how is this different?
No, my version control system does not cause this pain. What made you
think it did? Is Hoe a version control system?
>
> > Index: lib/hoe.rb
>
> [not gonna happen]
>
> P.S. You're not alone. This is the second time I've addressed this
> concern in a week.
> P.P.S. As a result, this'll probably be rewritten into a blog post.
All that said, I don't mind using Manifest.txt. I was just curious
about it, and that is why I sent this email.
--
Aaron Patterson
http://tenderlovemaking.com/
More information about the Ruby
mailing list