KimNorgaard/validates_hostname — pull request #2 by sshaw (2014-11-26 05:19:30+00:00)
Title: Don't include unnecessary requirements in gemspec + better error messages

Hi, a few things here:

[Your gemspec included a bunch of stuff](https://github.com/KimNorgaard/validates_hostname/blob/master/validates_hostname.gemspec#L20-23) that one doesn't need when using this library. For example, my project uses MySQL, but your gem installed the sqlite3 driver :crying_cat_face: This should fix things up.

The `gemspec` line in your Gemfile will load the dependencies defined in your gemspec. No need to repeat them in there.

The `doc` directory is not needed. The user of your library may choose install this as needed.

`.rspec`: `nested` format was changed to `documentation`.

I also changed the validation messages. For example:

```ruby
class User < ActiveRecord::Base
validates :website, :hostname => { :require_valid_tld => true, :allow_blank => true }
end
```

If website is invalid one will receive something like:
`Website hostname must be between 1 and 255 characters long` or `Website label begins or ends with hyphen`

If the form field is named *"Website"* then *"Website hostname"*, *"Website label"*, etc... are confusing as all the user knows/sees is *"Website"*.