-
-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Move all non-code files into data/ #36
Comments
I need to figure out how to do this so that if an OS distribution packager wants to repackage mime-types to fit their particular model, I can make this fairly simple to deal with for therm, even though they should just be repackaging gems in their distribution archives. |
It depends on the distro's packaging standards. Fedora doesn't split apart rubygems across separate directories, instead installs their |
Right. I'm just trying to figure out how to do it so that the distros that do ugly things to gems don't have to change something in the core of the gem in order to read the data. I don't want to read relative to FILE expecting that the sibling directory will be there—whereas I have been able to guarantee that child directories are present, even though the files themselves are not Ruby scripts. I could cheat, of course, and make these files Ruby scripts (which is what I did with Text::Format, although those objects also have some additional functionality to them IIRC). The right way is to probably move the loading from MIME::Types.load_from_file to a MIME::Types::Loader object, which has a root directory constant that can be overridden trivially by an packager without affecting other parts of the code. |
- Resolves the primary issue raised in #36 by moving MIME type definitions from `lib/mime/types/*` to `data/*`. I consider the work incomplete until I finish transferring the loading code to MIME::Types::Loader. - Extracted MIME::Type from lib/mime/types.rb into its own file. - Started identifying code that needs to be marked deprecated.
This will be resolved in MIME::Types 2.0 as noted in the above commit. |
A substantial upgrade to the mime-types library. Major features: - No longer compatible with Ruby 1.8. - Several major API changes and deprecations. - The default mime-types registry is now stored as JSON. - Improved developer tools. - Improved repackager tools. - Resolves #28, #36, #37, #43, and #44.
A substantial upgrade to the mime-types library. Major features: - No longer compatible with Ruby 1.8. - Several major API changes and deprecations. - The default mime-types registry is now stored as JSON. - Improved developer tools. - Improved repackager tools. - Resolves #28. - Resolves #36. - Resolves #37. - Resolves #43. - Resolves #44.
A substantial upgrade to the mime-types library. Major features: - No longer compatible with Ruby 1.8. - Several major API changes and deprecations. - The default mime-types registry is now stored as JSON. - Improved developer tools. - Improved repackager tools. - Fixes #28. - Fixes #36. - Fixes #37. - Fixes #43. - Fixes #44.
A substantial upgrade to the mime-types library. Major features: - No longer compatible with Ruby 1.8. - Several major API changes and deprecations. - The default mime-types registry is now stored as JSON. - Improved developer tools. - Improved repackager tools. - Fixes #28. - Fixes #36. - Fixes #37. - Fixes #42. - Fixes #43. - Fixes #44.
A substantial upgrade to the mime-types library. Major features: - No longer compatible with Ruby 1.8. - Several major API changes and deprecations. - The default mime-types registry is now stored as JSON. - Improved developer tools. - Improved repackager tools. - Fixes #28. - Fixes #36. - Fixes #37. - Fixes #42. - Fixes #43. - Fixes #44.
lib/
should only contain executable code. The type lists should be moved intodata/
, so they won't confuse RDoc.The text was updated successfully, but these errors were encountered: