Changelog

View Source

Unreleased changes

4.2.0

4.1.0

4.0.0

  • Test with Elixir 1.19 and Erlang 28.1; drop support for Elixir 1.16 and Erlang 25.
  • Update deps.

3.2.0

3.1.0

  • Added Moar.IO which contains functions to more easily format strings with colors and other ANSI codes.

3.0.0

  • Moar.URI.valid? will now return true when given a mailto: URI, as long as its path is not blank.
  • Breaking changes: in previous versions, Moar.URI.valid? would return false when given a mailto: URI. To ensure that a URI is a valid web URI, use Moar.URI.web_url?

2.7.0

  • Add :to_string shortcut for assert_eq which converts both terms to strings before comparing.

2.6.0

2.5.0

2.4.2

  • Updated sponsorship info.

2.4.1

  • Fix spec of Moar.String.pluralize.

2.4.0

  • Moar.String.pluralize can now optionally include the number along with the pluaralized text.

2.3.0

  • When either or both of the last two arguments to Moar.Term.when_present/3 are functions, they are called with the given term as an argument.

2.2.0

2.1.0

  • Moar.List.fill expands (or shrinks) a list to a given size by repeating its elements.

2.0.1

  • Require at least Elixir 1.16.

2.0.0

  • Test with Elixir 1.18; drop support for Elixir 1.15.

1.65.0

  • Moar.String.join joins multiple items, as a shortcut to Enum.map_join([item1, item2, ...], "-", &to_string/1)

1.64.0

1.63.1

1.63.0

  • Add Moar.Sugar.cont, Moar.Sugar.cont!, Moar.Sugar.halt, Moar.Sugar.halt!, and Moar.Sugar.noreply!

1.62.0

1.61.2

1.61.1

1.61.0

1.60.0

1.59.2

1.59.1

1.59.0

1.58.0

  • require Elixir 1.15 or greater

1.57.0

  • test against the latest version of Erlang and Elixir

1.56.2

  • more doc fixes

1.56.1

  • doc updates

1.56.0

  • add Moar.Code.fetch_docs_as_markdown to fetch a module's or function's docs as markdown.

1.55.0

1.54.0

1.53.0

  • add Moar.File.checksum/1 which returns a sha256 checksum of a file.
  • add Moar.File.stream! which delegates to File.stream! in a way that's compatible with older Elixir versions.

1.52.1

1.52.0

  • assert_eq now raises when an invalid option is provided.
  • Add :apply and :map options to assert_eq/3 to run one or more functions on left or right (:apply) or run one or more functions on each value in left or right (:map).
  • The following assert_eq transformations are now supported: :downcase, :sort, :squish, :trim
  • The following assert_eq are soft-deprecated: ignore_order: <boolean>, ignore_whitespace: :leading_and_trailing, whitespace: :squish, whitespace: :trim.
  • Moar.Opts.get/3 and Moar.Opts.take/2 accept keyword lists with a mix of "valueless" keys and regular keys, like [:a, b: 2], where the default value for a "valueless" key is true.
  • Add Moar.Opts.pop/3 which pops an opt out of an opts enum.
  • Add Moar.Opts.delete/2 and Moar.Opts.delete/3 which deletes values from opts.
  • Add Moar.Opts.replace/3 which replaces values in opts.

1.51.0

  • Add Moar.Term.when_present which returns one value when the term is present, and another value when missing

1.50.0

  • Deprecated is_map_or_keyword in favor of map_or_keyword?.
  • Deprecated is_map_or_nonempty_keyword in favor of map_or_nonempty_keyword?.

1.49.0

  • Add Moar.List.unwrap! which returns the argument if it's not a list, or returns the only item in the list, or raises if the list has 0 or more than 1 item.
  • Add Moar.Random.float which returns a random float.
  • Add Moar.String.remove_marked_whitespace which - remove_marked_whitespace removes whitespacing following a special \v marker.
  • Add Moar.URI.format with scheme_host_port, scheme_host_port_path, and simple_string formats.
  • Deprecate Moar.URI.to_simple_string in favor of Moar.URI.format(uri, :simple_string).

1.48.0

  • Add Moar.Enum.test_ids which is just like Moar.Enum.tids but with a slightly different name.

1.47.0

  • Add Moar.Enum.lists_to_maps which converts a list of lists to a list of maps using the provided list of keys.

1.46.0

  • Moar.Enum.tids accepts a :sorted option

1.45.1

1.45.0

1.44.0

1.43.0

  • Add Moar.List.to_sentence converts a list into a string, with items separated by commas, and an "and" before the last item.

1.42.0

1.41.0

  • Created Moar.List and added to_keyword which converts a list to a keyword list, allowing a default value.

1.40.0

  • assert_contains returns consistently-ordered map keys when using OTP 26.0 or greater.

1.39.0

  • Add Moar.String.compare and Moar.String.compare? which can transform strings before comparing.

1.38.0

  • Fix Moar.DateTime.recent? to return false when the given datetime is in the future.
  • Add Moar.DateTime.within? which returns true if the given datetime is within the given duration.

1.37.0

  • Add Moar.Enum.find_indices! which raises when a member of the expected elements is not found in the given enumerable.

1.36.0

  • Add Moar.Regex with named_capture/3 and named_captures/3 functions.
  • Add Moar.Version with compare/2 and normalize/1 functions.

1.35.0

1.34.0

1.33.0

1.32.0

  • Add Moar.Assertions.assert_contains/2
  • Soft-deprecate Moar.Assertions.assert_eq's ignore_whitespace: :leading_and_trailing option in favor of whitespace: :squish and whitespace: :trim

1.31.0

1.30.0

1.29.0

1.28.0

1.27.0

1.26.0

1.25.0

1.24.1

  • Bug fix: Moar.Map.deep_merge/3 used to try to convert any enumerable into a map before merging, but this caused problems when a value was some other kind of enumerable that wasn't meant to be a nested map-like structure. Now, it only automatically converts keyword lists to maps.
  • Add Moar.Enum.is_map_or_keyword (which unforuntately cannot be used as a guard).

1.24.0

1.23.0

1.22.0

  • assert_that and refute_that return the result of the action
  • Add :only and :except to documentation for assert_eq.

1.21.0

1.20.0

1.19.3

  • Add link to related library "siiibo/assert_match"

1.19.2

1.19.1

1.19.0

1.18.1

  • Fix Moar.Assertions.refute_that to work with checks that do not implement String.Chars.

1.18.0

1.17.0

  • Add ignore_whitespace: :leading_and_trailing option to Moar.Assertions.assert_eq.

1.16.0

1.15.0

1.14.0

1.13.1

  • Doc updates

1.13.0

1.12.0

1.11.0

1.10.0

  • Moar.Map.atomize_key/3 converts dashes in keys to underscores before atomizing. Because the other "atomize" functions in this module use this function, they have the same behavior.
  • Moar.String.slug/2 retains any leading or trailing joiners (so slug("_foo-bar", "_") now returns "_foo_bar" instead of "foo_bar").

1.9.0

1.8.0

  • Add atomize_key to Moar.Map, which atomizes a map key and raises if atomizing a key would conflict with an exsiting atom key. atomize_keys and deep_atomize_keys now use this function so they can also raise in the same situation.
  • Add "!" versions of some functions in Moar.Map that raise when a key is not found.
  • Add an overview of the library to the readme.

1.7.0

1.6.0

1.5.0

1.4.0

1.3.0

1.2.0

1.1.0

1.0.0

  • Update documentation
  • Minor formatting fixes
  • Remove "Moar.Term.or_default/2" since it is the same as Moar.Term.presence/2.

0.1.0

  • Initial release