From 0f1a303c63578f8cf48997e3d0a173ed7a0ed941 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 13 May 2011 13:59:39 -0500 Subject: [PATCH] Lock to mime types 1.15 --- linguist.gemspec | 2 +- test/test_mime.rb | 6 +++--- test/test_pathname.rb | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/linguist.gemspec b/linguist.gemspec index d9820324..2438c3af 100644 --- a/linguist.gemspec +++ b/linguist.gemspec @@ -3,5 +3,5 @@ Gem::Specification.new do |s| s.version = '0.0.1' s.summary = "GitHub Language detection" - s.add_dependency 'mime-types' + s.add_dependency 'mime-types', '1.15' end diff --git a/test/test_mime.rb b/test/test_mime.rb index 097cd87c..36ff5490 100644 --- a/test/test_mime.rb +++ b/test/test_mime.rb @@ -6,9 +6,9 @@ class TestMime < Test::Unit::TestCase include Linguist def test_lookup - assert_equal 'application/ruby', Mime.lookup(".rb") - assert_equal 'application/javascript', Mime.lookup(".js") - assert_equal 'application/python', Mime.lookup(".py") + assert_equal 'text/plain; charset=utf-8', Mime.lookup(".rb") + assert_equal 'text/plain; charset=utf-8', Mime.lookup(".js") + assert_equal 'text/plain; charset=utf-8', Mime.lookup(".py") assert_equal 'text/plain; charset=utf-8', Mime.lookup(".kt") assert_equal 'text/plain; charset=utf-8', Mime.lookup(".html") diff --git a/test/test_pathname.rb b/test/test_pathname.rb index 490f4260..c84931dc 100644 --- a/test/test_pathname.rb +++ b/test/test_pathname.rb @@ -52,14 +52,14 @@ class TestPathname < Test::Unit::TestCase end def test_mime_type - assert_equal 'application/ruby', Pathname.new("file.rb").mime_type - assert_equal 'application/javascript', Pathname.new("file.js").mime_type - assert_equal 'application/python', Pathname.new("itty.py").mime_type + assert_equal 'text/plain; charset=utf-8', Pathname.new("file.rb").mime_type + assert_equal 'text/plain; charset=utf-8', Pathname.new("file.js").mime_type + assert_equal 'text/plain; charset=utf-8', Pathname.new("itty.py").mime_type assert_equal 'text/plain; charset=utf-8', Pathname.new("defun.kt").mime_type end def test_media_type - assert_equal 'application', Pathname.new("file.js").media_type + assert_equal 'text', Pathname.new("file.js").media_type assert_equal 'text', Pathname.new("file.txt").media_type assert_equal 'text', Pathname.new("defun.kt").media_type end