From 92479108c5627f6cd332b6c069d2dd2e6f1e4b73 Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Tue, 2 Aug 2022 15:06:22 +1000 Subject: [PATCH] Upgrade to ruby 2.7.6 in more places --- .travis.yml | 2 +- Dockerfile | 2 +- README.md | 2 +- config/deploy.rb | 2 +- .../roles/morph-app/templates/sites/morph.io | 2 +- provisioning/roles/ruby/handlers/main.yml | 4 ++-- provisioning/roles/ruby/tasks/main.yml | 12 ++++++------ 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index cd393c382..95f9863a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ dist: xenial language: ruby rvm: - - 2.6.10 + - 2.7.6 env: SECRET_KEY_BASE=859384 RUN_SLOW_TESTS=true before_install: diff --git a/Dockerfile b/Dockerfile index 09069c9ad..f2776af47 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.6.10 +FROM ruby:2.7.6 RUN mkdir /morph WORKDIR /morph # We need a javascript runtime diff --git a/README.md b/README.md index 2e4880874..4183c3244 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ * Email alerts for broken scrapers ## Dependencies -Ruby 2.6.10, Docker, MySQL, SQLite 3, Redis, mitmproxy. +Ruby, Docker, MySQL, SQLite 3, Redis, mitmproxy. (See below for more details about installing Docker) Development is supported on Linux (Ubuntu 20.04) and Mac OS X. diff --git a/config/deploy.rb b/config/deploy.rb index 44b777b69..854f98dc4 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,7 +1,7 @@ set :application, 'morph' set :repo_url, 'https://github.com/openaustralia/morph.git' -set :rvm_ruby_version, '2.6.10' +set :rvm_ruby_version, '2.7.6' # ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp } diff --git a/provisioning/roles/morph-app/templates/sites/morph.io b/provisioning/roles/morph-app/templates/sites/morph.io index c1a4b100a..6eae85e21 100644 --- a/provisioning/roles/morph-app/templates/sites/morph.io +++ b/provisioning/roles/morph-app/templates/sites/morph.io @@ -3,7 +3,7 @@ server { server_name {{ server_name }} api.{{ server_name }}; root /var/www/current/public; passenger_enabled on; - passenger_ruby /home/deploy/.rvm/gems/ruby-2.6.10/wrappers/ruby; + passenger_ruby /home/deploy/.rvm/gems/ruby-2.7.6/wrappers/ruby; passenger_max_request_queue_size 300; # There's a lot of traffic coming to this one scraper. It was putting diff --git a/provisioning/roles/ruby/handlers/main.yml b/provisioning/roles/ruby/handlers/main.yml index 71423a2c9..b0df07ffa 100644 --- a/provisioning/roles/ruby/handlers/main.yml +++ b/provisioning/roles/ruby/handlers/main.yml @@ -1,4 +1,4 @@ --- -- name: Make ruby-2.6.10 the default - command: /bin/sh -l -c 'rvm alias create default ruby-2.6.10' +- name: Make ruby-2.7.6 the default + command: /bin/sh -l -c 'rvm alias create default ruby-2.7.6' become_user: deploy diff --git a/provisioning/roles/ruby/tasks/main.yml b/provisioning/roles/ruby/tasks/main.yml index 04b27e5ea..c434beeb3 100644 --- a/provisioning/roles/ruby/tasks/main.yml +++ b/provisioning/roles/ruby/tasks/main.yml @@ -13,7 +13,7 @@ # TODO: Is it possible to extract this list of dependencies automatically from rvm? # Or allow rvm to do the install - but that would require the deploy user to have the permissions -- name: "Ensure ruby-2.6.10 dependencies installed" +- name: "Ensure ruby-2.7.6 dependencies installed" apt: pkg={{ item }} with_items: - patch @@ -37,11 +37,11 @@ - libssl-dev - libgmp-dev -- name: Install ruby-2.6.10 with rvm - command: /bin/sh -l -c 'rvm install ruby-2.6.10 --autolibs=read-fail' creates=/home/deploy/.rvm/rubies/ruby-2.6.10 +- name: Install ruby-2.7.6 with rvm + command: /bin/sh -l -c 'rvm install ruby-2.7.6 --autolibs=read-fail' creates=/home/deploy/.rvm/rubies/ruby-2.7.6 become_user: deploy - notify: Make ruby-2.6.10 the default + notify: Make ruby-2.7.6 the default -- name: Install bundler for ruby 2.6.10 - command: bash -lc "rvm ruby-2.6.10; gem install bundler --version 2.0.2" +- name: Install bundler for ruby 2.7.6 + command: bash -lc "rvm ruby-2.7.6; gem install bundler --version 2.0.2" become_user: deploy