• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rero / sonar / 1253 / 1
99%
master: 95%

Build:
Build:
LAST BUILD BRANCH: rep-project-validation
DEFAULT BRANCH: master
Ran 12 Nov 2020 10:46AM UTC
Files 116
Run time 21s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Nov 2020 10:10AM UTC coverage: 100.0%. Remained the same
1253.1

push

travis-ci

sebastiendeleze
documents: handle several file formats

This commit allows to add all kind of files to documents. Depending on the type of the file, a preview can be available or not.
Additionally, the way to show the files has been completely refactored, to make consistency with frontend views.

* Configures preview max size for images and JSON/XML files.
* Configures extensions which allow to show a preview.
* Adds a border to generated file thumbnail.
* Keeps the ratio when generating file thumbnail.
* Appends orginal extension to filename when generating system files, to avoid conflict with files having the same name.
* Adds defaults metadata values for file, only if file is not deleted.
* Moves some functions related to documents from `views.py` to `utils.py`, to use them in JSON serialization.
* Adds `restriction`, 'thumbnail` and `link` properties to file, in document detail view and serialization.
* Avoids to remove the `restriction` property during pre-loading data, because this property is flagged as `dump_only`.
* Removes call to `replace_refs()` in document detail view, as no `$ref` properties is used in template.
* Changes `restricted` image for a better one.
* Adds a default image if no thumbnail is available.
* Refactore the macro for displaying thumbnails, as more information is now present in file metadata.
* Closes #322.
* Closes #339.

Co-Authored-by: Sébastien Délèze <sebastien.deleze@rero.ch>

3513 of 3513 relevant lines covered (100.0%)

1.0 hits per line

Source Files on job 1253.1
  • Tree
  • List 0
  • Changed 7
  • Source Changed 7
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 963
  • Travis Job 1253.1
  • 4c2f105f on github
  • Prev Job for on dev (#1237.1)
  • Next Job for on dev (#1257.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc