[DRE-commits] [ruby-i18n] 02/03: drop revert-available-locales-cache.patch
Antonio Terceiro
terceiro at moszumanska.debian.org
Fri Jul 31 13:40:59 UTC 2015
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository ruby-i18n.
commit 1867c0ca6393b219fd39c2d0a188d73dd6da609f
Author: Antonio Terceiro <terceiro at debian.org>
Date: Fri Jul 31 09:18:11 2015 -0300
drop revert-available-locales-cache.patch
---
debian/changelog | 2 +
.../patches/revert-available-locales-cache.patch | 72 ----------------------
debian/patches/series | 1 -
3 files changed, 2 insertions(+), 73 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 78951e5..84be804 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ ruby-i18n (0.7.0-1) UNRELEASED; urgency=medium
[ Antonio Terceiro ]
* Ignore-metadata-on-frozen-objects.patch: make tests pass on ruby2.2
+ * drop revert-available-locales-cache.patch; ruby-stringex fixed to work
+ with newer versions of ruby-i18n
-- Pirate Praveen <praveen at debian.org> Tue, 28 Jul 2015 22:06:48 +0530
diff --git a/debian/patches/revert-available-locales-cache.patch b/debian/patches/revert-available-locales-cache.patch
deleted file mode 100644
index 19bd658..0000000
--- a/debian/patches/revert-available-locales-cache.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-Description: revert caching of available locales
-Author: Lucas Nussbaum <lucas at debian.org>
-Origin: vendor
-Bug: https://github.com/svenfuchs/i18n/issues/315
-Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765124
-Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770194
-Forwarded: yes
-Index: ruby-i18n/lib/i18n.rb
-===================================================================
---- ruby-i18n.orig/lib/i18n.rb
-+++ ruby-i18n/lib/i18n.rb
-@@ -275,7 +275,7 @@ module I18n
- # Returns true when the passed locale, which can be either a String or a
- # Symbol, is in the list of available locales. Returns false otherwise.
- def locale_available?(locale)
-- I18n.config.available_locales_set.include?(locale)
-+ I18n.available_locales.map(&:to_s).include?(locale.to_s)
- end
-
- # Raises an InvalidLocale exception when the passed locale is not available.
-Index: ruby-i18n/lib/i18n/config.rb
-===================================================================
---- ruby-i18n.orig/lib/i18n/config.rb
-+++ ruby-i18n/lib/i18n/config.rb
-@@ -43,19 +43,10 @@ module I18n
- @@available_locales || backend.available_locales
- end
-
-- # Caches the available locales list as both strings and symbols in a Set, so
-- # that we can have faster lookups to do the available locales enforce check.
-- def available_locales_set #:nodoc:
-- @@available_locales_set ||= available_locales.inject(Set.new) do |set, locale|
-- set << locale.to_s << locale.to_sym
-- end
-- end
--
- # Sets the available locales.
- def available_locales=(locales)
- @@available_locales = Array(locales).map { |locale| locale.to_sym }
- @@available_locales = nil if @@available_locales.empty?
-- @@available_locales_set = nil
- end
-
- # Clears the available locales set so it can be recomputed again after I18n
-Index: ruby-i18n/test/i18n_test.rb
-===================================================================
---- ruby-i18n.orig/test/i18n_test.rb
-+++ ruby-i18n/test/i18n_test.rb
-@@ -224,23 +224,6 @@ class I18nTest < I18n::TestCase
- end
- end
-
-- test "available_locales can be replaced at runtime" do
-- begin
-- I18n.config.enforce_available_locales = true
-- assert_raise(I18n::InvalidLocale) { I18n.t(:foo, :locale => 'klingon') }
-- old_locales, I18n.config.available_locales = I18n.config.available_locales, [:klingon]
-- I18n.t(:foo, :locale => 'klingon')
-- ensure
-- I18n.config.enforce_available_locales = false
-- I18n.config.available_locales = old_locales
-- end
-- end
--
-- test "available_locales_set should return a set" do
-- assert_equal Set, I18n.config.available_locales_set.class
-- assert_equal I18n.config.available_locales.size * 2, I18n.config.available_locales_set.size
-- end
--
- test "exists? given an existing key will return true" do
- assert_equal true, I18n.exists?(:currency)
- end
diff --git a/debian/patches/series b/debian/patches/series
index 1aa16c9..815cfc5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
-revert-available-locales-cache.patch
strip_bundler.patch
Ignore-metadata-on-frozen-objects.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-i18n.git
More information about the Pkg-ruby-extras-commits
mailing list