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

prometheus / client_ruby / 741
100%
master: 100%

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

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>

4 of 4 new or added lines in 2 files covered. (100.0%)

1634 of 1634 relevant lines covered (100.0%)

62.21 hits per line

Jobs
ID Job ID Ran Files Coverage
1 741.1 (2.5.8) 09 Jun 2021 05:35PM UTC 0
100.0
Travis Job 741.1
2 741.2 (2.6.6) 09 Jun 2021 05:35PM UTC 0
100.0
Travis Job 741.2
3 741.3 (2.7.2) 09 Jun 2021 05:35PM UTC 0
100.0
Travis Job 741.3
4 741.4 (3.0.0) 09 Jun 2021 05:36PM UTC 0
100.0
Travis Job 741.4
5 741.5 (jruby-9.1.9.0) 09 Jun 2021 05:40PM UTC 0
0.0
Travis Job 741.5
Source Files on build 741
  • Tree
  • List 32
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #741
  • ec5c5aa6 on github
  • Prev Build on sinjo-improve-path-handling (#739)
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