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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f5fedb8e90899170ca4e67704d80a6b63f10303
4
- data.tar.gz: 20eef028f83b52a330aa392b41ef189f3822c12b
3
+ metadata.gz: 51775b047f4c1019139fc14f1a387e4ca52e1d00
4
+ data.tar.gz: 11aebbe7f66db816c1f37aa2ac65a7a0417bc405
5
5
  SHA512:
6
- metadata.gz: fd23def4d8d0efe7279aeb96b0ca02f565c36fc974b53362887033a4b4b3d54a08499d5c78d8914f0bbe3845c511ab4f95a09e98092e33c1f1548073e88cd414
7
- data.tar.gz: 98a8be8ca884939c734f388f412fdd236ce10c4470697ac289fab7acc777d61126b5f25ae144f320a18ecef697da92b25ebfb50cfaadc797eaabc6064bd468f7
6
+ metadata.gz: 1583872b9ca51739634993deb90b709f009a717bd4744927d19eb37312e5440ecd98d9446a1c3f3ac6cddca2b2f99ea29a65e67d48a7031e30add88ba6d87e31
7
+ data.tar.gz: dbc588428eb14d506bb70fa86c6522f333cd7f8c8684c127d4950fd50e2b4426f5cefe6d103e53c4da152074fc55ecb17b119a874e807cc97cc09581bbf7efae
Binary file
data.tar.gz.sig CHANGED
Binary file
data/Rakefile CHANGED
@@ -47,7 +47,7 @@ def extension
47
47
  RUBY_PLATFORM =~ /darwin/ ? "bundle" : "so"
48
48
  end
49
49
 
50
- require_relative "perf/bench" unless jruby?
50
+ require_relative "perf/bench"
51
51
 
52
52
  RSpec::Core::RakeTask.new(:spec)
53
53
  RSpec::Core::RakeTask.new(:rspec)
@@ -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.from_id(time)
261
+ # BSON::ObjectId.from_time(time)
257
262
  #
258
263
  # @example Create an object id from a time, ensuring uniqueness.
259
- # BSON::ObjectId.from_id(time, unique: true)
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.
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
 
15
15
  module BSON
16
- VERSION = "3.2.6"
16
+ VERSION = "3.2.7"
17
17
  end
@@ -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.6
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
  MIIDfDCCAmSgAwIBAgIBATANBgkqhkiG9w0BAQUFADBCMRQwEgYDVQQDDAtkcml2
18
18
  ZXItcnVieTEVMBMGCgmSJomT8ixkARkWBTEwZ2VuMRMwEQYKCZImiZPyLGQBGRY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zLFiPy4SFZlnqgxiuPtpOdVSSjtF0xxCkH7zl0G
32
+ BANPw/VzoRyeYKiPNTBPxICssceU7MdIeUibjCDQzZE4oNNfWoDn3rpqNgkk6n9H
33
+ GvK8YqU+WXTfVtb4wKCSUG8S490M1t6ZkSPdHRPLDd3SSLU3VSTfS4eIE9RCZJsr
34
+ Iar/l8KaXB2Jb5Tx+JzpKjZ9PxbEPbKPLiMvIoL6IzyeZChfwz4SHN/eB8s2nO71
35
+ 7gPoXx2RY+zJKB0K93PwB0c6a4ID4Ok1BvCO2Wnw0T8=
36
36
  -----END CERTIFICATE-----
37
- date: 2015-10-08 00:00:00.000000000 Z
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.4.6
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