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

stripe / stripe-ruby / 2904
94%
master: 97%

Build:
Build:
LAST BUILD BRANCH: HEAD
DEFAULT BRANCH: master
Ran 31 Jan 2019 11:18PM UTC
Jobs 6
Files 83
Run time 4min
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
2904

push

travis-ci

brandur
Fix query encoding for integer-indexed maps

As reported in #608, integer-indexed maps currently work when passed as
part of the body, but they are reverted to non-indexed maps when passed
in the query.

It turns out that we actually had two problems:

1. We weren't calling our `Util.encode_parameters` on our query
   parameters anywhere, and it's this method will does the integer
   encoding.

2. Even when I fixed (1) by calling `Util.encode_parameters`, Faraday
   would still strip the integer indexes as they were transformed in
   its default `NestedParamsEncoder`.

Here we fix both issues by calling `Util.encode_parameters` and sending
Faraday a custom encoder which bypasses its normal shenanigans.

Unfortunately, this has turned out to be somewhat difficult to test
because the integer-indexed maps also seem to confuse Webmock, which
strips them down to standard maps (I even tried testing against a
string, and it still got it wrong). I did use stripe-mock though to
verify that we are now sending the right payload.

Fixes #608.

1634 of 1732 relevant lines covered (94.34%)

3227.42 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2904.1 (2.1) 31 Jan 2019 11:19PM UTC 0
94.32
Travis Job 2904.1
2 2904.2 (2.2) 31 Jan 2019 11:18PM UTC 0
94.33
Travis Job 2904.2
3 2904.3 (2.3) 31 Jan 2019 11:18PM UTC 0
94.34
Travis Job 2904.3
4 2904.4 (2.4) 31 Jan 2019 11:19PM UTC 0
94.34
Travis Job 2904.4
5 2904.5 (2.5) 31 Jan 2019 11:19PM UTC 0
94.34
Travis Job 2904.5
6 2904.6 (jruby-9.0.5.0) 31 Jan 2019 11:21PM UTC 0
0.0
Travis Job 2904.6
Source Files on build 2904
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2904
  • d705f1ca on github
  • Next Build on brandur-fix-query-encoding (#2906)
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