mime-types 1.17.1 → 1.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,7 @@
1
+ == MIME::Types 1.17.2 / 2011-10-25
2
+ * Bug Fixes:
3
+ * Fixed an issue with Ruby 1.9 and file encoding.
4
+
1
5
  == MIME::Types 1.17.1 / 2011-10-23
2
6
  * Minor Enhancements:
3
7
  * Implemented modern 'hoe' semantics.
@@ -3,7 +3,7 @@
3
3
  == Description
4
4
 
5
5
  This library allows for the identification of a file's likely MIME content
6
- type. This is release 1.17.1. The identification of MIME content type is based
6
+ type. This is release 1.17.2. The identification of MIME content type is based
7
7
  on a file's filename extensions.
8
8
 
9
9
  MIME::Types for Ruby originally based on and synchronized with MIME::Types for
@@ -1,4 +1,4 @@
1
- # -*- ruby encoding: utf-8
1
+ # -*- ruby encoding: utf-8 -*-
2
2
 
3
3
  # The namespace for MIME applications, tools, and libraries.
4
4
  module MIME
@@ -24,7 +24,7 @@ module MIME
24
24
  # puts MIME::Type.simplified('x-appl/x-zip') # => 'appl/zip'
25
25
  #
26
26
  class Type
27
- VERSION = '1.17.1'
27
+ VERSION = '1.17.2'
28
28
 
29
29
  include Comparable
30
30
 
@@ -566,7 +566,7 @@ module MIME
566
566
  # = Author
567
567
  # Copyright:: Copyright (c) 2002 - 2009 by Austin Ziegler
568
568
  # <austin@rubyforge.org>
569
- # Version:: 1.17.1
569
+ # Version:: 1.17.2
570
570
  # Based On:: Perl
571
571
  # MIME::Types[http://search.cpan.org/author/MARKOV/MIME-Types-1.27/MIME/Types.pm],
572
572
  # Copyright (c) 2001 - 2009 by Mark Overmeer
@@ -577,7 +577,7 @@ module MIME
577
577
  #
578
578
  class Types
579
579
  # The released version of Ruby MIME::Types
580
- VERSION = '1.17.1'
580
+ VERSION = '1.17.2'
581
581
 
582
582
  # The data version.
583
583
  attr_reader :data_version
@@ -752,7 +752,12 @@ module MIME
752
752
  # more information that's available, though, the richer the values that can
753
753
  # be provided.
754
754
  def load_from_file(filename) #:nodoc:
755
- data = File.open(filename) { |f| f.read }.split($/)
755
+ if defined? ::Encoding
756
+ data = File.open(filename, 'r:UTF-8') { |f| f.read }
757
+ else
758
+ data = File.open(filename) { |f| f.read }
759
+ end
760
+ data = data.split($/)
756
761
  mime = MIME::Types.new
757
762
  data.each_with_index { |line, index|
758
763
  item = line.chomp.strip.gsub(%r{#.*}o, '')
@@ -2,12 +2,12 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "mime-types"
5
- s.version = "1.17.1"
5
+ s.version = "1.17.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Austin Ziegler"]
9
- s.date = "2011-10-24"
10
- s.description = "This library allows for the identification of a file's likely MIME content\ntype. This is release 1.17.1. The identification of MIME content type is based\non a file's filename extensions.\n\nMIME::Types for Ruby originally based on and synchronized with MIME::Types for\nPerl by Mark Overmeer, copyright 2001 - 2009. As of version 1.15, the data\nformat for the MIME::Type list has changed and the synchronization will no\nlonger happen.\n\nHomepage:: http://mime-types.rubyforge.org/\nGitHub:: http://github.com/halostatue/mime-types/\nCopyright:: 2002 - 2011, Austin Ziegler\n Based in part on prior work copyright Mark Overmeer\n\n:include: License.rdoc"
9
+ s.date = "2011-10-25"
10
+ s.description = "This library allows for the identification of a file's likely MIME content\ntype. This is release 1.17.2. The identification of MIME content type is based\non a file's filename extensions.\n\nMIME::Types for Ruby originally based on and synchronized with MIME::Types for\nPerl by Mark Overmeer, copyright 2001 - 2009. As of version 1.15, the data\nformat for the MIME::Type list has changed and the synchronization will no\nlonger happen.\n\nHomepage:: http://mime-types.rubyforge.org/\nGitHub:: http://github.com/halostatue/mime-types/\nCopyright:: 2002 - 2011, Austin Ziegler\n Based in part on prior work copyright Mark Overmeer\n\n:include: License.rdoc"
11
11
  s.email = ["austin@rubyforge.org"]
12
12
  s.extra_rdoc_files = ["Manifest.txt", "type-lists/application.txt", "type-lists/audio.txt", "type-lists/image.txt", "type-lists/message.txt", "type-lists/model.txt", "type-lists/multipart.txt", "type-lists/text.txt", "type-lists/video.txt", "History.rdoc", "License.rdoc", "README.rdoc"]
13
13
  s.files = [".hoerc", "History.rdoc", "Licence.rdoc", "Manifest.txt", "README.rdoc", "Rakefile", "lib/mime/types.rb", "lib/mime/types/application", "lib/mime/types/application.mac", "lib/mime/types/application.nonstandard", "lib/mime/types/application.obsolete", "lib/mime/types/audio", "lib/mime/types/audio.nonstandard", "lib/mime/types/audio.obsolete", "lib/mime/types/image", "lib/mime/types/image.nonstandard", "lib/mime/types/image.obsolete", "lib/mime/types/message", "lib/mime/types/message.obsolete", "lib/mime/types/model", "lib/mime/types/multipart", "lib/mime/types/multipart.nonstandard", "lib/mime/types/multipart.obsolete", "lib/mime/types/other.nonstandard", "lib/mime/types/text", "lib/mime/types/text.nonstandard", "lib/mime/types/text.obsolete", "lib/mime/types/text.vms", "lib/mime/types/video", "lib/mime/types/video.nonstandard", "lib/mime/types/video.obsolete", "mime-types.gemspec", "test/test_mime_type.rb", "test/test_mime_types.rb", "type-lists/application.txt", "type-lists/audio.txt", "type-lists/image.txt", "type-lists/message.txt", "type-lists/model.txt", "type-lists/multipart.txt", "type-lists/text.txt", "type-lists/video.txt", "License.rdoc", ".gemtest"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mime-types
3
3
  version: !ruby/object:Gem::Version
4
- hash: 81
4
+ hash: 87
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 17
9
- - 1
10
- version: 1.17.1
9
+ - 2
10
+ version: 1.17.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Austin Ziegler
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-24 00:00:00 Z
18
+ date: 2011-10-26 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rubyforge
@@ -156,7 +156,7 @@ dependencies:
156
156
  version_requirements: *id009
157
157
  description: |-
158
158
  This library allows for the identification of a file's likely MIME content
159
- type. This is release 1.17.1. The identification of MIME content type is based
159
+ type. This is release 1.17.2. The identification of MIME content type is based
160
160
  on a file's filename extensions.
161
161
 
162
162
  MIME::Types for Ruby originally based on and synchronized with MIME::Types for