mongoid-bulk-import 0.2.0 → 0.3.0

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
  SHA256:
3
- metadata.gz: 51da653af49acd1c5864ac9486c2a5433002253cc76f5e82c916db2d3ba37cf0
4
- data.tar.gz: 6e91982865e84d44fb831d93fc2b41fc6d5fb32fddfe86ef2476da59435708b5
3
+ metadata.gz: d604afaeec5184c3a57b6c035db7e094e874ec226abe549f64a5d70957add435
4
+ data.tar.gz: 3210904e17e007936d507f01a554310f48f4fd96b31fa2f1f88ba646df46c7d3
5
5
  SHA512:
6
- metadata.gz: 9c5b39207d023542927f23ad76ed5a7e5288246bc8035d471d0ab35d0d7d95e99b78a71ac86d029cffe4d5197559b21a6050e8d7769a924f713c5ba5f9a376d9
7
- data.tar.gz: d9ff9543faccd27263369d175a49ee8f294c2e40de4968ddbf6961d4260cc2d08400f1fbd138c803552b5b40aaa4e2105c27a82e230bf5207f8ec486756763cc
6
+ metadata.gz: 460d2d9c8ee6688f3b1a94d1892ad5d6a9e57ff097ab909b925a6a9ed090a1f809cdfa0c14a23acdd5048d67eb0f5f91081b6bba72f842daa5cd73b58594078d
7
+ data.tar.gz: 339b064bf999cc2f4e01a69d17b1dbe9ca0dfbd12fdaa3253522cf198f1ffb38076048fa3d32c158c87e90abfe8143ab68016305a51cb21ca7fcca17ba4e7a4d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mongoid-bulk-import (0.2.0)
4
+ mongoid-bulk-import (0.3.0)
5
5
  mongoid (>= 7.0)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  module Mongoid
2
2
  module Bulk
3
3
  module Import
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
6
6
  end
7
7
  end
@@ -21,7 +21,7 @@ module Mongoid
21
21
  end
22
22
 
23
23
  def bulk_insert_obj(attributes = nil, options = {}, &block)
24
- doc = new(attributes, &block)
24
+ doc = attributes.kind_of?(Mongoid::Document) ? attributes : new(attributes, &block)
25
25
  doc.valid? if (options[:validate].nil? ? true : options[:validate])
26
26
  doc
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-bulk-import
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arun Bharati
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-27 00:00:00.000000000 Z
11
+ date: 2021-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid