File tree Expand file tree Collapse file tree 5 files changed +28
-6
lines changed Expand file tree Collapse file tree 5 files changed +28
-6
lines changed Original file line number Diff line number Diff line change @@ -756,7 +756,11 @@ axes:
756
756
display_name : min
757
757
variables :
758
758
BSON : min
759
-
759
+ - id : 4-stable
760
+ display_name : 4-stable
761
+ variables :
762
+ BSON : 4-stable
763
+
760
764
- id : storage-engine
761
765
display_name : Storage Engine
762
766
values :
Original file line number Diff line number Diff line change @@ -43,7 +43,10 @@ set_env_vars() {
43
43
if test " $BSON " = min; then
44
44
export BUNDLE_GEMFILE=gemfiles/bson_min.gemfile
45
45
elif test " $BSON " = master; then
46
+ export MONGO_RUBY_DRIVER_BSON_MASTER=1
46
47
export BUNDLE_GEMFILE=gemfiles/bson_master.gemfile
48
+ elif test " $BSON " = 4-stable; then
49
+ export BUNDLE_GEMFILE=gemfiles/bson_4-stable.gemfile
47
50
elif test " $COMPRESSOR " = snappy; then
48
51
export BUNDLE_GEMFILE=gemfiles/snappy_compression.gemfile
49
52
elif test " $COMPRESSOR " = zstd; then
@@ -59,17 +62,18 @@ set_env_vars() {
59
62
bundle_install () {
60
63
args=--quiet
61
64
62
- if test " $BSON " = master; then
65
+ if test " $BSON " = master || test " $BSON " = 4-stable ; then
63
66
# In Docker bson is installed in the image, remove it if we need bson master.
64
67
gem uni bson || true
65
68
fi
66
69
67
70
# On JRuby we can test against bson master but not in a conventional way.
68
71
# See https://jira.mongodb.org/browse/RUBY-2156
69
- if echo $RVM_RUBY | grep -q jruby && test " $BSON " = master; then
72
+ if echo $RVM_RUBY | grep -q jruby && ( test " $BSON " = master || test " $BSON " = 4-stable) ; then
70
73
unset BUNDLE_GEMFILE
71
74
git clone https://github.com/mongodb/bson-ruby
72
75
(cd bson-ruby &&
76
+ git checkout " origin/$BSON " &&
73
77
bundle install &&
74
78
rake compile &&
75
79
gem build * .gemspec &&
Original file line number Diff line number Diff line change
1
+ source "https://rubygems.org"
2
+ gemspec path: '..'
3
+
4
+ gem 'bson', git: 'https://github.com/mongodb/bson-ruby', branch: '4-stable'
5
+
6
+ require_relative './standard'
7
+
8
+ standard_dependencies
Original file line number Diff line number Diff line change 1
1
source "https://rubygems.org"
2
2
gemspec path: '..'
3
3
4
- gem 'bson', git: 'https://github.com/mongodb/bson-ruby', branch: '4-stable '
4
+ gem 'bson', git: 'https://github.com/mongodb/bson-ruby', branch: 'master '
5
5
6
6
require_relative './standard'
7
7
Original file line number Diff line number Diff line change @@ -37,6 +37,12 @@ Gem::Specification.new do |s|
37
37
s . bindir = 'bin'
38
38
39
39
s . required_ruby_version = ">= 2.5"
40
-
41
- s . add_dependency 'bson' , '>=4.13.0' , '<5.0.0'
40
+
41
+ # For testing driver against bson master we need to depend on bson < 6.0.0
42
+ # but in release version we want to depend on bson < 5.0.0.
43
+ if %w( 1 yes true ) . include? ( ENV [ 'MONGO_RUBY_DRIVER_BSON_MASTER' ] )
44
+ s . add_dependency 'bson' , '>=4.13.0' , '<6.0.0'
45
+ else
46
+ s . add_dependency 'bson' , '>=4.13.0' , '<5.0.0'
47
+ end
42
48
end
You can’t perform that action at this time.
0 commit comments