bson 5.1.0 → 5.2.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: db8071ad65b8a0ef6e4c10b76f1143ce627b5d2ba0e3c9f7eed13d3868425c3e
4
- data.tar.gz: 3d76edf4c97a81d2362e1b08c4cee08074561f16b74f468b7cb1aac70fb614c4
3
+ metadata.gz: f383730000f9b08a131535250a7855d8ec8dcb0e3bb334f4779dcdcc95b56023
4
+ data.tar.gz: 57cb5e6db027b6982263d4f4eb0228968b6fc71e6b6499ef5563c0a160a3b2b0
5
5
  SHA512:
6
- metadata.gz: dde49d3d741174610fa32ba697c238285209f0074ba04a1d6758604665c1c817a9d96bc1c44c7a731530ebdc94a8ac9e74da3c4ea340a6d6d6d4a0bf4d6ab17e
7
- data.tar.gz: f29560d3d3830b34d33567671328dca0dc9b7b5ba173d6a193ed2b3150ae79a17f715666bc106a3c6fda0399ab4e7724bb3efc9a97733076464cd10698a366b3
6
+ metadata.gz: 433d3758ccd6ad9222b98bf43a4746b71b5966d6eb01321dff869eca61acef89e58b42baae0bd9c979d41cc922b4baf227ae0b71fdc4f21d37b0d3ec7137a85b
7
+ data.tar.gz: 7f61000684c0acb7af4d2d50c3e2cbc1e47ab342c415fc91addf7e1c5533cb3e23cfe4d16ba2ccd5dea72d70d8a89698eec3f4520fee3320c3c64c7aec95f10d
data/Rakefile CHANGED
@@ -25,7 +25,9 @@ require "rake/extensiontask"
25
25
  require "rspec/core/rake_task"
26
26
  require 'fileutils'
27
27
 
28
- load 'spec/shared/lib/tasks/candidate.rake'
28
+ if File.exist?('./spec/shared/lib/tasks/candidate.rake')
29
+ load './spec/shared/lib/tasks/candidate.rake'
30
+ end
29
31
 
30
32
  def jruby?
31
33
  defined?(JRUBY_VERSION)
@@ -53,8 +55,10 @@ RSpec::Core::RakeTask.new(:rspec)
53
55
 
54
56
  desc 'Build the bson gem'
55
57
  task :build => [ :clean_all, *(jruby? ? :compile : nil) ] do
56
- output = "--output=#{ENV['GEM_FILE_NAME']}" if ENV['GEM_FILE_NAME']
57
- system "gem build #{output} bson.gemspec"
58
+ command = [ 'gem', 'build' ]
59
+ command << "--output=#{ENV['GEM_FILE_NAME']}" if ENV['GEM_FILE_NAME']
60
+ command << ENV['GEMSPEC'] || 'bson.gemspec'
61
+ system(*command)
58
62
  end
59
63
 
60
64
  # `rake version` is used by the deployment system so get the release version
@@ -66,22 +70,10 @@ task :version do
66
70
  puts BSON::VERSION
67
71
  end
68
72
 
69
- # `rake gem_file_name` is used by the deployment system so get the name of
70
- # the gem file to be generated. It must do nothing more than just print the
71
- # name of the gem file to generate.
72
- desc 'Print the name of the gem file to generate.'
73
- task :gem_file_name do
74
- require 'bson/version'
75
- base = "bson-#{BSON::VERSION}"
76
- base << '-java' if jruby?
77
- puts "#{base}.gem"
78
- end
79
-
80
73
  task :clean_all => :clean do
81
- FileUtils.rm_f(File.join(File.dirname(__FILE__), 'lib', "bson_native.bundle"))
82
- FileUtils.rm_f(File.join(File.dirname(__FILE__), 'lib', "bson_native.so"))
83
- FileUtils.rm_f(File.join(File.dirname(__FILE__), 'lib', "bson_native.o"))
84
- FileUtils.rm_f(File.join(File.dirname(__FILE__), 'lib', "bson-ruby.jar"))
74
+ %w[ bson-ruby.jar bson_native.bundle bson_native.so bson_native.o ].each do |file|
75
+ FileUtils.rm_f(File.join(File.dirname(__FILE__), 'lib', file))
76
+ end
85
77
  end
86
78
 
87
79
  task :spec => :compile do
@@ -93,15 +85,6 @@ end
93
85
  # been built (and signed via GPG), so we just need `rake release` to
94
86
  # push the gem to rubygems.
95
87
  task :release do
96
- require 'bson/version'
97
-
98
- # confirm: there ought to be two gems, one for MRI, and one for Java. These
99
- # will have been previously generated by the 'BSON Release' GitHub action.
100
- gems = Dir['*.gem']
101
- if gems.length != 2
102
- abort "Expected two gem files to be ready to release; got #{gems.length}"
103
- end
104
-
105
88
  if ENV['GITHUB_ACTION'].nil?
106
89
  abort <<~WARNING
107
90
  `rake release` must be invoked from the `BSON Release` GitHub action,
@@ -116,6 +99,13 @@ task :release do
116
99
  WARNING
117
100
  end
118
101
 
102
+ # confirm: there ought to be two gems, one for MRI, and one for Java. These
103
+ # will have been previously generated by the 'build' job.
104
+ gems = Dir['*.gem']
105
+ if gems.length != 2
106
+ abort "Expected two gem files to be ready to release; got #{gems.inspect}"
107
+ end
108
+
119
109
  gems.each do |gem|
120
110
  system 'gem', 'push', gem
121
111
  end
data/lib/bson/version.rb CHANGED
@@ -5,5 +5,5 @@ module BSON
5
5
  #
6
6
  # NOTE: this file is automatically updated via `rake candidate:create`.
7
7
  # Manual changes to this file may be overwritten by that rake task.
8
- VERSION = '5.1.0'
8
+ VERSION = '5.2.0'
9
9
  end
@@ -100,7 +100,7 @@ describe BSON::Int64 do
100
100
  BSON::ByteBuffer.new(BSON::Int64.new(integer).to_bson.to_s)
101
101
  end
102
102
 
103
- context "when on JRuby", if: BSON::Environment.jruby? do
103
+ context "when on JRuby", if: BSON::Environment.jruby? && RUBY_VERSION < '3.0.0' do
104
104
 
105
105
  it "deserializes to a Fixnum object" do
106
106
  expect(described_class.from_bson(bson).class).to be(Fixnum)
@@ -120,7 +120,7 @@ describe BSON::Int64 do
120
120
  BSON::ByteBuffer.new(integer.to_bson.to_s)
121
121
  end
122
122
 
123
- context "when on JRuby", if: BSON::Environment.jruby? do
123
+ context "when on JRuby", if: BSON::Environment.jruby? && RUBY_VERSION < '3.0.0' do
124
124
 
125
125
  it "deserializes to a Fixnum object" do
126
126
  expect(described_class.from_bson(bson).class).to be(Fixnum)
@@ -258,9 +258,7 @@ module Mrss
258
258
  end
259
259
 
260
260
  <<~INTRO
261
- The MongoDB Ruby team is pleased to announce version #{product.version}
262
- of the `#{product.package}` gem - #{product.description}.
263
- This is a new #{release_description} of #{product.name}.
261
+ The MongoDB Ruby team is pleased to announce version #{product.version} of the `#{product.package}` gem - #{product.description}. This is a new #{release_description} of #{product.name}.
264
262
 
265
263
  Install this release using [RubyGems](https://rubygems.org/) via the command line as follows:
266
264
 
@@ -274,8 +272,7 @@ module Mrss
274
272
  gem '#{product.package}', '#{product.version}'
275
273
  ~~~
276
274
 
277
- Have any feedback? Click on through to MongoDB's JIRA and
278
- [open a new ticket](#{product.jira_project_url}) to let us know what's on your mind 🧠.
275
+ Have any feedback? Click on through to MongoDB's JIRA and [open a new ticket](#{product.jira_project_url}) to let us know what's on your mind 🧠.
279
276
 
280
277
  INTRO
281
278
  end
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: 5.1.0
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The MongoDB Ruby Team
@@ -263,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
263
263
  - !ruby/object:Gem::Version
264
264
  version: 1.3.6
265
265
  requirements: []
266
- rubygems_version: 3.6.9
266
+ rubygems_version: 3.7.2
267
267
  specification_version: 4
268
268
  summary: Ruby implementation of the BSON specification
269
269
  test_files: