sportngin / brew-gem

Install gems as homebrew formulas
MIT License
195 stars 22 forks source link

Fix for dashed gem names #10

Closed NickLaMuro closed 10 years ago

NickLaMuro commented 10 years ago

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, the $1 represents the parsed gem version number found in the gem list --remote "^#{name}$" command that was run on line 13 and parsed on 14. The raw output from the command would look something like this:


*** REMOTE GEMS ***

rails (4.1.4)

And would parse 4.1.4 and set it to $1.

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.

anfleene commented 10 years ago

Changes look good to me :+1: Do you know how to release this?

ehlertij commented 10 years ago

:+1: