You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to think that this gem is the reference implementation for Refile 3rd party backend gems. From that point of view the current structure suggests placing backend implementations directly under Refile namespace is the preferred practice.
Hence I'd like to propose the following structure to avoid promoting pollution of the root Refile namespace by silly backend implementors releasing their own gems:
/lib/refile/s3.rb
defines Refile::S3 module
requires refile/s3/version and refile/backend/s3
/lib/refile/s3/version.rb
defines Refile::S3::VERSION
/lib/refile/backend/s3.rb
implements the backend in Refile::Backend::S3 class
PS. I hope the tone of my post does not come through as patronizing - I'm certain @jnicklas has way more experience in structuring and gardening open source projects than I do. 😇
The text was updated successfully, but these errors were encountered:
I thought about this and decided on the current structure because of the following reasons:
I want gem name and file structure to match. If the file structure were as you mentioned, the gem should have been called refile-backend-s3. This wouldn't have been so bad, except...
Prior art. There are already several backend implementations out there simply called refile-something. Calling this gem something else would have been inconsistent with refile-fog, refile-postgres etc...
Namespace clashes are unlikely.
Rubygems restricts the namespace anyway, so clashes shouldn't happen.
Ok, thank you for the explanation! Just wanted to make sure it was a thought out decision instead of an overlook while splitting the gem out of the main library.
Food for thought
I'd like to think that this gem is the reference implementation for Refile 3rd party backend gems. From that point of view the current structure suggests placing backend implementations directly under
Refile
namespace is the preferred practice.Hence I'd like to propose the following structure to avoid promoting pollution of the root
Refile
namespace by silly backend implementors releasing their own gems:/lib/refile/s3.rb
Refile::S3
modulerefile/s3/version
andrefile/backend/s3
/lib/refile/s3/version.rb
Refile::S3::VERSION
/lib/refile/backend/s3.rb
Refile::Backend::S3
classPS. I hope the tone of my post does not come through as patronizing - I'm certain @jnicklas has way more experience in structuring and gardening open source projects than I do. 😇
The text was updated successfully, but these errors were encountered: