Skip to content
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

Closed
postmodern opened this issue Jul 24, 2013 · 4 comments
Closed

Move all non-code files into data/ #36

postmodern opened this issue Jul 24, 2013 · 4 comments
Assignees
Labels
Milestone

Comments

@postmodern
Copy link
Contributor

lib/ should only contain executable code. The type lists should be moved into data/, so they won't confuse RDoc.

@halostatue
Copy link
Member

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.

@postmodern
Copy link
Contributor Author

It depends on the distro's packaging standards. Fedora doesn't split apart rubygems across separate directories, instead installs their rubygem-* packages into /usr/share/gems/ like a normal gem.

@halostatue
Copy link
Member

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.

@ghost ghost assigned halostatue Aug 30, 2013
halostatue added a commit that referenced this issue Sep 16, 2013
- 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.
@halostatue
Copy link
Member

This will be resolved in MIME::Types 2.0 as noted in the above commit.

halostatue added a commit that referenced this issue Oct 20, 2013
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.
halostatue added a commit that referenced this issue Oct 20, 2013
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.
halostatue added a commit that referenced this issue Oct 20, 2013
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.
halostatue added a commit that referenced this issue Oct 20, 2013
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.
halostatue added a commit that referenced this issue Oct 20, 2013
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.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants