I don't know, does this question was raised here before, but do we really need to have heavy ActiveSuport as dependency? If we remove it, then we can use Pundit with another Ruby frameworks, not only with Rails.
WDYT?
I use Pundit exclusively with Rails, but if it can be abstracted and used by the greater Ruby community then that's a great idea. Would this be a big job?
Requiring ActiveSupport doesn't mean being dependent of Rails and, as far as I can tell, Pundit can be used outside of Rails without any problems.
@seanfcarroll
I didn't look carefully, but I think this is no hard to remove ActiveSupport as is.
@patleb
Yes, but very few people want to pull this heavy dependency for their non-Rails project. It is bad taste to use gems dependent on ActiveSupport in Hanami world, for example.
Pundit pulls only a handful of ActiveSupport files, not the whole gem (so this not heavy by a long shot). I can see your point and to answer to your question premises which was 'Do we really need ActiveSupport as dependency?' is yes, unless you want to rewrite or use something in place of:
require "active_support/concern"
require "active_support/core_ext/string/inflections"
require "active_support/core_ext/object/blank"
require "active_support/core_ext/module/introspection"
require "active_support/dependencies/autoload"
Otherwise, I don't see any value added by replacing these or bad taste in the eye on some circles as a strong argument.
Also, I want to point out that this is a bit disrespectful to the creator to criticise the project stack choices by wanting to impose another stack just for the sake to use your own stack like I saw recently here. As I see it, asking for a Hanami integration would be more helpful.
Hi!
First off, I'm not a fan of ActiveSupport. However it's the _only_ dependency of Pundit so it probably won't be a top priority for me to remove it in a while.
馃憢
For those who don鈥檛 want an ActiveSupport dependency take a look at Moat. Our company built it because we had slightly different requirements than Pundit, but loved the approach Pundit takes for auth code, so it鈥檚 very similar.
Most helpful comment
Pundit pulls only a handful of ActiveSupport files, not the whole gem (so this not heavy by a long shot). I can see your point and to answer to your question premises which was 'Do we really need ActiveSupport as dependency?' is yes, unless you want to rewrite or use something in place of:
Otherwise, I don't see any value added by replacing these or bad taste in the eye on some circles as a strong argument.
Also, I want to point out that this is a bit disrespectful to the creator to criticise the project stack choices by wanting to impose another stack just for the sake to use your own stack like I saw recently here. As I see it, asking for a Hanami integration would be more helpful.