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

stripe / stripe-ruby
95%
master: 97%

Build:
Build:
LAST BUILD BRANCH: HEAD
DEFAULT BRANCH: master
Repo Added 09 Dec 2017 01:25AM UTC
Files 262
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

LAST BUILD ON BRANCH brandur-net-http
branch: brandur-net-http
CHANGE BRANCH
x
Reset
  • brandur-net-http
  • HEAD
  • akropp-add-client-telemetry
  • akropp-telemetry-in-ms
  • alexander/flexible-billing
  • anniel-coveralls
  • anniel-test-coverage
  • beta
  • brandur-assert-raises
  • brandur-backwards-auto-paging-each
  • brandur-check-request-id
  • brandur-clean-test-output
  • brandur-clearable-connections
  • brandur-configuration-ca-bundle-path
  • brandur-configuring-version
  • brandur-connection-manager-gc
  • brandur-deleted-objects-with-ids
  • brandur-disable-lengths
  • brandur-drop-old-ruby
  • brandur-drop-timecop
  • brandur-exclude-examples
  • brandur-expand-retries
  • brandur-expose-compute-signature
  • brandur-fix-delete-discount
  • brandur-fix-query-encoding
  • brandur-fix-tests
  • brandur-frozen-strings
  • brandur-generate-header
  • brandur-hash
  • brandur-idempotent-replayed
  • brandur-initialize-instance-var
  • brandur-integer-indexes
  • brandur-keep-alive-to-30
  • brandur-merge-query-params
  • brandur-minor-refactor
  • brandur-minor-stripe-client-cleanup
  • brandur-minor-test-fixes
  • brandur-monotonic-time
  • brandur-named-code
  • brandur-net-http-persistent
  • brandur-nicer-error
  • brandur-only-empty-metadata
  • brandur-port-in-output
  • brandur-raise-argument-error
  • brandur-relax-file-constraints
  • brandur-remove-deprecated
  • brandur-remove-file-encoding
  • brandur-rename-request
  • brandur-request-begin
  • brandur-request-id-test
  • brandur-retry-fix
  • brandur-retry-lock-timeouts
  • brandur-rubocop-080
  • brandur-ruby-20
  • brandur-ruby-21
  • brandur-ruby-25
  • brandur-select-port
  • brandur-shoulda-context-2-0-0-rc4
  • brandur-simpler-encoding
  • brandur-stripe-mock-0-15
  • brandur-stripe-mock-030
  • brandur-stripe-mock-v0.12.0
  • brandur-stripe-should-retry
  • brandur-support-express-authorize
  • brandur-thread-state
  • brandur-warn-on-remove-error
  • brandur-webmock-380
  • cjavilla/add-playlist-link-to-readme
  • cjavilla/update-readme
  • ctrudeau-add-code-generated-comment-to-ruby
  • daz-terminal-bindings
  • fay/issfr
  • fay/update-version
  • foresthu-add-topup-cancel-support
  • integration-v5
  • jkakar/fix-product-issues
  • jkakar/topup-client
  • latest-codegen
  • master
  • metadata-api
  • mickjermsurawong/update-stripe-mock-version
  • ob-better-resource-url
  • ob-bump-faraday
  • ob-bump-rubocop
  • ob-creditnote-preview
  • ob-decimal-string
  • ob-dsl-custom-method
  • ob-early-fraud-warning
  • ob-enable-telemetry
  • ob-error-code
  • ob-error-object
  • ob-file-duck-typing
  • ob-file-link
  • ob-file-resource
  • ob-fix-ci
  • ob-fix-tests
  • ob-fix-windows
  • ob-gem-metadata
  • ob-github-actions
  • ob-irc-badge
  • ob-oauth
  • ob-openapi-files
  • ob-prep-file
  • ob-proxy
  • ob-remove-all
  • ob-remove-issuerfraudrecord
  • ob-remove-old-methods
  • ob-rubocop
  • ob-serialize-individual
  • ob-skip-to-hash-for-nil
  • ob-static-methods
  • ob-stripe-mock-0.11.0
  • ob-test-file-link-data
  • ob-topup-cancel
  • ob-travis-bundler
  • ob-travis-ruby26
  • ob-upcoming-line-items
  • ob-upgrade-stripe-mock
  • ob-vscode
  • ob/codegen-40a20cd
  • ob/codegen-63fe31a
  • ob/codegen-ab6898a
  • ob/codegen-ba4dcd0
  • ob/codegen-c806fa1
  • pavel/codegen
  • pavel/more-inheritance
  • pavel/more-method-sorting
  • pavel/normalize-opts
  • pavel/simplify-inheritance
  • pavel/single-quotes
  • ralex/codegen
  • ralex/codegen-2
  • ralex/fix-initialize-from
  • ralex/list-urs-and-st
  • ralex/unified_requests
  • rattrayalex-stripe-patch-1
  • rattrayalex/codegen-c806fa1
  • rattrayalex/codegen-f7fc004
  • remi-add-account-capabilities
  • remi-add-account-links
  • remi-add-checkout-session-retrieve
  • remi-add-checkout-sessions
  • remi-add-credit-notes
  • remi-add-creditnote
  • remi-add-customer-balance-transactions
  • remi-add-invoice-methods
  • remi-add-issuing-resources
  • remi-add-mandate
  • remi-add-payment-intent
  • remi-add-payment-methods
  • remi-add-person
  • remi-add-radar-lists
  • remi-add-radar-review
  • remi-add-reporting-resources
  • remi-add-sigma-scheduled-query-run
  • remi-add-subscription-schedules
  • remi-add-tax-ids
  • remi-add-tax-rates
  • remi-add-terminal-delete
  • remi-add-usage-record-summary
  • remi-add-webhook-endpoint
  • remi-bring-nested-tests-up
  • remi-change-readme
  • remi-fix-bt
  • remi-fix-checkout-sessions
  • remi-fix-payment-intent
  • remi-fix-readme
  • remi-fix-tests
  • remi-fix-tests-latest
  • remi-move-payment-intent-stripe-mock
  • remi-scheduled-run-mock
  • remi-setupintents
  • remi-wip-creditnote-line
  • remi/codegen-3854362
  • remi/codegen-474461f
  • remi/codegen-4bd4c01
  • remi/codegen-72527e3
  • remi/codegen-824d494
  • remi/codegen-d663cdb
  • remi/codegen-f71053e
  • remi/codegen-f75fd88
  • richardm-apiref-link
  • richardm-billingportalconfig
  • richardm-generate-via-stripetype
  • richardm-gha
  • richardm-junit-output
  • rubocop-0.79
  • rwz/inline-paths
  • rwz/sort-methods
  • sdk-release/next-major
  • tmaxwell/fix-connect-base
  • tomer-remove-edittable-bitcoin-receivers-actions
  • v3.10.0
  • v3.11.0
  • v3.12.0
  • v3.12.1
  • v3.13.0
  • v3.13.1
  • v3.14.0
  • v3.15.0
  • v3.16.0
  • v3.17.0
  • v3.17.1
  • v3.17.2
  • v3.18.0
  • v3.19.0
  • v3.20.0
  • v3.21.0
  • v3.22.0
  • v3.23.0
  • v3.24.0
  • v3.25.0
  • v3.26.0
  • v3.26.1
  • v3.27.0
  • v3.28.0
  • v3.29.0
  • v3.30.0
  • v3.31.0
  • v3.31.1
  • v3.9.1
  • v3.9.2
  • v4.0.0
  • v4.0.1
  • v4.0.2
  • v4.0.3
  • v4.1.0
  • v4.10.0
  • v4.11.0
  • v4.12.0
  • v4.13.0
  • v4.14.0
  • v4.15.0
  • v4.16.0
  • v4.17.0
  • v4.18.0
  • v4.18.1
  • v4.19.0
  • v4.2.0
  • v4.20.0
  • v4.20.1
  • v4.21.0
  • v4.21.1
  • v4.21.2
  • v4.21.3
  • v4.22.0
  • v4.22.1
  • v4.23.0
  • v4.3.0
  • v4.4.0
  • v4.4.1
  • v4.5.0
  • v4.6.0
  • v4.7.0
  • v4.7.1
  • v4.8.0
  • v4.8.1
  • v4.9.0
  • v4.9.1
  • v5.0.0
  • v5.0.1
  • v5.1.0
  • v5.1.1
  • v5.10.0
  • v5.11.0
  • v5.12.0
  • v5.12.1
  • v5.13.0
  • v5.14.0
  • v5.15.0
  • v5.16.0
  • v5.17.0
  • v5.18.0
  • v5.19.0
  • v5.2.0
  • v5.20.0
  • v5.21.0
  • v5.22.0
  • v5.23.0
  • v5.23.1
  • v5.24.0
  • v5.25.0
  • v5.26.0
  • v5.27.0
  • v5.28.0
  • v5.29.0
  • v5.29.1
  • v5.3.0
  • v5.30.0
  • v5.4.0
  • v5.4.1
  • v5.5.0
  • v5.6.0
  • v5.7.0
  • v5.7.1
  • v5.8.0
  • v5.9.0
  • zwick_set_app_info_partner_updates

pending completion
3246

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

Relevant lines Covered
Build:
Build:
1979 RELEVANT LINES 1883 COVERED LINES
3739.04 HITS PER LINE
Source Files on brandur-net-http
  • List 0
  • Changed 28
  • Source Changed 23
  • Coverage Changed 28
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
3246 brandur-net-http 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 b... Pull #813 29 Jul 2019 08:41PM UTC web-flow travis-ci pending completion  
3245 brandur-net-http 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 b... push 29 Jul 2019 08:41PM UTC brandur travis-ci pending completion  
3242 brandur-net-http 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 b... Pull #813 29 Jul 2019 08:36PM UTC web-flow travis-ci pending completion  
3243 brandur-net-http 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 b... push 29 Jul 2019 08:36PM UTC brandur travis-ci pending completion  
3239 brandur-net-http 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 b... Pull #813 25 Jul 2019 05:44PM UTC web-flow travis-ci pending completion  
3238 brandur-net-http 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 b... push 25 Jul 2019 05:44PM UTC brandur travis-ci pending completion  
3237 brandur-net-http 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 b... Pull #813 24 Jul 2019 07:56PM UTC web-flow travis-ci pending completion  
3236 brandur-net-http 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 b... push 24 Jul 2019 07:56PM UTC brandur travis-ci pending completion  
3235 brandur-net-http 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 b... Pull #813 24 Jul 2019 07:53PM UTC web-flow travis-ci pending completion  
3234 brandur-net-http 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 b... push 24 Jul 2019 07:52PM UTC brandur travis-ci pending completion  
See All Builds (4151)
  • Repo on GitHub
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