Extract build status URLs to make lines shorter

This commit is contained in:
Martin Frost 2016-01-09 11:23:23 +01:00
parent 89e3dda530
commit 684aa1a6e2
1 changed files with 23 additions and 27 deletions

View File

@ -1,6 +1,6 @@
# Isn # Isn
[![Build Status](https://semaphoreci.com/api/v1/projects/be7c4c34-c49e-45c7-9320-3fcc4f7f476a/458429/badge.svg)](https://semaphoreci.com/frost/isn) [![Build Status][4]][5]
Isn adds a [`Postgrex.Extension`][1] and [`Ecto.Type`][2] definitions Isn adds a [`Postgrex.Extension`][1] and [`Ecto.Type`][2] definitions
for the datatypes defined in the [`isn`][3] PostgreSQL module. for the datatypes defined in the [`isn`][3] PostgreSQL module.
@ -8,32 +8,26 @@ for the datatypes defined in the [`isn`][3] PostgreSQL module.
## Usage ## Usage
1. Add the package to your Mixfile: 1. Add the package to your Mixfile:
```elixir
```elixir defp deps do
defp deps do [{:isn, "~> 0.1"}]
[{:isn, "~> 0.1"}] end
end ```
```
2. Add the isn extension to your database 2. Add the isn extension to your database
```elixir
```elixir {:ok, pid} = Postgrex.Connection.start_link(
{:ok, pid} = Postgrex.Connection.start_link( hostname: "localhost",
hostname: "localhost", database: "isn_test"
database: "isn_test" )
) Postgrex.Connection.query!(pid, "CREATE EXTENSION isn;", [])
Postgrex.Connection.query!(pid, "CREATE EXTENSION isn;", []) ```
``` 3. Register the postgrex extension
```elixir
2. Register the postgrex extension Postgrex.Connection.start_link(
database: "isn_test",
```elixir extensions: [{Isn, {}}])
Postgrex.Connection.start_link( ```
database: "isn_test", 4. Start using all of the `isn` goodness in your project.
extensions: [{Isn, {}}])
```
3. Start using all of the `isn` goodness in your project.
## Examples ## Examples
@ -88,3 +82,5 @@ Ecto.Type | Postgrex type
[1]: http://hexdocs.pm/postgrex/Postgrex.Extension.html [1]: http://hexdocs.pm/postgrex/Postgrex.Extension.html
[2]: http://hexdocs.pm/ecto/Ecto.Type.html [2]: http://hexdocs.pm/ecto/Ecto.Type.html
[3]: http://www.postgresql.org/docs/9.4/static/isn.html [3]: http://www.postgresql.org/docs/9.4/static/isn.html
[4]: https://semaphoreci.com/api/v1/projects/be7c4c34-c49e-45c7-9320-3fcc4f7f476a/458429/badge.svg
[5]: https://semaphoreci.com/frost/isn