fix.sh in checkoff-0.33.2 vs fix.sh in checkoff-0.34.0
- old
+ new
@@ -114,11 +114,11 @@
ensure_ruby_versions() {
ensure_latest_ruby_build_definitions
# You can find out which feature versions are still supported / have
# been release here: https://www.ruby-lang.org/en/downloads/
- ruby_versions="$(latest_ruby_version 2.7)"
+ ruby_versions="$(latest_ruby_version 3.0)"
echo "Latest Ruby versions: ${ruby_versions}"
ensure_ruby_build_requirements
@@ -132,10 +132,11 @@
if [ "${ver}" == 2.6.7 ]
then
CFLAGS="-Wno-error=implicit-function-declaration" rbenv install -s "${ver}"
else
rbenv install -s "${ver}"
+ hash -r # ensure we are seeing latest bundler etc
fi
done
}
ensure_bundle() {
@@ -150,14 +151,13 @@
bundler_version_patch=$(cut -d. -f3 <<< "${bundler_version}")
# Version 2.1 of bundler seems to have some issues with nokogiri:
#
# https://app.asana.com/0/1107901397356088/1199504270687298
- # Version 2.2.22 of bundler comes with a fix to ensure the 'bundle
- # update --conservative' flag works as expected - important when
- # doing a 'bundle update' on a about-to-be-published gem after
- # bumping a gem version.
+ # Version <2.2.22 of bundler isn't compatible with Ruby 3.3:
+ #
+ # https://stackoverflow.com/questions/70800753/rails-calling-didyoumeanspell-checkers-mergeerror-name-spell-checker-h
need_better_bundler=false
if [ "${bundler_version_major}" -lt 2 ]
then
need_better_bundler=true
elif [ "${bundler_version_major}" -eq 2 ]
@@ -165,18 +165,22 @@
if [ "${bundler_version_minor}" -lt 2 ]
then
need_better_bundler=true
elif [ "${bundler_version_minor}" -eq 2 ]
then
- if [ "${bundler_version_patch}" -lt 22 ]
+ if [ "${bundler_version_patch}" -lt 23 ]
then
need_better_bundler=true
fi
fi
fi
if [ "${need_better_bundler}" = true ]
then
- gem install --no-document bundler
+ # need to do this first before 'bundle update --bundler' will work
+ make bundle_install
+ bundle update --bundler
+ # ensure next step installs fresh bundle
+ rm -f Gemfile.lock.installed
fi
make bundle_install
# https://bundler.io/v2.0/bundle_lock.html#SUPPORTING-OTHER-PLATFORMS
#
# "If you want your bundle to support platforms other than the one