aca84e7
# Generated from mime-types-1.16.gem by gem2rpm -*- rpm-spec -*-
e976bd3
%global gem_name mime-types
aca84e7
aca84e7
0400784
Summary: The mime-types library provides a library
e976bd3
Name: rubygem-%{gem_name}
fc1470c
Version: 3.3.1
d736d4d
Release: 2%{?dist}
0400784
License: MIT
0400784
URL: https://github.com/mime-types/ruby-mime-types/
78ce898
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
e976bd3
BuildRequires: rubygems-devel
6b1bdc5
BuildRequires: ruby(release)
0400784
BuildRequires: ruby >= 2.0
0400784
BuildRequires: rubygem(mime-types-data)
e976bd3
BuildRequires: rubygem(minitest)
aca84e7
BuildArch: noarch
aca84e7
aca84e7
%description
0400784
The mime-types library provides a library and registry for information about
0400784
MIME content type definitions. It can be used to determine defined filename
0400784
extensions for MIME types, or to use filename extensions to look up the likely
0400784
MIME type definitions.
0400784
Version 3.0 is a major release that requires Ruby 2.0 compatibility and
e2bb527
removes deprecated functions. The columnar registry format introduced
e2bb527
in 2.6 has been made the primary format; the registry data has been
e2bb527
extracted from this library and put into {mime-types-data}[https://github.com/mime-types/mime-types-data].
0400784
Additionally, mime-types is now licensed exclusively under the MIT licence and
0400784
there is a code of conduct in effect. There are a number of other smaller
0400784
changes described in the History file.
aca84e7
aca84e7
%package doc
aca84e7
Summary: Documentation for %{name}
aca84e7
aca84e7
Requires: %{name} = %{version}-%{release}
aca84e7
aca84e7
%description doc
aca84e7
This package contains documentation for %{name}.
aca84e7
aca84e7
%prep
aca84e7
%setup -q -c -T
aca84e7
6b1bdc5
%gem_install -n %{SOURCE0}
aca84e7
aca84e7
%build
aca84e7
aca84e7
%install
e976bd3
mkdir -p %{buildroot}%{gem_dir}
e976bd3
cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/
aca84e7
aca84e7
# These aren't executables
e976bd3
find %{buildroot}%{gem_instdir}/{Rakefile,test} -type f | \
aca84e7
  xargs -n 1 sed -i  -e '/^#! \/usr\/bin\/env .*/d'
aca84e7
aca84e7
%check
e976bd3
pushd .%{gem_instdir}
0400784
0400784
# We don't have these rubygem packages in Fedora yet.
e2bb527
sed -i -e '/^require..minitest-bonus-assertions.$/ s/^/#/' \
e2bb527
    -e '/^require..minitest\/hooks.$/ s/^/#/' \
e2bb527
    -e '/^require..minitest\/focus.$/ s/^/#/' \
e2bb527
    -e '/^require..minitest\/rg.$/ s/^/#/' \
e2bb527
    -e '/^require..fivemat\/minitest\/autorun.$/ s/^/#/' \
e2bb527
  test/minitest_helper.rb
0400784
0400784
# Add assert_has_keys manually not to load minitest-bonus-assertions.
0400784
# https://github.com/halostatue/minitest-bonus-assertions/blob/v2.0/lib/minitest-bonus-assertions.rb#L53-57
0400784
cat << EOF >> test/minitest_helper.rb
0400784
0400784
def assert_has_keys obj, keys, msg = nil
0400784
  keys = [ keys ] unless keys.kind_of?(Array)
0400784
  keys.all? { |key| assert obj.key?(key) }
0400784
end
0400784
EOF
0400784
0400784
# We don't have minitest-hooks in Fedora yet.
0400784
mv test/test_mime_types_cache.rb{,.disable}
0400784
0400784
ruby -Ilib:test -rminitest/autorun -e 'Dir.glob "./test/**/test_*.rb", &method(:require)'
0400784
e976bd3
popd
aca84e7
aca84e7
%files
e2bb527
%license %{gem_instdir}/Licence.md
e976bd3
%dir %{gem_instdir}
a788b4c
%exclude %{gem_instdir}/.*
e976bd3
%{gem_libdir}
a788b4c
%exclude %{gem_cache}
e976bd3
%{gem_spec}
aca84e7
aca84e7
%files doc
e2bb527
%doc %{gem_instdir}/Code-of-Conduct.md
e2bb527
%doc %{gem_instdir}/Contributing.md
e2bb527
%doc %{gem_instdir}/History.md
0400784
%doc %{gem_instdir}/README.rdoc
e976bd3
%{gem_instdir}/Rakefile
e976bd3
%{gem_instdir}/Manifest.txt
e976bd3
%{gem_instdir}/test
0400784
%doc %{gem_docdir}
aca84e7
aca84e7
%changelog
d736d4d
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-2
d736d4d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
d736d4d
fc1470c
* Mon Feb 03 2020 Pavel Valena <pvalena@redhat.com> - 3.3.1-1
fc1470c
- Update to mime-types 3.3.1.
fc1470c
494a600
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-2
494a600
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
494a600
e2bb527
* Tue Jul 23 2019 Pavel Valena <pvalena@redhat.com> - 3.2.2-1
e2bb527
- Update to mime-types 3.2.2.
e2bb527
d42ddd8
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-6
d42ddd8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
d42ddd8
2ddb127
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-5
2ddb127
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
2ddb127
5dbf628
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-4
5dbf628
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
5dbf628
dbc05e2
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-3
dbc05e2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
dbc05e2
b3a7c9a
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-2
b3a7c9a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
b3a7c9a
0400784
* Thu Jul 14 2016 Jun Aruga <jaruga@redhat.com> - 3.1-1
0400784
- Update to mime-types 3.1.
0400784
8d0dcc3
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.25.1-3
8d0dcc3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
8d0dcc3
c71ef26
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.1-2
c71ef26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
c71ef26
78ce898
* Mon Jun 16 2014 Vít Ondruch <vondruch@redhat.com> - 1.25.1-1
78ce898
- Update to mime-types 1.25.1.
78ce898
7388f51
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.19-5
7388f51
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
7388f51
64568e8
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.19-4
64568e8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
64568e8
6b1bdc5
* Thu Feb 28 2013 Vít Ondruch <vondruch@redhat.com> - 1.19-3
6b1bdc5
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
6b1bdc5
bfd3bdb
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.19-2
bfd3bdb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
bfd3bdb
a788b4c
* Fri Oct 26 2012 Vít Ondruch <vondruch@redhat.com> - 1.19-1
a788b4c
- Update to mime-types 1.19.
a788b4c
9abcf06
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.16-8
9abcf06
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
9abcf06
e976bd3
* Tue Jan 31 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.16-7
e976bd3
- Rebuilt for Ruby 1.9.3.
e976bd3
5040f3a
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.16-6
5040f3a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
5040f3a
e00a68e
* Mon Aug 08 2011 Mo Morsi <mmorsi@redhat.com> - 1.16-5
e00a68e
- Replace BR(check) with BR
e00a68e
ee86e86
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
ee86e86
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
ee86e86
aca84e7
* Wed Dec 30 2009 Matthew Kent <mkent@magoazul.com> - 1.16-3
aca84e7
- Remove needless rcov task in Rakefile causing issue (#544964).
aca84e7
aca84e7
* Sun Dec 27 2009 Matthew Kent <mkent@magoazul.com> - 1.16-2
aca84e7
- Fix license (#544964).
aca84e7
- Add note about rcov warning in test phase (#544964).
aca84e7
aca84e7
* Sun Dec 06 2009 Matthew Kent <mkent@magoazul.com> - 1.16-1
aca84e7
- Initial package