On Thu, 10 Jan 2013 19:11:32 +0000 Adam Spiers <aspiers@suse.com> wrote:
Ladislav Slezak (lslezak@suse.cz) wrote:
Dne 9.1.2013 16:40, Ralf Haferkamp napsal(a):
On Wed, Jan 09, 2013 at 01:37:18PM +0100, Josef Reidinger wrote:
On Wed, 9 Jan 2013 13:25:22 +0100 Ralf Haferkamp <rhafer@suse.de> wrote: [...] Yeah, this is the approach (or at least a similar one) I am currently trying as well. I created a small script that parses the Gemfile an filters out unneeded groups and platforms and generates a new Gemfile from that.
I have a simple rake task for this in Webyast:
https://github.com/webyast/webyast/blob/master/webyast/lib/tasks/gemfile.rak...
The Gemfiles are created during build in .spec: https://github.com/webyast/webyast/blob/master/webyast/package/webyast-base....
Thanks for the info!
Also it is interesting that Gemfile can interpret ruby code, so you can comment it out quite easy.
Gemfile is basically a Ruby file which is eval()ed, so you can write any Ruby code there. WebYast uses this feature for finding the installed webyast modules (gems) at runtime. It loads the gems dynamically depending on what's present in the system.
https://github.com/webyast/webyast/blob/master/webyast/package/webyast-base....
Is this link right? It's the same as above.
WebYast also loads some more additional development gems when running from Git checkout (a nice trick, it's convenient for developers and does not affect deployment/RPM build):
https://github.com/webyast/webyast/blob/master/webyast/Gemfile#L63
Yeah, that's a cute trick. It still breaks bundler's guarantee which worries me a bit, but I don't know in practice how bad that is.
Well, there is a lot of notice about this guarantee. I think it is not bad idea, but what I want is ability to switch it off as you need metadata of all gems even those in other groups ( and thats what my patch to bundler does). Reason why I want this is that there is controlled environment where you don't need such guarantee. First example is bundled gems. You control which gems goes there, you just need to load it. Second example is our rpms in enterprise products where we release only versions after testing if it works with products. So what I want is only ability to switch this feature off. Josef -- To unsubscribe, e-mail: opensuse-ruby+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-ruby+owner@opensuse.org