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

gwicke / restbase / 446 / 2
88%
master: 92%

Build:
Build:
LAST BUILD BRANCH: update_security_headers
DEFAULT BRANCH: master
Ran 17 Nov 2015 04:56AM UTC
Files 16
Run time 3s
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 Nov 2015 04:45AM UTC coverage: 87.578%. First build
446.2

push

travis-ci

gwicke
Module option templating

This patch adds the ability to template module options using the familiar
request template syntax. This lets us pass down global options like header
whitelists into individual modules, reducing the need for repetition and copy
& paste.

To accommodate passing in templates as well, an additional 'templates'
property is passed into module constructors verbatim, and the one case where
we pass in an apiRequest template is migrated to it.

In this current implementation, we cheat a little bit by only supporting a
single nesting level, with all option templates being directly evaluated
against the service config. We can consider supporting nested scopes as well,
but will need to clean up the way information is passed down the router trees
first. However, in practice a single module inclusion level is all we have
needed so far, and keeping it that way may be good for our sanity. Lets cross
that bridge when we get to it.

One thing that I noticed while working on this patch is that we are doing some
fairly gross and brittle spec referecing & manipulation in our tests. This
patch should give us tools to get rid of this by moving those variable pieces
into a proper service config.

1678 of 1916 relevant lines covered (87.58%)

129.77 hits per line

Source Files on job 446.2
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 446
  • Travis Job 446.2
  • b2e2d11c on github
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