1
0
Fork 0
forked from OpenNeo/impress

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 fb04c68294
commit 88c2ecb43a
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' 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. # Our database is MySQL, in both development and production.
gem 'mysql2', '>= 0.3.11' gem 'mysql2', '>= 0.3.11'
@ -21,7 +21,7 @@ gem 'react-rails', '~> 2.7', '>= 2.7.1'
gem 'will_paginate', '~> 3.0.pre2' gem 'will_paginate', '~> 3.0.pre2'
# For authentication. # 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. # For translation, both for the site UI and for Neopets data.
gem 'rails-i18n', '~> 4.0', '>= 4.0.9' 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' gem 'globalize', '~> 4.0.3'
# For reading and parsing HTML from Neopets.com, like importing Closet pages. # 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" gem "rest-client", "~> 1.6.7"
# For safely rendering users' Markdown + HTML on item list pages. # 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' gem 'RocketAMF', :git => 'https://github.com/rubyamf/rocketamf.git'
# For working with the OpenNeo ID service. # 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' gem 'openneo-auth-signatory', '~> 0.1.0'
# For preventing too many modeling attempts. # For preventing too many modeling attempts.
@ -53,6 +53,14 @@ gem "letter_opener", :group => :development
# For parallel API calls. # For parallel API calls.
gem "parallel", "~> 1.13.0" 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. # For deployment.
group :development do group :development do
gem 'capistrano', '~> 2.15.5', require: false gem 'capistrano', '~> 2.15.5', require: false
@ -66,6 +74,6 @@ end
# For testing. # For testing.
group :test do group :test do
gem 'factory_girl_rails', '~> 1.0' gem 'factory_girl_rails', '~> 4.9'
gem 'rspec-rails', '~> 2.0.0.beta.22' gem 'rspec-rails', '~> 2.0.0.beta.22'
end end

View file

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

View file

@ -1,6 +1,5 @@
require 'fileutils' require 'fileutils'
require 'uri' require 'uri'
require 'encoding/character/utf-8'
class SwfAsset < ActiveRecord::Base class SwfAsset < ActiveRecord::Base
# We use the `type` column to mean something other than what Rails means! # 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 'active_support/core_ext/hash'
require 'msgpack' require 'msgpack'
require 'openneo-auth-signatory' require 'openneo-auth-signatory'
require 'encoding/character/utf-8'
module Openneo module Openneo
module Auth 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.