Allow to pass a timestamp when counter is incremented
I though it should be nice to have possibility to add custom timestamp to counter when incrementing it's value (e.g. to be able to populate the data or migrate from other storage). In my implementation, you can pass a timestamp as Von.increment argument. Time.now is assumed when timestamp is not present.
Related issue: #10
I'm gonna think on this one a bit. I don't like the timestamp as a third argument for some reason. Maybe an optional third Hash argument – or maybe a different method when you're providing a timestamp (as proposed in #10).
Obviously it's useful to be able to seed/migrate stat data, but it's such a one-time thing that it feels a little odd to integrate it so tightly into the standard API.
Well, you're right, it's not the best solution, especially when there are multiple optional arguments. I don't think different method is really needed here, optional hash (or keyword arguments for ruby 2.0) sounds better for me. But I'd go with moving value argument to that optional hash as well (to prevent the need of passing default value when you just want to change the timestamp).
Yeah, I could get behind that. I think it's simple enough when the value is the only optional argument and it also looks pretty close to a lot of other increment methods in that it allows a value to increment by, but with the two args a Hash is probably better.