docco
docco copied to clipboard
Elixir
May I suggest .ex and .exs providing support for Elixir?
# ./lib/taskrr/repo.ex
defmodule Taskrr.Repo do
use Ecto.Repo, otp_app: :taskrr
@doc """
Dynamically loads the repository url from the
DATABASE_URL environment variable.
"""
def init(_, opts) do
{:ok, Keyword.put(opts, :url, System.get_env("DATABASE_URL"))}
end
end
# ./mix.exs
defmodule Taskrr.Mixfile do
use Mix.Project
def project do
[app: :taskrr,
version: "0.0.1",
elixir: "~> 1.4",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
start_permanent: Mix.env == :prod,
aliases: aliases(),
deps: deps()]
end
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.
def application do
[mod: {Taskrr.Application, []},
extra_applications: [:logger, :runtime_tools]]
end
end
Go right ahead and send in a pull request that adds it, and I'll be more than happy to merge.