github-gem-build
So the fact that GitHub hosts gems is really great. I find myself writing gems all the time now because it is easy to publish (and super easy to write thanks to jeweler). But the gem builder on GitHub is finicky. And when that's working, getting the gem into the spec file is slow. I hate waiting. I also hate building the gem locally because it always ends up without the owner's name prefixed. Then when the gem is ready on GitHub I end up with two different gems and a debugging nightmare.
Well, I got a little fed up and wrote a script that clones a repository, changes the gemspec so that the name matches, builds the gem and installs all with a simple command:
github-gem-build owner repository
It also validates the gemspec using the same code that GitHub recommends for testing if you are having problems. I probably need to tweak a few things to make it work properly on Windows (removing the sudo call if it is running on Windows, fixing the fact that File.join uses '/'), and I imagine that is coming soon. It might also be nice to support multiple gem versions based on tag or something. I packaged it as a gem so that you could just install it through the gem install command:
sudo gem install jeffrafter-github-gem-build
The irony? The gem builder didn't want to build it right away so I had to use it to install itself.
1 comment
Jump to comment form | comments rss [?]