This PR includes some long-overdue deferred maintenance to keep COVE up to date.
Note on commits
I'm doing this in stages, where each stage is an upgrade to either Ruby or Rails, along with associated dependency upgrades. Each commit to this branch is a working version of COVE, so if we find a subtle problem we can work our way back. Please don't squash!
Upgrades
Ruby from 2.4 to 3.1
Rails from 4.2 to 6.1
Nearly every gem has been upgraded to support the new versions of Ruby and Rails. There's potential for bugs everywhere!
Removals
removed a ton of old development/testing dependencies
adds a will_paginate initializer to fix a compatibility issue with Active Admin
Notes
The previous versions of Ruby and Nokogiri did not have native Apple Silicon versions, so setting up a local build was a big headache for people with newer Macs. These newer versions of Ruby and Nokogiri have proper Apple Silicon support, so you should be able to set up with bundle install like a normal project, with no weird C header errors to contend with.
Future work
The paperclip gem is deprecated in favor of Rails's built-in ActiveStorage. Eventually we'll need to move on from it, as it fails to support newer versions of Rails/Ruby. See https://github.com/thoughtbot/paperclip#deprecated for a migration guide.
CoffeeScript? Really?
there seems to only be one coffeescript file, richText-annotator.js.coffee, which is pretty small. Porting this to JS would allow us to remove the ancient CoffeeScript dependencies that will probably never be updated again.
The JS uses a lot of JQuery and JQueryUI. It's not realistic to remove it, but maybe there's a more lightweight way to include JQuery without using a gem
COVE is using version 1 of aws-sdk, while the currently supported version is version 3. It doesn't seem like they cut off support for old versions, but I wouldn't count on it working forever. Version 1 also relies on an outdated version of the json gem that blocks us from upgrading to Ruby 3.
I get a message when installing that a 2.0 version of oauth2 is released, and the 1.0 version we're using is unsupported. The devs insist that upgrading is easy.
Summary
This PR includes some long-overdue deferred maintenance to keep COVE up to date.
Note on commits
I'm doing this in stages, where each stage is an upgrade to either Ruby or Rails, along with associated dependency upgrades. Each commit to this branch is a working version of COVE, so if we find a subtle problem we can work our way back. Please don't squash!
Upgrades
Nearly every gem has been upgraded to support the new versions of Ruby and Rails. There's potential for bugs everywhere!
Removals
Changes
bigdecimal
version in the Gemfile (addresses a crash related to the newer Ruby version, see https://github.com/ruby/bigdecimal#which-version-should-you-select)configure_permitted_parameters
devise
method (see https://github.com/RailsApps/rails-devise-pundit/issues/33)will_paginate
initializer to fix a compatibility issue with Active AdminNotes
The previous versions of Ruby and Nokogiri did not have native Apple Silicon versions, so setting up a local build was a big headache for people with newer Macs. These newer versions of Ruby and Nokogiri have proper Apple Silicon support, so you should be able to set up with
bundle install
like a normal project, with no weird C header errors to contend with.Future work
paperclip
gem is deprecated in favor of Rails's built-in ActiveStorage. Eventually we'll need to move on from it, as it fails to support newer versions of Rails/Ruby. See https://github.com/thoughtbot/paperclip#deprecated for a migration guide.richText-annotator.js.coffee
, which is pretty small. Porting this to JS would allow us to remove the ancient CoffeeScript dependencies that will probably never be updated again.aws-sdk
, while the currently supported version is version 3. It doesn't seem like they cut off support for old versions, but I wouldn't count on it working forever. Version 1 also relies on an outdated version of thejson
gem that blocks us from upgrading to Ruby 3.oauth2
is released, and the 1.0 version we're using is unsupported. The devs insist that upgrading is easy.