1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2025-01-13 19:56:40 +00:00
Commit graph

16 commits

Author SHA1 Message Date
e1687c96ff Split tawashi into lib+executable to enable unit testing 2017-05-04 19:52:18 +01:00
5377d25c72 Simplify the response pipeline.
There is no on_send() anymore, instead responses can
override the way the top-level mustache file is retrieved.
2017-04-26 09:17:57 +01:00
06920f8d84 Return pasties into a proper html page.
I don't think html escaping is needed, since pasties
go through the colorizer first.

I don't really like the workaround to not call on_send() when
I don't want the html output, it's a bit omg what's going on
there... I'll have to rewrite that bit.
2017-04-25 22:56:19 +01:00
3c10d624e3 Allow users to specify min/max valid pastie sizes. 2017-04-24 19:09:43 +01:00
75674525de Response keeps a ptr to the SettingsBag now. 2017-04-23 13:40:48 +01:00
26aa51c3be Add a redis_db setting to the ini file. 2017-04-21 23:26:01 +01:00
b03c3198b8 Make a SettingsBag class that wraps the ini settings.
Easily allows to have default values for options
that are not specified in the loaded ini file.
2017-04-21 23:10:16 +01:00
00aa06282d Set the html root from the config file. 2017-04-18 20:10:36 +01:00
1870829ec2 Import lib mstch and put it to good use.
Response classes are given a chance to modify the
dictionary that is later sent to mstch.
2017-04-18 18:40:42 +01:00
680f13e1f6 Refactoring.
IncRedis is now held by Response, if requested by the base class.
Response objects know their names, and they use it to load
the html (soon to be mustache) data from disk.
Main only prepares a factory, the factory then instantiates
the actual Response.
The code now correctly serves index.cgi when the request is /.
Remove kakoune's safe_ptr from inside src and put an updated
one in lib/kakoune.
2017-04-15 03:18:33 +01:00
da2484b0d4 Use base_uri in the response 2017-04-11 19:36:18 +01:00
ef9e74c473 Redirect to the new page if pastie was successful. 2017-04-07 00:31:06 +01:00
4354f4bf29 Add GPL3 licence. 2017-04-06 23:35:06 +01:00
81cf36de22 Rename CGIEnv to cgi::Env 2017-04-06 23:02:17 +01:00
98d98fc4ba Step up work on responses. 2017-04-06 21:27:38 +01:00
fea5b738df First commit 2017-04-04 20:58:40 +01:00