Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_build/
ebin/
deps/
mix.lock
/_build
/deps
erl_crash.dump
*.ez
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure how hard it would be to get everything to compile under Elixir > 1.0, so I started a fresh Mix project (thus this file was auto-generated) and migrated each of the source files and whatnot manually. This file is exactly what is produced by Mix now, so I think we may as well keep it.

18 changes: 9 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
language: erlang
otp_release:
- 17.1
- 17.0
env:
- BUILD_TYPE=rebar REBAR_ENV=test ELIXIR_VERSION=stable
- BUILD_TYPE=mix MIX_ENV=test ELIXIR_VERSION=stable
- BUILD_TYPE=rebar REBAR_ENV=test ELIXIR_VERSION=v0.14.3
- BUILD_TYPE=mix MIX_ENV=test ELIXIR_VERSION=v0.14.3

install: "./.travis_install"
script: "./.travis_build"
before_install:
- wget https://github.com/elixir-lang/elixir/releases/download/v1.0.5/Precompiled.zip
- unzip -d elixir Precompiled.zip
before_script:
- "export PATH=`pwd`/elixir/bin:$PATH"
- mix local.hex --force
script: "MIX_ENV=test mix do deps.get, test"
after_success:
- "mix compile && mix coveralls.travis"
13 changes: 0 additions & 13 deletions .travis_build

This file was deleted.

7 changes: 0 additions & 7 deletions .travis_install

This file was deleted.

24 changes: 24 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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 third-
# party users, it should be done in your mix.exs file.

# Sample configuration:
#
# config :logger, :console,
# level: :info,
# format: "$date $time [$level] $metadata$message\n",
# metadata: [:user_id]

# 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"
2 changes: 2 additions & 0 deletions lib/quaff.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
defmodule Quaff do
end
4 changes: 2 additions & 2 deletions lib/constants.ex → lib/quaff/constants.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ defmodule Quaff.Constants do
file = opts[:file] || "<unknown file>"
line = opts[:line] || -1
msg = opts[:message] ||
String.from_char_list!(:io_lib.format( opts[:format], opts[:items] ))
msg = msg <> String.from_char_list!(:io_lib.format( "~n at ~s line ~p", [file,line] ))
List.to_string(:io_lib.format( opts[:format], opts[:items] ))
msg = msg <> "\n at #{file} line #{line}"
%__MODULE__{message: msg}
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/debug.ex → lib/quaff/debug.ex
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ defmodule Quaff.Debug do
false -> :int.i(arg)
end
end
end
end
35 changes: 22 additions & 13 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,32 @@ defmodule Quaff.Mixfile do
use Mix.Project

def project do
[ app: :quaff,
version: "0.0.1",
deps: deps(Mix.env)
]
[app: :quaff,
version: "0.0.1",
elixir: "~> 1.0",
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
[]
end

defp deps(:test) do
[ { :meck, git: "https://github.com/eproxus/meck.git", branch: "master" } |
deps(:prod) ]
# 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
[{:aleppo, compile: "rebar compile", github: "ChicagoBoss/aleppo", branch: "master"},
{:meck, "~> 0.8.2"}]
end
defp deps(_) do
[ { :aleppo, compile: "rebar compile",
git: "https://github.com/ChicagoBoss/aleppo.git", branch: "master" },
]
end
end
end
2 changes: 2 additions & 0 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
%{"aleppo": {:git, "git://github.com/ChicagoBoss/aleppo.git", "d64056219e248f24314dbbd08e3acb636e4f4b81", [branch: "master"]},
"meck": {:hex, :meck, "0.8.3"}}
29 changes: 0 additions & 29 deletions rebar.config.script

This file was deleted.

6 changes: 0 additions & 6 deletions src/quaff.app.src

This file was deleted.

2 changes: 1 addition & 1 deletion test/constants_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ defmodule Quaff.Constants.Test do
assert is_integer(@_SIZEOF_CHAR)
assert is_integer(@_SIZEOF_INT)
end
end
end
2 changes: 1 addition & 1 deletion test/debug_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ defmodule Quaff.Debug.Test do
false
end
end
end
end
2 changes: 1 addition & 1 deletion test/dummy.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ defmodule Dummy2 do
def x() do
1
end
end
end
2 changes: 1 addition & 1 deletion test/test_helper.exs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ExUnit.start
ExUnit.start