From 619f4cd7ba5d43766439746061b6d2394fda9730 Mon Sep 17 00:00:00 2001
From: George Dietrich <dev@dietrich.pub>
Date: Wed, 1 Jan 2025 21:25:14 -0500
Subject: [PATCH 1/3] Squashed 'src/components/mime/' content from commit
 2eabbaf

git-subtree-dir: src/components/mime
git-subtree-split: 2eabbaf24130b0378df64034f860b693fe025b0b
---
 .editorconfig            |  9 +++++++++
 .gitignore               |  9 +++++++++
 CHANGELOG.md             |  7 +++++++
 CONTRIBUTING.md          |  3 +++
 LICENSE                  | 21 +++++++++++++++++++++
 README.md                | 15 +++++++++++++++
 mkdocs.yml               | 31 +++++++++++++++++++++++++++++++
 shard.yml                | 17 +++++++++++++++++
 spec/athena-mime_spec.cr |  7 +++++++
 spec/spec_helper.cr      |  7 +++++++
 src/athena-mime.cr       |  6 ++++++
 11 files changed, 132 insertions(+)
 create mode 100644 .editorconfig
 create mode 100644 .gitignore
 create mode 100644 CHANGELOG.md
 create mode 100644 CONTRIBUTING.md
 create mode 100644 LICENSE
 create mode 100644 README.md
 create mode 100644 mkdocs.yml
 create mode 100644 shard.yml
 create mode 100644 spec/athena-mime_spec.cr
 create mode 100644 spec/spec_helper.cr
 create mode 100644 src/athena-mime.cr

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000..163eb75c8
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,9 @@
+root = true
+
+[*.cr]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+indent_style = space
+indent_size = 2
+trim_trailing_whitespace = true
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..0bbd4a9f4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+/docs/
+/lib/
+/bin/
+/.shards/
+*.dwarf
+
+# Libraries don't need dependency lock
+# Dependencies will be locked in applications that use them
+/shard.lock
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 000000000..c28e7c81e
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,7 @@
+# Changelog
+
+## [0.1.0] - YYYY-MM-DD
+
+_Initial release._
+
+[0.1.0]: https://github.com/athena-framework/mime/releases/tag/v0.1.0
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 000000000..9bbfb4915
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,3 @@
+# Contributing
+
+This repository is a read-only mirror. Please refer the [main Athena repository](https://github.com/athena-framework/athena/blob/master/CONTRIBUTING.md) on how to start contributing.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000..5b2ff9ef0
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2024 George Dietrich
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 000000000..95da6df1c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,15 @@
+# MIME
+
+[![Common Changelog](https://common-changelog.org/badge.svg)](https://common-changelog.org)
+[![CI](https://github.com/athena-framework/athena/workflows/CI/badge.svg)](https://github.com/athena-framework/athena/actions/workflows/ci.yml)
+[![Latest release](https://img.shields.io/github/release/athena-framework/mime.svg)](https://github.com/athena-framework/mime/releases)
+
+Allows manipulating MIME messages.
+
+## Getting Started
+
+Checkout the [Documentation](https://athenaframework.org/MIME).
+
+## Contributing
+
+Read the general [Contributing Guide](./CONTRIBUTING.md) for information on how to get started.
diff --git a/mkdocs.yml b/mkdocs.yml
new file mode 100644
index 000000000..917a6e68c
--- /dev/null
+++ b/mkdocs.yml
@@ -0,0 +1,31 @@
+INHERIT: ../../../mkdocs-common.yml
+
+site_name: MIME
+site_url: https://athenaframework.org/MIME/
+repo_url: https://github.com/athena-framework/mime
+
+nav:
+  - Introduction: README.md
+  - Back to Manual: project://.
+  - API:
+    - Aliases: aliases.md
+    - Top Level: top_level.md
+    - '*'
+
+plugins:
+  - search
+  - section-index
+  - literate-nav
+  - gen-files:
+      scripts:
+        - ../../../gen_doc_stubs.py
+  - mkdocstrings:
+      default_handler: crystal
+      custom_templates: ../../../docs/templates
+      handlers:
+        crystal:
+          crystal_docs_flags:
+            - ../../../docs/index.cr
+            - ../../../lib/athena-mime/src/athena-mime.cr
+          source_locations:
+            lib/athena-mime: https://github.com/athena-framework/mime/blob/v{shard_version}/{file}#L{line}
diff --git a/shard.yml b/shard.yml
new file mode 100644
index 000000000..798a4c44a
--- /dev/null
+++ b/shard.yml
@@ -0,0 +1,17 @@
+name: athena-mime
+
+version: 0.1.0
+
+crystal: '>= 0.36.0'
+
+license: MIT
+
+repository: https://github.com/athena-framework/mime
+
+documentation: https://athenaframework.org/MIME
+
+description: |
+  Allows manipulating MIME messages.
+
+authors:
+  - George Dietrich <dev@dietrich.pub>
diff --git a/spec/athena-mime_spec.cr b/spec/athena-mime_spec.cr
new file mode 100644
index 000000000..140236bc9
--- /dev/null
+++ b/spec/athena-mime_spec.cr
@@ -0,0 +1,7 @@
+require "./spec_helper"
+
+describe Athena::MIME do
+  it "works" do
+    false.should eq(true)
+  end
+end
diff --git a/spec/spec_helper.cr b/spec/spec_helper.cr
new file mode 100644
index 000000000..de13f7eb3
--- /dev/null
+++ b/spec/spec_helper.cr
@@ -0,0 +1,7 @@
+require "spec"
+
+require "athena-spec"
+
+require "../src/athena-mime"
+
+ASPEC.run_all
diff --git a/src/athena-mime.cr b/src/athena-mime.cr
new file mode 100644
index 000000000..b8eafb888
--- /dev/null
+++ b/src/athena-mime.cr
@@ -0,0 +1,6 @@
+# Convenience alias to make referencing `Athena::MIME` types easier.
+alias AMIME = Athena::MIME
+
+module Athena::MIME
+  VERSION = "0.1.0"
+end

From 03047623ffd0d54c1d2a9e96ccfddd1a799e7762 Mon Sep 17 00:00:00 2001
From: George Dietrich <dev@dietrich.pub>
Date: Wed, 1 Jan 2025 21:28:27 -0500
Subject: [PATCH 2/3] Integrate component

---
 mkdocs.yml         | 1 +
 scripts/diff.sh    | 1 +
 scripts/release.sh | 1 +
 scripts/repo.sh    | 1 +
 shard.dev.yml      | 2 ++
 shard.prod.yml     | 3 +++
 shard.yml          | 2 ++
 7 files changed, 11 insertions(+)

diff --git a/mkdocs.yml b/mkdocs.yml
index 1c84c8b73..a2e1b8475 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -42,6 +42,7 @@ nav:
     - project://framework
     - project://image_size
     - project://mercure
+    - project://mime
     - project://negotiation
     - project://routing
     - project://serializer
diff --git a/scripts/diff.sh b/scripts/diff.sh
index a18b60e56..cf7e1aa58 100755
--- a/scripts/diff.sh
+++ b/scripts/diff.sh
@@ -44,6 +44,7 @@ diff dotenv
 diff event-dispatcher
 diff image-size
 diff mercure
+diff mime
 diff framework
 diff negotiation
 diff routing
diff --git a/scripts/release.sh b/scripts/release.sh
index 518902655..fb6835298 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -29,6 +29,7 @@ function tag()
   componentNameMap[dotenv]="Dotenv"
   componentNameMap[event-dispatcher]="Event Dispatcher"
   componentNameMap[mercure]=Mercure
+  componentNameMap[mime]=MIME
   componentNameMap[framework]=Framework
   componentNameMap[image-size]="Image Size"
   componentNameMap[negotiation]=Negotiation
diff --git a/scripts/repo.sh b/scripts/repo.sh
index aed1b30e0..d32217e1f 100755
--- a/scripts/repo.sh
+++ b/scripts/repo.sh
@@ -38,6 +38,7 @@ case $METHOD in
     maybeSync "src/components/image_size" image-size https://github.com/athena-framework/image-size.git
     maybeSync "src/components/framework" framework https://github.com/athena-framework/framework.git
     maybeSync "src/components/mercure" mercure https://github.com/athena-framework/mercure.git
+    maybeSync "src/components/mime" mime https://github.com/athena-framework/mime.git
     maybeSync "src/components/negotiation" negotiation https://github.com/athena-framework/negotiation.git
     maybeSync "src/components/routing" routing https://github.com/athena-framework/routing.git
     maybeSync "src/components/serializer" serializer https://github.com/athena-framework/serializer.git
diff --git a/shard.dev.yml b/shard.dev.yml
index 8489fd321..fe4ddd9d9 100644
--- a/shard.dev.yml
+++ b/shard.dev.yml
@@ -16,6 +16,8 @@ dependencies:
     path: ./src/components/image_size
   athena-mercure:
     path: ./src/components/mercure
+  athena-mime:
+    path: ./src/components/mime
   athena-negotiation:
     path: ./src/components/negotiation
   athena-routing:
diff --git a/shard.prod.yml b/shard.prod.yml
index cb255e4b8..a559ba086 100644
--- a/shard.prod.yml
+++ b/shard.prod.yml
@@ -25,6 +25,9 @@ dependencies:
   athena-mercure:
     github: athena-framework/mercure
     branch: docs
+  athena-mime:
+    github: athena-framework/mime
+    branch: docs
   athena-negotiation:
     github: athena-framework/negotiation
     branch: docs
diff --git a/shard.yml b/shard.yml
index 1254cae4b..8bff55b73 100644
--- a/shard.yml
+++ b/shard.yml
@@ -30,6 +30,8 @@ dependencies:
     github: athena-framework/image-size
   athena-mercure:
     github: athena-framework/mercure
+  athena-mime:
+    github: athena-framework/mime
   athena-negotiation:
     github: athena-framework/negotiation
   athena-routing:

From 42282e807d3b7f52ccc72db4b6f04a6381e926fd Mon Sep 17 00:00:00 2001
From: George Dietrich <dev@dietrich.pub>
Date: Wed, 1 Jan 2025 21:36:09 -0500
Subject: [PATCH 3/3] Remove un-needed `mime` spec file

---
 src/components/mime/spec/athena-mime_spec.cr | 7 -------
 1 file changed, 7 deletions(-)
 delete mode 100644 src/components/mime/spec/athena-mime_spec.cr

diff --git a/src/components/mime/spec/athena-mime_spec.cr b/src/components/mime/spec/athena-mime_spec.cr
deleted file mode 100644
index 140236bc9..000000000
--- a/src/components/mime/spec/athena-mime_spec.cr
+++ /dev/null
@@ -1,7 +0,0 @@
-require "./spec_helper"
-
-describe Athena::MIME do
-  it "works" do
-    false.should eq(true)
-  end
-end