Skip to content

Commit

Permalink
Make Phoenix Live View a non-optional dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
jsonmaur committed Apr 25, 2023
1 parent c57d76d commit b42fe5f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v1.1.1

- Make Phoenix Live View a non-optional dependency

## v1.1.0

- Don't handle `updated` and `destroyed` hook events, `phx-update` is set to `ignore`
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Phoenix components and helpers for using CAPTCHAs with [Cloudflare Turnstile](ht
```elixir
def deps do
[
{:phoenix_turnstile, "~> 1.1"}
{:phoenix_turnstile, "~> 1.0"}
]
end
```
Expand Down Expand Up @@ -192,7 +192,7 @@ If your site uses a content security policy, you'll need to add `https://challen

When testing forms that use Turnstile verification, you may or may not want to call the live API.

Although we use the test keys by default, you should consider using mocks during testing. An excellent library to consider is [mox](https://github.com/dashbitco/mox). Phoenix Turnstile exposes a behaviour that you can use to make writing your tests much easier.
Although we use the test keys by default, you should consider using mocks during testing. An excellent library to consider is [mox](https://github.com/dashbitco/mox). Phoenix Turnstile exposes [`Turnstile.Behavior`](Turnstile.Behaviour.html) which makes writing tests much easier.

To start using Mox with Phoenix Turnstile, add this to your `test/test_helper.ex`:

Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule PhoenixTurnstile.MixProject do
def project do
[
app: :phoenix_turnstile,
version: "1.1.0",
version: "1.1.1",
elixir: "~> 1.13",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
Expand Down Expand Up @@ -52,7 +52,7 @@ defmodule PhoenixTurnstile.MixProject do
{:makeup_eex, "~> 0.1", only: :dev, runtime: false},
{:makeup_html, "~> 0.1", only: :dev, runtime: false},
{:makeup_js, "~> 0.1", only: :dev, runtime: false},
{:phoenix_live_view, "~> 0.17", optional: true}
{:phoenix_live_view, "~> 0.17"}
]
end

Expand Down

0 comments on commit b42fe5f

Please sign in to comment.