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

codeforamerica / ohana-api / 104
64%
master: 99%

Build:
Build:
LAST BUILD BRANCH: mb-update-factory-bot
DEFAULT BRANCH: master
Ran 31 Aug 2013 11:04PM UTC
Jobs 1
Files 31
Run time –
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
104

push

travis-ci

monfresh
Fix link header bug for empty results collection

When there are no results, current_page = 1, but total_pages = 0.  The Tire gem overrides Kaminari's last_page? method which checks if current_page >= total_pages, but tire defines last_page? as current_page == total_pages, which is semantically correct, but breaks our code.

Kaminari also provides an out_of_range? method to check if current_page > total_pages. However, Tire uses out_of_bounds? and didn't alias out_of_range?, so I submitted a pull request. Until he merges the fix, I will be using my fork of tire.

The alias is important because our app depends on 2 different pagination methods. Non-search queries (such as /api/locations) are paginated by Kaminari, but search results are paginated by Tire. Aliasing saves us from cluttering our code with multiple conditional statements.

565 of 585 relevant lines covered (96.58%)

16.38 hits per line

Jobs
ID Job ID Ran Files Coverage
1 104.1 (2.0.0) 31 Aug 2013 11:04PM UTC 0
96.58
Travis Job 104.1
Source Files on build 104
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #104
  • fb418d1b on github
  • Prev Build on data-merge (#102)
  • Next Build on data-merge (#105)
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