I'm working on a package that relies on a Ruby gem. For development, I added the gem's Github repo as a submodule and then call its binaries directly. This works perfectly and I'd like to distribute my package with the gem included so it can just install from Package Control without any additional steps.
To workaround compressed sublime-packages, the package extracts the gem to a library folder it creates in Installed Packages. I got the idea from Emmet which installs PyV8 binaries in a similar fashion. As a last step, the package chmods the owner executable bit on two of the gem's files.
This is all working, but I have a few questions:
1. Is including the gem a terrible idea?
2. Are there any security risks I'm not seeing?
3. Is there an "on_remove" hook which would let me remove the Installed Packages library folder my package added? I'd like to clean up after myself if possible.