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

Doc updates #261

Merged
merged 4 commits into from
Feb 6, 2023
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
5 changes: 5 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ neccessarly = "necessarily"
arrises = "arises"
moer = "more"
annotaiotn = "annotation"
comonents = "components"
encapsulte = "encapsulate"
proivded = "provided"
beavior = "behavior"
easisly = "easily"

[files]
extend-exclude = [
Expand Down
2 changes: 1 addition & 1 deletion src/components/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies:
## Documentation

If using the component on its own, checkout the [API documentation](https://athenaframework.org/Config).
If using the component as part of Athena, also checkout the [external documentation](https://athenaframework.org/components/config).
If using the component as part of Athena, also checkout the [external documentation](https://athenaframework.org/architecture/config).

## Contributing

Expand Down
6 changes: 3 additions & 3 deletions src/components/config/src/athena-config.cr
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module Athena
#
# Then run `shards install`, being sure to require it via `require "athena-config"`.
#
# From here, checkout the [manual](/components/config) for some additional information on how to use it both within and outside of the framework.
# From here, checkout the [manual](/architecture/config) for some additional information on how to use it both within and outside of the framework.
#
# INFO: DI parameter injection requires the [Athena::DependencyInjection][] component as well.
module Config
Expand Down Expand Up @@ -86,14 +86,14 @@ module Athena
# The instance is a lazily initialized singleton.
#
# `ACF.load_configuration` may be redefined to change _how_ the configuration object is provided; e.g. create it from a `YAML` or `JSON` configuration file.
# See the [external documentation](https://athenaframework.org/components/config/#configuration) for more information.
# See the [external documentation](/architecture/config/#configuration) for more information.
class_getter config : ACF::Base { ACF.load_configuration }

# Returns the configured `ACF::Parameters` instance.
# The instance is a lazily initialized singleton.
#
# `ACF.load_parameters` may be redefined to change _how_ the parameters object is provided; e.g. create it from a `YAML` or `JSON` configuration file.
# See the [external documentation](https://athenaframework.org/components/config/#parameters) for more information.
# See the [external documentation](/architecture/config/#parameters) for more information.
class_getter parameters : ACF::Parameters { ACF.load_parameters }

# By default return an empty configuration type.
Expand Down
2 changes: 1 addition & 1 deletion src/components/console/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies:
## Documentation

If using the component on its own, checkout the [API documentation](https://athenaframework.org/Console).
If using the component as part of Athena, also checkout the [external documentation](https://athenaframework.org/components/console).
If using the component as part of Athena, also checkout the [external documentation](https://athenaframework.org/architecture/console).

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion src/components/console/src/annotations.cr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Athena::Console::Annotations
# Annotation containing metadata related to an `ACON::Command`.
# This is the preferred way of configuring a command as it enables lazy command instantiation when used within the Athena framework.
# Checkout the [external documentation](/components/console/) for more information.
# Checkout the [external documentation](/architecture/console/) for more information.
#
# ```
# @[ACONA::AsCommand("add", description: "Sums two numbers, optionally making making the sum negative")]
Expand Down
2 changes: 1 addition & 1 deletion src/components/console/src/command.cr
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
# ```
#
# TIP: The suggested way of setting the name and description of the command is via the `ACONA::AsCommand` annotation.
# This enables lazy command instantiation when used within the Athena framework. Checkout the [external documentation](/components/console/) for more information.
# This enables lazy command instantiation when used within the Athena framework. Checkout the [external documentation](/architecture/console/) for more information.
#
# The `#configure` command is called automatically at the end of the constructor method.
# If your command defines its own, be sure to call `super()` to also run the parent constructor.
Expand Down
2 changes: 1 addition & 1 deletion src/components/dependency_injection/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ _First release a part of the monorepo._
### Added

- Add dependency on `athena-framework/config` ([#20](https://github.com/athena-framework/dependency-injection/pull/20)) (George Dietrich)
- Add support for injecting [parameters](https://athenaframework.org/components/config/#parameters) into a service ([#20](https://github.com/athena-framework/dependency-injection/pull/20)) (George Dietrich)
- Add support for injecting [parameters](https://athenaframework.org/architecture/config/#parameters) into a service ([#20](https://github.com/athena-framework/dependency-injection/pull/20)) (George Dietrich)
- Add support for [service proxies](https://athenaframework.org/DependencyInjection/Register/#Athena::DependencyInjection::Register--service-proxies) ([#21](https://github.com/athena-framework/dependency-injection/pull/21)) (George Dietrich)

### Removed
Expand Down
2 changes: 1 addition & 1 deletion src/components/dependency_injection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies:
## Documentation

If using the component on its own, checkout the [API documentation](https://athenaframework.org/DependencyInjection).
If using the component as part of Athena, also checkout the [external documentation](https://athenaframework.org/components/dependency_injection).
If using the component as part of Athena, also checkout the [external documentation](https://athenaframework.org/architecture/dependency_injection).

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions src/components/dependency_injection/src/annotations.cr
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ module Athena::DependencyInjection
#
# ### Parameters
#
# The `Athena::Config` component provides a way to manage `ACF::Parameters` objects used to define reusable [parameters](/components/config#parameters).
# The `Athena::Config` component provides a way to manage `ACF::Parameters` objects used to define reusable [parameters](/architecture/config#parameters).
# It is possible to inject these parameters directly into services in a type safe way.
#
# Parameter injection utilizes a specially formatted string, similar to tagged services.
Expand Down Expand Up @@ -308,7 +308,7 @@ module Athena::DependencyInjection
#
# ### Configuration
#
# The `Athena::Config` component provides a way to manage `ACF::Base` objects used for [configuration](/components/config#configuration).
# The `Athena::Config` component provides a way to manage `ACF::Base` objects used for [configuration](/architecture/config#configuration).
# The `Athena::DependencyInjection` component leverages the `ACFA::Resolvable` annotation to allow injecting entire configuration objects into services
# in addition to individual [parameters][Athena::DependencyInjection::Register--parameters].
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ alias ADI = Athena::DependencyInjection
# ## Getting Started
#
# If using this component within the [Athena Framework][Athena::Framework], it is already installed and required for you.
# Checkout the [manual](/components/dependency_injection) for some additional information on how to use it within the framework.
# Checkout the [manual](/architecture/dependency_injection) for some additional information on how to use it within the framework.
#
# If using it outside of the framework, you will first need to add it as a dependency:
#
Expand Down
2 changes: 1 addition & 1 deletion src/components/dependency_injection/src/ext/console.cr
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Athena::DependencyInjection::Console
# ADI.container.athena_console_application.run
# ```
#
# Checkout the [external documentation](/components/console/) for more information.
# Checkout the [external documentation](/architecture/console/) for more information.
class Application < ACON::Application
protected def initialize(
command_loader : ACON::Loader::Interface? = nil,
Expand Down
2 changes: 1 addition & 1 deletion src/components/event_dispatcher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies:
## Documentation

If using the component on its own, checkout the [API documentation](https://athenaframework.org/EventDispatcher).
If using the component as part of Athena, also checkout the [external documentation](https://athenaframework.org/components/event_dispatcher).
If using the component as part of Athena, also checkout the [external documentation](https://athenaframework.org/architecture/event_dispatcher).

## Contributing

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ alias AEDA = AED::Annotations
# ## Getting Started
#
# If using this component within the [Athena Framework][Athena::Framework], it is already installed and required for you.
# Checkout the [manual](/components/event_dispatcher) for some additional information on how to use it within the framework.
# Checkout the [manual](/architecture/event_dispatcher) for some additional information on how to use it within the framework.
#
# If using it outside of the framework, you will first need to add it as a dependency:
#
Expand Down
4 changes: 2 additions & 2 deletions src/components/framework/src/annotations.cr
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ module Athena::Framework::Annotations
# # }
# ```
#
# See the [external documentation](/components/validator/) for more information.
# See the [external documentation](/architecture/validator/) for more information.
#
# ### Map
#
Expand Down Expand Up @@ -347,6 +347,6 @@ module Athena::Framework::Annotations
# end
# ```
#
# See the [external documentation](/components/serializer/) for more information.
# See the [external documentation](/architecture/serializer/) for more information.
annotation View; end
end
4 changes: 2 additions & 2 deletions src/components/framework/src/athena.cr
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ module Athena::Framework
# The `AED::Event` that are emitted via `Athena::EventDispatcher` to handle a request during its life-cycle.
# Custom events can also be defined and dispatched within a controller, listener, or some other service.
#
# See each specific event and the [external documentation](/components/event_dispatcher/) for more information.
# See each specific event and the [external documentation](/architecture/event_dispatcher/) for more information.
module Events; end

# Exception handling in Athena is similar to exception handling in any Crystal program, with the addition of a new unique exception type, `ATH::Exceptions::HTTPException`.
Expand All @@ -106,7 +106,7 @@ module Athena::Framework

# The `AED::EventListenerInterface` that act upon `ATH::Events` to handle a request. Custom listeners can also be defined, see `AED::EventListenerInterface`.
#
# See each listener and the [external documentation](/components/event_dispatcher/) for more information.
# See each listener and the [external documentation](/architecture/event_dispatcher/) for more information.
module Listeners; end

# Namespace for types related to request parameter processing.
Expand Down
2 changes: 1 addition & 1 deletion src/components/framework/src/config/config.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require "./view_handler"

# Encompasses all configuration related to the `Athena::Framework` component.
#
# For a higher level introduction to configuring Athena components, see the [external documentation](/components/config).
# For a higher level introduction to configuring Athena components, see the [external documentation](/architecture/config).
struct Athena::Framework::Config
# Configuration related to `ATH::Listeners::CORS`.
#
Expand Down
4 changes: 2 additions & 2 deletions src/components/framework/src/config/content_negotiation.cr
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct Athena::Framework::Config

# Returns a `Regex` representing the hostname that this rule should be scoped to.
#
# [parameters](/components/config#parameters) may be used to generalize this.
# [parameters](/architecture/config#parameters) may be used to generalize this.
getter host : Regex?

# Returns the formats that should be considered for this set of routes.
Expand Down Expand Up @@ -48,7 +48,7 @@ struct Athena::Framework::Config
end

# This method should be overridden in order to provide the configuration for `ATH::Listeners::Format`.
# See the [external documentation](/components/negotiation) for more details.
# See the [external documentation](/architecture/negotiation) for more details.
#
# By default it returns `nil`, which disables the listener.
#
Expand Down
2 changes: 1 addition & 1 deletion src/components/framework/src/config/cors.cr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ struct Athena::Framework::Config; end
@[ACFA::Resolvable("routing.cors")]
struct Athena::Framework::Config::CORS
# This method should be overridden in order to provide the configuration for `ATH::Listeners::CORS`.
# See the [external documentation](/components/config#configuration) for more details.
# See the [external documentation](/architecture/config#configuration) for more details.
#
# By default it returns `nil`, which disables the listener.
#
Expand Down
2 changes: 1 addition & 1 deletion src/components/framework/src/config/view_handler.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require "./config"
@[ACFA::Resolvable("routing.view_handler")]
struct Athena::Framework::Config::ViewHandler
# This method should be overridden in order to provide configuration overrides for `ATH::View::ViewHandlerInterface`.
# See the [external documentation](/components/negotiation) for more details.
# See the [external documentation](/architecture/negotiation) for more details.
#
# NOTE: The `#failed_validation_status` is currently not used. Included for future work.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Responsible for resolving the arguments that will be passed to a controller action.
#
# See the [external documentation](/components/#argument-resolution) for more information.
# See the [external documentation](/architecture/#argument-resolution) for more information.
module Athena::Framework::Controller::ArgumentResolverInterface
# Returns an array of arguments resolved from the provided *request* for the given *route*.
abstract def get_arguments(request : ATH::Request, route : ATH::ActionBase) : Array
Expand Down
2 changes: 1 addition & 1 deletion src/components/framework/src/events/action_event.cr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require "./request_aware"

# Emitted after `ATH::Events::Request` and the related `ATH::Action` has been resolved, but before it has been executed.
#
# See the [external documentation](/components/#2-action-event) for more information.
# See the [external documentation](/architecture/#2-action-event) for more information.
class Athena::Framework::Events::Action < AED::Event
include Athena::Framework::Events::RequestAware

Expand Down
2 changes: 1 addition & 1 deletion src/components/framework/src/events/exception_event.cr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require "./settable_response"
#
# This event can be listened on to recover from errors or to modify the exception before it's rendered.
#
# See the [external documentation](/components/#8-exception-handling) for more information.
# See the [external documentation](/architecture/#8-exception-handling) for more information.
class Athena::Framework::Events::Exception < AED::Event
include Athena::Framework::Events::SettableResponse
include Athena::Framework::Events::RequestAware
Expand Down
2 changes: 1 addition & 1 deletion src/components/framework/src/events/request_event.cr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require "./settable_response"
#
# NOTE: If your listener logic requires that the the corresponding `ATH::Action` has been resolved, use `ATH::Events::Action` instead.
#
# See the [external documentation](/components/#1-request-event) for more information.
# See the [external documentation](/architecture/#1-request-event) for more information.
class Athena::Framework::Events::Request < AED::Event
include Athena::Framework::Events::SettableResponse
include Athena::Framework::Events::RequestAware
Expand Down
2 changes: 1 addition & 1 deletion src/components/framework/src/events/response_event.cr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require "./request_aware"
# This event can be listened on to modify the response object further before it is returned;
# such as adding headers/cookies, compressing the response, etc.
#
# See the [external documentation](/components/#5-response-event) for more information.
# See the [external documentation](/architecture/#5-response-event) for more information.
class Athena::Framework::Events::Response < AED::Event
include Athena::Framework::Events::RequestAware

Expand Down
2 changes: 1 addition & 1 deletion src/components/framework/src/events/terminate_event.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require "./request_aware"
#
# This event can be listened on to perform tasks that are not required to finish before the response is sent; such as sending emails, or other "heavy" tasks.
#
# See the [external documentation](/components/#7-terminate-event) for more information.
# See the [external documentation](/architecture/#7-terminate-event) for more information.
class Athena::Framework::Events::Terminate < AED::Event
include Athena::Framework::Events::RequestAware

Expand Down
2 changes: 1 addition & 1 deletion src/components/framework/src/events/view_event.cr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require "./settable_response"
#
# This event can be listened on to handle converting a non `ATH::Response` into an `ATH::Response`.
#
# See `ATH::Listeners::View` and the [external documentation](/components/#4-view-event) for more information.
# See `ATH::Listeners::View` and the [external documentation](/architecture/#4-view-event) for more information.
class Athena::Framework::Events::View < AED::Event
include Athena::Framework::Events::SettableResponse
include Athena::Framework::Events::RequestAware
Expand Down
2 changes: 1 addition & 1 deletion src/components/framework/src/header_utils.cr
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Athena::Framework::HeaderUtils
# )
# ```
#
# TIP: See the [cookbook](/cookbook/listeners#static-files) for an example of how to serve static files.
# TIP: Checkout the [external documentation](/getting_started/#static-files) for an example of how to serve static files.
def self.make_disposition(disposition : ATH::BinaryFileResponse::ContentDisposition, filename : String, fallback_filename : String? = nil) : String
if fallback_filename.nil? && (!filename.ascii_only? || filename.includes?('%'))
fallback_filename = filename.gsub { |chr| chr.ascii? ? chr : '_' }
Expand Down
2 changes: 1 addition & 1 deletion src/components/framework/src/listeners/format_listener.cr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require "mime"
#
# `ATH::Request::FORMATS` is used to determine the related format from the request's `MIME` type.
#
# See the [negotiation](/components/negotiation) component for more information.
# See the [negotiation](/architecture/negotiation) component for more information.
struct Athena::Framework::Listeners::Format
include AED::EventListenerInterface

Expand Down
2 changes: 1 addition & 1 deletion src/components/framework/src/listeners/view_listener.cr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Allows creating format agnostic controllers by allowing them to return format agnostic data that
# is later used to render the content in the expected format.
#
# See the [negotiation](/components/negotiation) component for more information.
# See the [negotiation](/architecture/negotiation) component for more information.
struct Athena::Framework::Listeners::View
include AED::EventListenerInterface

Expand Down
4 changes: 2 additions & 2 deletions src/components/framework/src/parameters/parameters.cr
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Encompasses parameters related to the `Athena::Framework` component.
#
# For a higher level introduction to using parameters, see the [external documentation](/components/config).
# For a higher level introduction to using parameters, see the [external documentation](/architecture/config).
struct Athena::Framework::Parameters
# This method should be overridden in order to customize the parameters for the `Athena::Framework` component.
# See the [external documentation](/components/config#parameters) for more details.
# See the [external documentation](/architecture/config#parameters) for more details.
#
# ```
# # Returns an `ATH::Parameters` instance with customized parameter values.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# ```
#
# The implementation for `HTML` for example could use `.to_s` as depicted here, or utilize a templating engine, possibly taking advantage
# of [custom annotations](/components/config/#custom-annotations) to allow specifying the related template name.
# of [custom annotations](/architecture/config/#custom-annotations) to allow specifying the related template name.
module Athena::Framework::View::FormatHandlerInterface
TAG = "athena.format_handler"

Expand Down
2 changes: 1 addition & 1 deletion src/components/framework/src/view/format_negotiator.cr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@[ADI::Register]
# An extension of `ANG::Negotiator` that supports resolving the format based on an applications `ATH::Config::ContentNegotiation` rules.
#
# See the [negotiation](/components/negotiation) component for more information.
# See the [negotiation](/architecture/negotiation) component for more information.
class Athena::Framework::View::FormatNegotiator < ANG::Negotiator
private getter! config : ATH::Config::ContentNegotiation?

Expand Down
2 changes: 1 addition & 1 deletion src/components/framework/src/view/view.cr
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# # GET /view/Fred # => 418 {"greeting":"Hello Fred"}
# ```
#
# See the [negotiation](/components/negotiation) component for more information.
# See the [negotiation](/architecture/negotiation) component for more information.
class Athena::Framework::View(T)
# The response data.
property data : T
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Processes an `ATH::View` into an `ATH::Response` of the proper format.
#
# See the [negotiation](/components/negotiation) component for more information.
# See the [negotiation](/architecture/negotiation) component for more information.
module Athena::Framework::View::ViewHandlerInterface
# The possible types for a view format handler.
alias HandlerType = ATH::View::FormatHandlerInterface | Proc(ATH::View::ViewHandlerInterface, ATH::ViewBase, ATH::Request, String, ATH::Response)
Expand Down
Loading