chialab / a11ygator-app

🐊 An application and Twitter bot that bites websites to taste their accessibility.
https://a11ygator.chialab.io
MIT License
7 stars 2 forks source link

Introducing storage adapters #1

Closed fquffio closed 5 years ago

fquffio commented 5 years ago

This PR introduces the concept of "filesystem adapters", which is totally overkill, but now GitHub knows we do know what an adapter is.

Screenshots are stored by default in the screenshots/ directory in the local filesystem. This can be configured via the SCREENSHOTS_PATH environment variable.

If the CLOUD_STORAGE_BUCKET environment variable is set, however, screenshots are stored in a Google Cloud Storage bucket, optionally prefixed with the value set as CLOUD_STORAGE_PREFIX env variable.

Also, screenshots' names are now uniquely generated using UUID v4, so that reports for the same page do not overwrite previous screenshots but always create new ones.

Last but not least, project structure has been refactored a bit.

Also fixed https://github.com/chialab/a11ygator-app/issues/3

nicolocarpignoli commented 5 years ago

@fquffio for me it is ok, well done! agree with merge? @edoardocavazza