[Ruby] hoe and Manifest.txt
Ryan Davis
ryand-ruby at zenspider.com
Sat Oct 28 13:29:59 PDT 2006
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.
> 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?
> 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.
More information about the Ruby
mailing list