From e3a5fbe72f966b27b967192317d7072db52d1c8c Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Fri, 10 Mar 2023 10:54:59 +0000 Subject: [PATCH] chore: remove Ruby Pinning from 0.70 (#36422) * chore: remove Ruby Pinning from 0.70 * Update Gemfile * Update Gemfile --------- Co-authored-by: Riccardo Cipolleschi --- .gitignore | 2 ++ .ruby-version | 1 - Gemfile | 4 ++-- Gemfile.lock | 28 +++++++++++++--------------- scripts/update-ruby.sh | 27 +-------------------------- template/Gemfile | 4 ++-- template/_ruby-version | 1 - 7 files changed, 20 insertions(+), 47 deletions(-) delete mode 100644 .ruby-version delete mode 100644 template/_ruby-version diff --git a/.gitignore b/.gitignore index c954afb75a0f3b..4f063e3ac40ad6 100644 --- a/.gitignore +++ b/.gitignore @@ -97,6 +97,8 @@ package-lock.json # Ruby Gems (Bundler) /vendor /template/vendor +.ruby-version +/**/.ruby-version # iOS / CocoaPods /template/ios/build/ diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index a603bb50a29e35..00000000000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.7.5 diff --git a/Gemfile b/Gemfile index 5efda89f452582..1142b1b209ae3a 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version -ruby '2.7.5' +ruby '>= 2.6.10' -gem 'cocoapods', '~> 1.11', '>= 1.11.2' +gem 'cocoapods', '>= 1.11.3' diff --git a/Gemfile.lock b/Gemfile.lock index 2c44851e84e5dd..2b013d0b13706d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,12 +3,11 @@ GEM specs: CFPropertyList (3.0.6) rexml - activesupport (6.1.7.2) + activesupport (7.0.4.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - zeitwerk (~> 2.3) addressable (2.8.1) public_suffix (>= 2.0.2, < 6.0) algoliasearch (1.27.5) @@ -16,15 +15,15 @@ GEM json (>= 1.5.1) atomos (0.1.3) claide (1.1.0) - cocoapods (1.11.3) + cocoapods (1.12.0) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.11.3) + cocoapods-core (= 1.12.0) cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 1.4.0, < 2.0) + cocoapods-downloader (>= 1.6.0, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.4.0, < 2.0) + cocoapods-trunk (>= 1.6.0, < 2.0) cocoapods-try (>= 1.1.0, < 2.0) colored2 (~> 3.1) escape (~> 0.0.4) @@ -32,10 +31,10 @@ GEM gh_inspector (~> 1.0) molinillo (~> 0.8.0) nap (~> 1.0) - ruby-macho (>= 1.0, < 3.0) + ruby-macho (>= 2.3.0, < 3.0) xcodeproj (>= 1.21.0, < 2.0) - cocoapods-core (1.11.3) - activesupport (>= 5.0, < 7) + cocoapods-core (1.12.0) + activesupport (>= 5.0, < 8) addressable (~> 2.8) algoliasearch (~> 1.0) concurrent-ruby (~> 1.1) @@ -54,7 +53,7 @@ GEM netrc (~> 0.11) cocoapods-try (1.2.0) colored2 (3.1.2) - concurrent-ruby (1.2.0) + concurrent-ruby (1.2.2) escape (0.0.4) ethon (0.16.0) ffi (>= 1.15.0) @@ -66,7 +65,7 @@ GEM i18n (1.12.0) concurrent-ruby (~> 1.0) json (2.6.3) - minitest (5.17.0) + minitest (5.18.0) molinillo (0.8.0) nanaimo (0.3.0) nap (1.1.0) @@ -85,16 +84,15 @@ GEM colored2 (~> 3.1) nanaimo (~> 0.3.0) rexml (~> 3.2.4) - zeitwerk (2.6.6) PLATFORMS ruby DEPENDENCIES - cocoapods (~> 1.11, >= 1.11.2) + cocoapods (~> 1.12) RUBY VERSION - ruby 2.7.5p203 + ruby 2.7.6p219 BUNDLED WITH - 2.3.11 + 2.1.4 diff --git a/scripts/update-ruby.sh b/scripts/update-ruby.sh index ffba2865c629a8..5f0ce693fb76a9 100755 --- a/scripts/update-ruby.sh +++ b/scripts/update-ruby.sh @@ -32,26 +32,6 @@ fi if [ -z "$VERSION" ]; then die "Please provide an installed/usable Ruby version" fi -echo "Setting Ruby version to: $VERSION" - -cd "$ROOT" || die "Failed to change to $ROOT" - -# do this first, so rbenv/rvm will automatically pick the desired version -echo "$VERSION" > .ruby-version - -# make sure we're using it -CURRENT_VERSION=$(ruby --version | cut -d' ' -f2 | cut -dp -f1) -if [ -z "$CURRENT_VERSION" ]; then - # rbenv/rvm uses shims, the commands do exist, but do not return a version if misconfigured - die "Missing usable ruby, check your installation" -elif [ "$VERSION" != "$CURRENT_VERSION" ]; then - die "Plese use the ruby version you are trying to set: $VERSION ('$CURRENT_VERSION' in use)" -fi - -echo "$VERSION" > template/_ruby-version - -sed_i -e "s/^\(ruby '\)[^']*\('.*\)$/\1$VERSION\2/" Gemfile -sed_i -e "s/^\(ruby '\)[^']*\('.*\)$/\1$VERSION\2/" template/Gemfile rm -f Gemfile.lock @@ -60,9 +40,4 @@ cp "$BUNDLE_APP_CONFIG/"* template/_bundle # sync! bundle lock -git add \ - .ruby-version \ - Gemfile \ - Gemfile.lock \ - template/_ruby-version \ - template/Gemfile +git add Gemfile.lock diff --git a/template/Gemfile b/template/Gemfile index 5efda89f452582..1142b1b209ae3a 100644 --- a/template/Gemfile +++ b/template/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version -ruby '2.7.5' +ruby '>= 2.6.10' -gem 'cocoapods', '~> 1.11', '>= 1.11.2' +gem 'cocoapods', '>= 1.11.3' diff --git a/template/_ruby-version b/template/_ruby-version deleted file mode 100644 index a603bb50a29e35..00000000000000 --- a/template/_ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.7.5