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

WordPoints / wordpoints
69%
master: 53%

Build:
Build:
LAST BUILD BRANCH: 1.10.4
DEFAULT BRANCH: master
Repo Added 03 Jan 2015 09:43PM UTC
Files 38
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 issue/300
branch: issue/300
CHANGE BRANCH
x
Reset
  • issue/300
  • 1.10
  • 1.10.0
  • 1.10.1
  • 1.10.2
  • 1.10.4
  • 1.5
  • 1.9
  • 1.9.0
  • 1.9.1
  • 1.9.2
  • 2.0
  • 2.0.0
  • 2.0.1
  • 2.0.2
  • feature/296
  • feature/misc
  • issue-210
  • issue-221
  • issue-256
  • issue/211
  • issue/220
  • issue/222
  • issue/262
  • issue/263
  • issue/273
  • issue/277
  • issue/298
  • issue/307
  • issue/317
  • issue/326
  • issue/328
  • issue/330
  • issue/335
  • issue/337
  • issue/345
  • issue/349
  • master
  • release/2.0.0
  • release/2.0.1
  • release/2.0.2
  • security/77231
  • stable

pending completion
334

push

travis-ci

JDGrimes
Promote users to the correct rank

This simplifies the rank transitioning code, and fixes a bug where
every other rank would be skipped when a user was being promoted. This
would cause a problem when you had ranks like this:

0 points (base)
100 points
1000 points

If a points-less user was awarded, say 150 points, they would be
transitioned to the 1000 points rank. Here is how it would happen. The
maybe-increase-rank function would first check if the user could
transition to the 100 points rank. It would get the affirmative. That
is the correct behavior. Then it would proceed to check if the user
could transition to the next rank. However, it would actually check one
rank above that. Of course, in a case like this, there is no fourth
rank, so the third rank for 1000 points would be returned.

Adds unit tests.

Fixes #300

1715 of 2475 relevant lines covered (69.29%)

26.33 hits per line

Relevant lines Covered
Build:
Build:
2475 RELEVANT LINES 1715 COVERED LINES
26.33 HITS PER LINE
Source Files on issue/300
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
334 issue/300 Promote users to the correct rank This simplifies the rank transitioning code, and fixes a bug where every other rank would be skipped when a user was being promoted. This would cause a problem when you had ranks like this: 0 points (base) 100 p... push 09 Mar 2015 08:04PM UTC JDGrimes travis-ci pending completion  
See All Builds (121)
  • 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