Update to mime-types 3.1.

epel9
Vít Ondruch 9 years ago
parent 8d0dcc3c7f
commit 040078442d

1
.gitignore vendored

@ -1,3 +1,4 @@
mime-types-1.16.gem
/mime-types-1.19.gem
/mime-types-1.25.1.gem
/mime-types-3.1.gem

@ -2,27 +2,35 @@
%global gem_name mime-types
Summary: Return the MIME Content-Type for a given filename
Summary: The mime-types library provides a library
Name: rubygem-%{gem_name}
Version: 1.25.1
Release: 3%{?dist}
Version: 3.1
Release: 1%{?dist}
Group: Development/Languages
License: GPL+ or Ruby or Artistic
URL: http://mime-types.rubyforge.org/
License: MIT
URL: https://github.com/mime-types/ruby-mime-types/
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
BuildRequires: rubygems-devel
BuildRequires: ruby(release)
BuildRequires: ruby >= 2.0
BuildRequires: rubygem(mime-types-data)
BuildRequires: rubygem(minitest)
BuildArch: noarch
%description
MIME::Types for Ruby manages a MIME Content-Type database that will return the
Content-Type for a given filename.
MIME::Types was originally based on and synchronized with 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.
The mime-types library provides a library and registry for information about
MIME content type definitions. It can be used to determine defined filename
extensions for MIME types, or to use filename extensions to look up the likely
MIME type definitions.
Version 3.0 is a major release that requires Ruby 2.0 compatibility and
removes
deprecated functions. The columnar registry format introduced in 2.6 has been
made the primary format; the registry data has been extracted from this
library
and put into {mime-types-data}[https://github.com/mime-types/mime-types-data].
Additionally, mime-types is now licensed exclusively under the MIT licence and
there is a code of conduct in effect. There are a number of other smaller
changes described in the History file.
%package doc
Summary: Documentation for %{name}
@ -51,16 +59,29 @@ find %{buildroot}%{gem_instdir}/{Rakefile,test} -type f | \
%check
pushd .%{gem_instdir}
ruby -Ilib -rminitest/autorun -rfileutils -e 'Dir.glob "./test/**/test_*.rb", &method(:require)'
# We don't have these rubygem packages in Fedora yet.
sed -i '7,11s/^/#/' test/minitest_helper.rb
# Add assert_has_keys manually not to load minitest-bonus-assertions.
# https://github.com/halostatue/minitest-bonus-assertions/blob/v2.0/lib/minitest-bonus-assertions.rb#L53-57
cat << EOF >> test/minitest_helper.rb
def assert_has_keys obj, keys, msg = nil
keys = [ keys ] unless keys.kind_of?(Array)
keys.all? { |key| assert obj.key?(key) }
end
EOF
# We don't have minitest-hooks in Fedora yet.
mv test/test_mime_types_cache.rb{,.disable}
ruby -Ilib:test -rminitest/autorun -e 'Dir.glob "./test/**/test_*.rb", &method(:require)'
popd
%files
%doc %{gem_instdir}/History.rdoc
%doc %{gem_instdir}/Licence.rdoc
%dir %{gem_instdir}/docs
%doc %{gem_instdir}/docs/COPYING.txt
%doc %{gem_instdir}/docs/artistic.txt
%doc %{gem_instdir}/README.rdoc
%license %{gem_instdir}/Licence.rdoc
%dir %{gem_instdir}
%exclude %{gem_instdir}/.*
%{gem_libdir}
@ -68,14 +89,19 @@ popd
%{gem_spec}
%files doc
%doc %{gem_instdir}/Code-of-Conduct.rdoc
%doc %{gem_instdir}/Contributing.rdoc
%{gem_instdir}/Gemfile
%doc %{gem_instdir}/History.rdoc
%doc %{gem_instdir}/README.rdoc
%{gem_instdir}/Rakefile
%{gem_instdir}/Manifest.txt
%{gem_instdir}/test
%{gem_docdir}
%doc %{gem_docdir}
%changelog
* Thu Jul 14 2016 Jun Aruga <jaruga@redhat.com> - 3.1-1
- Update to mime-types 3.1.
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.25.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

@ -1 +1 @@
54a5c6e16bd0992345f8da6489773167 mime-types-1.25.1.gem
d81cae43778c88988ee8b3cedc03bc84 mime-types-3.1.gem

Loading…
Cancel
Save