The to_i was causing group flippers to fail as their name (a string) would incorrectly get coerced into a integer (usually 0).
Fixes incorrect set coercion.
The "to_i" was causing group flippers to fail as their name (a string) would incorrectly get coerced into a integer (usually 0).
Huh seeing the CI failure makes this a bit more of an interesting issue. I'm guessing flipper expects the sets to be integers because of toggling individual users IDs?
Yeah, so I kind of think we need to change flipper itself to take strings instead of integers. Originally I chose integer because I could then use modulo for percentage of actors. Since then, I merged a pull request in flipper to use hashing of the Actor#id.to_s instead of Actor#id. This means we can now force strings for actor id and simplify flipper itself, but I haven't had time to do it.
Removes type coercion from specs.
Build fails pending acceptance of jnunemaker/flipper#13.
Ran into this same exact issue today and was about to write a fix. The tests in jnunemaker/flipper#13 will indeed cause the current state of this gem to fail. Implementation looks right. Nice work @chrislloyd