Skip to content

Commit

Permalink
Change component name to lowercase
Browse files Browse the repository at this point in the history
Capitalized component names were only a remnant of camel-cased elixir
modules. Now, with component names being separate, there is no need to
follow this convention. Lower-case arguments are the easiest way to
interact with an application.
  • Loading branch information
Glutexo committed Nov 4, 2023
1 parent 59a6535 commit 96031e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/cli.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule Onigumo.CLI do
@components %{
:Downloader => Onigumo.Downloader
:downloader => Onigumo.Downloader
}

def main(argv) do
Expand Down
4 changes: 2 additions & 2 deletions test/onigumo_cli_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defmodule OnigumoCLITest do

describe("Onigumo.CLI.main/1") do
@tag :tmp_dir
test("run CLI with 'Downloader' argument", %{tmp_dir: tmp_dir}) do
test("run CLI with 'downloader' argument", %{tmp_dir: tmp_dir}) do
expect(HTTPoisonMock, :start, fn -> nil end)
expect(HTTPoisonMock, :get!, length(@urls), &HttpSupport.response/1)

Expand All @@ -18,7 +18,7 @@ defmodule OnigumoCLITest do
input_file_content = InputSupport.url_list(@urls)
File.write!(input_path_tmp, input_file_content)
File.cd(tmp_dir)
Onigumo.CLI.main(["Downloader"])
Onigumo.CLI.main(["downloader"])
end

test("run CLI with invalid argument") do
Expand Down

0 comments on commit 96031e8

Please sign in to comment.