From 1e55907aee49c899dc7d39a5ea4daa6e4b9b7649 Mon Sep 17 00:00:00 2001 From: Wendel Fabian Chinsamy Date: Thu, 28 Mar 2024 17:33:26 +0200 Subject: [PATCH 1/4] removing ruby 3 changes before adding them back --- .github/workflows/deploy.yml | 2 +- .github/workflows/parallel_ci.yml | 2 +- .github/workflows/release.yml | 2 +- Dockerfile | 6 +++--- Gemfile | 12 ++++++------ Gemfile.lock | 2 +- bin/update | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 012f619..590cb21 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,7 +24,7 @@ jobs: - name: Set up Ruby 3.1 uses: ruby/setup-ruby@v1 with: - ruby-version: '3.1.4' + ruby-version: '2.6' - uses: actions/cache@v3 with: path: vendor/bundle diff --git a/.github/workflows/parallel_ci.yml b/.github/workflows/parallel_ci.yml index 25d23b8..ce143ba 100644 --- a/.github/workflows/parallel_ci.yml +++ b/.github/workflows/parallel_ci.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Ruby 3.1 uses: ruby/setup-ruby@v1 with: - ruby-version: "3.1.4" + ruby-version: "2.6" bundler-cache: true - name: Run Specs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33c1aa9..82495c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Ruby 3.1 uses: ruby/setup-ruby@v1 with: - ruby-version: '3.1.4' + ruby-version: '2.6' - uses: actions/cache@v3 with: path: vendor/bundle diff --git a/Dockerfile b/Dockerfile index 4ab184a..d82aaec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM phusion/passenger-full:2.5.1 +FROM phusion/passenger-full:2.0.1 LABEL maintainer="kgarza@datacite.org" # Set correct environment variables. @@ -12,7 +12,7 @@ RUN usermod -a -G docker_env app CMD ["/sbin/my_init"] # Use Ruby 3.1.4 -RUN bash -lc 'rvm --default use ruby-3.1.4' +RUN bash -lc 'rvm --default use ruby-2.6.8' # Update installed APT packages RUN apt-get update && apt-get upgrade -y --allow-unauthenticated -o Dpkg::Options::="--force-confold" && \ @@ -51,7 +51,7 @@ RUN mkdir -p vendor/bundle && \ chown -R app:app . && \ chmod -R 755 . && \ gem update --system 3.4.22 && \ - gem install bundler -v 2.5.6 && \ + gem install bundler -v 2.4.20 && \ /sbin/setuser app bundle install --path vendor/bundle # enable SSH diff --git a/Gemfile b/Gemfile index 6bed779..5eefea6 100644 --- a/Gemfile +++ b/Gemfile @@ -15,7 +15,7 @@ gem "dalli", "~> 2.7.6" gem "dotenv" gem "equivalent-xml", "~> 0.6.0" gem "facets", require: false -gem "faraday_middleware-aws-sigv4", "~> 0.3.0" +gem "faraday_middleware-aws-sigv4", "~> 0.2.4" gem "git", "~> 1.5" gem "iso8601", "~> 0.9.0" gem "jwt" @@ -56,11 +56,11 @@ end group :test do gem "capybara" gem "codeclimate-test-reporter", "~> 1.0.0" - gem "factory_bot_rails", "~> 6.4", ">= 6.4.3" - gem "faker", "~> 3.2", ">= 3.2.3" - gem "rubocop-rspec", "~> 2.0", require: false + gem "factory_bot_rails", "~> 4.8", ">= 4.8.2" + gem "faker" + gem "rubocop-rspec", "~> 1.28" gem "shoulda-matchers", "~> 4.1", ">= 4.1.2" - gem "simplecov", "~> 0.22.0" - gem "vcr", "~> 6.1" + gem "simplecov" + gem "vcr", "~> 5.1" gem "webmock", "~> 3.1" end diff --git a/Gemfile.lock b/Gemfile.lock index e1d72b3..c925e15 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -518,4 +518,4 @@ DEPENDENCIES webmock (~> 3.1) BUNDLED WITH - 2.5.6 \ No newline at end of file + 2.4.20 \ No newline at end of file diff --git a/bin/update b/bin/update index c3eb787..084f8f8 100755 --- a/bin/update +++ b/bin/update @@ -15,7 +15,7 @@ chdir APP_ROOT do # Add necessary update steps to this file. puts "== Installing dependencies ==" - system! "gem install bundler -v 2.5.6 --conservative" + system! "gem install bundler -v 2.4.20 --conservative" system("bundle check") || system!("bundle install") puts "\n== Updating database ==" From 09741c46b43056ea61056128516240797a3a6609 Mon Sep 17 00:00:00 2001 From: Wendel Fabian Chinsamy Date: Thu, 28 Mar 2024 17:36:17 +0200 Subject: [PATCH 2/4] add updated gemfile.lock --- Gemfile.lock | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c925e15..2e2c7ea 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -174,12 +174,12 @@ GEM erubi (1.10.0) excon (0.71.1) facets (3.1.0) - factory_bot (6.4.6) - activesupport (>= 5.0.0) - factory_bot_rails (6.4.3) - factory_bot (~> 6.4) - railties (>= 5.0.0) - faker (3.2.3) + factory_bot (4.11.1) + activesupport (>= 3.0.0) + factory_bot_rails (4.11.1) + factory_bot (~> 4.11.1) + railties (>= 3.0.0) + faker (2.22.0) i18n (>= 1.8.11, < 2) faraday (0.17.6) multipart-post (>= 1.2, < 3) @@ -187,9 +187,9 @@ GEM faraday faraday_middleware (0.14.0) faraday (>= 0.7.4, < 1.0) - faraday_middleware-aws-sigv4 (0.3.0) + faraday_middleware-aws-sigv4 (0.2.4) aws-sigv4 (~> 1.0) - faraday (>= 0.15) + faraday (>= 0.9) ffi (1.15.5) gender_detector (0.1.2) unicode_utils (>= 1.3.0) @@ -391,20 +391,14 @@ GEM unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.30.0) parser (>= 3.2.1.0) - rubocop-capybara (2.20.0) - rubocop (~> 1.41) - rubocop-factory_bot (2.25.1) - rubocop (~> 1.41) rubocop-performance (1.6.1) rubocop (>= 0.71.0) rubocop-rails (2.19.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) - rubocop-rspec (2.27.1) - rubocop (~> 1.40) - rubocop-capybara (~> 2.17) - rubocop-factory_bot (~> 2.22) + rubocop-rspec (1.42.0) + rubocop (>= 0.87.0) ruby-progressbar (1.13.0) scanf (1.0.0) sentry-raven (2.13.0) @@ -447,7 +441,7 @@ GEM unicode-display_width (2.5.0) unicode-types (1.9.0) unicode_utils (1.4.0) - vcr (6.2.0) + vcr (5.1.0) webmock (3.14.0) addressable (>= 2.8.0) crack (>= 0.3.2) @@ -480,9 +474,9 @@ DEPENDENCIES dotenv equivalent-xml (~> 0.6.0) facets - factory_bot_rails (~> 6.4, >= 6.4.3) - faker (~> 3.2, >= 3.2.3) - faraday_middleware-aws-sigv4 (~> 0.3.0) + factory_bot_rails (~> 4.8, >= 4.8.2) + faker + faraday_middleware-aws-sigv4 (~> 0.2.4) git (~> 1.5) iso8601 (~> 0.9.0) json-canonicalization (= 0.3.1) @@ -504,17 +498,17 @@ DEPENDENCIES rubocop (~> 1.3, >= 1.3.1) rubocop-performance (~> 1.5, >= 1.5.1) rubocop-rails (~> 2.8, >= 2.8.1) - rubocop-rspec (~> 2.0) + rubocop-rspec (~> 1.28) sentry-raven (~> 2.9) shoryuken (~> 4.0) shoulda-matchers (~> 4.1, >= 4.1.2) simple_command - simplecov (~> 0.22.0) + simplecov slack-notifier (~> 2.3, >= 2.3.2) spring spring-watcher-listen (~> 2.0.0) sprockets (~> 3.7, >= 3.7.2) - vcr (~> 6.1) + vcr (~> 5.1) webmock (~> 3.1) BUNDLED WITH From 71bb5e232a04eb5f5e7194889881508776e1d735 Mon Sep 17 00:00:00 2001 From: Wendel Fabian Chinsamy Date: Thu, 28 Mar 2024 17:54:59 +0200 Subject: [PATCH 3/4] update the bundler version and ruby version --- .github/workflows/deploy.yml | 4 ++-- .github/workflows/parallel_ci.yml | 2 +- .github/workflows/release.yml | 4 ++-- Dockerfile | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 590cb21..c12585f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,7 +24,7 @@ jobs: - name: Set up Ruby 3.1 uses: ruby/setup-ruby@v1 with: - ruby-version: '2.6' + ruby-version: '3.1.4' - uses: actions/cache@v3 with: path: vendor/bundle @@ -34,7 +34,7 @@ jobs: - name: Install run: | cp .env.build .env - gem install bundler -v 2.5.6 + gem install bundler -v 2.4.20 bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - name: Lint and Test diff --git a/.github/workflows/parallel_ci.yml b/.github/workflows/parallel_ci.yml index ce143ba..25d23b8 100644 --- a/.github/workflows/parallel_ci.yml +++ b/.github/workflows/parallel_ci.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Ruby 3.1 uses: ruby/setup-ruby@v1 with: - ruby-version: "2.6" + ruby-version: "3.1.4" bundler-cache: true - name: Run Specs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 82495c2..d5d581c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Ruby 3.1 uses: ruby/setup-ruby@v1 with: - ruby-version: '2.6' + ruby-version: '3.1.4' - uses: actions/cache@v3 with: path: vendor/bundle @@ -33,7 +33,7 @@ jobs: - name: Install run: | cp .env.build .env - gem install bundler -v 2.5.6 + gem install bundler -v 2.4.20 bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - name: Lint and Test diff --git a/Dockerfile b/Dockerfile index d82aaec..75323ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM phusion/passenger-full:2.0.1 +FROM phusion/passenger-full:2.5.1 LABEL maintainer="kgarza@datacite.org" # Set correct environment variables. @@ -12,7 +12,7 @@ RUN usermod -a -G docker_env app CMD ["/sbin/my_init"] # Use Ruby 3.1.4 -RUN bash -lc 'rvm --default use ruby-2.6.8' +RUN bash -lc 'rvm --default use ruby-3.1.4' # Update installed APT packages RUN apt-get update && apt-get upgrade -y --allow-unauthenticated -o Dpkg::Options::="--force-confold" && \ From 85f2a04133dcbe3093b1308a5e7b891d2221e94a Mon Sep 17 00:00:00 2001 From: Wendel Fabian Chinsamy Date: Thu, 28 Mar 2024 17:57:39 +0200 Subject: [PATCH 4/4] update the setup script --- bin/setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/setup b/bin/setup index f1a6659..4528d72 100755 --- a/bin/setup +++ b/bin/setup @@ -15,7 +15,7 @@ chdir APP_ROOT do # Add necessary setup steps to this file. puts "== Installing dependencies ==" - system! "gem install bundler -v 2.5.6 --conservative" + system! "gem install bundler -v 2.4.20 --conservative" system("bundle check") || system!("bundle install") # puts "\n== Copying sample files =="