Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIME component #496

Merged
merged 4 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ nav:
- project://framework
- project://image_size
- project://mercure
- project://mime
- project://negotiation
- project://routing
- project://serializer
Expand Down
1 change: 1 addition & 0 deletions scripts/diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ diff dotenv
diff event-dispatcher
diff image-size
diff mercure
diff mime
diff framework
diff negotiation
diff routing
Expand Down
1 change: 1 addition & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions scripts/repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions shard.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions shard.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 9 additions & 0 deletions src/components/mime/.editorconfig
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions src/components/mime/.gitignore
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions src/components/mime/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions src/components/mime/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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.
21 changes: 21 additions & 0 deletions src/components/mime/LICENSE
Original file line number Diff line number Diff line change
@@ -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.
15 changes: 15 additions & 0 deletions src/components/mime/README.md
Original file line number Diff line number Diff line change
@@ -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.
31 changes: 31 additions & 0 deletions src/components/mime/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -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}
17 changes: 17 additions & 0 deletions src/components/mime/shard.yml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
7 changes: 7 additions & 0 deletions src/components/mime/spec/spec_helper.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require "spec"

require "athena-spec"

require "../src/athena-mime"

ASPEC.run_all
6 changes: 6 additions & 0 deletions src/components/mime/src/athena-mime.cr
Original file line number Diff line number Diff line change
@@ -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
Loading