From 9a20b9844090e742762b2aae1e2c0cc153ae350e Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Sun, 19 Apr 2026 17:26:34 +0200 Subject: [PATCH] rearrange and rename diretories and modules: prepare for new scopes implementation --- lib/{ => core}/actor.ex | 2 +- lib/{ => demo}/hello.ex | 2 +- mix.exs | 4 ++-- test/{actor_test.exs => core_test.exs} | 7 +++---- test/demo_test.exs | 12 ++++++++++++ test/hello_test.exs | 9 --------- 6 files changed, 19 insertions(+), 17 deletions(-) rename lib/{ => core}/actor.ex (94%) rename lib/{ => demo}/hello.ex (85%) rename test/{actor_test.exs => core_test.exs} (82%) create mode 100644 test/demo_test.exs delete mode 100644 test/hello_test.exs diff --git a/lib/actor.ex b/lib/core/actor.ex similarity index 94% rename from lib/actor.ex rename to lib/core/actor.ex index 38d6829..7232be0 100644 --- a/lib/actor.ex +++ b/lib/core/actor.ex @@ -1,4 +1,4 @@ -defmodule Xplore.Actor do +defmodule Scopes.Core.Actor do defp loop(bhv) do receive do msg -> diff --git a/lib/hello.ex b/lib/demo/hello.ex similarity index 85% rename from lib/hello.ex rename to lib/demo/hello.ex index 2a09d35..edcb95e 100644 --- a/lib/hello.ex +++ b/lib/demo/hello.ex @@ -1,4 +1,4 @@ -defmodule Hello do +defmodule Scopes.Demo.Hello do @moduledoc """ Documentation for `Hello`. """ diff --git a/mix.exs b/mix.exs index d4dc8f7..498cc7e 100644 --- a/mix.exs +++ b/mix.exs @@ -1,9 +1,9 @@ -defmodule Xplore.MixProject do +defmodule Scopes.MixProject do use Mix.Project def project do [ - app: :xplore, + app: :scopes, version: "0.1.0", elixir: "~> 1.18", start_permanent: Mix.env() == :prod, diff --git a/test/actor_test.exs b/test/core_test.exs similarity index 82% rename from test/actor_test.exs rename to test/core_test.exs index 0208cfb..155ad4a 100644 --- a/test/actor_test.exs +++ b/test/core_test.exs @@ -1,9 +1,8 @@ -defmodule ActorTest do +defmodule Scopes.CoreTest do use ExUnit.Case, async: true + alias Scopes.Core.Actor - alias Xplore.Actor - - describe "simple-actors:" do + describe "actors:" do test "basic-life-cycle" do this = self() ac = Actor.create(fn msg -> send(this, msg) end) diff --git a/test/demo_test.exs b/test/demo_test.exs new file mode 100644 index 0000000..120d813 --- /dev/null +++ b/test/demo_test.exs @@ -0,0 +1,12 @@ +defmodule Scopes.DemoTest do + use ExUnit.Case, async: true + alias Scopes.Demo.Hello + doctest Hello + + describe "hello:" do + test "greets the world" do + assert Hello.hello() == :world + end + end +end + diff --git a/test/hello_test.exs b/test/hello_test.exs deleted file mode 100644 index e7f9326..0000000 --- a/test/hello_test.exs +++ /dev/null @@ -1,9 +0,0 @@ -defmodule HelloTest do - use ExUnit.Case - doctest Hello - - test "greets the world" do - assert Hello.hello() == :world - end -end -