Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Rails 5.0 #917

Draft
wants to merge 32 commits into
base: master
Choose a base branch
from
Draft

Upgrade to Rails 5.0 #917

wants to merge 32 commits into from

Conversation

ysbaddaden
Copy link
Contributor

@ysbaddaden ysbaddaden commented Nov 27, 2023

Begins the upgrade from Rails 4.2 to Rails 5.0

  • Upgrade to Rails 5.0
  • Fix deprecations (alias_method_chain, ...)
  • Vendor jquery & jquery-ui to avoid frontend upgrade issues
  • Upgrade to DecentExposure 3 needs changes in create/update with strong parameters
  • Drop includes-count gem (abandoned, used once, breaks ActiveRecord)
  • Drop active_model_serializers gem (used once along with includes-count)
  • Upgrade Devise (gem is updated, seems to work)
  • Fix failures catched by the unit test suite (one last failing spec)
  • Fix failures catched by the integration test suite
  • Enable Rails 5.0 default settings

We can't seem to properly relate to the `Layer#fields` and
`Collection#sites` association objects from the import wizard, leading
to exceptions in ActiveRecord (`persisted.map!` on frozen array), and
then the bulk operation to save the sites in elasticsearch to be
empty...
This reverts commit 5804abae862c2fa07bd8ff9696c9646ff953435a.
This reverts commit d483b84a1caca5578c998c10d408e59b13abe018.
The gems upgraded jquery 1.5 to jquery 1.12 which broke some backward
compatibility in v1.9 by removing `$.browser` which is breaking a couple
dependencies (fancybox, jcrop) as well as the instedd theme.

Let's avoid dealing with frontend matters while upgrading the backend.
@ysbaddaden ysbaddaden added the tech-debt Technical Debt label Nov 27, 2023
@ysbaddaden ysbaddaden self-assigned this Nov 27, 2023
The includes-count gem has been abandonned and breaks ActiveRecord 5.0
badly (it freezes an internal collection), and it was easier to remove
active_model_serializers to replace includes-count than trying to fix
the one time usage of the serializer.
@ysbaddaden ysbaddaden force-pushed the task/upgrade-to-rails50 branch from a5af9fd to 360332b Compare November 28, 2023 09:07
Fixes a couple issues found by Knockout 3.5 but still downgrade the
library as it still doesn't work properly. Also vendors the asset file
as the gem can't be installed along with rails 5 and the gem does
nothing.

Also downgrades lodash since there was error popping out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech-debt Technical Debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant