ccaum/puppetlabs-mysql — pull request #5 by justintime (2012-02-02 21:36:03+00:00)
Title: /dbname in hostname

Given the following resource:
```
mysql::db { 'dbname':
user => 'dbuser',
password => 'dbpass',
host => '%',
grant => ['all'],
charset => 'utf8',
}
```
You will end up with '%/dbname' in the Host column of the mysql.user table, when it should just be a '%'.

This pull request is embarassing, and shows just how much of a Ruby newb I am. While it technically works, it violates DRY in every way. Please, please, please show me how to pull this regex out into a method. Note that the same regex is used in lib/puppet/provider/database_grant/mysql.rb