sportngin/brew-gem — pull request #10 by NickLaMuro (2014-07-10 18:33:47+00:00)
Title: Fix for dashed gem names

This essentially reverts one of the changes made in PR #8.

The `$1` global variable has different values at line 16 and line 18. In line 16, it is the return value from the `gem list --remote "^#{name}$"` command that was run. It would look something like this:

```

*** REMOTE GEMS ***

rails (4.1.4)
```

The second usage of `$1` (which was mistakenly changed to version in the aforementioned PR) is the value of the match in the regex of the gsub command. This was the original value, and should remain that since we don't want to replace the portions of the gem name with the version, but to upcase the character following any dash and removing any existing dashes.