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

stripe / stripe-ruby / 3242
95%
master: 97%

Build:
Build:
LAST BUILD BRANCH: HEAD
DEFAULT BRANCH: master
Ran 29 Jul 2019 08:36PM UTC
Jobs 7
Files 98
Run time 3min
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
3242

Pull #813

travis-ci

web-flow
Convert library to use built-in `Net::HTTP`

Moves the library off of Faraday and over onto the standard library's
built-in `Net::HTTP` module. The upside of the transition is that we
break away from a few dependencies that have caused us a fair bit of
trouble in the past, the downside is that we need more of our own code
to do things (although surprisingly, not that much more).

The biggest new pieces are:

* `ConnectionManager`: A per-thread class that manages a connection to
  each Stripe infrastructure URL (like `api.stripe.com`,
  `connect.stripe.com`, etc.) so that we can reuse them between
  requests. It's also responsible for setting up and configuring new
  `Net::HTTP` connections, which is a little more heavyweight
  code-wise compared to other libraries. All of this could have lived in
  `StripeClient`, but I extracted it because that class has gotten so
  big.

* `MultipartEncoder`: A class that does multipart form encoding for file
  uploads. Unfortunately, Ruby doesn't bundle anything like this. I
  built this by referencing the Go implementation because the original
  RFC is not very detailed or well-written. I also made sure that it was
  behaving similarly to our other custom implementations like
  stripe-node, and that it can really upload a file outside the test
  suite.

There's some risk here in that it's easy to miss something across one of
these big transitions. I've tried to test out various error cases
through tests, but also by leaving scripts running as I terminate my
network connection and bring it back. That said, we'd certainly release
on a major version bump because some of the interface (like setting
`Stripe.default_client`) changes.
Pull Request #813: Convert library to use built-in `Net::HTTP`

156 of 156 new or added lines in 5 files covered. (100.0%)

1883 of 1979 relevant lines covered (95.15%)

3739.04 hits per line

Jobs
ID Job ID Ran Files Coverage
1 3242.1 (2.1) 29 Jul 2019 08:37PM UTC 0
95.18
Travis Job 3242.1
2 3242.2 (2.2) 29 Jul 2019 08:36PM UTC 0
95.19
Travis Job 3242.2
3 3242.3 (2.3) 29 Jul 2019 08:37PM UTC 0
95.19
Travis Job 3242.3
4 3242.4 (2.4) 29 Jul 2019 08:36PM UTC 0
95.19
Travis Job 3242.4
5 3242.5 (2.5) 29 Jul 2019 08:36PM UTC 0
95.2
Travis Job 3242.5
6 3242.6 (2.6) 29 Jul 2019 08:37PM UTC 0
95.21
Travis Job 3242.6
7 3242.7 (jruby-9.0.5.0) 29 Jul 2019 08:39PM UTC 0
0.0
Travis Job 3242.7
Source Files on build 3242
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #3242
  • Pull Request #813
  • PR Base - master (#3217)
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