Resolve connection URL into Hash.
Add this line to your application's Gemfile:
gem "connection_url_resolver"
And then execute:
$ bundle
Or install it yourself as:
$ gem install connection_url_resolver
url = "mysql2://user:password@localhost:3306/app_dev"
ConnectionUrlResolver.new(url).to_hash
# =>
{
"adapter" => "mysql2",
"username" => "user",
"password" => "password",
"port" => "3306",
"database" => "app_dev",
"host" => "localhost"
}
- MIT license
- Moya Contributors Guidelines which TLDR: means we give out push access easily and often.