Skip to content

Commit

Permalink
Rename repo to CheckerCab (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffreyPS authored Dec 3, 2021
1 parent 4e56e34 commit ee3f8ad
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ erl_crash.dump
*.ez

# Ignore package tarball (built via "mix hex.build").
cookie_cutter-*.tar
checker_cab-*.tar

# Gets created when CI setup is used locally.
/ci/creds
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CookieCutter
# CheckerCab

**Important**: if you're creating a new Elixir library or service, make sure to read the Elixir project runbook in the [engineering repo](https://github.com/Shimmur/engineering/blob/main/runbooks/services/elixir_application.md).

Expand Down
10 changes: 5 additions & 5 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resources:
webhook_token: b6fd0d78
icon: github-circle
source:
repository: Shimmur/elixir-lib-cookie-cutter
repository: Shimmur/checker_cab
access_token: ((github.token))

# Used for operating on <main>
Expand All @@ -30,7 +30,7 @@ resources:
check_every: 1h
webhook_token: b6fd0d78
source:
uri: https://github.com/Shimmur/elixir-lib-cookie-cutter.git
uri: https://github.com/Shimmur/checker_cab.git
branch: main
username: ((github.username))
password: ((github.token))
Expand All @@ -41,7 +41,7 @@ resources:
check_every: 1h
source:
branch: main
repository: Shimmur/elixir-lib-cookie-cutter
repository: Shimmur/checker_cab
access_token: ((github.token))

# Used as the base image for running tests; found in Shimmur/docker-images
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
image: build-base-image
params:
HEXPM_KEY: ((hexpm.key))
COVERALLS_REPO_TOKEN: ((coveralls.elixir_lib_cookie_cutter_repo_token))
COVERALLS_REPO_TOKEN: ((coveralls.elixir_lib_checker_cab_repo_token))
privileged: true
file: git-pr/ci/tasks/test-pr.yml
on_failure:
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
image: build-base-image
params:
HEXPM_KEY: ((hexpm.key))
COVERALLS_REPO_TOKEN: ((coveralls.elixir_lib_cookie_cutter_repo_token))
COVERALLS_REPO_TOKEN: ((coveralls.elixir_lib_checker_cab_repo_token))
privileged: true
file: git-main/ci/tasks/test-main.yml
on_failure:
Expand Down
4 changes: 2 additions & 2 deletions lib/cookie_cutter.ex → lib/checker_cab.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule CookieCutter do
defmodule CheckerCab do
@moduledoc """
Documentation for CookieCutter.
Documentation for CheckerCab.
"""
import ExUnit.Assertions, only: [assert: 2, flunk: 1]

Expand Down
6 changes: 3 additions & 3 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
defmodule CookieCutter.MixProject do
defmodule CheckerCab.MixProject do
use Mix.Project

@version "0.1.0"

def project do
[
app: :cookie_cutter,
app: :checker_cab,
version: @version,
elixir: "~> 1.11.2",
test_coverage: [tool: ExCoveralls],
Expand Down Expand Up @@ -35,7 +35,7 @@ defmodule CookieCutter.MixProject do
[
organization: "community",
description: "TODO",
links: %{"GitHub" => "https://github.com/Shimmur/elixir-lib-cookie-cutter"}
links: %{"GitHub" => "https://github.com/Shimmur/checker_cab"}
]
end

Expand Down
51 changes: 0 additions & 51 deletions replace.sh

This file was deleted.

32 changes: 16 additions & 16 deletions test/cookie_cutter_test.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule CookieCutterTest do
defmodule CheckerCabTest do
use ExUnit.Case

defmodule ModuleForStructTests do
Expand All @@ -20,7 +20,7 @@ defmodule CookieCutterTest do
input = %{key1: "value1", key2: "value2", key3: "value3"}

### kickoff
result = CookieCutter.fields_for(input)
result = CheckerCab.fields_for(input)

assert Enum.sort(result) == Enum.sort(Map.keys(input))
end
Expand All @@ -29,7 +29,7 @@ defmodule CookieCutterTest do
input = %{"key1" => :value1, "key2" => :value2, "key3" => :value3}

### kickoff
result = CookieCutter.fields_for(input)
result = CheckerCab.fields_for(input)

assert Enum.sort(result) == Enum.sort(Map.keys(input))
end
Expand All @@ -38,7 +38,7 @@ defmodule CookieCutterTest do
input = %ModuleForStructTests{}

### kickoff
result = CookieCutter.fields_for(input)
result = CheckerCab.fields_for(input)

expected_keys =
input
Expand All @@ -53,7 +53,7 @@ defmodule CookieCutterTest do
input = %ModuleForEctoSchemaTests{}

### kickoff
result = CookieCutter.fields_for(input)
result = CheckerCab.fields_for(input)

expected_keys =
input
Expand All @@ -68,7 +68,7 @@ defmodule CookieCutterTest do
input = ModuleForEctoSchemaTests

### kickoff
result = CookieCutter.fields_for(input)
result = CheckerCab.fields_for(input)

expected_keys =
input
Expand All @@ -87,7 +87,7 @@ defmodule CookieCutterTest do
input = [expected: expected, actual: actual, fields: Map.keys(expected)]

## kickoff
assert :ok == CookieCutter.assert_values_for(input)
assert :ok == CheckerCab.assert_values_for(input)
end

test "success: it raises when a key in `:fields` is missing from the `:expected` input" do
Expand All @@ -99,7 +99,7 @@ defmodule CookieCutterTest do
expected_message = "Key for field: #{inspect(:key2)} didn't exist in #{:expected}"

assert_raise(ExUnit.AssertionError, formatted_error_message(expected_message), fn ->
CookieCutter.assert_values_for(input)
CheckerCab.assert_values_for(input)
end)
end

Expand All @@ -112,7 +112,7 @@ defmodule CookieCutterTest do
expected_message = "Key for field: #{inspect(:key2)} didn't exist in #{:actual}"

assert_raise(ExUnit.AssertionError, formatted_error_message(expected_message), fn ->
CookieCutter.assert_values_for(input)
CheckerCab.assert_values_for(input)
end)
end

Expand All @@ -129,7 +129,7 @@ defmodule CookieCutterTest do

## kickoff
assert_raise(ExUnit.AssertionError, formatted_error_message(expected_message), fn ->
CookieCutter.assert_values_for(input)
CheckerCab.assert_values_for(input)
end)
end

Expand All @@ -139,7 +139,7 @@ defmodule CookieCutterTest do

## kickoff
# if things match, :ok. If they don't, it will raise.
assert :ok == CookieCutter.assert_values_for(input)
assert :ok == CheckerCab.assert_values_for(input)
end

test "success: with string keys explicitly specified" do
Expand All @@ -148,7 +148,7 @@ defmodule CookieCutterTest do

## kickoff
# if things match, :ok. If they don't, it will raise.
assert :ok == CookieCutter.assert_values_for(input)
assert :ok == CheckerCab.assert_values_for(input)
end

test "success: with fields as strings" do
Expand All @@ -157,7 +157,7 @@ defmodule CookieCutterTest do

## kickoff
# if things match, :ok. If they don't, it will raise.
assert :ok == CookieCutter.assert_values_for(input)
assert :ok == CheckerCab.assert_values_for(input)
end

test "success: with skip_fields key passed in" do
Expand All @@ -166,7 +166,7 @@ defmodule CookieCutterTest do

input = [expected: expected, actual: actual, fields: Map.keys(expected), skip_fields: [:key2]]

assert :ok == CookieCutter.assert_values_for(input)
assert :ok == CheckerCab.assert_values_for(input)
end

test "success: with string skip_fields key passed in" do
Expand All @@ -175,7 +175,7 @@ defmodule CookieCutterTest do

input = [expected: expected, actual: actual, fields: Map.keys(expected), skip_fields: ["key2"]]

assert :ok == CookieCutter.assert_values_for(input)
assert :ok == CheckerCab.assert_values_for(input)
end
end

Expand All @@ -188,7 +188,7 @@ defmodule CookieCutterTest do

input = [expected: expected, actual: actual, fields: Map.keys(expected), opts: [convert_dates: true]]

assert :ok == CookieCutter.assert_values_for(input)
assert :ok == CheckerCab.assert_values_for(input)
end
end

Expand Down

0 comments on commit ee3f8ad

Please sign in to comment.