Skip to content

Commit

Permalink
Add changelog and tidy up
Browse files Browse the repository at this point in the history
- add Hex badge to README
- fix ArrayedData return value
- bump Mix version
  • Loading branch information
danielspofford committed May 27, 2019
1 parent af3f9b1 commit 4bbc7ab
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 0.2.0

## Breaking Changes

- [ManufacturerData] `deserialize/1` returns `{:error, bin}` instead of
`{:error, {:unhandled_company_id, bin}}`
- [Event] `deserialize/1` returns `{:error, bin}` instead of
`{:error, {:bad_event_code, bin}}`
- [Apple] when attempting to deserialize a non-binary term, crash
- [AdvertisingReport] `deserialize/1` always returns
`{status, %AdvertisingReport{}}`
- [Device]
- when attempting to deserialize a non-binary term, crash
- faults nested within a device discovered during deserialization will no
longer be realized through tuples like `{:early_termination, 0}`, instead
the violating binary will be returned as-is

## Enhancements

- [Apple] `deserialize/1` returns `{:error, bin}` instead of crashing on invalid
input
- [ArrayedData] `deserialize/1` returns `{:error, bin}` instead of crashing on
invalid input
- [Transport]
- `LE` is always included as a handler WRT `Transport`
- errors during deserialization no longer prevent a Bluetooth event from being
dispatched to handlers
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Harald

[![Hex version badge](https://img.shields.io/hexpm/v/harald.svg)](https://hex.pm/packages/harald)
[![CircleCI](https://circleci.com/gh/verypossible/harald.svg?style=svg)](https://circleci.com/gh/verypossible/harald)
[![Coverage Status](https://coveralls.io/repos/github/verypossible/harald/badge.svg)](https://coveralls.io/github/verypossible/harald)

An Elixir Bluetooth Host library.

Active early development, reliable semantic versioning.
Active early development, the [CHANGELOG](CHANGELOG.md) is your friend.

[Documentation](https://hexdocs.pm/harald).
[Getting Started](https://hexdocs.pm/harald/getting_started).
2 changes: 1 addition & 1 deletion lib/harald/hci/arrayed_data.ex
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ defmodule Harald.HCI.ArrayedData do
"""
def deserialize(schema, length, struct_module, bin)

def deserialize(_, length, _, <<>>) when length > 0, do: {:error, :incomplete}
def deserialize(_, length, _, <<>> = bin) when length > 0, do: {:error, bin}

def deserialize(schema, length, struct_module, bin) do
schema
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ defmodule Harald.MixProject do
source_url: "https://github.com/verypossible/harald",
start_permanent: Mix.env() == :prod,
test_coverage: [tool: ExCoveralls],
version: "0.1.1"
version: "0.2.0"
]
end

Expand Down

0 comments on commit 4bbc7ab

Please sign in to comment.