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

d00rman / restbase / 184 / 1
88%
master: 84%

Build:
Build:
LAST BUILD BRANCH: parsoidproxy/mirror-html2html
DEFAULT BRANCH: master
Ran 17 Sep 2015 11:53AM UTC
Files 15
Run time 0s
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

17 Sep 2015 11:32AM UTC coverage: 88.287% (+0.1%) from 88.17%
184.1

push

travis-ci

d00rman
Mathoid: Add public and back-end endpoints

This commit adds two public routes:

- `POST /{domain}/media/math`
- `GET /{domain}/media/math/{hash}`

The first allows clients to perform a POST request to ask for a formula
to be rendered. It takes the same parameters as Mathoid, namely `q` (the
formula to be rendered), `type` (the format or type of the supplied
formula) and `format` (the desired output format). Only `q` is
mandatory, `type` defaults to `tex`, while `format` is presumed to be
`json` if not supplied. Internally, the request is saved using the
*post_data* module. The request hash is therefore calculated and is used
to determine if the given formula has already been rendered by Mathoid
in the sought output format. If so, the stored version is returned.
Otherwise, a request is issued to Mathoid and its result is stored and
returned. In either case, the response contains the `x-resource-location`
header which can be used to perform subsequent, low-latency requests to
obtain the same render via the second public endpoint.

Note that the endpoints and their storage are organised in such a way as
to be domain-independent. This commit introduces a new, global domain -
`window.wikimedia.org` - and all Mathoid requests are internally
remapped to it. In other words, if a render with the data hash `12345`
exists, it can be retrieved equally from all domains, regardless of the
initial request's domain.

Also, this commit reorganises slightly the configuration files.

1500 of 1699 relevant lines covered (88.29%)

167.72 hits per line

Source Files on job 184.1
  • Tree
  • List 0
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 184
  • Travis Job 184.1
  • dd510452 on github
  • Prev Job for on mathoid/post-routes (#183.1)
  • Next Job for on mathoid/post-routes (#185.2)
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