Skip to content

HossainAraf/refactor-rails3-mongoid-omniauth

 
 

Repository files navigation

Rails3 Mongoid OmniAuth — Security Modernization (Rails 7.2–Aligned)

This repository is a modernized fork of a legacy Rails 3.2.13 Mongoid + OmniAuth application.
The goal of this refactor is to apply modern Rails security, testing, and dependency practices, preparing the codebase conceptually for Rails 7.2.

What was done

  • Updated Gemfile following Rails 7.x security and dependency guidelines
  • Removed unnecessary legacy dependencies
  • Removed ActiveRecord railtie and fixtures; the app runs purely on Mongoid
  • Replaced legacy attr_accessible mass-assignment protection with strong parameters
  • Replaced deprecated before_filter callbacks with before_action
  • Replaced deprecated skip_before_filter callbacks with skip_before_action
  • Updated the test suite (In progress)

Migration pitfalls encountered

  • Asset pipeline issues
  • Mongoid vs ActiveRecord configuration conflicts

These issues were identified and resolved incrementally during the refactor.

Security refactor notes

A mapping of legacy attr_* usage to strong parameters is documented here:

./docs/refactor-security-strongparams/attr-list.md

Setup

bundle install
rails s
bundle exec rspec

Future work

    Documentation cleanup

    Further alignment with Rails 7.2 conventions

🔭 Future Features

  • Update documentaion

Attribution

Original application by Daniel Kehoe Copyright © 2012–2013 Daniel Kehoe See rails3-mongoid-omniauth for the original project.

About

A security-focused modernization of a Rails 3.2 Mongoid + OmniAuth app, refactored with strong parameters, updated dependencies, and modern testing practices.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Ruby 84.8%
  • HTML 10.0%
  • SCSS 2.7%
  • JavaScript 1.9%
  • CoffeeScript 0.6%