From 5bd6f7626bccbcb85232950e02ac233315a10d3f Mon Sep 17 00:00:00 2001 From: Frank Hunleth Date: Sat, 25 Nov 2023 17:42:45 -0600 Subject: [PATCH] Use fortune from hex --- config/config.exs | 2 ++ {fortunes => fortune}/nerves-tips | 0 mix.exs | 4 ++-- mix.lock | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) rename {fortunes => fortune}/nerves-tips (100%) diff --git a/config/config.exs b/config/config.exs index 597a779..755ac21 100644 --- a/config/config.exs +++ b/config/config.exs @@ -28,6 +28,8 @@ config :nerves_runtime, config :nerves_time_zones, default_time_zone: "Asia/Tokyo" +config :nerves_motd, fortune: true + if Mix.env() == :test do config :nerves_motd, runtime_mod: NervesMOTD.MockRuntime config :elixir, ansi_enabled: false diff --git a/fortunes/nerves-tips b/fortune/nerves-tips similarity index 100% rename from fortunes/nerves-tips rename to fortune/nerves-tips diff --git a/mix.exs b/mix.exs index d48b704..69d690b 100644 --- a/mix.exs +++ b/mix.exs @@ -14,7 +14,7 @@ defmodule NervesMOTD.MixProject do description: description(), package: package(), deps: deps(), - compilers: Mix.compilers() ++ [:strfile_compiler], + compilers: Mix.compilers() ++ [:fortune_compiler], dialyzer: dialyzer(), preferred_cli_env: %{ docs: :docs, @@ -35,7 +35,7 @@ defmodule NervesMOTD.MixProject do [ {:nerves_runtime, "~> 0.8"}, {:nerves_time, "~> 0.4", optional: true}, - {:fortune, path: "../elixir-fortune"}, + {:fortune, "~> 0.1"}, {:credo, "~> 1.5", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 1.1", only: :dev, runtime: false}, {:ex_doc, "~> 0.25", only: :docs, runtime: false}, diff --git a/mix.lock b/mix.lock index 8e7768b..8e458ae 100644 --- a/mix.lock +++ b/mix.lock @@ -7,6 +7,7 @@ "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, "ex_doc": {:hex, :ex_doc, "0.30.9", "d691453495c47434c0f2052b08dd91cc32bc4e1a218f86884563448ee2502dd2", [:mix], [{:earmark_parser, "~> 1.4.31", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "d7aaaf21e95dc5cddabf89063327e96867d00013963eadf2c6ad135506a8bc10"}, "file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"}, + "fortune": {:hex, :fortune, "0.1.0", "cf607c436159ce03cd30a7dd832996d1cc673ad1538831d2415af7cd83d649aa", [:mix], [], "hexpm", "9bf386a8574a83e44e11b375512c5079470c8d281bbb51c108689ca5962e47eb"}, "jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"}, "makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"}, "makeup_elixir": {:hex, :makeup_elixir, "0.16.1", "cc9e3ca312f1cfeccc572b37a09980287e243648108384b97ff2b76e505c3555", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "e127a341ad1b209bd80f7bd1620a15693a9908ed780c3b763bccf7d200c767c6"},