WIP: Move Ruby code to gem

So that it can be reused by all Puppet modules without having to copy source code files.