diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3750c35 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/i18n-0.7.0.gem diff --git a/.rh-ror42-rubygem-i18n.metadata b/.rh-ror42-rubygem-i18n.metadata new file mode 100644 index 0000000..5ba1b9d --- /dev/null +++ b/.rh-ror42-rubygem-i18n.metadata @@ -0,0 +1 @@ +0ae0e0757fb8bccb9b0516aa90534c194936441c SOURCES/i18n-0.7.0.gem diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/rubygem-i18n-0.7.0-Ignore-metadata-for-frozen-classes.patch b/SOURCES/rubygem-i18n-0.7.0-Ignore-metadata-for-frozen-classes.patch new file mode 100644 index 0000000..6f18637 --- /dev/null +++ b/SOURCES/rubygem-i18n-0.7.0-Ignore-metadata-for-frozen-classes.patch @@ -0,0 +1,34 @@ +From bbbdedc0c78ec941a84d161d5c610a358310cf99 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 20 Jan 2015 14:34:44 +0100 +Subject: [PATCH] Ignore metadata for frozen classes. + +--- + lib/i18n/backend/metadata.rb | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/lib/i18n/backend/metadata.rb b/lib/i18n/backend/metadata.rb +index 52c0a29..a8d922a 100644 +--- a/lib/i18n/backend/metadata.rb ++++ b/lib/i18n/backend/metadata.rb +@@ -21,11 +21,15 @@ module I18n + def included(base) + Object.class_eval do + def translation_metadata +- @translation_metadata ||= {} ++ unless self.frozen? ++ @translation_metadata ||= {} ++ else ++ {} ++ end + end + + def translation_metadata=(translation_metadata) +- @translation_metadata = translation_metadata ++ @translation_metadata = translation_metadata unless self.frozen? + end + end unless Object.method_defined?(:translation_metadata) + end +-- +2.1.0 + diff --git a/SPECS/rubygem-i18n.spec b/SPECS/rubygem-i18n.spec new file mode 100644 index 0000000..859431a --- /dev/null +++ b/SPECS/rubygem-i18n.spec @@ -0,0 +1,159 @@ +%{?scl:%scl_package rubygem-%{gem_name}} +%{!?scl:%global pkg_name %{name}} + +%global gem_name i18n + +Summary: New wave Internationalization support for Ruby +Name: %{?scl_prefix}rubygem-%{gem_name} +Version: 0.7.0 +Release: 4%{?dist} +Group: Development/Languages +License: MIT and (BSD or Ruby) +URL: http://github.com/svenfuchs/i18n +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +# Fixes Ruby 2.2 test failures related to frozen objects. +# https://github.com/svenfuchs/i18n/pull/305 +Patch0: rubygem-i18n-0.7.0-Ignore-metadata-for-frozen-classes.patch + +Requires: %{?scl_prefix_ruby}ruby(rubygems) +Requires: %{?scl_prefix_ruby}ruby(release) +BuildRequires: %{?scl_prefix_ruby}ruby +BuildRequires: %{?scl_prefix_ruby}ruby(release) +BuildRequires: %{?scl_prefix_ruby}rubygems-devel +BuildRequires: %{?scl_prefix_ruby}rubygem(minitest) +BuildRequires: %{?scl_prefix}rubygem(mocha) +BuildRequires: %{?scl_prefix}rubygem(test_declarative) +BuildArch: noarch +Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version} + +%description +Ruby Internationalization and localization solution. + +%package doc +Summary: Documentation for %{pkg_name} +Group: Documentation +Requires:%{?scl_prefix}%{pkg_name} = %{version}-%{release} + +%description doc +Documentation for %{pkg_name}. + +%prep +%{?scl:scl enable %{scl} - << \EOF} +gem unpack %{SOURCE0} +%{?scl:EOF} +%setup -q -D -T -n %{gem_name}-%{version} +%{?scl:scl enable %{scl} - << \EOF} +gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec +%{?scl:EOF} + +%patch0 -p1 + +%build +%{?scl:scl enable %{scl} - << \EOF} +gem build %{gem_name}.gemspec +%gem_install +%{?scl:EOF} + + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +%check +pushd .%{gem_instdir} + +# Bundler just complicates everything in our case, remove it. +sed -i -e "/require 'bundler\/setup'/ s/^/#/" test/test_helper.rb + +# Tests are failing without LANG environment is set. +# https://github.com/svenfuchs/i18n/issues/115 + +%{?scl:scl enable %{scl} - << \EOF} +LANG=en_US.utf8 ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)' +%{?scl:EOF} +popd + +%files +%dir %{gem_instdir} +%{gem_libdir} +%doc %{gem_instdir}/README.md +%doc %{gem_instdir}/MIT-LICENSE +%{gem_cache} +%{gem_spec} + +%files doc +%{gem_instdir}/test +%{gem_instdir}/gemfiles +%doc %{gem_docdir} + +%changelog +* Sat Feb 20 2016 Pavel Valena - 0.7.0-4 +- Add scl macros + +* Thu Feb 04 2016 Fedora Release Engineering - 0.7.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jun 18 2015 Fedora Release Engineering - 0.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Jan 20 2015 Vít Ondruch - 0.7.0-1 +- Update to i18n 0.7.0. + +* Tue Jul 22 2014 Josef Stribny - 0.6.11-1 +- Update to i18n 0.6.11 + +* Wed Jun 18 2014 Josef Stribny - 0.6.9-4 +- Fix test suite compatibility with minitest 5 + +* Sun Jun 08 2014 Fedora Release Engineering - 0.6.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Feb 04 2014 Josef Stribny - 0.6.9-2 +- Fix license: Ruby is now licensed under BSD or Ruby + +* Mon Dec 09 2013 Vít Ondruch - 0.6.9-1 +- Update to i18n 0.6.9. + - Fix CVE-2013-4491. + +* Sun Aug 04 2013 Fedora Release Engineering - 0.6.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jul 24 2013 Josef Stribny - 0.6.4-1 +- Update to i18n 0.6.4. + +* Tue Feb 26 2013 Vít Ondruch - 0.6.1-3 +- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 + +* Thu Feb 14 2013 Fedora Release Engineering - 0.6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Oct 26 2012 Vít Ondruch - 0.6.1-1 +- Update to I18n 0.6.1. + +* Wed Jul 18 2012 Bohuslav Kabrda - 0.6.0-1 +- Update to I18n 0.6.0. +- Removed unneeded %%defattr usage. + +* Thu Jan 19 2012 Vít Ondruch - 0.5.0-3 +- Rebuilt for Ruby 1.9.3. +- Enabled test suite. + +* Sat Jan 14 2012 Fedora Release Engineering - 0.5.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Thu Mar 24 2011 Vít Ondruch - 0.5.0-1 +- Update to i18n 0.5.0. +- Documentation moved into subpackage. +- Removed unnecessary cleanup. +- Preparetion for test suite execution during build. + +* Wed Feb 09 2011 Fedora Release Engineering - 0.4.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Nov 18 2010 Jozef Zigmund - 0.4.2-2 +- Add GPLv2 or Ruby License +- Files MIT-LICENSE, geminstdir/lib/i18n.rb are non executable now + +* Thu Nov 11 2010 Jozef Zigmund - 0.4.2-1 +- Initial package