This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Handy bindings when developing the MONEI gateway integration. | |
# Most of the bindings are for the `opts` | |
# Instructions | |
# Just rename this file to `.iex.exs` and save it in either, | |
# 1. the gringotts root directory | |
# 2. your applications root directory | |
# essentially the place where you launch your `iex` sessions via `iex -S mix`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Runs credo and the formatter on the staged files, after the commit is made | |
# This is purely for notification and will not halt/change your commit. | |
# You must add the "path to Elixir 1.6 repository" to `ELIXIR_16` environment variable, | |
# Add this to your shell's `.rc`: | |
# export ELIXIR_16=path/to/elixir1.6 | |
# List all .ex files staged in the previous commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Handy bindings when developing the Trexle gateway integration. | |
# Most of the bindings are for the `opts` | |
# Instructions | |
# Just rename this file to `.iex.exs` and save it in either, | |
# 1. the gringotts root directory | |
# 2. your applications root directory | |
# essentially the place where you launch your `iex` sessions via `iex -S mix`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Handy bindings when developing the CAMS gateway integration. | |
# Most of the bindings are for the `opts` | |
# Instructions | |
# Just rename this file to `.iex.exs` and save it in either, | |
# 1. the gringotts root directory | |
# 2. your applications root directory | |
# essentially the place where you launch your `iex` sessions via `iex -S mix`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Handy bindings when developing the GlobalCollect gateway integration. | |
# Most of the bindings are for the `opts` | |
# Instructions | |
# Just rename this file to `.iex.exs` and save it in either, | |
# 1. the gringotts root directory | |
# 2. your applications root directory | |
# essentially the place where you launche your `iex` sessions via `iex -S mix`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by "git commit" with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# To enable this hook, rename this file to "pre-commit". | |
if git rev-parse --verify HEAD >/dev/null 2>&1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias Gringotts.Money, as: MoneyProtocol | |
describe "Gringotts.Money protocol implementation" do | |
# You may not need this one :) | |
test "currency is an upcase String.t" do | |
the_currency = MoneyProtocol.currency(Money.new(0, :USD)) | |
assert match?(currency when is_binary(currency), the_currency) | |
assert the_currency == String.upcase(the_currency) | |
end | |
test "to_integer" do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias Gringotts.{CreditCard, Response} | |
card = %CreditCard{ | |
number: "4929000005559", | |
month: 3, | |
year: 20, | |
first_name: "SAM", | |
last_name: "JONES", | |
verification_code: "123", | |
brand: "VISA" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Drop this in your ~/.emacs OR ~/.emacs.d/init.el | |
(require 'package) | |
(setq package-enable-at-startup nil) | |
(add-to-list 'package-archives | |
'("melpa" . "https://melpa.org/packages/") | |
'("org" . "https://orgmode.org/elpa/")) | |
(package-initialize) | |
;; Bootstrap `use-package' |