From 5201dda1f16a7e123b083ee1221b0a0dd8abfe8f Mon Sep 17 00:00:00 2001 From: Paul Daigle Date: Sat, 20 Feb 2016 10:40:54 -0500 Subject: [PATCH] Project setup --- README.md | 20 ++++++++++++++++++++ config/config.exs | 30 ++++++++++++++++++++++++++++++ lib/loggex.ex | 2 ++ mix.exs | 32 ++++++++++++++++++++++++++++++++ test/loggex_test.exs | 8 ++++++++ test/test_helper.exs | 1 + 6 files changed, 93 insertions(+) create mode 100644 README.md create mode 100644 config/config.exs create mode 100644 lib/loggex.ex create mode 100644 mix.exs create mode 100644 test/loggex_test.exs create mode 100644 test/test_helper.exs diff --git a/README.md b/README.md new file mode 100644 index 0000000..1187d87 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# Loggex + +**TODO: Add description** + +## Installation + +If [available in Hex](https://hex.pm/docs/publish), the package can be installed as: + + 1. Add loggex to your list of dependencies in `mix.exs`: + + def deps do + [{:loggex, "~> 0.0.1"}] + end + + 2. Ensure loggex is started before your application: + + def application do + [applications: [:loggex]] + end + diff --git a/config/config.exs b/config/config.exs new file mode 100644 index 0000000..f2069fc --- /dev/null +++ b/config/config.exs @@ -0,0 +1,30 @@ +# This file is responsible for configuring your application +# and its dependencies with the aid of the Mix.Config module. +use Mix.Config + +# This configuration is loaded before any dependency and is restricted +# to this project. If another project depends on this project, this +# file won't be loaded nor affect the parent project. For this reason, +# if you want to provide default values for your application for +# 3rd-party users, it should be done in your "mix.exs" file. + +# You can configure for your application as: +# +# config :loggex, key: :value +# +# And access this configuration in your application as: +# +# Application.get_env(:loggex, :key) +# +# Or configure a 3rd-party app: +# +# config :logger, level: :info +# + +# It is also possible to import configuration files, relative to this +# directory. For example, you can emulate configuration per environment +# by uncommenting the line below and defining dev.exs, test.exs and such. +# Configuration from the imported file will override the ones defined +# here (which is why it is important to import them last). +# +# import_config "#{Mix.env}.exs" diff --git a/lib/loggex.ex b/lib/loggex.ex new file mode 100644 index 0000000..a8197d6 --- /dev/null +++ b/lib/loggex.ex @@ -0,0 +1,2 @@ +defmodule Loggex do +end diff --git a/mix.exs b/mix.exs new file mode 100644 index 0000000..3efda3f --- /dev/null +++ b/mix.exs @@ -0,0 +1,32 @@ +defmodule Loggex.Mixfile do + use Mix.Project + + def project do + [app: :loggex, + version: "0.0.1", + elixir: "~> 1.2", + build_embedded: Mix.env == :prod, + start_permanent: Mix.env == :prod, + deps: deps] + end + + # Configuration for the OTP application + # + # Type "mix help compile.app" for more information + def application do + [applications: [:logger, :cowboy, :plug, :postgrex, :ecto]] + end + + # Dependencies can be Hex packages: + # + # {:mydep, "~> 0.3.0"} + # + # Or git/path repositories: + # + # {:mydep, git: "https://github.com/elixir-lang/mydep.git", tag: "0.1.0"} + # + # Type "mix help deps" for more examples and options + defp deps do + [] + end +end diff --git a/test/loggex_test.exs b/test/loggex_test.exs new file mode 100644 index 0000000..e2fff17 --- /dev/null +++ b/test/loggex_test.exs @@ -0,0 +1,8 @@ +defmodule LoggexTest do + use ExUnit.Case + doctest Loggex + + test "the truth" do + assert 1 + 1 == 2 + end +end diff --git a/test/test_helper.exs b/test/test_helper.exs new file mode 100644 index 0000000..869559e --- /dev/null +++ b/test/test_helper.exs @@ -0,0 +1 @@ +ExUnit.start()