From 644c1753383b260c7f903ac30a1f10aa44793a0e Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Sat, 21 Aug 2021 18:35:13 -0700 Subject: [PATCH] Print a deprecation message when the jasmine-core gem is loaded [#179247158] [#179247160] --- lib/jasmine-core.rb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lib/jasmine-core.rb b/lib/jasmine-core.rb index d540f631..6ba57dd8 100644 --- a/lib/jasmine-core.rb +++ b/lib/jasmine-core.rb @@ -1,3 +1,28 @@ +if ENV["SUPPRESS_JASMINE_DEPRECATION"].nil? + puts <<~END_DEPRECATION_MSG + The Jasmine Ruby gems are deprecated. There will be no further releases after + the end of the Jasmine 3.x series. We recommend that most users migrate to the + jasmine-browser-runner npm package, which is the direct replacement for the + jasmine gem. See for setup + instructions, including for Rails applications that use either Sprockets or + Webpacker. + + If jasmine-browser-runner doesn't meet your needs, one of these might: + + * The jasmine npm package to run specs in Node.js: + + * The standalone distribution to run specs in browsers with no additional + tools: + * The jasmine-core npm package if all you need is the Jasmine assets: + . This is the direct equivalent of the + jasmine-core Ruby gem. + + To prevent this message from appearing, set the SUPPRESS_JASMINE_DEPRECATION + environment variable. + + END_DEPRECATION_MSG +end + module Jasmine module Core class << self