diff --git a/CHANGELOG.md b/CHANGELOG.md index 8522823..6d7ee7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## v0.2.0 + +* Fixes + * `ExTTY` no longer defaults a `:name` option for GenServer start_link. + If you relied on the default `ExTTY` name, you will need to pass that or + a different name as the `:name` option explicitly and use it + (or the returned pid of `ExTTY.start_link/1`) when calling the + functions of `ExTTY`: + + ```elixir + # Named GenServer + {:ok, _pid} = ExTTY.start_link(name: TTY1) + ExTTY.send_text(TTY1, "1+1\n") + + # Unnamed GenServer + {:ok, tty} = ExTTY.start_link() + ExTTY.send_text(tty, "1+1\n") + ``` + ## v0.1.0 Initial release diff --git a/README.md b/README.md index 430db17..5296432 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Install `extty` by adding it to your list of dependencies in `mix.exs`: ```elixir def deps() do [ - {:extty, "~> 0.1"} + {:extty, "~> 0.2"} ] end ``` @@ -25,12 +25,12 @@ pid to receive the returned text data. The incoming message will be formatted as `{:tty_data, String.t()}` ```elixir -iex()> ExTTY.start_link(handler: self()) -{:ok, #PID<0.149.0>} + +iex()> {:ok, tty} = ExTTY.start_link(handler: self()) iex()> flush() {:tty_data, "Interactive Elixir (1.10.3) - press Ctrl+C to exit (type h() ENTER for help)\r\n"} {:tty_data, "iex(1)> "} -iex()> ExTTY.send_text("1+1\n") +iex()> ExTTY.send_text(tty, "1+1\n") :ok iex()> flush() {:tty_data, "1+1\r\n"} diff --git a/mix.exs b/mix.exs index 2f73f0a..107932f 100644 --- a/mix.exs +++ b/mix.exs @@ -1,13 +1,13 @@ defmodule ExTTY.MixProject do use Mix.Project - @version "0.1.0" + @version "0.2.0" @source_url "https://github.com/jjcarstens/extty" def project do [ app: :extty, - version: "0.1.0", + version: @version, elixir: "~> 1.10", start_permanent: Mix.env() == :prod, build_embedded: Mix.env() == :prod,