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

stripe / stripe-ruby / 3489
97%

Build:
DEFAULT BRANCH: master
Ran 10 Oct 2019 05:12PM UTC
Jobs 5
Files 291
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
3489

push

travis-ci

brandur-stripe
Support backwards pagination with list's `#auto_paging_each` (#865)

* Support backwards pagination with list's `#auto_paging_each`

Previously, `#auto_paging_each` would always try to paginate forward,
even if it was clear based on the list's current filters that the user
had been intending to iterate backwards by specifying an `ending_before`
filter exclusively.

Here we implement backwards iteration by detecting this condition,
reversing the current list data, and making new requests for the
previous page (instead of the next one) as needed, which allows the user
to handle elements in reverse logical order.

Reversing the current page's list is intended as a minor user feature,
but may possibly be contentious. For background, when backwards
iterating in the API, results are still returned in "normal" order. So
if I specifying `ending_before=7`, the next page would look like `[4, 5,
6`] instead of `[6, 5, 4]`. In `#auto_paging_each` I reverse it to `[6,
5, 4]` so it feels to the user like they're handling elements in the
order they're iterating, which I think is okay. The reason it might be
contentious though is that it could be a tad confusing to someone who
already understands the normal `ending_before` ordering in the API.

Fixes #864.

* Allow `ending_before` and `starting_after` to remain in hydrated list object

5758 of 5989 relevant lines covered (96.14%)

2407.4 hits per line

Jobs
ID Job ID Ran Files Coverage
1 3489.1 (2.3) 10 Oct 2019 05:12PM UTC 0
96.21
Travis Job 3489.1
2 3489.2 (2.4) 10 Oct 2019 05:12PM UTC 0
96.21
Travis Job 3489.2
3 3489.3 (2.5) 10 Oct 2019 05:12PM UTC 0
96.21
Travis Job 3489.3
4 3489.4 (2.6) 10 Oct 2019 05:13PM UTC 0
96.18
Travis Job 3489.4
5 3489.5 (jruby-9.2.7.0) 10 Oct 2019 05:15PM UTC 0
0.0
Travis Job 3489.5
Source Files on build 3489
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #3489
  • e3cc91de on github
  • Prev Build on master (#3483)
  • Next Build on master (#3490)
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

© 2026 Coveralls, Inc