diff --git a/contracts.gemspec b/contracts.gemspec index 8ac2f85..559de3a 100644 --- a/contracts.gemspec +++ b/contracts.gemspec @@ -13,8 +13,11 @@ Gem::Specification.new do |s| s.homepage = "https://github.com/egonSchiele/contracts.ruby" s.license = "BSD-2-Clause" s.required_ruby_version = [">= 3.0", "< 4"] - s.post_install_message = " - 0.16.x will be the supporting Ruby 2.x and be feature frozen (only fixes will be released) - For Ruby 3.x use 0.17.x or later - " + + if Contracts::VERSION < "0.17" + s.post_install_message = " + 0.16.x will be the supporting Ruby 2.x and be feature frozen (only fixes will be released) + For Ruby 3.x use 0.17.x or later + " + end end diff --git a/lib/contracts.rb b/lib/contracts.rb index e8bab85..7a9d9eb 100644 --- a/lib/contracts.rb +++ b/lib/contracts.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +require "contracts/version" require "contracts/attrs" require "contracts/builtin_contracts" require "contracts/decorators"