Prepare for v2.0.0.beta1

This commit is contained in:
Luca Guidi 2022-07-18 11:07:55 +02:00
parent 1705bb19c8
commit fc01b8068e
No known key found for this signature in database
GPG Key ID: 319B8D04DABE74E0
6 changed files with 483 additions and 264 deletions

View File

@ -1,33 +1,93 @@
# Hanami
The web, with simplicity.
## v2.0.0.beta1 - 2022-07-20
### Added
- [Luca Guidi] Added support for `hanami` CLI [#1096]
- [Luca Guidi] Added support for Rake tasks for compatibility with Ruby hosting services (`db:migrate` and `assets:precompile`) [#1096]
- [Tim Riley] Add `app/` as source dir for application container [#1174]
- [Piotr Solnica] Allow Rack middleware to be inserted before/after a specific router middleware [#1176]
```ruby
# config/routes.rb:
module TestApp
class Routes < Hanami::Routes
slice :admin, at: "/admin" do
use TestApp::Middlewares::AppendOne
use TestApp::Middlewares::Prepare, before: TestApp::Middlewares::AppendOne
use TestApp::Middlewares::AppendTwo, after: TestApp::Middlewares::AppendOne
end
end
end
```
### Fixed
- [Tim Riley] Fallback to `RACK_ENV` if `HANAMI_ENV` isn't set [#1168]
- [Tim Riley] Print error friendly messages when a soft dependency isn't installed [#1166]
- [Piotr Solnica] Ensure to handle properly Rack middleware that accept a block
```ruby
# config/app.rb:
module TestApp
class App < Hanami::App
config.middleware.use(TestApp::TestMiddleware) do |env|
env["tested"] = "yes"
end
end
end
```
- [Tim Riley] Ensure to correctly activate session middleware [#1179]
- [Tim Riley] Avoid redundant auto-registrations for `lib/` files [#1184]
### Changed
- [Luca Guidi] Make `app/` the core of Hanami 2 apps
- [Luca Guidi] `Hanami::Application` -> `Hanami::App`
- [Luca Guidi] Remove `::Application::` namespace in public API class names (e.g. `Hanami::Application::Routes` -> `Hanami::Routes`) [#1172]
- [Tim Riley] Removed `Hanami::Configuration#settings_path`, `#settings_class_name` [#1175]
- [Tim Riley] Removed `Hanami::Configuration::Router#routes_path`, and `#routes_class_name` [#1175]
- [Tim Riley] Make `Hanami::App` to inherit from `Hanami::Slice` [#1162]
## v2.0.0.alpha8 - 2022-05-19
## Added
### Added
- [Tim Riley] Introduced `Hanami::Application::Action` as base class for actions that integrate with Hanami applications. Base action classes in Hanami applications should now inherit from this.
- [Tim Riley] Introduced `Hanami::Application::View` and `Hanami::Application::View::Context` as base classes for views and view contexts that integrate with Hanami applications. Base view classes in Hanami applications should now inherit from these.
- [Tim Riley] Introduced `Hanami::Application.application_name`, which returns an `Hanami::SliceName` instance, with methods for representing the application name in various formats.
## Fixed
### Fixed
- [Andrew Croome] When a request is halted, do not attempt to automatically render any view paired with an `Hanami::Application::Action`
## Changed
### Changed
- [Tim Riley] `Hanami::Application.namespace_name`, `.namespace_path` have been removed. These can now be accessed from the `.application_name`.
- [Tim Riley] `Hanami::Slice.slice_name` now returns an `Hanami::SliceName` instance instead of a Symbol
- [Tim Riley] `Hanami::Slice.namespace_path` has been removed. This can now be accessed from the `.slice_name`.
## v2.0.0.alpha7.1 - 2022-03-09
## Fixed
### Fixed
- [Tim Riley] Fixed error creating slice classes when the enclosing module did not already exist
## v2.0.0.alpha7 - 2022-03-08
## Added
### Added
- [Tim Riley] Introduced `Hanami::ApplicationLoadError` and `Hanami::SliceLoadError` exceptions to represent errors encountered during application and slice loading.
- [Tim Riley] `Hanami::Slice.shutdown` can be used to stop all the providers in a slice
## Changed
### Changed
- [Tim Riley] Slices are now represented as concrete classes (such as `Main::Slice`) inheriting from `Hanami::Slice`, as opposed to _instances_ of `Hanami::Slice`. You may create your own definitions for these slices in `config/slices/[slice_name].rb`, which you can then use for customising per-slice config and behavior, e.g.
```ruby
@ -39,6 +99,7 @@ The web, with simplicity.
end
end
```
- [Tim Riley] Application-level `config.slice(slice_name, &block)` setting has been removed in favour of slice configuration within concrete slice class definitions
- [Tim Riley] You can configure your slice imports inside your slice classes, e.g.
@ -52,6 +113,7 @@ The web, with simplicity.
end
end
```
- [Tim Riley] You can configure your slice exports inside your slice classes, e.g.
```ruby
@ -64,6 +126,7 @@ The web, with simplicity.
end
end
```
- [Tim Riley] For advanced cases, you can configure your slice's container via a `prepare_container` block:
```ruby
@ -78,10 +141,13 @@ The web, with simplicity.
end
end
```
- [Tim Riley] `Hanami::Application.shutdown` will now also shutdown all registered slices
## v2.0.0.alpha6 - 2022-02-10
### Added
- [Luca Guidi] Official support for Ruby: MRI 3.1
- [Tim Riley] Introduce partial Slice imports and exports. It allows to selectively export a functionality from a slice and import into another.
@ -146,9 +212,11 @@ The web, with simplicity.
```
### Fixed
- [Luca Guidi] Ensure request logger to respect logger formatter option.
### Changed
- [Luca Guidi] Drop support for Ruby: MRI 2.6 and 2.7.
- [Tim Riley] `Hanami.init` => `Hanami.prepare` and `hanami/init` => `hanami/prepare`
- [Tim Riley] `Hanami.register_bootable` => `Hanami.register_provider`
@ -158,7 +226,9 @@ The web, with simplicity.
- [Tim Riley] `Hanami::Slice#start_bootable` => `Hanami::Slice#start`
## v2.0.0.alpha5 - 2022-01-12
### Changed
- [Luca Guidi] Sensible default configuration for application logger, with per-environment defaults:
The defaults are:
@ -216,6 +286,7 @@ The web, with simplicity.
end
end
```
- [Tim Riley] Comprehensive `config.source_dirs` setting
This replaces the previous `component_dir_paths` setting, and contains two nested settings:
@ -275,11 +346,15 @@ The web, with simplicity.
end
end
```
- [Tim Riley] Application router is lazy loaded (not requiring application to be fully booted) and now available via `Hanami.rack_app` or `Hanami.application.rack_app`, instead of the previous `Hanami.app` (which required the app to be booted first).
## v2.0.0.alpha4 - 2021-12-07
### Added
- [Luca Guidi] Manage Content Security Policy (CSP) with "zero-defaults" policy. New API to change CSP values and to disable the feature.
```ruby
# Read a CSP value
@ -347,17 +422,21 @@ The web, with simplicity.
```
## v2.0.0.alpha3 - 2021-11-09
### Added
- [Luca Guidi] Added `Hanami.shutdown` to stop all bootable components in the application container
- [Tim Riley] Added `component_dir_paths` application setting to allow for components to be loaded from additional directories inside each slice directory. To begin with, this defaults to `%w[actions repositories views]`. Components inside these directories are expected to be namespaced to match the directory name; e.g. given a `main` slice, `slices/main/actions/home.rb` is expected to define `Main::Actions::Home`, and will be registered in the slice container as `"actions.home"`.
### Changed
- [Tim Riley] A slice's classes can now be defined directly inside `slices/[slice_name]/lib/`; e.g. given a `main` slice, `slices/main/lib/example.rb` is expected to define `Main::Example`, and will be registered in the slice container as `"example"`
- [Tim Riley] The root `lib/` directory is no longer configured as a component dir, and classes inside `lib/[app_namespace]/` will no longer be auto-registered into the container. If you need to share components, create them in their own slices as appropriate, and import those slices into the other slices that require them.
- [Tim Riley] `lib/[app_namespace]/` is configured for autoloading, and `lib/` is added to `$LOAD_PATH` to support explicit requires for source files outside `lib/[app_namespace]/`.
- [Tim Riley] (Internal) Ported `Hanami::Configuration` and related classes to use dry-configurable
- [Tim Riley] Application inflector can be entirely replaced, if required, via `Hanami::Configuration#inflector=`. Custom inflection rules can still be provided to the default inflector via `Hanami::Configuration#inflections`.
- [Marc Busqué] App settings are defined within a concrete class rather than an anonymous block, to allow for users to leverage the typical behavior of Ruby classes, such as for defining their own types module to use for coercing setting values. This class also relies on dry-configurable for its settings implementation, so the standard dry-configurable `setting` API is available, such as the `constructor:` and `default:` options.
```ruby
# frozen_string_literal: true
@ -375,8 +454,10 @@ The web, with simplicity.
end
end
```
- [Marc Busqué] Application `settings_loader` and `settings_loader_options` have been replaced with `settings_store`, which is an updated abstraction for providing setting values to work with the new `Hanami::Application::Settings` implementation noted above (see `Application::Settings::DotenvStore` for the default store, which provides the same behavior as previously)
- [Marc Busqué] Routes are defined within a concrete class rather than an anonymous block, to provide consistency with the settings (noted above), as well a place for additional behavior (in future releases):
```ruby
# frozen_string_literal: true
@ -394,13 +475,16 @@ The web, with simplicity.
```
## v2.0.0.alpha2 - 2021-05-04
### Added
- [Luca Guidi] Official support for Ruby: MRI 3.0
- [Tim Riley] Code autoloading via Zeitwerk
- [Tim Riley] `Hanami::Application` subclasses generate and configure a `Dry::System::Container`, accessible via `.container` and `AppNamespace::Container`, with several common container methods available directly via the application subclass (e.g. `Bookshelf::Application["foo"]` or `Hanami.application["foo"]`)
- [Tim Riley] Introduced `Hanami::Application.register_bootable` to register custom components
- [Tim Riley] Introduced `Hanami::Application.keys` to get the list of resolved components
- [Tim Riley] Dynamically create an auto-injection mixin (e.g. `Bookshelf::Deps`)
```ruby
# frozen_string_literal: true
@ -415,6 +499,7 @@ The web, with simplicity.
end
end
```
- [Tim Riley] Introduced application settings. They are accessible via `Hanami.application.settings` in `config/settings.rb`
- [Tim Riley] Introduced application slices to organise high-level application concerns. Slices are generated based on subdirectories of `slices/`, and map onto corresponding ruby module namespaces, e.g. `slices/main` -> `Main`, with the slice instance itself being `Main::Slice` (as well as being accessible via `Hanami.application.slices[:main]`)
- [Tim Riley] Each slice generates and configures has its own `Dry::System::Container`, accessible via the slice instance (e.g. `Main::Slice.container`) as well as via its own constant (e.g. `Main::Container`)
@ -422,13 +507,16 @@ The web, with simplicity.
- [Tim Riley] Allow slice containers to be imported by other slice containers
### Changed
- [Luca Guidi] Drop support for Ruby: MRI 2.5
- [Tim Riley] Removed `config.cookies` in favor of `config.actions.cookies`
- [Tim Riley] Removed `config.sessions` in favor of `config.actions.sessions`
- [Tim Riley] Removed `config.security` settings
## v2.0.0.alpha1 - 2019-01-30
### Added
- [Luca Guidi] Implemented from scratch `hanami version`
- [Luca Guidi] Implemented from scratch `hanami server`
- [Luca Guidi] Main configuration is opinionated: when a setting is not specified in generated code, it uses a framework default.
@ -451,6 +539,7 @@ The web, with simplicity.
(e.g. `config.security.content_security_policy[:plugin_types] = nil` to override the settings)
### Changed
- [Luca Guidi] Drop support for Ruby: MRI 2.3, and 2.4.
- [Luca Guidi] `Hanami::Application` must be used as superclass for main application under `config/application.rb` (e.g. `Bookshelf::Application`)
- [Luca Guidi] Main configuration is available at `config/application.rb` instead of `config/enviroment.rb`
@ -459,6 +548,7 @@ The web, with simplicity.
- [Luca Guidi] Per enviroment settings must be wrapped in a block (e.g. `config.enviroment(:production) { |c| c.logger = {} }`)
- [Luca Guidi] Concrete applications are no longer supported (e.g. `Web::Application` in `apps/web/application.rb`)
- [Luca Guidi] Main routes must be configured at `config/routes.rb`:
```ruby
# frozen_string_literal: true
@ -472,113 +562,153 @@ Hanami.application.routes do
end
end
```
- [Luca Guidi] Per application routes are no longer supported (e.g. `apps/web/config/routes.rb`)
- [Luca Guidi] Removed `shotgun` and code reloading from the core. Code reloading is implemented by `hanami-reloader` gem.
- [Luca Guidi] Removed support for `.hanamirc`
## v1.3.4 - 2021-05-02
### Fixed
- [Slava Kardakov] Fix generated `config.ru` `require_relative` statement
- [Armin] Fix `Hanami::CommonLogger` elapsed time compatibility with `rack` 2.1.0+
- [Adam Daniels] Fix generated tests compatibility with `minitest` 6.0+
## v1.3.3 - 2019-09-20
### Added
- [Gray Manley] Standardize file loading for `.env` files (see: https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use)
### Fixed
- [Alfonso Uceda & Luca Guidi] Ensure to use `:host` option when mounting an application in main router (e.g. `mount Beta::Application.new, at: "/", host: "beta.hanami.test"`)
## v1.3.2 - 2019-07-26
### Added
- [Luca Guidi] Support both `hanami-validations` 1 and 2
### Fixed
- [Wisnu Adi Nurcahyo] Ensure `hanami generate` syntax for Welcome page is compatible with ZSH
- [Luca Guidi] Don't let `hanami` to crash when called without `bundle exec`
## v1.3.1 - 2019-01-18
### Added
- [Luca Guidi] Official support for Ruby: MRI 2.6
- [Luca Guidi] Support `bundler` 2.0+
### Fixed
- [Aidan Coyle] Remove from app generator support for deprecated `force_ssl` setting
- [Alessandro Caporrini] Remove from app generator support for deprecated `body_parsers` setting
- [Daphne Rouw & Sean Collins] Make app generator to work when code in `config/environment.rb` uses double quotes
## v1.3.0 - 2018-10-24
### Added
- [Luca Guidi] Automatically log body payload from body parsers
### Fixed
- [Luca Guidi] Generate correct syntax for layout unit tests
- [Vladislav Yashin] Fix concatenation of `Pathname` and `String` in `Hanami::CommonLogger`
## v1.3.0.beta1 - 2018-08-08
### Added
- [Sean Collins] Generate new projects with RSpec as default testing framework
- [Alfonso Uceda] Generate actions/views/mailers with nested module/class definition
### Fixed
- [Anton Davydov] Make possible to pass extra settings for custom logger instances (eg. `logger SemanticLogger.new, :foo, :bar`)
- [graywolf] Ensure `hanami generate app` to work without `require_relative` entries in `config/environment.rb`
- [Makoto Tajitsu & Luca Guidi] Fixed regression for `hanami new .` that used to generate a broken project
### Fixed
- [John Downey] Don't use thread unsafe `Dir.chdir` to serve static assets
## v1.2.0 - 2018-04-11
## v1.2.0.rc2 - 2018-04-06
### Fixed
- [Kelsey Judson] Ensure to not reload code under `lib/` when `shotgun` isn't bundled
## v1.2.0.rc1 - 2018-03-30
## v1.2.0.beta2 - 2018-03-23
### Fixed
- [Luca Guidi] Raise meaningful error message when trying to access `session` or `flash` with disabled sessions
- [Pistos] Print stack trace to standard output when a CLI command raises an error
## v1.2.0.beta1 - 2018-02-28
### Added
- [Luca Guidi] HTTP/2 Early Hints
### Fixed
- [Alfonso Uceda] Render custom template if an exception is raised from a view or template
## v1.1.1 - 2018-02-27
### Added
- [Luca Guidi] Official support for Ruby MRI 2.5+
### Fixed
- [Alfonso Uceda] Fixed regression for mailer generator: when using options like `--from` and `--to` the generated Ruby code isn't valid as it was missing string quotes.
- [Luca Guidi] Generate tests for views including `:format` in `exposures`. This fixes view unit tests when the associated template renders a partial.
## v1.1.0 - 2017-10-25
### Fixed
- [Luca Guidi] Ensure `hanami db rollback` steps to be a positive integer
## v1.1.0.rc1 - 2017-10-16
### Added
- [Yuji Ueki] Generate RSpec tests with `:type` metadata (eg `type: :action`)
- [Kirill] Add `--relation` option for `hanami generate model` (eg `bundle exec hanami generate model user --relation=accounts`)
## v1.1.0.beta3 - 2017-10-04
### Fixed
- [Luca Guidi] Don't require `:plugins` group when running `hanami new`
## v1.1.0.beta2 - 2017-10-03
### Added
- [Luca Guidi] Introduce `:plugins` group for `Gemfile` in order enable Hanami plugin gems
- [Alfonso Uceda] CLI: `hanami db rollback` to revert one or more migrations at once
### Fixed
- [Gabriel Gizotti] Fix generate/destroy for nested actions
## v1.1.0.beta1 - 2017-08-11
### Added
- [Ben Johnson] Allow to use custom logger as `Hanami.logger` (eg. `Hanami.configure { logger Timber::Logger.new($stdout) }`)
- [akhramov] Generate spec file for application layout when generating a new app
- [Anton Davydov] Generate `README.md` file for new projects
@ -587,23 +717,29 @@ end
- [Marion Duprey & Gabriel Gizotti] Filter sensitive data in logs
### Fixed
- [jarosluv] Ensure to remove the correct migration file when executing `hanami db destroy model`
- [sovetnik] Fix require path for Minitest spec helper
## v1.0.0 - 2017-04-06
## v1.0.0.rc1 - 2017-03-31
### Added
- [Luca Guidi] Allow `logger` setting in `config/environment.rb` to accept arbitrary arguments to make `Hanami::Logger` to be compatible with Ruby's `Logger`. (eg. `logger 'daily', level: :info`)
### Fixed
- [Luca Guidi] Ensure code reloading don't misconfigure mailer settings (regression from v1.0.0.beta3)
- [Luca Guidi] Ensure database disconnection to happen in the same thread of `Hanami.boot`
- [Luca Guidi] Ensure `mailer` block in `config/environment.rb` to be evaluated multiple times, according to the current Hanami environment
- [Luca Guidi] Ensure a Hanami project to require only once the code under `lib/`
## v1.0.0.beta3 - 2017-03-17
### Fixed
- [Luca Guidi] Try to disconnect from database at the boot time. This is useful to prune stale connection during production deploys.
- [Tobias Sandelius] Don't mount `Hanami::CommonLogger` middleware if logging is disabled for the project.
- [Anton Davydov] Don't configure mailers, if it's mailing is disabled for the project.
@ -611,12 +747,15 @@ end
- [Jimmy Börjesson] Make `apps/web/application.rb` code to wrap around the 80th column
### Changed
- [Luca Guidi] Removed deprecated `ApplicationConfiguration#default_format`. Use `#default_request_format` instead.
## v1.0.0.beta2 - 2017-03-02
## v1.0.0.beta1 - 2017-02-14
### Added
- [Luca Guidi] Official support for Ruby: MRI 2.4
- [yjukaku] CLI: `hanami generate model` now also generates a migration
- [Luca Guidi] Generate `config/boot.rb` for new Hanami projects.
@ -625,6 +764,7 @@ end
- [Luca Guidi] Introduced `environment` for env specific settings in `config/environment.rb`
### Fixed
- [Marcello Rocha] Fix Hanami::Mailer loading
- [Kai Kuchenbecker] Serve only existing assets with `Hanami::Static`
- [Gabriel Gizotti] Ensure inline ENV vars to not be overwritten by `.env.*` files
@ -635,6 +775,7 @@ end
- [Victor Franco] Fixed CLI subcommands help output
### Changed
- [Ozawa Sakuro] Don't include `bundler` as a dependency `Gemfile` for new Hanami projects
- [Luca Guidi] Make compatible with Rack 2.0 only
- [Luca Guidi] Removed `logger` settings from Hanami applications
@ -642,23 +783,31 @@ end
- [Luca Guidi] Changed mailer syntax in `config/environment.rb`
## v0.9.2 - 2016-12-19
## Added
- [The Crab] Mark unit tests/specs as pending for generated actions and views
### Fixed
- [Luca Guidi] Rake task `:environment` no longer depends on the removed `:preload` task
- [Luca Guidi] Ensure force SSL to use the default port, or the configured one
- [Luca Guidi] Boot the project when other it's started without `hanami server` (eg. `puma` or `rackup`)
## v0.9.1 - 2016-11-18
### Fixed
- [Luca Guidi] Ensure JSON body parser to not eval untrusted input
## v0.9.0 - 2016-11-15
### Added
- [Christophe Philemotte] Introduced `hanami secret` to generate and print a new sessions secret
### Fixed
- [Bruz Marzolf] Skip project code preloading when code reloading is enabled
- [Bruz Marzolf] Ensure to generate project in current directory when running `hanami new .`
- [Pascal Betz] Fix constant lookup within the project namespace
@ -667,6 +816,7 @@ end
- [Luca Guidi] Fix duplicated Rack middleware in single Hanami application stacks
### Changed
- [Luca Guidi] Official support for Ruby MRI 2.3+
- [Luca Guidi] Removed support for "application" architecture
- [Luca Guidi] Removed `Hanami::Container.new` in favor of `Hanami.app`
@ -678,7 +828,9 @@ end
- [Luca Guidi & Sean Collins] Renamed assets configuration `digest` into `fingerprint`
## v0.8.0 - 2016-07-22
### Added
- [Luca Guidi] Generate new projects with Subresurce Integrity enabled in production (security).
- [Luca Guidi] Include `X-XSS-Protection: 1; mode=block` in default response headers (security).
- [Luca Guidi] Include `X-Content-Type-Options: nosniff` in default response headers (security).
@ -692,6 +844,7 @@ end
- [Sean Collins] Add `--version` and `-v` for `hanami version` CLI
### Fixed
- [Josh Bodah] Ensure consistent CLI messages
- [Andrey Morskov] Ensure consistent user experience and messages for generators
- [Luca Guidi] Fixed generators for camel case project names
@ -711,7 +864,9 @@ end
- [Luca Guidi & Lucas Amorim] Make model generator not dependendent on the current directory name, but to the project name stored in `.hanamirc`
### Changed
[Luca Guidi] Drop support for Ruby 2.0 and 2.1
- [Trung Lê] Database env var is now `DATABASE_URL` (without the project name prefix like `BOOKSHELF_DATABASE_URL`
- [Trung Lê] `lib/config/mapping.rb` is no longer generated for new projects and no longer loaded.
- [Anton Davydov] New generated projects will depend (in their `Gemfile`) on `hanami` tiny version (`~> 0.8'`) instead of patch version (`0.8.0`)
@ -723,24 +878,34 @@ end
- [Luca Guidi] Allow views to render any HTTP status code. In actions use `halt(422)` for default status page or `self.status = 422` for view rendering.
## v0.7.3 - 2016-05-23
### Fixed
- [Pascal Betz] Use `Shotgun::Static` to serve static files in development mode and avoid to reload the env
## v0.7.2 - 2016-02-09
### Fixed
- [Alfonso Uceda Pompa] Fixed routing issue when static assets server tried to hijack paths that are matching directories in public directory
## v0.7.1 - 2016-02-05
### Fixed
- [Anton Davydov] Fixed routing issue when static assets server tried to hijack requests belonging to dynamic endpoints
- [Anatolii Didukh] Ensure to fallback to default engine for `hanami console`
## v0.7.0 - 2016-01-22
### Changed
- [Luca Guidi] Renamed the project
## v0.6.1 - 2016-01-19
### Fixed
- [Anton Davydov] Show the current app name in Welcome page (eg. `/admin` shows instructions on how to generate an action for `Admin` app)
- [Anton Davydov] Fix project creation when name contains dashes (eg. `"awesome-project" => "AwesomeProject"`)
- [Anton Davydov] Ensure to add assets related entries to `.gitignore` when a project is generated with the `--database` flag
@ -749,7 +914,9 @@ end
- [Serg Ikonnikov & Trung Lê] Ensure console to use the bundled engine
## v0.6.0 - 2016-01-12
### Added
- [Luca Guidi] Introduced configurable assets compressors
- [Luca Guidi] Introduced "CDN mode" in order to serve static assets via Content Distribution Networks
- [Luca Guidi] Introduced "Digest mode" in production in order to generate and serve assets with checksum suffix
@ -768,6 +935,7 @@ end
- [Gonzalo Rodríguez-Baltanás Díaz] Generate new applications with default favicon
### Fixed
- [Neil Matatall] Use "secure compare" for CSRF tokens in order to prevent timing attacks
- [Bernardo Farah] Fix support for chunked response body (via `Rack::Chunked::Body`)
- [Lucas Allan Amorim] Add `bundler` as a runtime dependency
@ -784,6 +952,7 @@ end
- [Alfonso Uceda Pompa] Convert dasherized names into underscored names when generating projects (eg. `awesome-project` to `awesome_project`)
### Changed
- [Sean Collins] Welcome page shows current year in copyright notes
- [Luca Guidi] Add `/public/assets*` to `.gitignore` of new projects
- [Luca Guidi] Removed support for `default_format` in favor of `default_request_format`
@ -792,7 +961,9 @@ end
- [Luca Guidi] `assets` configuration in `apps/web/application.rb` now accepts a block to configure sources and other settings
## v0.5.0 - 2015-09-30
### Added
- [Ines Coelho & Rosa Faria] Introduced mailers support
- [Theo Felippe] Added configuration entries: `#default_request_format` and `default_response_format`
- [Rodrigo Panachi] Introduced `logger` configuration for applications, to be used like this: `Web::Logger.debug`
@ -800,6 +971,7 @@ end
- [Pascal Betz] Introduced `--method` CLI argument for action generator as a way to specify the HTTP verb
### Fixed
- [Luca Guidi] Handle conflicts between directories with the same name while serving static assets
- [Derk-Jan Karrenbeld] Include default value `font-src: self` for CSP HTTP header
- [Cam Huynh] Make CLI arguments immutable for `Lotus::Environment`
@ -807,13 +979,17 @@ end
- [Alfonso Uceda Pompa] Print error message and exit when no name is provided to model generator
### Changed
- [Theo Felippe] Deprecated `#default_format` in favor of: `#default_request_format`
## v0.4.1 - 2015-07-10
### Added
- [Trung Lê] Alias `--database` as `--db` for `lotus new`
### Fixed
- [Alfonso Uceda Pompa] Ensure to load correctly apps in `lotus console`
- [Alfonso Uceda Pompa] Ensure to not duplicate prefix for Container mounted apps (eg `/admin/admin/dashboard`)
- [Alfonso Uceda Pompa] Ensure generator for "application" architecture to generate session secret
@ -822,7 +998,9 @@ end
- [Luca Guidi] Ensure to prepend sessions middleware, so other Rack components can have access to HTTP session
## v0.4.0 - 2015-06-23
### Added
- [Luca Guidi] Database migrations and new CLI commands for database operations
- [Luca Guidi] Cross Site Request Forgery (CSRF) protection
- [Hiếu Nguyễn & Luca Guidi] Application Architecture
@ -831,23 +1009,28 @@ end
- [Luca Guidi] Added `rendered` "let" variable for new generated tests for views
### Fixed
- [Alfonso Uceda Pompa] Fix generated routes for Container applications mounted on a path different from `/`.
- [Luca Guidi] Reading `.lotusrc` pollutes `ENV` with unwanted variables.
- [Alfonso Uceda Pompa] Added sqlite extension to SQLite/SQLite3 database URL.
### Changed
- [Luca Guidi] `.env`, `.env.development` and `.env.test` are generated and expected to be placed at the root of the project.
- [Luca Guidi] Remove database mapping from generated apps.
- [Trung Lê & Luca Guidi] Remove default generated from new apps.
- [Luca Guidi] New projects should depend on `lotus-model ~> 0.4`
## v0.3.2 - 2015-05-22
### Added
- [Alfonso Uceda Pompa] Automatic secure cookies if the current connection is using HTTPS.
- [Alfonso Uceda Pompa] Routing helpers for actions (via `#routes`).
- [My Mai] Introduced `Lotus.root`. It returns the top level directory of the project.
### Fixed
- [Ngọc Nguyễn] Model generator should use new RSpec syntax.
- [Ngọc Nguyễn] Model generator must respect file name conventions for Ruby.
- [Ngọc Nguyễn] Action generator must respect file name conventions for Ruby.
@ -855,17 +1038,22 @@ end
- [Luca Guidi] Container generator for RSpec let the application to be preloaded (discard `config.before(:suite)`)
## v0.3.1 - 2015-05-15
### Added
- [Hiếu Nguyễn] Introduced application generator (eg. `bundle exec lotus generate app admin` creates `apps/admin`).
- [Ngọc Nguyễn] Introduced model generator (eg. `bundle exec lotus generate model user` creates entity, repository and test files).
- [Ngọc Nguyễn] Introduced `Lotus.env`, `Lotus.env?` for current environment introspection (eg. `Lotus.env?(:test)` or `Lotus.env?(:staging, :production)`)
- [Miguel Molina] Skip view creation when an action is generated via `--skip-view` CLI arg.
### Fixed
- [Luca Guidi] Ensure routes to be loaded for unit tests
## v0.3.0 - 2015-03-23
### Added
- [Luca Guidi] Introduced action generator. Eg. `bundle exec lotus generate action web dashboard#index`
- [Alfonso Uceda Pompa] Allow to specify default cookies options in application configuration. Eg. `cookies true, { domain: 'lotusrb.org' }`
- [Tom Kadwill] Include `Lotus::Helpers` in views.
@ -877,12 +1065,16 @@ end
- [Luca Guidi] Dynamic finders for relative and absolute routes. It implements method missing: `Web::Routes.home_path` will resolve to `Web::Routes.path(:home)`.
### Changed
[Alfonso Uceda Pompa] Cookies will send `HttpOnly` by default. This is for security reasons.
- [Jan Lelis] Enable `templates` configuration for new generated apps
- [Mark Connell] Change SQLite file extension from `.db` to `.sqlite3`
## v0.2.1 - 2015-02-06
### Added
- [Huy Đỗ] Introduced `Lotus::Logger`
- [Jimmy Zhang] `lotus new` accepts a `--path` argument
- [Jimmy Zhang] Project generator for the current directory (`lotus new .`). This is useful to provide a web deliverable for existing Ruby gems.
@ -890,6 +1082,7 @@ end
- [Hiếu Nguyễn] RSpec support for project generator: `--test=rspec` or `--test=minitest` (default)
### Fixed
- [Luca Guidi] `lotus version` to previx `v` (eg `v0.2.1`)
- [Rob Yurkowski] Ensure project name doesn't contain special or forbidden characters
- [Luca Guidi] Ensure all the applications are loaded in console
@ -897,7 +1090,9 @@ end
- [Hiếu Nguyễn] Fixed `lotus new` to print usage when project name isn't provided
## v0.2.0 - 2014-06-23
### Added
- [Luca Guidi] Introduced `lotus new` as a command to generate projects. It supports "container" architecture for now.
- [Luca Guidi] Show a welcome page when one mounted Lotus application doesn't have routes
- [Luca Guidi] Introduced `Lotus::Application.preload!` to preload all the Lotus applications in a given Ruby process. (Bulk `Lotus::Application.load!`)
@ -927,13 +1122,17 @@ end
- [Luca Guidi] Official support for MRI 2.1 and 2.2
### Changed
- [Alfonso Uceda Pompa] Changed semantic of `assets` configuration. Now it's only used to set the sources for the assets. Static serving assets has now a new configuration: `serve_assets`.
### Fixed
- [Luca Guidi] Ensure `HEAD` requests return empty body
## v0.1.0 - 2014-06-23
### Added
- [Luca Guidi] Allow to run multiple Lotus applications in the same Ruby process (framework duplication)
- [Luca Guidi] Introduced `Lotus::Routes` as factory to generate application URLs
- [Luca Guidi] Allow to configure scheme, host and port (`scheme`, `host` and `port` configuration)

View File

@ -1,8 +1,29 @@
# Hanami
### The web, with simplicity.
## Features
## v2.0.0.beta1 - 2021-07-20
- Generate new apps using `app/` directory
## v2.0.0.alpha8 - 2021-05-19
## v2.0.0.alpha7.1 - 2021-03-09
## v2.0.0.alpha7 - 2021-03-08
## v2.0.0.alpha6 - 2021-02-10
## v2.0.0.alpha5 - 2021-01-12
## v2.0.0.alpha4 - 2021-12-07
## v2.0.0.alpha3 - 2021-11-09
## v2.0.0.alpha2 - 2021-05-04
## v2.0.0.alpha1 - 2019-01-30
## v1.3.3 - 2019-09-20
@ -110,14 +131,14 @@
- Assets preprocessors support (eg. Sass, ES6, Opal, Less, CoffeScript..)
- Assets compressors (eg. YUI, UglifyJS2, Google Closure Compiler, Sass..)
- Assets helpers:
* `javascript`
* `stylesheet`
* `favicon`
* `image`
* `video`
* `audio`
* `asset_path`
* `asset_url`
- `javascript`
- `stylesheet`
- `favicon`
- `image`
- `video`
- `audio`
- `asset_path`
- `asset_url`
- Content Delivery Network (CDN) support for static assets (CDN mode)
- Checksum suffix for static assets in production mode (Digest mode)
- Support for third party gems as assets distribution channel (eg. `lotus-jquery`)

10
Gemfile
View File

@ -8,11 +8,11 @@ unless ENV["CI"]
gem "yard"
end
gem "hanami-utils", "~> 2.0.alpha", github: "hanami/utils", branch: "main"
gem "hanami-router", "~> 2.0.alpha", github: "hanami/router", branch: "main"
gem "hanami-controller", "~> 2.0.alpha", github: "hanami/controller", branch: "main"
gem "hanami-cli", "~> 2.0.alpha", github: "hanami/cli", branch: "main"
gem "hanami-view", "~> 2.0.alpha", github: "hanami/view", branch: "main"
gem "hanami-utils", github: "hanami/utils", branch: "main"
gem "hanami-router", github: "hanami/router", branch: "main"
gem "hanami-controller", github: "hanami/controller", branch: "main"
gem "hanami-cli", github: "hanami/cli", branch: "main"
gem "hanami-view", github: "hanami/view", branch: "main"
gem "hanami-devtools", github: "hanami/devtools", branch: "main"

View File

@ -21,7 +21,6 @@ Gem::Specification.new do |spec|
"LICENSE.md",
"README.md",
"hanami.gemspec",
"bin/*",
"lib/**/*"
]

View File

@ -8,7 +8,7 @@ module Hanami
module Version
# @since 0.9.0
# @api private
VERSION = "2.0.0.alpha8"
VERSION = "2.0.0.beta1"
# @since 0.9.0
# @api private

View File

@ -2,6 +2,6 @@
RSpec.describe "Hanami::VERSION" do
it "returns current version" do
expect(Hanami::VERSION).to eq("2.0.0.alpha8")
expect(Hanami::VERSION).to eq("2.0.0.beta1")
end
end