mongoid-auto_increase_id 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ccc647e0d12fe3055a8afe2562c95621647fcc1
4
- data.tar.gz: 0115578d789c8bfbbc7997be6ef01378d596a071
3
+ metadata.gz: 81608918a20da106db21a5ff5f4f2ad45e2c8ca3
4
+ data.tar.gz: 661fe7539dd7d39f49a59cd1a68c185a379bfb94
5
5
  SHA512:
6
- metadata.gz: f2ee19525950e2d8b505fd079da47891c121efbf684e247af56cc0a8f1eaa6f2d5d793aaf85eac7c9dcb1c72a623b00c274651250a3072a45f4667cbd2f6412a
7
- data.tar.gz: 12013d6b8a305ec4bed42475c05a6b93d1a2e15e436cf416d5a3c18bdee0b72cd227e3e30cba732d11694318132b149fbd560d6e05704ab815893728c0389f60
6
+ metadata.gz: 238993cb2757f1183099202a3b8f9a62f16b31edc057f91cf259e5946bb26d4ff4ad183723a29735a3df5c72411d805e07fb23b58ca4e75fe41c9e37c56788a3
7
+ data.tar.gz: 2dd0083c28279ed8eefaaf4b74f9a305187faa9d8aa24b6b5dd840951385789021d2707cbdb1bd5e81f936ac8356e1f1ba3c1bea19c4d41d8d78cd1fe9269b9f
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Mongoid::AutoIncreaseId
2
2
 
3
- TODO: Write a gem description
3
+ Override id field to MySQL like auto increment for Mongoid in a way different from [github.com:@huacnlee/mongoid_auto_increment_id](https://github.com/huacnlee/mongoid_auto_increment_id)
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,7 +18,7 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- Override id field to MySQL like auto increment for Mongoid in a way different from github.com:@huacnlee
21
+
22
22
 
23
23
  ## Contributing
24
24
 
@@ -19,10 +19,10 @@ module Mongoid
19
19
  o["value"]["c"].to_i
20
20
  end
21
21
 
22
- def reset_id_counter
22
+ def reset_id_counter(value = 0)
23
23
  Mongoid::Sessions.default.command({:findAndModify => "mongoid.auto_increment_ids",
24
24
  :query => { :_id => collection_name.to_s },
25
- :update => { "$set" => { :c => 0 } }
25
+ :update => { "$set" => { :c => value } }
26
26
  })
27
27
  end
28
28
 
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module AutoIncreaseId
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-auto_increase_id
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Binz