Da: Eric H. [mailto:[email protected]]
Inviato: venerd 11 novembre 2011 01:56
A: ruby-talk ML
Oggetto: Re: Dividing a gem into 2 or 3 gems
On Nov 10, 2011, at 1:31 AM, Rahul K. wrote:
I have a gem that has been growing for a while (e.g. mygem). There’s a
lot of experimental stuff being added. So I’d like to have a
mygem-core which has the basic stuff that should be stable and fairly
frozen. Then i can quickly respond with a fix, rather than wait for
the other changes to stabilize.
I prefer to:
- Keep the original gem name
- Make a plugin system and move the fast-moving parts into plugins.
core gem should automatically load plugin gems.
The other stuff can go into mygem-extra or mygem-utils and
mygem-experimental. Some of it may move from “experimental” to “util”
or “extra” as the API stabilizes.
Give each experiment a reasonable name and release them as separate
especially if you’re not interested in maintaining or exploring them
forever. This allows you to hand them off to more-interested
abandon them without breaking API.
I am not clear what the best way is. Do i keep the original gem name
and make it implicitly the “core” removing all other stuff from it. Or
should i create new gems for these 3 or 4, meaning that the original
(name) will no longer exist.
Should i keep it in one git repo within the same directory structure
(meaning multiple gemspec files). Or divide/clone it into separate
github repos. However, I am hoping that even across these gems the
root directory will still be my gem.
Use separate repositories for separate gems. You can create an
for your repositories on github.
Will dividing the gem lead to other problems ?
Splitting up a gem won’t lead to other problems by itself.
To save yourself a possible hassle, avoid having = dependencies between
pieces. An = dependency forces you to release at least two gems at once
you want both pieces to be using the latest code. Instead use ~> to
a version range that is acceptable.
Use a good tool like Hoe to manage the releases of your many gems. A
tool makes releasing easy, so an update that affects three of your gems
not be tedious and should take only a few minutes, not an hour or more.
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu’ IMAP, POP3 e
SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
Capodanno a Riccione, Pacchetto Relax: Mezza Pensione + bagno turco +
solarium + massaggio. Wifi e parcheggio gratis. 2 giorni euro 199 a
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid979&d)-12