Skip to content

Commit

Permalink
Merge branch 'master' into upgrade-to-rails-5.0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Jul 28, 2022
2 parents 361972b + cd82718 commit 85e9674
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dist: xenial

language: ruby
rvm:
- 2.4.10
- 2.5.9
env: SECRET_KEY_BASE=859384 RUN_SLOW_TESTS=true

before_install:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.4.10
FROM ruby:2.5.9
RUN mkdir /morph
WORKDIR /morph
# We need a javascript runtime
Expand Down
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ gem "validate_url"
# TODO: Remove this when we can
gem "nio4r", "~> 2.4.0"

# Adding psych here to lock its version. psych 4.0 causes us issues with installing gems. Ugh.
# TODO: Remove this as soon as possible
gem "psych", "< 4.0.0"

group :production do
# 3.0.0 requires ruby 2.5 or higher.
# TODO: Remove version lock as soon as we have upgraded to ruby 2.5
Expand Down
8 changes: 3 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,7 @@ GEM
pry-stack_explorer (0.4.13)
binding_of_caller (~> 0.7)
pry (~> 0.13)
psych (4.0.4)
stringio
psych (3.3.2)
public_suffix (4.0.7)
puma (5.6.4)
nio4r (~> 2.0)
Expand Down Expand Up @@ -436,8 +435,7 @@ GEM
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
ffi (~> 1.0)
rdoc (6.4.0)
psych (>= 4.0.0)
rdoc (6.3.3)
redcarpet (3.5.1)
redis (4.5.1)
regexp_parser (2.5.0)
Expand Down Expand Up @@ -555,7 +553,6 @@ GEM
sshkit (1.21.2)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
stringio (3.0.2)
stripe (6.5.0)
temple (0.8.2)
thor (1.2.1)
Expand Down Expand Up @@ -647,6 +644,7 @@ DEPENDENCIES
pry-remote
pry-rescue
pry-stack_explorer
psych (< 4.0.0)
puma
rack-livereload
rack-mini-profiler (< 3.0.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Email alerts for broken scrapers

## Dependencies
Ruby 2.4.10, Docker, MySQL, SQLite 3, Redis, mitmproxy.
Ruby 2.5.9, 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.
Expand Down
2 changes: 1 addition & 1 deletion config/deploy.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set :application, 'morph'
set :repo_url, 'https://github.com/openaustralia/morph.git'

set :rvm_ruby_version, '2.4.10'
set :rvm_ruby_version, '2.5.9'

# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }

Expand Down
2 changes: 1 addition & 1 deletion provisioning/roles/morph-app/templates/sites/morph.io
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.10/wrappers/ruby;
passenger_ruby /home/deploy/.rvm/gems/ruby-2.5.9/wrappers/ruby;
passenger_max_request_queue_size 300;

# There's a lot of traffic coming to this one scraper. It was putting
Expand Down
4 changes: 2 additions & 2 deletions provisioning/roles/ruby/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
- name: Make ruby-2.4.10 the default
command: /bin/sh -l -c 'rvm alias create default ruby-2.4.10'
- name: Make ruby-2.5.9 the default
command: /bin/sh -l -c 'rvm alias create default ruby-2.5.9'
become_user: deploy
12 changes: 6 additions & 6 deletions provisioning/roles/ruby/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.10 dependencies installed"
- name: "Ensure ruby-2.5.9 dependencies installed"
apt: pkg={{ item }}
with_items:
- patch
Expand All @@ -37,11 +37,11 @@
- libssl-dev
- libgmp-dev

- name: Install ruby-2.4.10 with rvm
command: /bin/sh -l -c 'rvm install ruby-2.4.10 --autolibs=read-fail' creates=/home/deploy/.rvm/rubies/ruby-2.4.10
- name: Install ruby-2.5.9 with rvm
command: /bin/sh -l -c 'rvm install ruby-2.5.9 --autolibs=read-fail' creates=/home/deploy/.rvm/rubies/ruby-2.5.9
become_user: deploy
notify: Make ruby-2.4.10 the default
notify: Make ruby-2.5.9 the default

- name: Install bundler for ruby 2.4.10
command: bash -lc "rvm ruby-2.4.10; gem install bundler --version 2.0.2"
- name: Install bundler for ruby 2.5.9
command: bash -lc "rvm ruby-2.5.9; gem install bundler --version 2.0.2"
become_user: deploy

0 comments on commit 85e9674

Please sign in to comment.