JuanitoFatas / connection_url_resolver

Resolve connection URL into Hash.

Home Page:https://github.com/JuanitoFatas/connection_url_resolver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ConnectionUrlResolver

Build Status

Resolve connection URL into Hash.

Installation

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

Usage

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"
}

License, Contributor's Guidelines

About

Resolve connection URL into Hash.

https://github.com/JuanitoFatas/connection_url_resolver

License:MIT License


Languages

Language:Ruby 98.2%Language:Shell 1.8%