handcuffs icon indicating copy to clipboard operation
handcuffs copied to clipboard

Restrict dependency on Rails

Open tiagotex opened this issue 4 years ago • 2 comments

Currently, handcuffs depends on rails in the gemspec:

spec.add_runtime_dependency "rails", ">= 4.0"

This causes apps that want to avoid loading some rails plugins to be forced to load all rails plugins, ie, in the Gemfile we include:

gem "actionmailer"
gem "actionpack"
gem "actionview"
gem "activemodel"
gem "activerecord"
gem "activesupport"
gem "railties"

Instead of requesting gem "rails", since that would also include other gems like activestorage, actiontext, etc. But since this gem requires rails as a dependency, it forces bundle to load all of rails.

Would you be open to change the run time dependencies to be activerecord and maybe activesupport? If you agree I can open a PR with the change.

Thank you for the awesome gem 🙂

tiagotex avatar Aug 04 '21 10:08 tiagotex

I've created a fork that uses restricted dependencies, you can use it by adding the following to your Gemfile:

gem "handcuffs", github: "https://github.com/tiagotex/handcuffs.git"

tiagotex avatar Mar 20 '22 12:03 tiagotex

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Feb 15 '24 01:02 github-actions[bot]