Update to i18n 0.6.11

f38
Josef Stribny 11 years ago
parent ea2f85a834
commit 4684e6183d

1
.gitignore vendored

@ -4,3 +4,4 @@
/i18n-0.6.1.gem /i18n-0.6.1.gem
/i18n-0.6.4.gem /i18n-0.6.4.gem
/i18n-0.6.9.gem /i18n-0.6.9.gem
/i18n-0.6.11.gem

@ -1,44 +0,0 @@
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 53f34aa..d24b81f 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -1,7 +1,25 @@
$KCODE = 'u' if RUBY_VERSION <= '1.9'
require 'rubygems'
-require 'test/unit'
+
+# Use minitest if we can, otherwise fallback to test-unit.
+begin
+ require 'minitest/autorun'
+ TEST_CASE = defined?(Minitest::Test) ? Minitest::Test : MiniTest::Unit::TestCase
+
+ # TODO: Remove these aliases and update tests accordingly.
+ class TEST_CASE
+ alias :assert_raise :assert_raises
+ alias :assert_not_equal :refute_equal
+
+ def assert_nothing_raised(*args)
+ yield
+ end
+ end
+rescue LoadError
+ require 'test/unit'
+ TEST_CASE = Test::Unit::TestCase
+end
# Do not load the i18n gem from libraries like active_support.
#
@@ -17,7 +35,7 @@
require 'mocha'
require 'test_declarative'
-class Test::Unit::TestCase
+class I18n::TestCase < TEST_CASE
def teardown
I18n.locale = nil
I18n.default_locale = :en
--
1.9.3

@ -2,22 +2,17 @@
Summary: New wave Internationalization support for Ruby Summary: New wave Internationalization support for Ruby
Name: rubygem-%{gem_name} Name: rubygem-%{gem_name}
Version: 0.6.9 Version: 0.6.11
Release: 4%{?dist} Release: 1%{?dist}
Group: Development/Languages Group: Development/Languages
License: MIT and (BSD or Ruby) License: MIT and (BSD or Ruby)
URL: http://github.com/svenfuchs/i18n URL: http://github.com/svenfuchs/i18n
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
# Upstream fix for Minitest 5
# https://github.com/svenfuchs/i18n/commit/c6d95dafa30253c992047e699b26377669979af0
Patch0: rubygem-i18n-0.6.10-minitest5.patch
BuildRequires: ruby(release) BuildRequires: ruby(release)
BuildRequires: rubygems-devel BuildRequires: rubygems-devel
BuildRequires: rubygem(minitest) BuildRequires: rubygem(minitest)
BuildRequires: rubygem(mocha) BuildRequires: rubygem(mocha)
BuildRequires: rubygem(test_declarative) BuildRequires: rubygem(test_declarative)
# TODO: Circular dependency with active support.
#BuildRequires: rubygem(activesupport)
BuildArch: noarch BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version} Provides: rubygem(%{gem_name}) = %{version}
@ -37,7 +32,6 @@ Documentation for %{name}
gem unpack %{SOURCE0} gem unpack %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version} %setup -q -D -T -n %{gem_name}-%{version}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%patch0 -p1
%build %build
gem build %{gem_name}.gemspec gem build %{gem_name}.gemspec
@ -59,24 +53,27 @@ sed -i -e "s|require 'bundler/setup'||" test/test_helper.rb
find ./test -name '*_test.rb' | xargs sed -i -e 's/Test::Unit::TestCase/I18n::TestCase/' find ./test -name '*_test.rb' | xargs sed -i -e 's/Test::Unit::TestCase/I18n::TestCase/'
# Tests are failing without LANG environment is set. # Tests are failing without LANG environment is set.
# https://github.com/svenfuchs/i18n/issues/115 # https://github.com/svenfuchs/i18n/issues/115
LANG=en_US.utf8 ruby -Ilib:test test/all.rb LANG=en_US.utf8 ruby -Ilib:test -rset test/all.rb
popd popd
%files %files
%dir %{gem_instdir} %dir %{gem_instdir}
%{gem_libdir} %{gem_libdir}
%doc %{gem_instdir}/README.textile %doc %{gem_instdir}/README.md
%doc %{gem_instdir}/MIT-LICENSE %doc %{gem_instdir}/MIT-LICENSE
%{gem_cache} %{gem_cache}
%{gem_spec} %{gem_spec}
%files doc %files doc
%{gem_instdir}/ci
%{gem_instdir}/test %{gem_instdir}/test
%{gem_instdir}/gemfiles
%doc %{gem_docdir} %doc %{gem_docdir}
%changelog %changelog
* Tue Jul 22 2014 Josef Stribny <jstribny@redhat.com> - 0.6.11-1
- Update to i18n 0.6.11
* Wed Jun 18 2014 Josef Stribny <jstribny@redhat.com> - 0.6.9-4 * Wed Jun 18 2014 Josef Stribny <jstribny@redhat.com> - 0.6.9-4
- Fix test suite compatibility with minitest 5 - Fix test suite compatibility with minitest 5

@ -1 +1 @@
2ee80a0d22ccddf868e1437d9e3dfc00 i18n-0.6.9.gem d414d41965c53b119341ff3b474340ae i18n-0.6.11.gem

Loading…
Cancel
Save