Asana / ruby-asana

Official Ruby client library for the Asana API v1
MIT License
77 stars 54 forks source link

Modularize global required method #168

Open czeise opened 1 year ago

czeise commented 1 year ago

This PR fixes #45 and builds off of mful's previous PR for this issue.

It should be noted that #45 specifically mentions a compatibility issue with FactoryBot, but the issue is much broader than that. This gem currently introduces a required method globally in the projects that use it, which breaks any method named required in those projects.

This solution:

My concerns with this solution:

I believe the method that I'm protecting here (required) is only necessary to add support to a ruby version (2.0.0) that isn't actually supported by this gem. It likely could be removed, but it would require updates to the code generation codebase.

Supported rubies:

  • MRI 2.7.x
  • MRI 3.0.x
  • MRI 3.1.x