- Fix copyright, license and links
- Fixed typespecs in
Euclid.Assertions
. - Upgraded Erlang from 24.2 to 24.3.3 and Elixir from 1.13.1 to 1.13.4.
- Implemented
Euclid.Protocol
.
- Deprecated all modules in
Euclid.Extra
andEuclid.Test.Extra
. They are now at the top level. For example,Euclid.Extra.String
is now justEuclid.String
. - Deprecated
Euclid.Extra.Exists
; most of its functions moved toEuclid.Term
though a few moved elsewhere. See theEuclid.Extra.Exists
module docs for more details. - Deprecated
Euclid.Extra.Tuple
- Deprecated
Euclid.Assertions.assert_datetime_approximate
in favor ofEuclid.Assertions.assert_eq
with the:within
option. For example, instead ofassert_datetime_approximate(dt1, dt2, 30)
, useassert_eq(dt1, dt2, within: {30, :second})
.
Deprecated modules and functions will be removed in the 1.0
release.
- Added
Euclid.File
which hasnew_tempfile_path/1
andwrite_tempfile/2
functions. - Added
Euclid.Difference
protocol which has adiff/2
function. The default implementation does a simple subtraction withKernel.-/2
, and also includes implementations forDateTime
,NaiveDateTime
, andBitString
(strings). - Added
Euclid.Duration
which is a{time, unit}
tuple (for example,{200, :millisecond}
). It hasconvert/2
andto_string/1
functions. - Added
Euclid.Sugar
which has some handy functions meant to be imported. Euclid.Random.string
now supports base32 encoding. The default is still base64. Base32 is useful for file names since it only contains letters and numbers.Euclid.Assertions.assert_eq
now supports:within
option. It usesEuclid.Difference
to determine whether the two values are within the given delta. It also supportsDuration
s so it can check whether twoDateTime
s are within some delta. Examples:assert_eq(temp, 98.6, within: 1.5)
,assert_eq(created_at, now(), within: {5, :second})
.- Added
Euclid.DateTime.parse_iso8601!/1
which is likeDateTime.parse_iso8601/1
but raises if the string is not in ISO8601 format. - The
bin/dev/shipit
script (used when developing Euclid itself) now runs Dialyzer and Credo.
- Euclid.Test.Extra.Assertions.assert_recent accepts a DateTime as a string, in ISO8601 format
- Fix deprecation warning
- Extra.Map.deep_atomize_keys, when confronted with a map entry whose value is a list of maps, will deeply atomize those maps' keys.
- Add
Euclid.Test.Helpers.Retry
- Update readme with information about
bin/dev/doctor
- Initial release