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

stripe / stripe-ruby / 2905
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
2905

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%)

1634 of 1732 relevant lines covered (94.34%)

3227.42 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2905.1 (2.1) 31 Jan 2019 11:19PM UTC 0
94.32
Travis Job 2905.1
2 2905.2 (2.2) 31 Jan 2019 11:18PM UTC 0
94.33
Travis Job 2905.2
3 2905.3 (2.3) 31 Jan 2019 11:19PM UTC 0
94.34
Travis Job 2905.3
4 2905.4 (2.4) 31 Jan 2019 11:19PM UTC 0
94.34
Travis Job 2905.4
5 2905.5 (2.5) 31 Jan 2019 11:19PM UTC 0
94.34
Travis Job 2905.5
6 2905.6 (jruby-9.0.5.0) 31 Jan 2019 11:21PM UTC 0
0.0
Travis Job 2905.6
Source Files on build 2905
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2905
  • 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