From 97a60f5012166ec387fbedf61f1d3b736d2ae3b6 Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Mon, 11 Sep 2023 16:58:52 -0600 Subject: [PATCH] switch from Appraisal to Bundler::Multilock --- .github/workflows/push.yml | 11 ++++--- Appraisals | 5 ---- Gemfile | 9 ++++++ ...7.0.gemfile.lock => Gemfile.rails-7.0.lock | 4 +-- bin/appraisal | 29 ------------------- gemfiles/rails_7.0.gemfile | 7 ----- 6 files changed, 16 insertions(+), 49 deletions(-) delete mode 100644 Appraisals rename gemfiles/rails_7.0.gemfile.lock => Gemfile.rails-7.0.lock (99%) delete mode 100755 bin/appraisal delete mode 100644 gemfiles/rails_7.0.gemfile diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 827bcdc..777d48c 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,4 +1,4 @@ -name: Ruby +name: Continuous Integration on: push: @@ -8,14 +8,13 @@ on: jobs: test: - runs-on: ubuntu-latest strategy: fail-fast: false matrix: - ruby-version: [3.0, 2.7] - gemfile: ['gemfiles/rails_7.0.gemfile'] + ruby-version: [2.7, "3.0", 3.1, 3.2] + lockfile: ['Gemfile.rails-7.0.lock'] services: postgres: @@ -38,14 +37,14 @@ jobs: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true env: - BUNDLE_GEMFILE: ${{ matrix.gemfile }} + BUNDLE_LOCKFILE: ${{ matrix.lockfile }} - name: Run tests run: bin/rspec env: PGHOST: localhost PGUSER: postgres PGPASSWORD: postgres - BUNDLE_GEMFILE: ${{ matrix.gemfile }} + BUNDLE_LOCKFILE: ${{ matrix.lockfile }} lint: runs-on: ubuntu-latest diff --git a/Appraisals b/Appraisals deleted file mode 100644 index b8f9e47..0000000 --- a/Appraisals +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -appraise "rails-7.0" do - gem "activerecord", "~> 7.0.0" -end diff --git a/Gemfile b/Gemfile index be173b2..09745c3 100644 --- a/Gemfile +++ b/Gemfile @@ -2,4 +2,13 @@ source "https://rubygems.org" +plugin "bundler-multilock", "1.0.4" +return unless Plugin.installed?("bundler-multilock") + +Plugin.send(:load_plugin, "bundler-multilock") + gemspec + +lockfile "rails-7.0", default: true do + gem "activerecord", "~> 7.0.0" +end diff --git a/gemfiles/rails_7.0.gemfile.lock b/Gemfile.rails-7.0.lock similarity index 99% rename from gemfiles/rails_7.0.gemfile.lock rename to Gemfile.rails-7.0.lock index ab84a4e..7215919 100644 --- a/gemfiles/rails_7.0.gemfile.lock +++ b/Gemfile.rails-7.0.lock @@ -1,5 +1,5 @@ PATH - remote: .. + remote: . specs: activerecord-pg-extensions (0.5.3) activerecord (~> 7.0.0) @@ -158,4 +158,4 @@ DEPENDENCIES rubocop-rspec (~> 2.3) BUNDLED WITH - 2.2.17 + 2.4.19 diff --git a/bin/appraisal b/bin/appraisal deleted file mode 100755 index 42960e1..0000000 --- a/bin/appraisal +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'appraisal' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require "pathname" -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -bundle_binstub = File.expand_path("bundle", __dir__) - -if File.file?(bundle_binstub) - if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") - load(bundle_binstub) - else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") - end -end - -require "rubygems" -require "bundler/setup" - -load Gem.bin_path("appraisal", "appraisal") diff --git a/gemfiles/rails_7.0.gemfile b/gemfiles/rails_7.0.gemfile deleted file mode 100644 index bc1dfc9..0000000 --- a/gemfiles/rails_7.0.gemfile +++ /dev/null @@ -1,7 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activerecord", "~> 7.0.0" - -gemspec path: "../"