alphagov/gem_publisher — pull request #18 by karianne (2014-10-21 18:18:17+00:00)
Title: Fix bug where -r parameter to rubygems plugin does nothing

I tried to use the rubygems plugin to publish a gem to my company's Gemfury account, but was stuck with error messages:

ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory @ rb_sysopen - gemfury

After digging though the code, I saw that this was caused by `add_option` disregarding the value for `-r`, and treating it as a normal argument. The line `options[:gem_repository] = value` actually sets `options[:gem_repository]` to `true`, not to `"gemfury"`. I was unsuccessful in getting `add_option` to take in an actual argument - the documentation for this was very confusing. My proposed solution is using a `-g` or `--use-gemfury` option instead, that just sets `options[:gem_repository]` to `"gemfury"` if set. Please let me know what you think.