summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Ziegler <austin@zieglers.ca>2013-11-24 17:55:49 -0500
committerAustin Ziegler <austin@zieglers.ca>2013-11-24 17:57:57 -0500
commit6be836f59a041893cfc1c25668b3aa3552a7e334 (patch)
tree88975c38f276e5105dd1e123affe85c1eee104f1
parentade226b48b6f7f4be5c72c33924f771365b00203 (diff)
downloadgit-v1-bug-fixes.tar.gz
Resolve issue #47: undefined method zero?v1.25.1v1-bug-fixes
-rw-r--r--History.rdoc7
-rw-r--r--README.rdoc19
-rw-r--r--lib/mime/types.rb8
-rw-r--r--mime-types.gemspec6
4 files changed, 25 insertions, 15 deletions
diff --git a/History.rdoc b/History.rdoc
index 84e8840418..8c6e8294df 100644
--- a/History.rdoc
+++ b/History.rdoc
@@ -1,3 +1,10 @@
+== 1.25.1 / 201-11-24
+
+* Bugs:
+ * Fix an issue with priority comparison in the 1.x release series. Found by
+ sdbondi. This issue does not exist in the 2.x release series.
+ https://github.com/halostatue/mime-types/issues/47
+
== 1.25 / 2013-08-30
* New Features:
diff --git a/README.rdoc b/README.rdoc
index 4d3620a0ce..54fbc55da7 100644
--- a/README.rdoc
+++ b/README.rdoc
@@ -10,14 +10,16 @@ continuous integration :: {<img src="https://travis-ci.org/halostatue/mime-types
== Description
This library allows for the identification of a file's likely MIME content
-type. This is release 1.25, adding experimental caching and lazy loading
-functionality.
+type. This is release 1.25.1, fixing an issue with priority comparison for
+mime-types 1.x. The current release is 2.0, which only supports Ruby 1.9 or
+later.
-The caching and lazy loading features were initially implemented by Greg
-Brockman (gdb). As these features are experimental, they are disabled by
-default and must be enabled through the use of environment variables. The cache
-is invalidated on a per-version basis; the cache for version 1.25 will not be
-reused for version 1.26.
+Release 1.25.1 contains all features of 1.25, including the experimental
+caching and lazy loading functionality. The caching and lazy loading features
+were initially implemented by Greg Brockman (gdb). As these features are
+experimental, they are disabled by default and must be enabled through the use
+of environment variables. The cache is invalidated on a per-version basis; the
+cache for version 1.25 will not be reused for any later version.
To use lazy loading, set the environment variable +RUBY_MIME_TYPES_LAZY_LOAD+
to any value other than 'false'. When using lazy loading, the initial startup
@@ -48,8 +50,7 @@ complete; don't hesitate to ask to add additional information. This library
follows the IANA collection of MIME types (see below for reference).
MIME::Types for Ruby was originally based on MIME::Types for Perl by Mark
-Overmeer, copyright 2001 - 2009. As of version 1.15, the data format for the
-MIME::Type list has changed and the synchronization will no longer happen.
+Overmeer, copyright 2001 - 2009.
MIME::Types is built to conform to the MIME types of RFCs 2045 and 2231. It
tracks the {IANA registry}[http://www.iana.org/assignments/media-types/]
diff --git a/lib/mime/types.rb b/lib/mime/types.rb
index 40d299f71f..876300cb8f 100644
--- a/lib/mime/types.rb
+++ b/lib/mime/types.rb
@@ -33,7 +33,7 @@ module MIME
#
class Type
# The released version of Ruby MIME::Types
- VERSION = '1.25'
+ VERSION = '1.25.1'
include Comparable
@@ -97,9 +97,11 @@ module MIME
elsif platform? != other.platform?
platform? ? 1 : -1 # generic < platform
elsif complete? != other.complete?
- pc = complete? ? -1 : 1 # complete < incomplete
+ complete? ? -1 : 1 # complete < incomplete
elsif obsolete? != other.obsolete?
- pc = obsolete? ? 1 : -1 # current < obsolete
+ obsolete? ? 1 : -1 # current < obsolete
+ else
+ 0
end
if pc.zero? and obsolete? and (use_instead != other.use_instead)
diff --git a/mime-types.gemspec b/mime-types.gemspec
index 0ec3dd8314..23a6800d92 100644
--- a/mime-types.gemspec
+++ b/mime-types.gemspec
@@ -2,12 +2,12 @@
Gem::Specification.new do |s|
s.name = "mime-types"
- s.version = "1.25"
+ s.version = "1.25.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Austin Ziegler"]
- s.date = "2013-08-30"
- s.description = "This library allows for the identification of a file's likely MIME content\ntype. This is release 1.25, adding experimental caching and lazy loading\nfunctionality.\n\nThe caching and lazy loading features were initially implemented by Greg\nBrockman (gdb). As these features are experimental, they are disabled by\ndefault and must be enabled through the use of environment variables. The cache\nis invalidated on a per-version basis; the cache for version 1.25 will not be\nreused for version 1.26.\n\nTo use lazy loading, set the environment variable +RUBY_MIME_TYPES_LAZY_LOAD+\nto any value other than 'false'. When using lazy loading, the initial startup\nof MIME::Types is around 12\u{2013}25\u{d7} faster than normal startup (on my system,\nnormal startup is about 90 ms; lazy startup is about 4 ms). This isn't\ngenerally useful, however, as the MIME::Types database has not been loaded.\nLazy startup and load is just *slightly* faster\u{2014}around 1 ms. The real advantage\ncomes from using the cache.\n\nTo enable the cache, set the environment variable +RUBY_MIME_TYPES_CACHE+ to a\nfilename where MIME::Types will have read-write access. The first time a new\nversion of MIME::Types is run using this file, it will be created, taking a\nlittle longer than normal. Subsequent loads using the same cache file will be\napproximately 3\u{bd}\u{d7} faster (25 ms) than normal loads. This can be combined with\n+RUBY_MIME_TYPES_LAZY_LOAD+, but this is *not* recommended in a multithreaded\nor multiprocess environment where all threads or processes will be using the\nsame cache file.\n\nAs the caching interface is still experimental, the only values cached are the\ndefault MIME::Types database, not any custom MIME::Types added by users.\n\nMIME types are used in MIME-compliant communications, as in e-mail or HTTP\ntraffic, to indicate the type of content which is transmitted. MIME::Types\nprovides the ability for detailed information about MIME entities (provided as\na set of MIME::Type objects) to be determined and used programmatically. There\nare many types defined by RFCs and vendors, so the list is long but not\ncomplete; don't hesitate to ask to add additional information. This library\nfollows the IANA collection of MIME types (see below for reference).\n\nMIME::Types for Ruby was originally based on MIME::Types for Perl by Mark\nOvermeer, copyright 2001 - 2009. As of version 1.15, the data format for the\nMIME::Type list has changed and the synchronization will no longer happen.\n\nMIME::Types is built to conform to the MIME types of RFCs 2045 and 2231. It\ntracks the {IANA registry}[http://www.iana.org/assignments/media-types/]\n({ftp}[ftp://ftp.iana.org/assignments/media-types]) with some unofficial types\nadded from the {LTSW collection}[http://www.ltsw.se/knbase/internet/mime.htp]\nand added by the users of MIME::Types."
+ s.date = "2013-11-24"
+ s.description = "This library allows for the identification of a file's likely MIME content\ntype. This is release 1.25.1, fixing an issue with priority comparison for\nmime-types 1.x. The current release is 2.0, which only supports Ruby 1.9 or\nlater.\n\nRelease 1.25.1 contains all features of 1.25, including the experimental\ncaching and lazy loading functionality. The caching and lazy loading features\nwere initially implemented by Greg Brockman (gdb). As these features are\nexperimental, they are disabled by default and must be enabled through the use\nof environment variables. The cache is invalidated on a per-version basis; the\ncache for version 1.25 will not be reused for any later version.\n\nTo use lazy loading, set the environment variable +RUBY_MIME_TYPES_LAZY_LOAD+\nto any value other than 'false'. When using lazy loading, the initial startup\nof MIME::Types is around 12\u{2013}25\u{d7} faster than normal startup (on my system,\nnormal startup is about 90 ms; lazy startup is about 4 ms). This isn't\ngenerally useful, however, as the MIME::Types database has not been loaded.\nLazy startup and load is just *slightly* faster\u{2014}around 1 ms. The real advantage\ncomes from using the cache.\n\nTo enable the cache, set the environment variable +RUBY_MIME_TYPES_CACHE+ to a\nfilename where MIME::Types will have read-write access. The first time a new\nversion of MIME::Types is run using this file, it will be created, taking a\nlittle longer than normal. Subsequent loads using the same cache file will be\napproximately 3\u{bd}\u{d7} faster (25 ms) than normal loads. This can be combined with\n+RUBY_MIME_TYPES_LAZY_LOAD+, but this is *not* recommended in a multithreaded\nor multiprocess environment where all threads or processes will be using the\nsame cache file.\n\nAs the caching interface is still experimental, the only values cached are the\ndefault MIME::Types database, not any custom MIME::Types added by users.\n\nMIME types are used in MIME-compliant communications, as in e-mail or HTTP\ntraffic, to indicate the type of content which is transmitted. MIME::Types\nprovides the ability for detailed information about MIME entities (provided as\na set of MIME::Type objects) to be determined and used programmatically. There\nare many types defined by RFCs and vendors, so the list is long but not\ncomplete; don't hesitate to ask to add additional information. This library\nfollows the IANA collection of MIME types (see below for reference).\n\nMIME::Types for Ruby was originally based on MIME::Types for Perl by Mark\nOvermeer, copyright 2001 - 2009.\n\nMIME::Types is built to conform to the MIME types of RFCs 2045 and 2231. It\ntracks the {IANA registry}[http://www.iana.org/assignments/media-types/]\n({ftp}[ftp://ftp.iana.org/assignments/media-types]) with some unofficial types\nadded from the {LTSW collection}[http://www.ltsw.se/knbase/internet/mime.htp]\nand added by the users of MIME::Types."
s.email = ["austin@rubyforge.org"]
s.extra_rdoc_files = ["Contributing.rdoc", "History.rdoc", "Licence.rdoc", "Manifest.txt", "README.rdoc", "docs/COPYING.txt", "docs/artistic.txt", "Contributing.rdoc", "History.rdoc", "Licence.rdoc", "README.rdoc"]
s.files = [".gemtest", ".hoerc", ".travis.yml", "Contributing.rdoc", "Gemfile", "History.rdoc", "Licence.rdoc", "Manifest.txt", "README.rdoc", "Rakefile", "docs/COPYING.txt", "docs/artistic.txt", "lib/mime-types.rb", "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", "test/test_mime_type.rb", "test/test_mime_types.rb", "test/test_mime_types_cache.rb", "test/test_mime_types_lazy.rb"]