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

prometheus / client_ruby / 741 / 1
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: fix_with_labels
DEFAULT BRANCH: master
Ran 09 Jun 2021 05:35PM UTC
Files 32
Run time 17s
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

09 Jun 2021 05:34PM UTC coverage: 100.0%. Remained the same
2.5.8

push

travis-ci

Sinjo
Fix URI escaping of spaces in push.rb

When `URI.escape` was deprecated, we switched to using `CGI.escape` to
construct the request path in push.rb.

The problem with that is that it mishandles spaces, encoding them as `+`
rather than `%20`. This leads to literal `+` characters in metric
labels, which is a bug.

This commit uses `ERB::Util.url_encode` instead, which gives us the
behaviour we want.

It's not the part of the standard library I expected to use for this,
but it's the only one that seems to have the behaviour we want and that
hasn't disappeared in Ruby 3.0. `WEBrick::HTTPUtils.escape` seems
similar on the surface, but doesn't encode `&`. Presumably it's intended
as a best-effort way to encode an entire URL, and has to assume that any
`&` character is a separator between query params.

Signed-off-by: Chris Sinjakli <chris@sinjakli.co.uk>

1650 of 1650 relevant lines covered (100.0%)

15.78 hits per line

Source Files on job 741.1 (2.5.8)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 704
  • Travis Job 741.1
  • ec5c5aa6 on github
  • Prev Job for 2.5.8 on sinjo-improve-path-handling (#739.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