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

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

Build:
Build:
LAST BUILD BRANCH: HEAD
DEFAULT BRANCH: master
Ran 01 Feb 2019 05:16PM UTC
Jobs 6
Files 83
Run time 2min
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
2909

Pull #740

travis-ci

web-flow
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.
Pull Request #740: Fix query encoding for integer-indexed maps

6 of 6 new or added lines in 1 file covered. (100.0%)

1654 of 1754 relevant lines covered (94.3%)

3186.94 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2909.1 (2.1) 01 Feb 2019 05:17PM UTC 0
94.32
Travis Job 2909.1
2 2909.2 (2.2) 01 Feb 2019 05:17PM UTC 0
94.33
Travis Job 2909.2
3 2909.3 (2.3) 01 Feb 2019 05:18PM UTC 0
94.34
Travis Job 2909.3
4 2909.4 (2.4) 01 Feb 2019 05:17PM UTC 0
94.34
Travis Job 2909.4
5 2909.5 (2.5) 01 Feb 2019 05:16PM UTC 0
94.34
Travis Job 2909.5
6 2909.6 (jruby-9.0.5.0) 01 Feb 2019 05:19PM UTC 0
0.0
Travis Job 2909.6
Source Files on build 2909
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2909
  • Pull Request #740
  • PR Base - master (#2896)
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