Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated methods are used internally #60

Closed
mattparlane opened this issue Mar 11, 2014 · 3 comments
Closed

Deprecated methods are used internally #60

mattparlane opened this issue Mar 11, 2014 · 3 comments
Labels
Milestone

Comments

@mattparlane
Copy link

I'm not sure if this is the right forum as this is really just a question, sorry if it's not.

I'm using this library, but I'm trying to canonicalize types, and I'm doing it thus:

def mime_types(type)
  if type == 'application/vnd.ms-excel'
    type = 'application/excel'
  end
  MIME::Types[type]
end

There's probably a much better way, but this works. The point of my question is that when I do this for the above type, I get two deprecation warnings:

MIME::Type#platform? is deprecated and will be removed.
MIME::Type#system? is deprecated and will be removed.

They appear to originate from calls within the library, so I'm wondering if I'm doing anything wrong or if the above method will cease to work in the future.

Thanks,

Matt Parlane

@halostatue halostatue added the Bug label Mar 11, 2014
@halostatue halostatue added this to the 2.2 milestone Mar 11, 2014
@halostatue
Copy link
Member

You're good; it was my error and will be fixed in the 2.2 release this week.

@halostatue
Copy link
Member

By the way, application/vnd.ms-excel is the correct canonical MIME type; it's the registered MIME type, whereas application/excel is not registered. You may want to reverse your test (and I will properly mark application/excel obsolete and add a use_instead value.

@mattparlane
Copy link
Author

Thanks a bunch!

Matt

On Wed, Mar 12, 2014 at 3:18 AM, Austin Ziegler [email protected]:

By the way, application/vnd.ms-excel is the correct canonical MIME
type; it's the registered MIME type, whereas application/excel is not
registered. You may want to reverse your test (and I will properly mark
application/excel obsolete and add a use_instead value.

Reply to this email directly or view it on GitHubhttps://github.com//issues/60#issuecomment-37299954
.

Matt Parlane
Web Genius Central New Zealand Limited
Email: [email protected]
Phone: 0800 256 506
DD: 04 297 9827

halostatue added a commit that referenced this issue Mar 14, 2014
The registered MIME type is application/vnd.ms-excel; marked as the
use-instead for application/excel.

Also marked application/x-excel obsolete the same way.

Fixes #60.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants