i just wanna ask if it is possible to create a gem out of 2 working gems.
For example, i want to combine gem 1 and gem 2 to create gem 3.
gem 1 + gem 2 = gem 3
I know it is possible to create a gem from scratch.
But what I want to accomplish is to create a gem by mixing 2 opensource gems.
With that, I dont need to add 2 separate gems inside my dying GEMFILE.
Are there any tools or something that I need to have…. in order to accomplish that?
Thanks in advance.
Gems contains files that perform specific task.
Combining two gems is just like copying contents of one gem into another to make it one. The disadvantage of doing so is it will increase the dependency and it will be fit for specific purpose or task in your project. So at later stage if you want to change your code or modify it, it may be that modification will only happen if you change or replace one of the gem with other but since you merged it onto other, you again need to go back to what you had previously.
Secondly, if one gem is updated on remote site then you will not be able to update the same in your application as its merged. Again you need to extract gems, update and merge again.
Having so, merging isn’t a good practice although possible as it will diminish the code usage and flexibility.
So it will be good to only need to add one line of code in your gemfile.