All notable changes to this project will be documented in this file.
- Update logo to the blue.
- Improve README.
- Add ability for controllers auto-mounting
Good bye giant applicationmountblocks!
But you can disable it withnested: falseoption formount, for example, for conditional umbrella application. - Allow to mount anonymous controllers
- Add support for Ruby 3.0 – 4.0
- Add support of
OPTIONSHTTP-method - Add
Application.require_dirsmethod - Add
Controller#path_to_backmethod - Add
:log_dirfor default config - Add
:requireoption forConfig#load_yaml - Receive options for Tilt in
Controller#(render|view)method via:tiltargument - Add support of block for
Controller#rendermethod - Add metadata to Gem specification with links
- Add required Ruby version into Gem specification
- Add
Controller.with_actionsmethod for modules Example:include with_actions ModuleWithActions - Allow to render view by relative path from current view
- Add ability for refining HTTP-methods of actions inside controllers
Now you can not usepost,patchand others insidemountblocks, yay! - Catch
SyntaxErrorfor custom Internal Server Error page - Add
:onlyoption to#with_actionsmethod - Add cache for
Controller#url_toin production viamemerygem - Add ability to refine actions in modules
Justextend Flame::Controller::Actionsin module now, and thaninclude with_actions ThatModule, as before. - Add
Flame::Router::Routes#to_s, for routes printingputs MyApplication.router.routes
- Add
Request#headersmethod (with Camel-Cased Hash) - Accept options for cookies setting
- Add
Flame::Path#include?method, forwarding to#to_s - Allow integration with
better_errorsgem
More info here. - Add RuboCop plugins, resolve offenses by them
- Add
remarkMarkdown linter
- Replace Array-based routes system with Hash-based
- Move
flameexecutable andtemplate/to separated gemflame-cli, not required by default. - Take out
ConfigfromFlame::ApplicationtoFlame
Now it's possible to load config before routes (and models).
Also addConfigFileNotFoundError. - Replace
URIbuilding withAddressable::URIfrom external gem - Replace
no-cachewithpublicandmax-age(one year) forCache-Controlheader for static files - Implemented 405 response instead of 404 for unavailable HTTP methods
- Change format of mounting from constants to Symbols
- Call
default_body(for the nearest route) withoutexecute - Switch from unsupported
bacontominitest-bacon, and then to RSpec - Replace
Controller.with_actionswith.inherit_actions - Move
Dispatcher#path_totoApplication.path_to - Replace
Controller#default_bodywith#not_foundfor 404 pages, like#server_errorfor 500 pages. - Replace
URI.decode_www_form_componentwithCGI.unescape - Reduce the number of violations of the Law of Demeter
Thanks to @snuggs - Catch
invalid %-encoding, halt 400 - Improve
#inspectoutput for custom Errors - Switch from Travis CI to Cirrus CI
- Autoload
Rendermodule, don't eager require
I think it's unnecessary for API-like usage. - Slightly optimize
StaticFile - Build query in
#path_tofrom root-Hash
Now building a path with merged query parameters is easier, no moreparams: {}. - Run
Controller#not_foundthroughexecute
For found nearest routes.
Now we can write before-hooks inexecutealso for nonexistent pages. - Don't assign results of
execute(after-hooks) asbody - Require directories starting with
_first - Allow to redefine controller path with
PATHconstant inside - Resolve Ruby warnings
- Update Rack and GorillaPatch
- Update RuboCop to a new version, resolve new offenses
- Improve version locks for dependencies
- Use Depfu instead of closed Gemnasium
- Improve CI config
- Remove
Application#configandApplication#routermethods - Remove Ruby < 2.7 support
- Remove integration with
better_errors. - Remove HTML tags (
<h1>) from default body
There is noContent-TypeHTTP header, also there is no reason to return exactly HTML content
(Flame can be used only for API or something else). - Remove
bundleras development dependency.
- Fix issue with
nilin after-hook which returned 404 status - Fix routing to path without an optional argument at the beginning
- Fix routing for multiple routes starting with arguments
Example: parent controller withshow(id)and nested controller at/:parent_id/nested. - Avoid new controller creation in
halt - Fix typos in documentation
- Fix exploit with static files
You could get the content of any file from the outside of public directory.
It did not work withnginx, Cloudflare or something else.
- Add
RouteArgumentsOrderError - Add
TemplateNotFoundErrorwhen file for rendering not found - Add
CODE_OF_CONDUCT.md - Add
:versionoption forController#url_tomethod with static files
- Remove ending slash from
Path#adaptif initial path has all parameters - Rename
RouteArgumentsErrortoRouteExtraArgumentsError
- Fix
RouteArgumentsValidator#action_argumentscaching - Fix gem requiring in some cases
- Add parent actions inheritance without forbidden actions
- Improve
Controller#extract_params_formethod
- Add support of Modules for
with_actionsmethod
- Return status from
Flame::Controller#redirect
- Fix body for rerouted action
- Add
Flame::Path#to_strmethod for implicit conversion to String
- Add support of
Flame::PathforController#url_to
- Add
Controller#reroutemethod for executing another action
- Remove ending slash for
Path#adaptto actions without parameters
- Fix default path for nested
IndexController
- Add
Pathclass for more OOP
- Improve
Flame::Request#http_methodand comparing by it
- Add support of HTTP status as last argument for
Controller#redirectmethod - Add support of
Controller#redirectas argument forDispatcher#halt
- Return
nilfromController#redirectmethod
- Add support of
HEADHTTP method
- Return upcased symbolized HTTP method from
Flame::Request#http_method
- Add comparing by first argument including in path parts for Routes sorting
- Add support of
URIobjects forredirectmethod
- Move cached views from
Flame::RendertoApplication - Improve view files search by controller name
Don't remove extra (logical)controllerparts.
- Display default body for status (500) if controller has not initialized Don't raise another (the second) exception.
- Improve default body rendering
- Fix many errors in 4.12.0
- Add specs
- Add Travis CI integration
- Add Code Climate integration
- Update Ruby target version in RuboCop to 2.3
- Remove trailing slash for
path_towithout optional arguments - Replace two different errors about Route arguments
with oneRouteArgumentsError - Require status for
haltmethod before body - Move
Content-Typewriter from Dispatcher to Response - Try to find and return static files before routes
- Remove unnecessary Actions Validator
- Fix dependencies and their versions
- Fix issue with default body from Flame
- Fix issue with frozen path in
path_to - Fix offenses from new RuboCop version
- Use
rack-slashenforce
instead of custom (built) implementation.
- Fix critical bug with static files
- Add
Cache-Control: no-cacheheader for responses with static files
- Make methods for static files in Dispatcher private
- Fix
gemspecrequire - Fix content type for attachments
- Fix views as symbolic links
- Add
haltmethod for controllers
- Add support of actions optional arguments values
- Add more methods for Controller delegation from Dispatcher
- Replace
rescueinexecutewithserver_errorprivate method
- Fix views files search
- Add redirect from request with many trailing slashes to path without them
- Add cache option for views render
- Fix layouts for
PlainTemplate
- Make
defaultsmethod for routes refines not required
- Add RuboCop as development dependency, resolve some offenses
- Update
gorilla-patchto version2
- Add
Controller.actionsshortcut method
- Add
:tmp_dirforApplication#config
- Add
PATCHHTTP-method for routes refines
- Remove String keys from
params, leave only Symbol
- Update
gorilla-patchto version1.0.0
- Update gemspec syntax
- Add support of
:paramsargument forpath_tomethod
- Add support of
falsevalue for layout render option
- Improve parent actions inheritance
- Add method to inherit actions from superclass
- Add method to inherit actions from superclass
- Update
gorilla-patchto fixed version
- Symbolize
paramskeys nested in Arrays
- Update
rackandtiltdependencies
- Add port (after host) for
url_tomethod
- Add port (after host) for
url_tomethod
- Fix
default_bodyfor static files
- Fix bugs with
default_bodyinvoking
- Fix 404 (after previous change)
- Replace
not_foundmethod withdefault_bodyand halting, for 404
- Fix nested layouts sorting
- Add
url_tohelper method for building full URL from controller
- Add support of views filenames as downcased controller name
when actions isindex
- Fix issue with cache of non-rendered
- Fix non-Symbol nested keys in request
params
- Add support of view render with multiple layouts
- Make
Flame::Renderwork with cache
- Make
Flame::Render.tiltspublic
- Add executable with
newsubcommand
- Add method for loading YAML files to Application
- Fix static files for Unicode filenames
- Improve views directories search (add more variants)
- Improve views directories search (more variants)
- Add
:indexaction as default forpath_tohelper method
- Add
content_typeandattachmenthelper methods for Dispatcher
- Take underscored preceding module name if controller is
IndexController
- Improve views directories search
- Remove
indexpart from directories of views for controller
- Fix fatal issues from version 4.0.8
- Change Route class, fix many default-path-build errors
- Fix
ArgumentNotAssignedErrorraising
- Fix dependencies
- Improve templates and layouts search
- Add support of protected
Controller#executemethods
- Fix
GorillaPatchusage - Fix error raising in
path_to(for nonexistent route)
- Dump exception from Dispatcher if not dumped from Controller
- Improve default paths for controllers
- Add version file (and
Flame::VERSIONconstant)
- Add internal helper method for plugins
- Relax
tiltdependency - Return
nilwhen template not found instead of 404
- Fix default REST actions
- Nest Validators, Errors and Route from root (
Flame) namespace
- Make hooks as code in
Controller#executemethod (before and aftersuper) - Documentation (YARD) added!
- Improve controllers templates folder searching
- Fix 404 error
- Make empty string as default body
- Add
body(united reader and writer) method
- Add
Content-Type: text/htmlheader for default body
- Fix 404 without nearest route
- Add hooks for errors
- Fix and improve many things
- Remove middlewares and
Flame::Application.usemethod
Userackupfor this.
- Make "all actions" as default for
afterandbeforehooks
- Add Symbol keys in
paramsalongside of String
- Make
:indexas default action forpath_to
- Fix error when body is
OKinstead of empty
- Add support of
RACK_ENVenvironment variable - Add
:cacheoption forrendermethod (enabled by default)
- Fix templates
- Make default path for
IndexControllerequal to/
- Add
helpersmethod for applications
- Make Dispatcher as class, large refactoring
- Add
:config_dirforApplication#config
- Fix error with
nilaction in routes refines
- Make path for routes refines not required
- Fix default paths of controllers
- Add (recursive)
mountmethod for routes refine
- Improve template searching in different possible directories
- Make
pathargument ofFlame::Controller#viewmethod not required
- Fix
Flame::Controller#path_tomethod
- Add (recursive)
mountmethod for routes refine
- Make Controllers as classes, Dispatcher as helper module for Application
- Add
aftermethod (hook) for routes refine
- Add
Rack::Session::Poolby default
- Add support for Rack middlewares in Flame applications
- Remove
Controllerclass, make controllers as modules
- Set cookies for path
/
- Add more helper methods for
Flame::Dispatcherand controllers
- Fix
scopefor layouts
- Improve version locks for other dependencies
- Improve version locks for dependencies
- Add REST actions as default
- Add
Flame::Request(Rack::Requestwrapper) - Add
beforemethod for routes refine
- Fix Tilt-warnings
- Fix views search for controllers
- Add helper methods for controllers
- Fix bug when a view layout is missing
- Fix error with 'tilt' dependency