Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
izelnakri committed Jun 19, 2016
0 parents commit 00f95dc
Show file tree
Hide file tree
Showing 10 changed files with 138 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/_build
/cover
/deps
erl_crash.dump
*.ez
8 changes: 8 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
The MIT License (MIT)
Copyright (c) 2016 Izel Nakri

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# PaperTrail

**TODO: Add description**

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed as:

1. Add paper_trail to your list of dependencies in `mix.exs`:

def deps do
[{:paper_trail, "~> 0.0.1"}]
end

2. Ensure paper_trail is started before your application:

def application do
[applications: [:paper_trail]]
end

30 changes: 30 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
@@ -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 :paper_trail, key: :value
#
# And access this configuration in your application as:
#
# Application.get_env(:paper_trail, :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"
9 changes: 9 additions & 0 deletions lib/mix/tasks/papertrail/install.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
defmodule Mix.Tasks.Papertrail.Install do
@shortdoc "my short doc"

use Mix.Task

def run(args) do
IO.puts "run called"
end
end
2 changes: 2 additions & 0 deletions lib/paper_trail.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
defmodule PaperTrail do
end
48 changes: 48 additions & 0 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
defmodule PaperTrail.Mixfile do
use Mix.Project

def project do
[app: :paper_trail,
version: "0.0.2",
elixir: "~> 1.2",
description: description,
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
package: package,
deps: deps]
end

# Configuration for the OTP application
#
# Type "mix help compile.app" for more information
def application do
[]
end

defp deps do
[
{:postgrex, ">= 0.0.0"},
{:ecto, "~> 2.0.0-rc.1"},
{:poison, "2.1.0"}
]
end

defp description do
"""
PaperTrail lets you track and record all the changes in your database.
"""
end

defp package do
[
name: :paper_trail,
files: ["lib", "mix.exs", "README*", "LICENSE*"],
maintainers: ["Izel Nakri"],
licenses: ["MIT License"],
links: %{
# "GitHub" => "https://github.com/ericmj/postgrex",
# "Docs" => "http://ericmj.github.io/postgrex/"
}
]
end
end
7 changes: 7 additions & 0 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
%{"connection": {:hex, :connection, "1.0.2", "f4a06dd3ecae4141aa66f94ce92ea4c4b8753069472814932f1cadbc3078ab80", [:mix], []},
"db_connection": {:hex, :db_connection, "1.0.0-rc.1", "4d9ac0db8a6edf401103b85ad29b40188b70adc649ba2a028df6ff2207cfb250", [:mix], [{:sbroker, "~> 1.0.0-beta.2", [hex: :sbroker, optional: true]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: true]}, {:connection, "~> 1.0.2", [hex: :connection, optional: false]}]},
"decimal": {:hex, :decimal, "1.1.2", "79a769d4657b2d537b51ef3c02d29ab7141d2b486b516c109642d453ee08e00c", [:mix], []},
"ecto": {:hex, :ecto, "2.0.0-rc.6", "a207218470d8c6366a20940e33f6f9fcd2e9a34c8e9779b808fe100f88c05f5e", [:mix], [{:poison, "~> 1.5 or ~> 2.0", [hex: :poison, optional: true]}, {:sbroker, "~> 1.0-beta", [hex: :sbroker, optional: true]}, {:postgrex, "~> 0.11.2", [hex: :postgrex, optional: true]}, {:mariaex, "~> 0.7.7", [hex: :mariaex, optional: true]}, {:decimal, "~> 1.0", [hex: :decimal, optional: false]}, {:poolboy, "~> 1.5", [hex: :poolboy, optional: false]}]},
"poison": {:hex, :poison, "2.1.0", "f583218ced822675e484648fa26c933d621373f01c6c76bd00005d7bd4b82e27", [:mix], []},
"poolboy": {:hex, :poolboy, "1.5.1", "6b46163901cfd0a1b43d692657ed9d7e599853b3b21b95ae5ae0a777cf9b6ca8", [:rebar], []},
"postgrex": {:hex, :postgrex, "0.11.2", "139755c1359d3c5c6d6e8b1ea72556d39e2746f61c6ddfb442813c91f53487e8", [:mix], [{:connection, "~> 1.0", [hex: :connection, optional: false]}, {:db_connection, "~> 1.0-rc", [hex: :db_connection, optional: false]}, {:decimal, "~> 1.0", [hex: :decimal, optional: false]}]}}
8 changes: 8 additions & 0 deletions test/paper_trail_test.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
defmodule PaperTrailTest do
use ExUnit.Case
doctest PaperTrail

test "the truth" do
assert 1 + 1 == 2
end
end
1 change: 1 addition & 0 deletions test/test_helper.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ExUnit.start()

0 comments on commit 00f95dc

Please sign in to comment.