Skip to content

Commit

Permalink
Tidy up Postgrex generated docs, closes #391
Browse files Browse the repository at this point in the history
  • Loading branch information
José Valim committed Jun 18, 2018
1 parent bbb8f0f commit 23551b5
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 24 deletions.
1 change: 1 addition & 0 deletions lib/postgrex/stream.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ defmodule Postgrex.Stream do
@type t :: %Postgrex.Stream{}
end
defmodule Postgrex.Cursor do
@moduledoc false
defstruct [:portal, :ref, :connection_id, :mode]
@type t :: %Postgrex.Cursor{}
end
Expand Down
81 changes: 59 additions & 22 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,76 @@ defmodule Postgrex.Mixfile do
@version "0.14.0-dev"

def project do
[app: :postgrex,
version: @version,
elixir: "~> 1.4",
deps: deps(),
name: "Postgrex",
source_url: "https://github.com/elixir-ecto/postgrex",
docs: [source_ref: "v#{@version}", main: "readme", extras: ["README.md"]],
description: description(),
package: package()]
[
app: :postgrex,
version: @version,
elixir: "~> 1.4",
deps: deps(),
name: "Postgrex",
description: "PostgreSQL driver for Elixir",
source_url: "https://github.com/elixir-ecto/postgrex",
docs: docs(),
package: package()
]
end

# Configuration for the OTP application
def application do
[applications: [:logger, :db_connection, :decimal, :crypto],
mod: {Postgrex.App, []},
env: [type_server_reap_after: 3 * 60_000, json_library: Jason]]
[
applications: [:logger, :db_connection, :decimal, :crypto],
mod: {Postgrex.App, []},
env: [type_server_reap_after: 3 * 60_000, json_library: Jason]
]
end

defp deps do
[{:ex_doc, "~> 0.14", only: :docs},
{:jason, "~> 1.0", only: :test},
{:decimal, "~> 1.0"},
{:db_connection, "~> 1.1", github: "elixir-ecto/db_connection", ref: "4947966"},
{:connection, "~> 1.0"}]
[
{:ex_doc, "~> 0.14", only: :docs},
{:jason, "~> 1.0", only: :test},
{:decimal, "~> 1.0"},
{:db_connection, "~> 1.1", github: "elixir-ecto/db_connection", ref: "4947966"},
{:connection, "~> 1.0"}
]
end

defp description do
"PostgreSQL driver for Elixir."
defp docs do
[
source_ref: "v#{@version}",
main: "readme",
extras: ["README.md"],
groups_for_modules: [
# Postgrex
# Postgrex.Notifications
# Postgrex.Query
# Postgrex.Result
"Data Types": [
Postgrex.Box,
Postgrex.Circle,
Postgrex.INET,
Postgrex.Interval,
Postgrex.Lexeme,
Postgrex.Line,
Postgrex.LineSegment,
Postgrex.MACADDR,
Postgrex.Path,
Postgrex.Point,
Postgrex.Polygon,
Postgrex.Range
],
"Custom types and Extensions": [
Postgrex.Extension,
Postgrex.TypeInfo,
Postgrex.Types
]
]
]
end

defp package do
[maintainers: ["Eric Meadows-Jönsson", "James Fish"],
licenses: ["Apache 2.0"],
links: %{"Github" => "https://github.com/elixir-ecto/postgrex"}]
[
maintainers: ["Eric Meadows-Jönsson", "James Fish"],
licenses: ["Apache 2.0"],
links: %{"Github" => "https://github.com/elixir-ecto/postgrex"}
]
end
end
4 changes: 2 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], [], "hexpm"},
"db_connection": {:git, "https://github.com/elixir-ecto/db_connection.git", "49479667131329376adf1c2c0e9a16bcf470aa84", [ref: "4947966"]},
"decimal": {:hex, :decimal, "1.3.1", "157b3cedb2bfcb5359372a7766dd7a41091ad34578296e951f58a946fcab49c6", [:mix], [], "hexpm"},
"earmark": {:hex, :earmark, "1.2.2", "f718159d6b65068e8daeef709ccddae5f7fdc770707d82e7d126f584cd925b74", [:mix], [], "hexpm"},
"ex_doc": {:hex, :ex_doc, "0.16.1", "b4b8a23602b4ce0e9a5a960a81260d1f7b29635b9652c67e95b0c2f7ccee5e81", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm"},
"earmark": {:hex, :earmark, "1.2.5", "4d21980d5d2862a2e13ec3c49ad9ad783ffc7ca5769cf6ff891a4553fbaae761", [:mix], [], "hexpm"},
"ex_doc": {:hex, :ex_doc, "0.18.3", "f4b0e4a2ec6f333dccf761838a4b253d75e11f714b85ae271c9ae361367897b7", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm"},
"jason": {:hex, :jason, "1.0.0", "0f7cfa9bdb23fed721ec05419bcee2b2c21a77e926bce0deda029b5adc716fe2", [], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"},
}

0 comments on commit 23551b5

Please sign in to comment.