diff --git a/Gemfile.lock b/Gemfile.lock index f096e0fd..782b257e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,6 +3,7 @@ PATH specs: cocina-models (0.99.2) activesupport + commonmarker (~> 2.0, != 2.0.2) deprecation dry-struct (~> 1.0) dry-types (~> 1.1) @@ -43,7 +44,7 @@ GEM json_schema (~> 0.14, >= 0.14.3) openapi_parser (~> 1.0) rack (>= 1.5) - commonmarker (2.0.2) + commonmarker (2.0.1) rb_sys (~> 0.9) concurrent-ruby (1.3.4) connection_pool (2.4.1) diff --git a/cocina-models.gemspec b/cocina-models.gemspec index 5ba96501..7f1203f9 100644 --- a/cocina-models.gemspec +++ b/cocina-models.gemspec @@ -25,6 +25,11 @@ Gem::Specification.new do |spec| spec.required_ruby_version = '>= 3.0' spec.add_dependency 'activesupport' + if RUBY_VERSION >= '3.4' # rubocop:disable Gemspec/RubyVersionGlobalsUsage + spec.add_dependency 'commonmarker', '>= 2.0.2' # commonmarker <= 2.0.1 is incompatible with Ruby 3.4 + else + spec.add_dependency 'commonmarker', '~> 2.0', '!= 2.0.2' # commonmarker 2.0.2 includes a breaking change in Rubies < 3.4 + end spec.add_dependency 'deprecation' spec.add_dependency 'dry-struct', '~> 1.0' spec.add_dependency 'dry-types', '~> 1.1'