Skip to content

Online documentation has lame interpolation failures #10

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

Closed
tomoyoirl opened this issue Feb 14, 2012 · 1 comment
Closed

Online documentation has lame interpolation failures #10

tomoyoirl opened this issue Feb 14, 2012 · 1 comment

Comments

@tomoyoirl
Copy link

At http://mime-types.rubyforge.org/MIME/Types.html#method-i-type_for there is sample code which looks like

puts "MIME::Types.type_for('citydesk.xml')
  => "#{MIME::Types.type_for('citydesk.xml')}"
puts "MIME::Types.type_for('citydesk.gif')
  => "#{MIME::Types.type_for('citydesk.gif')}"

Seriously? It's supposed to output a bunch of junk with a #{} around it? I don't think so.
Unfortunately, because the real sample output was missing when I looked, I assumed it would return a single type and tried to send something from Rails with :content_type => MIME::Types.type_for('foo.css') which sent the deceptively-good-looking string [text/css] instead of sending text/css. I subsequently wasted a bunch of time tracking down what the problem was.

@halostatue
Copy link
Member

Fixed in 1.18.

irb is quite useful for this sort of thing if you find yourself confused again.

jperkin pushed a commit to TritonDataCenter/pkgsrc-legacy that referenced this issue Dec 9, 2013
== MIME::Types 1.18 / 2012-03-20
* New MIME Types:
  * Types reported in Issue #6
    (mime-types/ruby-mime-types#6):
    * CoffeeScript (text/x-coffeescript; .coffee; 8bit).
    * AIR
      (application/vnd.adobe.air-applicationinstaller-package+zip, .air;
      base64).
    * WOFF (application/font-woff; .woff; base64).
    * TrueType (application/x-font-truetype; .ttf; base64).
    * OpenType (application/x-font-opentype; .otf; base64).
  * WebM (audio/webm, video/webm; .webm). Issue #11
    (mime-types/ruby-mime-types#11).
* New extensions:
  * f4v/f4p (video/mp4, used by Adobe); f4a/fb4 (audio/mp4, used by Adobe).
* Bug Fixes:
  * It was pointed out that Licence.txt was incorrectly named. Fixed by
    renaming to Licence.rdoc (from Issue/Pull Request #8,
    mime-types/ruby-mime-types#8).
  * It was pointed out that a plan to have the test output generated
    automatically never went through. Issue #10
    (mime-types/ruby-mime-types#10)
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Oct 11, 2014
== MIME::Types 1.18 / 2012-03-20
* New MIME Types:
  * Types reported in Issue #6
    (mime-types/ruby-mime-types#6):
    * CoffeeScript (text/x-coffeescript; .coffee; 8bit).
    * AIR
      (application/vnd.adobe.air-applicationinstaller-package+zip, .air;
      base64).
    * WOFF (application/font-woff; .woff; base64).
    * TrueType (application/x-font-truetype; .ttf; base64).
    * OpenType (application/x-font-opentype; .otf; base64).
  * WebM (audio/webm, video/webm; .webm). Issue #11
    (mime-types/ruby-mime-types#11).
* New extensions:
  * f4v/f4p (video/mp4, used by Adobe); f4a/fb4 (audio/mp4, used by Adobe).
* Bug Fixes:
  * It was pointed out that Licence.txt was incorrectly named. Fixed by
    renaming to Licence.rdoc (from Issue/Pull Request #8,
    mime-types/ruby-mime-types#8).
  * It was pointed out that a plan to have the test output generated
    automatically never went through. Issue #10
    (mime-types/ruby-mime-types#10)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants