Skip to content

Commit

Permalink
Use cookiecutter organization name throughout project
Browse files Browse the repository at this point in the history
  • Loading branch information
samamorgan authored and Jacob Kent committed Jan 18, 2023
1 parent c4fbf7d commit d078220
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"project_name_verbose": "Sample App",
"repo_name": "{{ cookiecutter.project_name.lower()|replace(' ', '_')|replace('-', '_')|replace('.', '_')|trim() }}",
"author_name": "Ben Beecher",
"email": "{{ cookiecutter.author_name.lower()|replace(' ', '-') }}@lightmatter.com",
"org_name": "Lightmatter",
"email": "{{ cookiecutter.author_name.lower()|replace(' ', '-') }}@{{ cookiecutter.org_name|lower }}.com",
"description": "A short description of the project.",
"domain_name": "example.com",
"version": "0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.repo_name}}/scripts/setup_github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ if [ -d .git ]; then
else
echo "Setting up Git"
git init . -b main
git remote add origin "[email protected]:Lightmatter/{{ cookiecutter.repo_name }}.git"
git remote add origin "[email protected]:{{ cookiecutter.org_name }}/{{ cookiecutter.repo_name }}.git"
#todo - add all and make initial push
fi
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</a>
</div>
<p class="mt-8 text-center text-base text-gray-400">
&copy; {{ now().strftime("%Y") }} Lightmatter, Inc. All rights reserved.
&copy; {{ now().strftime("%Y") }} {{ cookiecutter.org_name }} All rights reserved.
</p>
</div>
</footer>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "base.jinja" %}
{% from "components/button.jinja" import button %}
{% block title %}
Index
{{ cookiecutter.org_name }} Base Install
{% endblock title %}
{% block content %}
<div class="container mx-auto">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from .models import User

email_seq = seq("test@lightmatter.com")
email_seq = seq("test@{{ cookiecutter.org_name|lower }}.com")

user = Recipe(
User,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,16 @@ def test_file_upload():


def test_send_email(mailoutbox):
mail.send_mail("subject", "body", "[email protected]", ["[email protected]"])
mail.send_mail(
"subject",
"body",
"from@{{ cookiecutter.org_name|lower }}.com",
["to@{{ cookiecutter.org_name|lower }}.com"],
)
assert len(mailoutbox) == 1

m = mailoutbox[0]
assert m.subject == "subject"
assert m.body == "body"
assert m.from_email == "from@lightmatter.com"
assert list(m.to) == ["to@lightmatter.com"]
assert m.from_email == "from@{{ cookiecutter.org_name|lower }}.com"
assert list(m.to) == ["to@{{ cookiecutter.org_name|lower }}.com"]

0 comments on commit d078220

Please sign in to comment.