bson 3.2.6 → 3.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Rakefile +1 -1
- data/lib/bson/object_id.rb +7 -2
- data/lib/bson/version.rb +1 -1
- data/spec/bson/object_id_spec.rb +37 -0
- metadata +10 -10
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51775b047f4c1019139fc14f1a387e4ca52e1d00
|
4
|
+
data.tar.gz: 11aebbe7f66db816c1f37aa2ac65a7a0417bc405
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1583872b9ca51739634993deb90b709f009a717bd4744927d19eb37312e5440ecd98d9446a1c3f3ac6cddca2b2f99ea29a65e67d48a7031e30add88ba6d87e31
|
7
|
+
data.tar.gz: dbc588428eb14d506bb70fa86c6522f333cd7f8c8684c127d4950fd50e2b4426f5cefe6d103e53c4da152074fc55ecb17b119a874e807cc97cc09581bbf7efae
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Rakefile
CHANGED
data/lib/bson/object_id.rb
CHANGED
@@ -194,6 +194,11 @@ module BSON
|
|
194
194
|
|
195
195
|
private
|
196
196
|
|
197
|
+
def initialize_copy(other)
|
198
|
+
to_bson
|
199
|
+
other.instance_variable_set(:@raw_data, @raw_data)
|
200
|
+
end
|
201
|
+
|
197
202
|
def repair
|
198
203
|
@raw_data = @data.to_bson_object_id
|
199
204
|
remove_instance_variable(:@data)
|
@@ -253,10 +258,10 @@ module BSON
|
|
253
258
|
# Create a new object id from a time.
|
254
259
|
#
|
255
260
|
# @example Create an object id from a time.
|
256
|
-
# BSON::ObjectId.
|
261
|
+
# BSON::ObjectId.from_time(time)
|
257
262
|
#
|
258
263
|
# @example Create an object id from a time, ensuring uniqueness.
|
259
|
-
# BSON::ObjectId.
|
264
|
+
# BSON::ObjectId.from_time(time, unique: true)
|
260
265
|
#
|
261
266
|
# @param [ Time ] time The time to generate from.
|
262
267
|
# @param [ Hash ] options The options.
|
data/lib/bson/version.rb
CHANGED
data/spec/bson/object_id_spec.rb
CHANGED
@@ -383,6 +383,43 @@ describe BSON::ObjectId do
|
|
383
383
|
end
|
384
384
|
end
|
385
385
|
|
386
|
+
describe "#clone" do
|
387
|
+
|
388
|
+
context "when the data has not been generated yet" do
|
389
|
+
|
390
|
+
let!(:object_id) do
|
391
|
+
described_class.new
|
392
|
+
end
|
393
|
+
|
394
|
+
let!(:clone) do
|
395
|
+
object_id.clone
|
396
|
+
end
|
397
|
+
|
398
|
+
it "generates and copies the data" do
|
399
|
+
expect(clone).to eq(object_id)
|
400
|
+
end
|
401
|
+
end
|
402
|
+
|
403
|
+
context "when the data has been generated" do
|
404
|
+
|
405
|
+
let!(:object_id) do
|
406
|
+
described_class.new
|
407
|
+
end
|
408
|
+
|
409
|
+
let(:clone) do
|
410
|
+
object_id.clone
|
411
|
+
end
|
412
|
+
|
413
|
+
before do
|
414
|
+
object_id.to_s
|
415
|
+
end
|
416
|
+
|
417
|
+
it "copies the data" do
|
418
|
+
expect(clone).to eq(object_id)
|
419
|
+
end
|
420
|
+
end
|
421
|
+
end
|
422
|
+
|
386
423
|
describe "#inspect" do
|
387
424
|
|
388
425
|
let(:object_id) do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyler Brock
|
@@ -16,7 +16,7 @@ cert_chain:
|
|
16
16
|
-----BEGIN CERTIFICATE-----
|
17
17
|
MIIDfDCCAmSgAwIBAgIBATANBg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SHN/eB8s2nO71
|
35
|
+
7gPoXx2RY+zJKB0K93PwB0c6a4ID4Ok1BvCO2Wnw0T8=
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date:
|
37
|
+
date: 2017-07-03 00:00:00.000000000 Z
|
38
38
|
dependencies: []
|
39
39
|
description: A full featured BSON specification implementation, in Ruby
|
40
40
|
email:
|
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: 1.3.6
|
137
137
|
requirements: []
|
138
138
|
rubyforge_project: bson
|
139
|
-
rubygems_version: 2.
|
139
|
+
rubygems_version: 2.6.11
|
140
140
|
signing_key:
|
141
141
|
specification_version: 4
|
142
142
|
summary: Ruby Implementation of the BSON specification
|
metadata.gz.sig
CHANGED
Binary file
|