module Marten

Defined in:

marten.cr
marten/app.cr
marten/apps/association.cr
marten/apps/config.cr
marten/apps/errors.cr
marten/apps/main_config.cr
marten/apps/registry.cr
marten/asset/engine.cr
marten/asset/errors.cr
marten/asset/finder/app_dirs.cr
marten/asset/finder/base.cr
marten/asset/finder/file_system.cr
marten/cli.cr
marten/cli/admin.cr
marten/cli/command.cr
marten/cli/manage.cr
marten/cli/manage/command/base.cr
marten/cli/manage/command/collect_assets.cr
marten/cli/manage/command/gen_migrations.cr
marten/cli/manage/command/list_migrations.cr
marten/cli/manage/command/migrate.cr
marten/cli/manage/command/new.cr
marten/cli/manage/command/new/context.cr
marten/cli/manage/command/new/template.cr
marten/cli/manage/command/reset_migrations.cr
marten/cli/manage/command/routes.cr
marten/cli/manage/command/serve.cr
marten/cli/manage/command/version.cr
marten/cli/spinner.cr
marten/conf/env.cr
marten/conf/errors.cr
marten/conf/global_settings.cr
marten/conf/global_settings/assets.cr
marten/conf/global_settings/csrf.cr
marten/conf/global_settings/database.cr
marten/conf/global_settings/emailing.cr
marten/conf/global_settings/i18n.cr
marten/conf/global_settings/media_files.cr
marten/conf/global_settings/sessions.cr
marten/conf/global_settings/strict_stransport_security.cr
marten/conf/global_settings/templates.cr
marten/conf/settings.cr
marten/core/encryptor.cr
marten/core/signer.cr
marten/core/storage/base.cr
marten/core/storage/errors.cr
marten/core/storage/file_system.cr
marten/core/validation.cr
marten/core/validation/callbacks.cr
marten/core/validation/error.cr
marten/core/validation/error_set.cr
marten/db/concerns/can_format_strings_or_symbols.cr
marten/db/connection.cr
marten/db/connection/base.cr
marten/db/connection/mysql.cr
marten/db/connection/postgresql.cr
marten/db/connection/sqlite.cr
marten/db/constants.cr
marten/db/constraint/unique.cr
marten/db/deletion/runner.cr
marten/db/deletion/strategy.cr
marten/db/errors.cr
marten/db/field.cr
marten/db/field/base.cr
marten/db/field/big_int.cr
marten/db/field/bool.cr
marten/db/field/date.cr
marten/db/field/date_time.cr
marten/db/field/email.cr
marten/db/field/file.cr
marten/db/field/file/file.cr
marten/db/field/float.cr
marten/db/field/int.cr
marten/db/field/many_to_many.cr
marten/db/field/many_to_one.cr
marten/db/field/one_to_one.cr
marten/db/field/string.cr
marten/db/field/text.cr
marten/db/field/uuid.cr
marten/db/index.cr
marten/db/management/column.cr
marten/db/management/column/base.cr
marten/db/management/column/big_int.cr
marten/db/management/column/bool.cr
marten/db/management/column/concerns/is_built_in_column.cr
marten/db/management/column/date.cr
marten/db/management/column/date_time.cr
marten/db/management/column/float.cr
marten/db/management/column/int.cr
marten/db/management/column/reference.cr
marten/db/management/column/string.cr
marten/db/management/column/text.cr
marten/db/management/column/uuid.cr
marten/db/management/constraint/unique.cr
marten/db/management/index.cr
marten/db/management/introspector/base.cr
marten/db/management/introspector/column_info.cr
marten/db/management/introspector/concerns/core.cr
marten/db/management/introspector/mysql.cr
marten/db/management/introspector/postgresql.cr
marten/db/management/introspector/sqlite.cr
marten/db/management/migrations.cr
marten/db/management/migrations/diff.cr
marten/db/management/migrations/diff/dependency/base.cr
marten/db/management/migrations/diff/dependency/changed_column.cr
marten/db/management/migrations/diff/dependency/created_table.cr
marten/db/management/migrations/diff/dependency/removed_column.cr
marten/db/management/migrations/diff/migration.cr
marten/db/management/migrations/errors.cr
marten/db/management/migrations/graph.cr
marten/db/management/migrations/graph/node.cr
marten/db/management/migrations/reader.cr
marten/db/management/migrations/record.cr
marten/db/management/migrations/recorder.cr
marten/db/management/migrations/runner.cr
marten/db/management/migrations/runner/pre_initial_node.cr
marten/db/management/migrations/runner/progress.cr
marten/db/management/migrations/runner/progress_type.cr
marten/db/management/project_state.cr
marten/db/management/schema_editor.cr
marten/db/management/schema_editor/base.cr
marten/db/management/schema_editor/concerns/core.cr
marten/db/management/schema_editor/mysql.cr
marten/db/management/schema_editor/postgresql.cr
marten/db/management/schema_editor/sqlite.cr
marten/db/management/statement.cr
marten/db/management/statement/columns.cr
marten/db/management/statement/foreign_key_name.cr
marten/db/management/statement/index_name.cr
marten/db/management/statement/reference.cr
marten/db/management/statement/table.cr
marten/db/management/table_state.cr
marten/db/migration.cr
marten/db/migration/dsl.cr
marten/db/migration/dsl/create_table.cr
marten/db/migration/operation/add_column.cr
marten/db/migration/operation/add_index.cr
marten/db/migration/operation/add_unique_constraint.cr
marten/db/migration/operation/base.cr
marten/db/migration/operation/change_column.cr
marten/db/migration/operation/create_table.cr
marten/db/migration/operation/delete_table.cr
marten/db/migration/operation/execute_sql.cr
marten/db/migration/operation/remove_column.cr
marten/db/migration/operation/remove_index.cr
marten/db/migration/operation/remove_unique_constraint.cr
marten/db/migration/operation/rename_column.cr
marten/db/migration/operation/rename_table.cr
marten/db/migration/operation/run_code.cr
marten/db/model.cr
marten/db/model/app_config.cr
marten/db/model/callbacks.cr
marten/db/model/comparison.cr
marten/db/model/connection.cr
marten/db/model/inheritance.cr
marten/db/model/persistence.cr
marten/db/model/querying.cr
marten/db/model/table.cr
marten/db/model/validation.cr
marten/db/query/expression/filter.cr
marten/db/query/many_to_many_set.cr
marten/db/query/node.cr
marten/db/query/page.cr
marten/db/query/paginator.cr
marten/db/query/raw_set.cr
marten/db/query/related_set.cr
marten/db/query/set.cr
marten/db/query/sql/empty_query.cr
marten/db/query/sql/join.cr
marten/db/query/sql/join_type.cr
marten/db/query/sql/predicate.cr
marten/db/query/sql/predicate/base.cr
marten/db/query/sql/predicate/contains.cr
marten/db/query/sql/predicate/ends_with.cr
marten/db/query/sql/predicate/exact.cr
marten/db/query/sql/predicate/greater_than.cr
marten/db/query/sql/predicate/greater_than_or_equal.cr
marten/db/query/sql/predicate/i_contains.cr
marten/db/query/sql/predicate/i_ends_with.cr
marten/db/query/sql/predicate/i_exact.cr
marten/db/query/sql/predicate/i_starts_with.cr
marten/db/query/sql/predicate/in.cr
marten/db/query/sql/predicate/is_null.cr
marten/db/query/sql/predicate/less_than.cr
marten/db/query/sql/predicate/less_than_or_equal.cr
marten/db/query/sql/predicate/starts_with.cr
marten/db/query/sql/predicate_connector.cr
marten/db/query/sql/predicate_node.cr
marten/db/query/sql/query.cr
marten/db/query/sql/raw_query.cr
marten/db/query/sql/row_iterator.cr
marten/db/reverse_relation.cr
marten/db/transaction.cr
marten/email.cr
marten/emailing/address.cr
marten/emailing/backend/base.cr
marten/emailing/backend/development.cr
marten/emailing/content_type.cr
marten/emailing/email.cr
marten/handler.cr
marten/handlers/base.cr
marten/handlers/concerns/callbacks.cr
marten/handlers/concerns/cookies.cr
marten/handlers/concerns/flash.cr
marten/handlers/concerns/record_listing.cr
marten/handlers/concerns/record_retrieving.cr
marten/handlers/concerns/rendering.cr
marten/handlers/concerns/request_forgery_protection.cr
marten/handlers/concerns/session.cr
marten/handlers/concerns/x_frame_options.cr
marten/handlers/defaults/bad_request.cr
marten/handlers/defaults/debug/page_not_found.cr
marten/handlers/defaults/debug/server_error.cr
marten/handlers/defaults/debug/server_error/frame.cr
marten/handlers/defaults/development/serve_asset.cr
marten/handlers/defaults/development/serve_media_file.cr
marten/handlers/defaults/page_not_found.cr
marten/handlers/defaults/permission_denied.cr
marten/handlers/defaults/server_error.cr
marten/handlers/errors.cr
marten/handlers/record_create.cr
marten/handlers/record_delete.cr
marten/handlers/record_detail.cr
marten/handlers/record_list.cr
marten/handlers/record_update.cr
marten/handlers/redirect.cr
marten/handlers/schema.cr
marten/handlers/template.cr
marten/http/cookies.cr
marten/http/cookies/sub_store/base.cr
marten/http/cookies/sub_store/encrypted.cr
marten/http/cookies/sub_store/signed.cr
marten/http/errors.cr
marten/http/flash_store.cr
marten/http/headers.cr
marten/http/params/concerns/core.cr
marten/http/params/data.cr
marten/http/params/query.cr
marten/http/request.cr
marten/http/response.cr
marten/http/response/bad_request.cr
marten/http/response/forbidden.cr
marten/http/response/found.cr
marten/http/response/gone.cr
marten/http/response/internal_server_error.cr
marten/http/response/method_not_allowed.cr
marten/http/response/moved_permanently.cr
marten/http/response/not_found.cr
marten/http/response/see_other.cr
marten/http/session/errors.cr
marten/http/session/store.cr
marten/http/session/store/base.cr
marten/http/session/store/cookie.cr
marten/http/uploaded_file.cr
marten/middleware.cr
marten/middleware/flash.cr
marten/middleware/gzip.cr
marten/middleware/i18n.cr
marten/middleware/session.cr
marten/middleware/strict_transport_security.cr
marten/middleware/x_frame_options.cr
marten/migration.cr
marten/model.cr
marten/routing/errors.cr
marten/routing/map.cr
marten/routing/match.cr
marten/routing/parameter.cr
marten/routing/parameter/base.cr
marten/routing/parameter/integer.cr
marten/routing/parameter/path.cr
marten/routing/parameter/slug.cr
marten/routing/parameter/string.cr
marten/routing/parameter/uuid.cr
marten/routing/reverser.cr
marten/routing/rule/base.cr
marten/routing/rule/map.cr
marten/routing/rule/path.cr
marten/schema.cr
marten/schema/bound_field.cr
marten/schema/errors.cr
marten/schema/field.cr
marten/schema/field/base.cr
marten/schema/field/bool.cr
marten/schema/field/date.cr
marten/schema/field/date_time.cr
marten/schema/field/email.cr
marten/schema/field/file.cr
marten/schema/field/float.cr
marten/schema/field/int.cr
marten/schema/field/string.cr
marten/schema/field/uuid.cr
marten/server.cr
marten/server/context.cr
marten/server/handlers/concerns/handler_response_converter.cr
marten/server/handlers/error.cr
marten/server/handlers/host_verification.cr
marten/server/handlers/logger.cr
marten/server/handlers/middleware.cr
marten/server/handlers/routing.cr
marten/spec.cr
marten/spec/client.cr
marten/template/condition.cr
marten/template/condition/token/base.cr
marten/template/condition/token/end.cr
marten/template/condition/token/operator.cr
marten/template/condition/token/operator/and.cr
marten/template/condition/token/operator/equal.cr
marten/template/condition/token/operator/greater_than.cr
marten/template/condition/token/operator/greater_than_or_equal.cr
marten/template/condition/token/operator/in.cr
marten/template/condition/token/operator/infix.cr
marten/template/condition/token/operator/less_than.cr
marten/template/condition/token/operator/less_than_or_equal.cr
marten/template/condition/token/operator/not.cr
marten/template/condition/token/operator/not_equal.cr
marten/template/condition/token/operator/or.cr
marten/template/condition/token/operator/prefix.cr
marten/template/condition/token/value.cr
marten/template/context.cr
marten/template/context/block_stack.cr
marten/template/context_producer.cr
marten/template/context_producer/debug.cr
marten/template/context_producer/flash.cr
marten/template/context_producer/i18n.cr
marten/template/context_producer/request.cr
marten/template/engine.cr
marten/template/errors.cr
marten/template/filter.cr
marten/template/filter/base.cr
marten/template/filter/capitalize.cr
marten/template/filter/default.cr
marten/template/filter/down_case.cr
marten/template/filter/linebreaks.cr
marten/template/filter/safe.cr
marten/template/filter/size.cr
marten/template/filter/up_case.cr
marten/template/filter_expression.cr
marten/template/loader/app_dirs.cr
marten/template/loader/base.cr
marten/template/loader/cached.cr
marten/template/loader/file_system.cr
marten/template/node/base.cr
marten/template/node/tag.cr
marten/template/node/text.cr
marten/template/node/variable.cr
marten/template/node_set.cr
marten/template/object.cr
marten/template/object/auto.cr
marten/template/parser.cr
marten/template/parser/lexer.cr
marten/template/parser/token.cr
marten/template/parser/token_type.cr
marten/template/safe_string.cr
marten/template/tag.cr
marten/template/tag/asset.cr
marten/template/tag/assign.cr
marten/template/tag/base.cr
marten/template/tag/block.cr
marten/template/tag/concerns/can_extract_assignments.cr
marten/template/tag/concerns/can_extract_kwargs.cr
marten/template/tag/concerns/can_split_smartly.cr
marten/template/tag/csrf_token.cr
marten/template/tag/extend.cr
marten/template/tag/for.cr
marten/template/tag/for/loop.cr
marten/template/tag/if.cr
marten/template/tag/include.cr
marten/template/tag/local_time.cr
marten/template/tag/spaceless.cr
marten/template/tag/super.cr
marten/template/tag/translate.cr
marten/template/tag/url.cr
marten/template/tag/verbatim.cr
marten/template/template.cr
marten/template/value.cr
marten/template/variable.cr

Constant Summary

Log = ::Log.for("marten")
VERSION = "0.2.4"

Class Method Summary

Class Method Detail

def self.apps #

Returns the apps registry.

This method returns an instance of Marten::Apps::Registry, giving access to the details of the installed applications.


[View source]
def self.assets #

Returns the assets engine.

This method returns an instance of Marten::Asset::Engine, which allows to find assets and to generate their URLs.


[View source]
def self.configure(env : Nil | String | Symbol = nil, &) #

Allows to configure a Marten project.

This method allows to define the setting values of a Marten project. When called without argument, it allows to define shared setting values (ie. shared across all environments):

Marten.configure do |config|
  config.installed_apps = [
    FooApp,
    BarApp,
  ]
end

This method can also be called with a specific argument in order to ensure that the underlying settings are defined for a specific environment only:

Marten.configure :development do |config|
  config.secret_key = "INSECURE"
end

[View source]
def self.env #

Returns the current Marten environment.

This method returns a Marten::Conf::Env object, which allows to interact with the current environment. For example:

Marten.env              # => <Marten::Conf::Env:0x1052b8060 @id="development">
Marten.env.id           # => "development"
Marten.env.development? # => true

[View source]
def self.media_files_storage #

Returns the media files storage.

This method returns an instance of a Marten::Core::Storage::Base subclass. This object allows to perform file operations like saving files, deleting files, generating URLs...


[View source]
def self.routes #

Returns the main routes map.

This method returns the main routes map, initialized according to the routes configuration and allowing to perform reverse URL resolutions.


[View source]
def self.settings #

Returns the settings of the application.

This method returns the main Marten::Conf::GlobalSettings object, which contains the settings configured for the current environment.


[View source]
def self.setup #

Setups the Marten project.

This involves setup-ing the configured settings, applications, assets, templates, and the I18n tooling.


[View source]
def self.start(host : String | Nil = nil, port : Int32 | Nil = nil, args : Array(String) = ARGV) #

Starts the Marten server.


[View source]
def self.templates #

Returns the Marten templates engine.

This method returns an instance of Marten::Template::Engine, which allows to find templates and to render them.


[View source]