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

stripe / stripe-ruby
96%
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-monotonic-time
branch: brandur-monotonic-time
CHANGE BRANCH
x
Reset
  • brandur-monotonic-time
  • 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-named-code
  • brandur-net-http
  • 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
3458

Pull #857

travis-ci

web-flow
Move to monotonic time for duration calculations

Drops the use of `Time.now` in favor of using the system's monotonic
clock for various operations that calculate and use elapsed duration.
The latter is preferable because in some cases `Time.now` can be
unstable, like if it's set manually by a system administrator or an NTP
daemon.

I don't expect that the previous code would actually have caused trouble
in the vast majority of normal situations, so I'm not going to backport
anything, but this seems like good hygiene.

For better or worse I had to wrap the monotonic time calls in a new
`Util` function because (1) the normal invocation is long enough to have
caused a lot of overruns on our 80 character line lengths, and (2)
Timecop doesn't stub the monotonic clock, so the `Util` method gives us
a nice place that we can stub on where necessary.
Pull Request #857: Move to monotonic time for duration calculations

10 of 10 new or added lines in 3 files covered. (100.0%)

3794 of 3948 relevant lines covered (96.1%)

2404.11 hits per line

Relevant lines Covered
Build:
Build:
3948 RELEVANT LINES 3794 COVERED LINES
2404.11 HITS PER LINE
Source Files on brandur-monotonic-time
  • List 0
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
3458 brandur-monotonic-time Move to monotonic time for duration calculations Drops the use of `Time.now` in favor of using the system's monotonic clock for various operations that calculate and use elapsed duration. The latter is preferable because in some cases `Time.now` ... Pull #857 01 Oct 2019 04:53PM UTC web-flow travis-ci pending completion  
3457 brandur-monotonic-time Move to monotonic time for duration calculations Drops the use of `Time.now` in favor of using the system's monotonic clock for various operations that calculate and use elapsed duration. The latter is preferable because in some cases `Time.now` ... push 01 Oct 2019 04:53PM 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