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

prometheus / client_ruby / 739
100%
master: 100%

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

pending completion
739

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.

1634 of 1634 relevant lines covered (100.0%)

47.17 hits per line

Jobs
ID Job ID Ran Files Coverage
1 739.1 (2.5.8) 09 Jun 2021 05:34PM UTC 0
100.0
Travis Job 739.1
2 739.2 (2.6.6) 09 Jun 2021 05:34PM UTC 0
100.0
Travis Job 739.2
3 739.3 (2.7.2) 09 Jun 2021 05:34PM UTC 0
100.0
Travis Job 739.3
Source Files on build 739
  • Tree
  • List 32
  • Changed 2
  • Source Changed 2
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #739
  • 7b86c472 on github
  • Prev Build on sinjo-improve-path-handling (#737)
  • Next Build on sinjo-improve-path-handling (#741)
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

© 2025 Coveralls, Inc