ruby - Conditional gem dependencies -


Is it possible to conditionally set dependency on a gem at the time of installation? Here is my situation which will hopefully clarify the question.

A gem which I keep depends on Jason Mani. However, I often use jruby, which is a monkey of Jason Mani called Jason-Jeruube, to work around it, I have to make two different gems for each dependency. I want to make a gem, which either say it depends on JSON or Jason-Jarubi, or it checks at the established time and uses the right dependence.

Can anyone have a good solution for this?

hmm,

I believe that any multiple dependencies code Because I have seen those gems that seem to do this. But I would advise you to do this. There is no point that the code you are inserting is so easy, when you believe that the user will load a gem that depends on the other, which depends on someone else, even so That a small disturbance in the logic of any one code or someone else can fulfill the dependency is a nightmare train

So, I will leave your coupling - besides, I was suggesting that you have a Which is the tarball Yogis can also download I had to manually remove the code inside those gems, whose configuration code did not allow me to install them.


Comments