I realize the answer is probably "no", but might Mechanize be available as a
simple tar.gz in addition to being available as a gem?
Thanks,
Kirk Haines
I realize the answer is probably "no", but might Mechanize be available as a
simple tar.gz in addition to being available as a gem?
Thanks,
Kirk Haines
Kirk Haines wrote:
I realize the answer is probably "no", but might Mechanize be available as a simple tar.gz in addition to being available as a gem?
Done! BTW, would be nice if there were a utility that would make a tar.gz out of the gem, or if "gem" could also create a tar.gz.
Regards,
Michael
Rant can do something similar, you embed the gemspec in an Rantfile
and it can create gem/tar.gz/zip packages from it.
http://make.rubyforge.org/files/doc/rubyproject_rdoc.html
Rake can also create a tar.gz, but only if your system has the "tar"
program.
Kind regards,
Stefan
On Saturday 30 July 2005 14:10, Michael Neumann wrote:
Kirk Haines wrote:
> I realize the answer is probably "no", but might Mechanize be
> available as a simple tar.gz in addition to being available as a
> gem?Done! BTW, would be nice if there were a utility that would make a
tar.gz out of the gem, or if "gem" could also create a tar.gz.
You can easily create a .tar.gz from the RubyGems package
mkdir whatever-0.0.1 && cd whatever-0.0.1
tar xvf ../whatever.gem
tar zxf data.tar.gz
rm metadata.gz data.tar.gz
cd ..
tar zcf whatever-0.0.1.tar.gz whatever-0.0.1/
I've taken a look at your package, and it seems that the resulting
tarball would be OK, except for the lack of an installer (just adding
setup.rb should do in this case), and the loss of ctime & related
information, if you care about that.
This approach won't work in general though: it will often result in
an unsatisfactory tarball: one that can only be used when RubyGems is
installed, if it is installed using RubyGems' "1 dir = 1 lib" approach;
i.o.w. if you essentially keep using RubyGems but just bypass its unpack
phase. The reason is that source compatibility is often lost when
packaging with RubyGems, due to problems including:
* require_gem dependencies
* auto_require-related assumptions
* lack of DATADIR support in RubyGems
This means that it is often necessary to keep two lines of development,
"traditional" (using for instance setup.rb, compatible with existent systems)
and "RubyGems-dependent", or to code carefully to make sure the library/app
works in both environments. This is understandably a PITA, so more and more
libraries are released exclusively through RubyGems. But you can try to
prevent these issues by:
* removing obvious RubyGems dependencies (e.g. require 'rubygems')
* avoiding unqualified require_gem 'xxx' (you only want require_gem when a
specific version is needed, and if you do use it you'll have to code
very carefully to make sure it still works without RubyGems)
* not using auto_require (you can get the same functionality in a
backwards-compatible way)
* avoiding RubyGems-specific path assumptions such as in
File.open(File.join(File.dirname(__FILE__), "../data/foo.xpm"))
On Sat, Jul 30, 2005 at 09:10:57PM +0900, Michael Neumann wrote:
Kirk Haines wrote:
>I realize the answer is probably "no", but might Mechanize be available as
>a simple tar.gz in addition to being available as a gem?Done! BTW, would be nice if there were a utility that would make a
tar.gz out of the gem, or if "gem" could also create a tar.gz.
--
Mauricio Fernandez