your_platform
your_platform copied to clipboard
[WIP] Rails-6 Reboot
This pull request collects the following major maintenance steps:
- [ ] Migrate the application from rails 5.0 to rails 6.1
- [ ] Convert the your_platform rails engine to a standalone application
- [ ] Move organization-specific code into namespaces
- [ ] Dockerize the development workflow
- [ ] Drop obsolete feature specs
- [ ] Dockerize continuous tests
Migrate the application from rails 5.0 to rails 6.1
Many things have changed in rails since our last major update. In particular, webpacker is now a first-class citizen. Because this pull request also converts the rails engine to a standalone application, rather than using the rails-update rake tasks, I'm creating a fresh rails-6 application and replace the appropriate files.
Convert the your_platform rails engine to a standalone application
Move organization-specific code into namespaces
Managing engines requires additional steps when separating javascript code. I've done it for another project and I think that, for now, it's easier for the development process to unify the engine with the major main applications.
Dockerize the development workflow
[2021-03-22 15:34:39] fiedl@data ~/rails/your_platform fiedl/rails-6 ⚡
▶ docker-compose build web
▶ docker-compose run web bundle install
▶ docker-compose run web bundle exec rails db:migrate
▶ docker-compose run web bundle exec rails console
Drop obsolete feature specs
Dockerize continuous tests
Database migrations
-
[x] Bring over database migrations from the your_platform engine and wingolfsplattform
-
[x] Apply filename namespacing
db/migrate/*.your_platform.rb
# applies to all orgsdb/migrate/*.wingolf.rb
# applies to wingolf org -
[x] Fix migration issues due to the update to rails 6
-
[x] Comment out migration code that requires models and is no longer necessary for fresh app installs. This way, the migration can be tested without using the model layer.
-
[x] Test migrations
docker-compose run web bundle exec rails db:drop db:create db:migrate