Wikicr::Page
Inherits Wikicr::Page::InternalLinks / Wikicr::Page::TableOfContent / Struct / Value / Object
A Page is the representation in the wiki of something that can be accessed
from an url /pages/*path.
It is used to associate path, url and data. Is is can also jails the path into the OPTIONS.basedir to be sure that there is no attack by writing files outside of the directory where the pages must be stored.
Constants
Directory where the pages are stored
Beginning of the url of a page
Constructors
Class methods
translate a name ("/test/title" for example) into a file path ("/srv/data/test/ttle.md)
Instance methods
Save the modifications on the file into the git repository TODO: lock before commit TODO: security of jailed_file and self.name ?
verify if the file is in the current dir (avoid ../ etc.)
it will raise a Error403 if the file is out of the basedir
TODO: verify if the new_page already exists Move the current page into another place and commit