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

mime-types 1.17.2 fails tests with ruby 1.8.7 #8

Closed
graaff opened this issue Dec 18, 2011 · 5 comments
Closed

mime-types 1.17.2 fails tests with ruby 1.8.7 #8

graaff opened this issue Dec 18, 2011 · 5 comments
Assignees

Comments

@graaff
Copy link
Contributor

graaff commented Dec 18, 2011

When I try to run the tests with ruby 1.8.7 I get the following failure:

  1) Failure:
test_platform_eh(TestMIME_Type) [./test/test_mime_type.rb:182]:
Failed refutation, no message given

33 tests, 139 assertions, 1 failures, 0 errors, 0 skips
@halostatue
Copy link
Member

I can't reproduce on the Mac with 1.8.7-p358.


/Users/AZiegler/.rbenv/versions/1.8.7-p358/bin/ruby -w -Ilib:bin:test:. -e 'require "rubygems"; gem "minitest"; require "minitest/autorun"; require "test/test_mime_type.rb"; require "test/test_mime_types.rb"' -- 
Run options: --seed 54862

# Running tests:

.................................

Finished tests in 0.007822s, 4218.8699 tests/s, 18026.0803 assertions/s.

33 tests, 141 assertions, 0 failures, 0 errors, 0 skips

This is what will be going out tonight as 1.18.

@graaff
Copy link
Contributor Author

graaff commented Mar 21, 2012

I have the same problem with the released 1.18 version. This is on Gentoo Linux using ruby 1.8.7 (2011-12-28 patchlevel 357) [x86_64-linux].

yaml = #<MIME::Type:0x7f3b05308ff8 @sub_type="yaml", @docs=nil, @content_type="text/x-yaml", @obsolete=nil, @url=nil, @registered=true, @encoding="8bit", @media_type="text", @raw_sub_type="x-yaml", @simplified="text/yaml", @System=/linux/, @extensions=["yaml", "yml"], @raw_media_type="text">

Please let me know if you need more info on this, I'd be happy to dig around a bit more if you tell me what you need.

@halostatue halostatue reopened this Mar 21, 2012
@halostatue
Copy link
Member

I think I see the problem.

Can you try changing line 9 of test/test_mime_type.rb to:

    MIME::Type.from_array('text/x-yaml', %w(yaml yml), '8bit', 'xunil')

You'll get two different failures, but you get those, I know how to fix it and will commit a patch later.

@ghost ghost assigned halostatue Mar 22, 2012
halostatue pushed a commit that referenced this issue Mar 22, 2012
Apparently some people run the tests on Linux. Imagine that. :)
@graaff
Copy link
Contributor Author

graaff commented Mar 22, 2012

  1) Failure:
test_to_a(TestMIME_Type) [./test/test_mime_type.rb:267]:
--- expected
+++ actual
@@ -1 +1 @@
-["text/x-yaml", ["yaml", "yml"], "8bit", /xunil/, nil, nil, nil, false]
+["text/x-yaml", ["yaml", "yml"], "8bit", /linux/, nil, nil, nil, false]


  2) Failure:
test_system_equals(TestMIME_Type) [./test/test_mime_type.rb:251]:
Expected: /xunil/
  Actual: /linux/

  3) Failure:
test_to_hash(TestMIME_Type) [./test/test_mime_type.rb:273]:
--- expected
+++ actual
@@ -1 +1 @@
-{"Extensions"=>["yaml", "yml"], "Content-Transfer-Encoding"=>"8bit", "Registered"=>false, "System"=>/xunil/, "Content-Type"=>"text/x-yaml", "URL"=>nil, "Docs"=>nil, "Obsolete"=>nil}
+{"Extensions"=>["yaml", "yml"], "Content-Transfer-Encoding"=>"8bit", "Registered"=>false, "System"=>/linux/, "Content-Type"=>"text/x-yaml", "URL"=>nil, "Docs"=>nil, "Obsolete"=>nil}

@graaff
Copy link
Contributor Author

graaff commented Mar 22, 2012

Fix confirmed, I just tested with the new commit and tests now pass on ruby 1.8, ruby 1.9 and jruby. Thanks!

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)
jperkin pushed a commit to TritonDataCenter/pkgsrc-legacy that referenced this issue Dec 9, 2013
== 1.19 / 2012-06-20
* New MIME Types:
  * XCF Gnome Images (image/x-xcf, image/x-compressed-xcf;
    .xcf). https://github.com/halostatue/mime-types/issue/17
  * Types reported in mime-types/ruby-mime-types#12:
    * DV (video/x-dv; .dv)
    * IVF (video/x-ivf; .ivf)
    * Matroska (video/x-matroska; .mkv)
    * Motion JPEG (video/x-motion-jpeg; .mjpg)
    * RealMedia (official; application/vnd.rn-realmedia; .rm)
* New extensions:
  * dcm (application/dicom); https://github.com/halostatue/mime-types/issue/16.
  * Types reported in mime-types/ruby-mime-types#12:
    * 3g2, 3gpp2 (video/3gpp2)
    * mpeg (video/mpeg)
    * mxf (application/mxf)
    * ts (video/MP2T)
    * ogg (video/ogg)
* Fixed MIME Types:
  * Adobe AIR application installer packages was missing a
    hyphen. https://github.com/halostatue/mime-types/issue/13
  * Types reported in mime-types/ruby-mime-types#12:
    * audio/x-pn-realaudio extension is .ra, not .rm.
* Resolved mime-types/ruby-mime-types#8. Apparently some
  people run the tests on Linux. Imagine that.
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)
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Oct 11, 2014
== 1.19 / 2012-06-20
* New MIME Types:
  * XCF Gnome Images (image/x-xcf, image/x-compressed-xcf;
    .xcf). https://github.com/halostatue/mime-types/issue/17
  * Types reported in mime-types/ruby-mime-types#12:
    * DV (video/x-dv; .dv)
    * IVF (video/x-ivf; .ivf)
    * Matroska (video/x-matroska; .mkv)
    * Motion JPEG (video/x-motion-jpeg; .mjpg)
    * RealMedia (official; application/vnd.rn-realmedia; .rm)
* New extensions:
  * dcm (application/dicom); https://github.com/halostatue/mime-types/issue/16.
  * Types reported in mime-types/ruby-mime-types#12:
    * 3g2, 3gpp2 (video/3gpp2)
    * mpeg (video/mpeg)
    * mxf (application/mxf)
    * ts (video/MP2T)
    * ogg (video/ogg)
* Fixed MIME Types:
  * Adobe AIR application installer packages was missing a
    hyphen. https://github.com/halostatue/mime-types/issue/13
  * Types reported in mime-types/ruby-mime-types#12:
    * audio/x-pn-realaudio extension is .ra, not .rm.
* Resolved mime-types/ruby-mime-types#8. Apparently some
  people run the tests on Linux. Imagine that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants