RubyGems Navigation menu

mongoid-bigbang 0.0.3

When you have a project in which you are not using Mongoid::Timestamps and you want to mock an object's creation time, you have to do some cumbersome operations in order to get those first 4 bytes of the ObjectId to represent the seconds since the Unix epoch that you want for that object. Particularly, if you want to have two objects with the same creation time, it would not suffice to generate the IDs via the BSON::ObjectId.from_time method, since it would yield the same ID for both objects, and you probably do not want them to be seen as the same object. This gem solves this little annoying issue by generating a unique ID for the given timestamp by using the other 8 bytes in ObjectId to generate the needed additional entropy.

Gemfile:
= クリップボードにコピー コピー完了!

インストール:
=

バージョン履歴:

  1. 0.0.3 - January 22, 2015 (8.5KB)
  2. 0.0.2 - January 18, 2015 (8.5KB)
全てのバージョンを表示(全3件)

Runtime依存関係 (1):

moped ~> 2.0.0

Development依存関係 (5):

bundler >= 1.6.2
pry ~> 0.10.1
pry-byebug ~> 2.0.0
rake ~> 10.0
rspec ~> 3.1.0

所有者:

作者:

  • Daniel Serrano

SHA 256チェックサム:

9a14133b29a4299268b6b9b6c81c77ddf51116015cfbb71ec732dafc3858972c

累計ダウンロード数 5,394

このバージョンのみ 3,126

ライセンス:

MIT

必要なRubyのバージョン: >= 0

リンク: