No longer using Flask to develop this, see: https://reviews.reviewboard.org/r/6825/
Review Request #6808 — Created Jan. 18, 2015 and discarded
This is a WIP for my project. The attached files is the sample of a basic prototype running on Flask.
main.py is the Flask web server with two functions:
- retrieve_file_blob: This is meant to return a response that contains the file blob given the Git sha. Calls GitRepository.retrieve_file_blob (see below) to obtain this information.
- file_exists: This is meant to return a response that checks whether the file exists given by the Git sha. Calls GitRepository.file_exists (see below) to obtain this information.
respository.py: Contains a Repository class that represents a base SCM repository. Not much there currenty, aside from two abstract methods: retrieve_file_blob and file_exists. Meant for abstraction for future SCM support.
git_repository.py: Contains a class GitRepository which Extends Repository, provides implementation for the functions listed in Repository. Also has doctests to test functionality (doctests will only work for my local system so far).
Just local testing, see doctests in git_repository.py.
I have also ran the webserver and tried to access the URLs for getting the file and checking if the file exists to test the response.