Upgrade to Rails 4.2.11.3 and Ruby 2.4.10

Some tricks required here to get the dependencies to work out, but we got it!!

Oh also, we move away from the rbenv in Ubuntu's package manager, because it doesn't support more recent Rubies like 2.4.10.
This commit is contained in:
Emi Matchu 2023-08-02 15:18:36 -07:00
parent a15cbeb307
commit f80d220a62
51 changed files with 102 additions and 67 deletions

View file

@ -1 +1 @@
2.2.4
2.4.10

20
Gemfile
View file

@ -1,7 +1,7 @@
source 'http://rubygems.org'
ruby '2.2.4'
ruby '2.4.10'
gem 'rails', '= 4.1.16'
gem 'rails', '= 4.2.11.3'
# Our database is MySQL, in both development and production.
gem 'mysql2', '>= 0.3.11'
@ -21,7 +21,7 @@ gem 'react-rails', '~> 2.7', '>= 2.7.1'
gem 'will_paginate', '~> 3.0.pre2'
# For authentication.
gem 'devise', '~> 3.5.10'
gem 'devise', '~> 4.9', '>= 4.9.2'
# For translation, both for the site UI and for Neopets data.
gem 'rails-i18n', '~> 4.0', '>= 4.0.9'
@ -29,7 +29,7 @@ gem 'http_accept_language', '~> 2.1', '>= 2.1.1'
gem 'globalize', '~> 4.0.3'
# For reading and parsing HTML from Neopets.com, like importing Closet pages.
gem "nokogiri", "~> 1.5.2"
gem 'nokogiri', '~> 1.10', '>= 1.10.10'
gem "rest-client", "~> 1.6.7"
# For safely rendering users' Markdown + HTML on item list pages.
@ -41,7 +41,7 @@ gem 'sanitize', '~> 2.0.3'
gem 'RocketAMF', :git => 'https://github.com/rubyamf/rocketamf.git'
# For working with the OpenNeo ID service.
gem 'msgpack', '~> 0.5.3'
gem 'msgpack', '~> 1.6', '>= 1.6.1'
gem 'openneo-auth-signatory', '~> 0.1.0'
# For preventing too many modeling attempts.
@ -53,6 +53,14 @@ gem "letter_opener", :group => :development
# For parallel API calls.
gem "parallel", "~> 1.13.0"
# TODO: Rails requests the latest version of these dependencies, but they
# require Ruby 2.5 or higher, so we have to request lower ones instead!
# (loofah is slightly trickier: it requires a recent nokogiri, but recent
# nokogiri requires Ruby 2.6, so, yeah.)
gem 'loofah', '~> 2.20', '< 2.21'
gem 'minitest', '~> 5.15', '< 5.16'
gem 'mail', '~> 2.7', '>= 2.7.1', '< 2.8'
# For deployment.
group :development do
gem 'capistrano', '~> 2.15.5', require: false
@ -66,6 +74,6 @@ end
# For testing.
group :test do
gem 'factory_girl_rails', '~> 1.0'
gem 'factory_girl_rails', '~> 4.9'
gem 'rspec-rails', '~> 2.0.0.beta.22'
end

View file

@ -7,34 +7,42 @@ GIT
GEM
remote: http://rubygems.org/
specs:
actionmailer (4.1.16)
actionpack (= 4.1.16)
actionview (= 4.1.16)
actionmailer (4.2.11.3)
actionpack (= 4.2.11.3)
actionview (= 4.2.11.3)
activejob (= 4.2.11.3)
mail (~> 2.5, >= 2.5.4)
actionpack (4.1.16)
actionview (= 4.1.16)
activesupport (= 4.1.16)
rack (~> 1.5.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.11.3)
actionview (= 4.2.11.3)
activesupport (= 4.2.11.3)
rack (~> 1.6)
rack-test (~> 0.6.2)
actionview (4.1.16)
activesupport (= 4.1.16)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.11.3)
activesupport (= 4.2.11.3)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.16)
activesupport (= 4.1.16)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (4.2.11.3)
activesupport (= 4.2.11.3)
globalid (>= 0.3.0)
activemodel (4.2.11.3)
activesupport (= 4.2.11.3)
builder (~> 3.1)
activerecord (4.1.16)
activemodel (= 4.1.16)
activesupport (= 4.1.16)
arel (~> 5.0.0)
activesupport (4.1.16)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
activerecord (4.2.11.3)
activemodel (= 4.2.11.3)
activesupport (= 4.2.11.3)
arel (~> 6.0)
activesupport (4.2.11.3)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.3.8)
arel (5.0.1.20140414130214)
arel (6.0.4)
babel-source (5.8.35)
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
@ -64,14 +72,14 @@ GEM
compass (~> 1.0.0)
sass-rails (< 5.1)
sprockets (< 4.0)
concurrent-ruby (1.1.10)
concurrent-ruby (1.2.2)
connection_pool (2.2.5)
devise (3.5.10)
crass (1.0.6)
devise (4.9.2)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
railties (>= 4.1.0)
responders
thread_safe (~> 0.1)
warden (~> 1.2.3)
diff-lcs (1.2.5)
dotenv (2.8.1)
@ -80,12 +88,14 @@ GEM
railties (>= 3.2)
erubis (2.7.0)
execjs (2.5.2)
factory_girl (2.6.4)
activesupport (>= 2.3.9)
factory_girl_rails (1.7.0)
factory_girl (~> 2.6.0)
factory_girl (4.9.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.9.0)
factory_girl (~> 4.9.0)
railties (>= 3.0.0)
ffi (1.12.2)
globalid (0.4.2)
activesupport (>= 4.2.0)
globalize (4.0.3)
activemodel (>= 4.0.0, < 5)
activerecord (>= 4.0.0, < 5)
@ -97,18 +107,21 @@ GEM
http_accept_language (2.1.1)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
json (1.8.6)
launchy (2.4.3)
addressable (~> 2.3)
letter_opener (1.4.1)
launchy (~> 2.2)
loofah (2.20.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
memcache-client (1.8.5)
mime-types (1.25.1)
mini_mime (1.1.2)
mini_portile2 (2.4.0)
minitest (5.15.0)
msgpack (0.5.12)
msgpack (1.6.1)
multi_json (1.15.0)
mysql2 (0.3.18)
net-scp (1.0.4)
@ -118,32 +131,42 @@ GEM
net-ssh (2.9.2)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
nokogiri (1.5.11)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
openneo-auth-signatory (0.1.0)
ruby-hmac
orm_adapter (0.5.0)
parallel (1.13.0)
rack (1.5.5)
rack (1.6.13)
rack-attack (2.2.1)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (4.1.16)
actionmailer (= 4.1.16)
actionpack (= 4.1.16)
actionview (= 4.1.16)
activemodel (= 4.1.16)
activerecord (= 4.1.16)
activesupport (= 4.1.16)
rails (4.2.11.3)
actionmailer (= 4.2.11.3)
actionpack (= 4.2.11.3)
actionview (= 4.2.11.3)
activejob (= 4.2.11.3)
activemodel (= 4.2.11.3)
activerecord (= 4.2.11.3)
activesupport (= 4.2.11.3)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.16)
sprockets-rails (~> 2.0)
railties (= 4.2.11.3)
sprockets-rails
rails-deprecated_sanitizer (1.0.4)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.9)
activesupport (>= 4.2.0, < 5.0)
nokogiri (~> 1.6)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
rails-i18n (4.0.9)
i18n (~> 0.7)
railties (~> 4.0)
railties (4.1.16)
actionpack (= 4.1.16)
activesupport (= 4.1.16)
railties (4.2.11.3)
actionpack (= 4.2.11.3)
activesupport (= 4.2.11.3)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (13.0.6)
@ -157,8 +180,9 @@ GEM
execjs
railties (>= 3.2)
tilt
responders (1.1.2)
railties (>= 3.2, < 4.2)
responders (2.4.1)
actionpack (>= 4.2.0, < 6.0)
railties (>= 4.2.0, < 6.0)
rest-client (1.6.9)
mime-types (~> 1.16)
rspec (2.0.1)
@ -188,10 +212,10 @@ GEM
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
temple (0.8.2)
thor (1.2.2)
thread_safe (0.3.6)
@ -211,21 +235,24 @@ DEPENDENCIES
RocketAMF!
capistrano (~> 2.15.5)
compass-rails (~> 3.1)
devise (~> 3.5.10)
devise (~> 4.9, >= 4.9.2)
dotenv-rails (~> 2.8, >= 2.8.1)
factory_girl_rails (~> 1.0)
factory_girl_rails (~> 4.9)
globalize (~> 4.0.3)
haml (~> 6.1, >= 6.1.1)
http_accept_language (~> 2.1, >= 2.1.1)
letter_opener
loofah (~> 2.20, < 2.21)
mail (~> 2.7, >= 2.7.1, < 2.8)
memcache-client (~> 1.8.5)
msgpack (~> 0.5.3)
minitest (~> 5.15, < 5.16)
msgpack (~> 1.6, >= 1.6.1)
mysql2 (>= 0.3.11)
nokogiri (~> 1.5.2)
nokogiri (~> 1.10, >= 1.10.10)
openneo-auth-signatory (~> 0.1.0)
parallel (~> 1.13.0)
rack-attack (~> 2.2.0)
rails (= 4.1.16)
rails (= 4.2.11.3)
rails-i18n (~> 4.0, >= 4.0.9)
rdiscount (~> 1.6.5)
react-rails (~> 2.7, >= 2.7.1)
@ -238,7 +265,7 @@ DEPENDENCIES
will_paginate (~> 3.0.pre2)
RUBY VERSION
ruby 2.2.4p230
ruby 2.4.10p364
BUNDLED WITH
1.17.3

6
Vagrantfile vendored
View file

@ -72,8 +72,10 @@ Vagrant.configure("2") do |config|
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y rbenv libmysqlclient-dev libcurl4-openssl-dev nodejs
su vagrant -c 'rbenv install 2.2.4 && gem install bundler -v 1.17.3'
apt-get install -y libmysqlclient-dev libcurl4-openssl-dev nodejs
su vagrant -c 'git clone https://github.com/rbenv/rbenv.git ~/.rbenv'
su vagrant -c 'git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build'
su vagrant -c '~/.rbenv/bin/rbenv install 2.4.10 && ~/.rbenv/shims/gem install bundler -v 1.17.3'
apt-get install -y mysql-server
mysql -e "CREATE USER IF NOT EXISTS openneo_impress IDENTIFIED BY 'openneo_impress';"
mysql -e "CREATE DATABASE IF NOT EXISTS openneo_impress;"

View file

@ -1,6 +1,5 @@
require 'fileutils'
require 'uri'
require 'encoding/character/utf-8'
class SwfAsset < ActiveRecord::Base
# We use the `type` column to mean something other than what Rails means!

View file

@ -1,7 +1,6 @@
require 'active_support/core_ext/hash'
require 'msgpack'
require 'openneo-auth-signatory'
require 'encoding/character/utf-8'
module Openneo
module Auth

Binary file not shown.

BIN
vendor/cache/actionmailer-4.2.11.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/actionpack-4.2.11.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/actionview-4.2.11.3.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/activejob-4.2.11.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/activemodel-4.2.11.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/activerecord-4.2.11.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/activesupport-4.2.11.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/arel-6.0.4.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/concurrent-ruby-1.2.2.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/crass-1.0.6.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/devise-4.9.2.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/factory_girl-4.9.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/globalid-0.4.2.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/loofah-2.20.0.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/mini_portile2-2.4.0.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/msgpack-1.6.1.gem vendored Normal file

Binary file not shown.

BIN
vendor/cache/nokogiri-1.10.10.gem vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rack-1.6.13.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rails-4.2.11.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/rails-dom-testing-1.0.9.gem vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/railties-4.2.11.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/responders-2.4.1.gem vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
vendor/cache/sprockets-rails-3.2.2.gem vendored Normal file

Binary file not shown.