[Rubygems-developers] Gem-Spec Meta Information
Mehr, Assaph (Assaph)
assaph at avaya.com
Mon Jul 26 02:34:31 EDT 2004
Am now working on making app-gems installable as a regular application,
i.e. with start-menu shortcuts, file-type associations etc. This is
somewhat windows specific, but I think you can do similar stuff on
linux. One of the nice things about it is that you can get many things
easily from what's already included with ruby-gems. E.g. an
I plan to tell my users to install ruby (hopefully 1.8.2 will have gems
built-in). Possibly install extensions that aren't gems right now (e.g.
wxRuby) and then install my app. Thereafter they do not need to monkey
with the command line to launch the app, the help file is more visible,
i can bind file-types to my app, etc.
My envisioned course of action is as follows:
* Add some meta information in the gemspec file.
* Have something else (see below) run after the regular gem is
* Have that something else extract the information and a
Gem::Specification object and query it.
I am thinking of adding a generic hash property on the
Gem::Specification called 'meta'. My app-gem-installer will query for
specific keys. Does something like this sound reasonable? :
spec = Gem::Specification.new do |s|
# open .aaa files with my app:
s.meta[AppGemInst::FTYPE] = '.aaa'
# create a start-menu link to the help file:
s.meta[AppGemInst::HELP_FILE] = 'doc/help.html'
# my app distribution server:
s.meta[AppGemInst::UPDATE_SERVER] = 'http://fox.mycompany.com:8808'
I will then need to extract the spec from the .gem file and run
something like: AppGemInst.new(spec).install
(This is also why the post-install script mentioned sounds good.).
Now for the AppGemInst implementation. I see two options, detailed
1. As a ruby script that generates an NSIS script
+ Has GUI
+ Knows how to install stuff on windows
+ Can bundle other stuff (like dependant extensions)
- Windows only
2. Inside ruby-gems.
+ It is part of ruby gems distribution systems.
+ Easily extensible by pluggin-in a platform-installer. Each one will
take only the relevant parts of the info.
- No nice GUI to display license, errors etc.
- No easy way to bundle non-gem extensions.
Email: assaph at avaya.com
Phone: +61-2-9352 9247
Fax: +61-2-9352 9247 Auslabs (Avaya Labs Australia)
Level 3, 123 Epping Rd, North Ryde, NSW 2113
Web: http://www.avaya.com <http://www.avaya.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rubygems-developers