# Generated from mime-types-1.25.1.gem by gem2rpm -*- rpm-spec -*- %define gemname mime-types %define version 1.25.1 %define release 5 %define onapp_version 3 %define release_extra %{?dist}.onapp.%{onapp_version} %global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) %global geminstdir %{gemdir}/gems/%{gemname}-%{version} %define rubyabi 2.0.0 Summary: This library allows for the identification of a file's likely MIME content type Name: rubygem-%{gemname} Version: %{version} Release: %{release}%{release_extra} Group: Development/Languages License: MIT and Artistic 2.0 and GPL-2 URL: http://mime-types.rubyforge.org/ Source0: https://rubygems.org/gems/%{gemname}-%{version}.gem Requires: ruby(abi) = %{rubyabi} Requires: ruby(rubygems) BuildRequires: ruby(abi) = %{rubyabi} BuildRequires: ruby(rubygems) BuildRequires: ruby BuildArch: noarch Provides: rubygem(%{gemname}) = %{version} %description This library allows for the identification of a file's likely MIME content 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. 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 of MIME::Types is around 12–25× faster than normal startup (on my system, normal startup is about 90 ms; lazy startup is about 4 ms). This isn't generally useful, however, as the MIME::Types database has not been loaded. Lazy startup and load is just *slightly* faster—around 1 ms. The real advantage comes from using the cache. To enable the cache, set the environment variable +RUBY_MIME_TYPES_CACHE+ to a filename where MIME::Types will have read-write access. The first time a new version of MIME::Types is run using this file, it will be created, taking a little longer than normal. Subsequent loads using the same cache file will be approximately 3½× faster (25 ms) than normal loads. This can be combined with +RUBY_MIME_TYPES_LAZY_LOAD+, but this is *not* recommended in a multithreaded or multiprocess environment where all threads or processes will be using the same cache file. As the caching interface is still experimental, the only values cached are the default MIME::Types database, not any custom MIME::Types added by users. MIME types are used in MIME-compliant communications, as in e-mail or HTTP traffic, to indicate the type of content which is transmitted. MIME::Types provides the ability for detailed information about MIME entities (provided as a set of MIME::Type objects) to be determined and used programmatically. There are many types defined by RFCs and vendors, so the list is long but not 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. 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/] ({ftp}[ftp://ftp.iana.org/assignments/media-types]) with some unofficial types added from the {LTSW collection}[http://www.ltsw.se/knbase/internet/mime.htp] and added by the users of MIME::Types. %package doc Summary: Documentation for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name} %prep %setup -q -c -T mkdir -p .%{gemdir} gem install --local --install-dir .%{gemdir} \ --force %{SOURCE0} %build %install mkdir -p %{buildroot}%{gemdir} cp -pa .%{gemdir}/* \ %{buildroot}%{gemdir}/ %files %dir %{geminstdir} #%{geminstdir}/lib %exclude %{gemdir}/cache/%{gemname}-%{version}.gem %{gemdir}/specifications/%{gemname}-%{version}.gemspec %{geminstdir}/.gemtest %{geminstdir}/.hoerc %{geminstdir}/.travis.yml %{geminstdir}/Contributing.rdoc %{geminstdir}/Gemfile %{geminstdir}/History.rdoc %{geminstdir}/Licence.rdoc %{geminstdir}/Manifest.txt %{geminstdir}/README.rdoc %{geminstdir}/Rakefile %{geminstdir}/docs/COPYING.txt %{geminstdir}/docs/artistic.txt %{geminstdir}/lib/mime-types.rb %{geminstdir}/lib/mime/types.rb %{geminstdir}/lib/mime/types/application %{geminstdir}/lib/mime/types/application.mac %{geminstdir}/lib/mime/types/application.nonstandard %{geminstdir}/lib/mime/types/application.obsolete %{geminstdir}/lib/mime/types/audio %{geminstdir}/lib/mime/types/audio.nonstandard %{geminstdir}/lib/mime/types/audio.obsolete %{geminstdir}/lib/mime/types/image %{geminstdir}/lib/mime/types/image.nonstandard %{geminstdir}/lib/mime/types/image.obsolete %{geminstdir}/lib/mime/types/message %{geminstdir}/lib/mime/types/message.obsolete %{geminstdir}/lib/mime/types/model %{geminstdir}/lib/mime/types/multipart %{geminstdir}/lib/mime/types/multipart.nonstandard %{geminstdir}/lib/mime/types/multipart.obsolete %{geminstdir}/lib/mime/types/other.nonstandard %{geminstdir}/lib/mime/types/text %{geminstdir}/lib/mime/types/text.nonstandard %{geminstdir}/lib/mime/types/text.obsolete %{geminstdir}/lib/mime/types/text.vms %{geminstdir}/lib/mime/types/video %{geminstdir}/lib/mime/types/video.nonstandard %{geminstdir}/lib/mime/types/video.obsolete %{geminstdir}/test/test_mime_type.rb %{geminstdir}/test/test_mime_types.rb %{geminstdir}/test/test_mime_types_cache.rb %{geminstdir}/test/test_mime_types_lazy.rb %files doc %doc %{gemdir}/doc/%{gemname}-%{version} %doc %{geminstdir}/Contributing.rdoc %doc %{geminstdir}/History.rdoc %doc %{geminstdir}/Licence.rdoc %doc %{geminstdir}/Manifest.txt %doc %{geminstdir}/README.rdoc %doc %{geminstdir}/docs/COPYING.txt %doc %{geminstdir}/docs/artistic.txt %changelog * Wed Mar 05 2014 Yuriy Kohut - 1.25.1-1 - Initial package