| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2023-02-15 | 2.4 kB | |
| v1.13.0 source code.tar.gz | 2023-02-15 | 305.8 kB | |
| v1.13.0 source code.zip | 2023-02-15 | 423.8 kB | |
| Totals: 3 Items | 732.0 kB | 0 | |
Install
luarocks install lapis
Additions
- Add the
lapis simulatecommand to simulate a request to the application without starting a server. This is useful for testing and debugging. Seelapis simulate --helpfor details about usage. - Add support for SQLite (See
lapis.db.sqlite,lapis.db.sqlite.model, lapis.db.sqlite.schema`) - Add
request:get_request()method to get a reference to the request object. (Note this just returnsself, but it is useful in cases where the request object is being proxied through the helper chain of a widget)
Changes
- The default error page will now render a JSON response if the
acceptrequest header is set toapplication/json content_fornow stores content blocks directly on the request object (prefixed with_content_for). This may solve a bug where widget helper chain could have cached an outdated copy of thecontent_forstate.content_forwill now throw an error if attempted to be used in a context without a request object- Layout content rendering has been simplified to avoid additional closure and function scope created
- The resolved layout is now written to
request.options(akaself.options) so that the view can know if a layout will be rendered within the current request. Note: actions that skip layout by default (eg.json,redirect_to) will writefalsetooptions.layout. - Internal refactors to all of the database modules, removal of some
undocumented functions (removed
set_backend,set_logger,get_logger,init_logger) - Updated generated SQL for MySQL in some places to output keywords in capitals
lapis.db.paginationPaginators now have a simple fallback for clause generation when the database module lacks a clause parser. (Will work for simple queries without aggregates instead of throwing an error when callingtotal_itemsandhas_items)lapis.specRemove undocumented test helpers:use_db_connection,assert_no_queries.lapis.specuse_test_envanduse_test_serverno longer interact with database connection insetupandteardown.lapis.spec.requestThe mockedngxobject now covers more fields to make it suitable for more kinds of requests
Full Changelog: https://github.com/leafo/lapis/compare/v1.12.0...v1.13.0