Serving current blobs (documents) for git repositories. We use git HEAD commit to get current blob.
Multi-host serve for git repositories based on guarded header value.
Support for serving current blobs for git repositories.
Add stelae serve cli command, which spins up the server and serves documents from Stele data repositories in an archive.
First we parse an archive and initialize Actix routes to git repositories given the Stele that's specified in config.toml. Note that Actix routes need to be registered dynamically, because the routing matching patterns depend on and are read from an external configuration file repositories.json.
For parsing, read and map all data repositories from repositories.json in Stele's authentication repo. Here's an example of a repositories.json file that expects to serve only two data repositories: open-law-html and law-static-assets.
Stele can reference other Stele in dependencies.json. To serve current blobs on referenced Stele, referenced Stele needs to specify top-level scopes in repositories.json.
After the archive is parsed, map and initialize all data git repositories to global, read-only AppState.
For testing framework, add tests for three possible archives for serving current documents are basic, multijursdiction, multihost.
Basic archive is an archive with one stele that has multiple data repositories. Multijursdiction archive is an example of Stele referencing other Stele with dependencies.json. Multihost archive is enabled by using the current_documents_guard in config.toml
Multi-host serve for git repositories based on guarded header value.
When config.toml sets a current_documents_guard header, we expect the HTTP requests to Stele to contain a guarded header. So requests which don't match the expected guarded header aren't resolved.
Closes #18 Closes #29 Closes #31
This PR adds support for:
HEAD
commit to get current blob.Support for serving current blobs for git repositories.
Add
stelae serve
cli command, which spins up the server and serves documents from Stele data repositories in an archive.Actix
routes to git repositories given the Stele that's specified inconfig.toml
. Note that Actix routes need to be registered dynamically, because the routing matching patterns depend on and are read from an external configuration filerepositories.json
.repositories.json
in Stele's authentication repo. Here's an example of arepositories.json
file that expects to serve only two data repositories: open-law-html and law-static-assets.dependencies.json
. To serve current blobs on referenced Stele, referenced Stele needs to specify top-levelscopes
inrepositories.json
.AppState
.For testing framework, add tests for three possible archives for serving current documents are basic, multijursdiction, multihost. Basic archive is an archive with one stele that has multiple data repositories. Multijursdiction archive is an example of Stele referencing other Stele with
dependencies.json
. Multihost archive is enabled by using thecurrent_documents_guard
in config.tomlMulti-host serve for git repositories based on guarded header value.
When
config.toml
sets acurrent_documents_guard
header, we expect the HTTP requests to Stele to contain a guarded header. So requests which don't match the expected guarded header aren't resolved.