Hello community,

here is the log from the commit of package rubygem-i18n for openSUSE:Factory 
checked in at 2017-06-02 10:33:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-i18n (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-i18n.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-i18n"

Fri Jun  2 10:33:26 2017 rev:13 rq:499979 version:0.8.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-i18n/rubygem-i18n.changes        
2017-04-11 09:32:16.482320922 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-i18n.new/rubygem-i18n.changes   
2017-06-02 10:34:04.765571386 +0200
@@ -1,0 +2,6 @@
+Wed May 31 07:20:52 UTC 2017 - [email protected]
+
+- updated to version 0.8.4
+  no changelog found
+
+-------------------------------------------------------------------

Old:
----
  i18n-0.8.1.gem

New:
----
  i18n-0.8.4.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-i18n.spec ++++++
--- /var/tmp/diff_new_pack.U2LEai/_old  2017-06-02 10:34:05.265500748 +0200
+++ /var/tmp/diff_new_pack.U2LEai/_new  2017-06-02 10:34:05.269500183 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-i18n
-Version:        0.8.1
+Version:        0.8.4
 Release:        0
 %define mod_name i18n
 %define mod_full_name %{mod_name}-%{version}

++++++ i18n-0.8.1.gem -> i18n-0.8.4.gem ++++++
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gemfiles/Gemfile.rails-3.2.x.lock 
new/gemfiles/Gemfile.rails-3.2.x.lock
--- old/gemfiles/Gemfile.rails-3.2.x.lock       1970-01-01 01:00:00.000000000 
+0100
+++ new/gemfiles/Gemfile.rails-3.2.x.lock       2017-05-31 03:43:51.000000000 
+0200
@@ -0,0 +1,32 @@
+PATH
+  remote: ..
+  specs:
+    i18n (0.8.2)
+
+GEM
+  remote: https://rubygems.org/
+  specs:
+    activesupport (3.2.22.5)
+      i18n (~> 0.6, >= 0.6.4)
+      multi_json (~> 1.0)
+    metaclass (0.0.4)
+    minitest (5.10.1)
+    mocha (1.2.1)
+      metaclass (~> 0.0.1)
+    multi_json (1.12.1)
+    rake (12.0.0)
+    test_declarative (0.0.5)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  activesupport (~> 3.2.0)
+  i18n!
+  minitest
+  mocha
+  rake
+  test_declarative
+
+BUNDLED WITH
+   1.14.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gemfiles/Gemfile.rails-4.0.x.lock 
new/gemfiles/Gemfile.rails-4.0.x.lock
--- old/gemfiles/Gemfile.rails-4.0.x.lock       1970-01-01 01:00:00.000000000 
+0100
+++ new/gemfiles/Gemfile.rails-4.0.x.lock       2017-05-31 03:43:51.000000000 
+0200
@@ -0,0 +1,37 @@
+PATH
+  remote: ..
+  specs:
+    i18n (0.8.2)
+
+GEM
+  remote: https://rubygems.org/
+  specs:
+    activesupport (4.0.13)
+      i18n (~> 0.6, >= 0.6.9)
+      minitest (~> 4.2)
+      multi_json (~> 1.3)
+      thread_safe (~> 0.1)
+      tzinfo (~> 0.3.37)
+    metaclass (0.0.4)
+    minitest (4.7.5)
+    mocha (1.2.1)
+      metaclass (~> 0.0.1)
+    multi_json (1.12.1)
+    rake (12.0.0)
+    test_declarative (0.0.5)
+    thread_safe (0.3.6)
+    tzinfo (0.3.53)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  activesupport (~> 4.0.0)
+  i18n!
+  minitest
+  mocha
+  rake
+  test_declarative
+
+BUNDLED WITH
+   1.14.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gemfiles/Gemfile.rails-4.1.x.lock 
new/gemfiles/Gemfile.rails-4.1.x.lock
--- old/gemfiles/Gemfile.rails-4.1.x.lock       1970-01-01 01:00:00.000000000 
+0100
+++ new/gemfiles/Gemfile.rails-4.1.x.lock       2017-05-31 03:43:51.000000000 
+0200
@@ -0,0 +1,38 @@
+PATH
+  remote: ..
+  specs:
+    i18n (0.8.2)
+
+GEM
+  remote: https://rubygems.org/
+  specs:
+    activesupport (4.1.16)
+      i18n (~> 0.6, >= 0.6.9)
+      json (~> 1.7, >= 1.7.7)
+      minitest (~> 5.1)
+      thread_safe (~> 0.1)
+      tzinfo (~> 1.1)
+    json (1.8.6)
+    metaclass (0.0.4)
+    minitest (5.10.1)
+    mocha (1.2.1)
+      metaclass (~> 0.0.1)
+    rake (12.0.0)
+    test_declarative (0.0.5)
+    thread_safe (0.3.6)
+    tzinfo (1.2.2)
+      thread_safe (~> 0.1)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  activesupport (~> 4.1.0)
+  i18n!
+  minitest
+  mocha
+  rake
+  test_declarative
+
+BUNDLED WITH
+   1.14.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gemfiles/Gemfile.rails-4.2.x.lock 
new/gemfiles/Gemfile.rails-4.2.x.lock
--- old/gemfiles/Gemfile.rails-4.2.x.lock       1970-01-01 01:00:00.000000000 
+0100
+++ new/gemfiles/Gemfile.rails-4.2.x.lock       2017-05-31 03:43:51.000000000 
+0200
@@ -0,0 +1,36 @@
+PATH
+  remote: ..
+  specs:
+    i18n (0.8.2)
+
+GEM
+  remote: https://rubygems.org/
+  specs:
+    activesupport (4.2.8)
+      i18n (~> 0.7)
+      minitest (~> 5.1)
+      thread_safe (~> 0.3, >= 0.3.4)
+      tzinfo (~> 1.1)
+    metaclass (0.0.4)
+    minitest (5.10.1)
+    mocha (1.2.1)
+      metaclass (~> 0.0.1)
+    rake (12.0.0)
+    test_declarative (0.0.5)
+    thread_safe (0.3.6)
+    tzinfo (1.2.2)
+      thread_safe (~> 0.1)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  activesupport (~> 4.2.0)
+  i18n!
+  minitest
+  mocha
+  rake
+  test_declarative
+
+BUNDLED WITH
+   1.14.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gemfiles/Gemfile.rails-5.0.x.lock 
new/gemfiles/Gemfile.rails-5.0.x.lock
--- old/gemfiles/Gemfile.rails-5.0.x.lock       1970-01-01 01:00:00.000000000 
+0100
+++ new/gemfiles/Gemfile.rails-5.0.x.lock       2017-05-31 03:43:51.000000000 
+0200
@@ -0,0 +1,37 @@
+PATH
+  remote: ..
+  specs:
+    i18n (0.8.2)
+
+GEM
+  remote: https://rubygems.org/
+  specs:
+    activesupport (5.0.2)
+      concurrent-ruby (~> 1.0, >= 1.0.2)
+      i18n (~> 0.7)
+      minitest (~> 5.1)
+      tzinfo (~> 1.1)
+    concurrent-ruby (1.0.5)
+    metaclass (0.0.4)
+    minitest (5.10.1)
+    mocha (1.2.1)
+      metaclass (~> 0.0.1)
+    rake (12.0.0)
+    test_declarative (0.0.5)
+    thread_safe (0.3.6)
+    tzinfo (1.2.2)
+      thread_safe (~> 0.1)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  activesupport (~> 5.0.0)
+  i18n!
+  minitest
+  mocha
+  rake
+  test_declarative
+
+BUNDLED WITH
+   1.14.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gemfiles/Gemfile.rails-master.lock 
new/gemfiles/Gemfile.rails-master.lock
--- old/gemfiles/Gemfile.rails-master.lock      1970-01-01 01:00:00.000000000 
+0100
+++ new/gemfiles/Gemfile.rails-master.lock      2017-05-31 03:43:51.000000000 
+0200
@@ -0,0 +1,43 @@
+GIT
+  remote: git://github.com/rails/rails.git
+  revision: 49aa974ec8b15721d53b3b6abea88bd6ba433a68
+  branch: master
+  specs:
+    activesupport (5.1.0.alpha)
+      concurrent-ruby (~> 1.0, >= 1.0.2)
+      i18n (~> 0.7)
+      minitest (~> 5.1)
+      tzinfo (~> 1.1)
+
+PATH
+  remote: ..
+  specs:
+    i18n (0.8.2)
+
+GEM
+  remote: https://rubygems.org/
+  specs:
+    concurrent-ruby (1.0.5)
+    metaclass (0.0.4)
+    minitest (5.10.1)
+    mocha (1.2.1)
+      metaclass (~> 0.0.1)
+    rake (12.0.0)
+    test_declarative (0.0.5)
+    thread_safe (0.3.6)
+    tzinfo (1.2.2)
+      thread_safe (~> 0.1)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  activesupport!
+  i18n!
+  minitest
+  mocha
+  rake
+  test_declarative
+
+BUNDLED WITH
+   1.14.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/i18n/backend/base.rb new/lib/i18n/backend/base.rb
--- old/lib/i18n/backend/base.rb        2017-02-22 03:51:26.000000000 +0100
+++ new/lib/i18n/backend/base.rb        2017-05-31 03:43:51.000000000 +0200
@@ -23,7 +23,7 @@
 
       def translate(locale, key, options = {})
         raise InvalidLocale.new(locale) unless locale
-        entry = key && lookup(locale, key, options[:scope], options)
+        entry = lookup(locale, key, options[:scope], options) unless key.nil?
 
         if entry.nil? && options.key?(:default)
           entry = default(locale, key, options[:default], options)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/i18n/gettext.rb new/lib/i18n/gettext.rb
--- old/lib/i18n/gettext.rb     2017-02-22 03:51:26.000000000 +0100
+++ new/lib/i18n/gettext.rb     2017-05-31 03:43:51.000000000 +0200
@@ -8,11 +8,12 @@
     @@plural_keys = { :en => [:one, :other] }
 
     class << self
-      # returns an array of plural keys for the given locale so that we can
-      # convert from gettext's integer-index based style
+      # returns an array of plural keys for the given locale or the whole hash
+      # of locale mappings to plural keys so that we can convert from gettext's
+      # integer-index based style
       # TODO move this information to the pluralization module
-      def plural_keys(locale)
-        @@plural_keys[locale] || @@plural_keys[:en]
+      def plural_keys(*args)
+        args.empty? ? @@plural_keys : @@plural_keys[args.first] || 
@@plural_keys[:en]
       end
 
       def extract_scope(msgid, separator)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/i18n/version.rb new/lib/i18n/version.rb
--- old/lib/i18n/version.rb     2017-02-22 03:51:26.000000000 +0100
+++ new/lib/i18n/version.rb     2017-05-31 03:43:51.000000000 +0200
@@ -1,3 +1,3 @@
 module I18n
-  VERSION = "0.8.1"
+  VERSION = "0.8.4"
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2017-02-22 03:51:26.000000000 +0100
+++ new/metadata        2017-05-31 03:43:51.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: i18n
 version: !ruby/object:Gem::Version
-  version: 0.8.1
+  version: 0.8.4
 platform: ruby
 authors:
 - Sven Fuchs
@@ -12,7 +12,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2017-02-22 00:00:00.000000000 Z
+date: 2017-05-31 00:00:00.000000000 Z
 dependencies: []
 description: New wave Internationalization support for Ruby.
 email: [email protected]
@@ -23,11 +23,17 @@
 - MIT-LICENSE
 - README.md
 - gemfiles/Gemfile.rails-3.2.x
+- gemfiles/Gemfile.rails-3.2.x.lock
 - gemfiles/Gemfile.rails-4.0.x
+- gemfiles/Gemfile.rails-4.0.x.lock
 - gemfiles/Gemfile.rails-4.1.x
+- gemfiles/Gemfile.rails-4.1.x.lock
 - gemfiles/Gemfile.rails-4.2.x
+- gemfiles/Gemfile.rails-4.2.x.lock
 - gemfiles/Gemfile.rails-5.0.x
+- gemfiles/Gemfile.rails-5.0.x.lock
 - gemfiles/Gemfile.rails-master
+- gemfiles/Gemfile.rails-master.lock
 - lib/i18n.rb
 - lib/i18n/backend.rb
 - lib/i18n/backend/base.rb
@@ -98,6 +104,7 @@
 - test/gettext/api_test.rb
 - test/gettext/backend_test.rb
 - test/i18n/exceptions_test.rb
+- test/i18n/gettext_plural_keys_test.rb
 - test/i18n/interpolate_test.rb
 - test/i18n/load_path_test.rb
 - test/i18n_test.rb
@@ -132,7 +139,7 @@
       version: 1.3.5
 requirements: []
 rubyforge_project: "[none]"
-rubygems_version: 2.6.8
+rubygems_version: 2.6.10
 signing_key: 
 specification_version: 4
 summary: New wave Internationalization support for Ruby
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/i18n/gettext_plural_keys_test.rb 
new/test/i18n/gettext_plural_keys_test.rb
--- old/test/i18n/gettext_plural_keys_test.rb   1970-01-01 01:00:00.000000000 
+0100
+++ new/test/i18n/gettext_plural_keys_test.rb   2017-05-31 03:43:51.000000000 
+0200
@@ -0,0 +1,20 @@
+require 'test_helper'
+
+class I18nGettextPluralKeysTest < I18n::TestCase
+  def setup
+    super
+    I18n::Gettext.plural_keys[:zz] = [:value1, :value2]
+  end
+
+  test "Returns the plural keys of the given locale if present" do
+    assert_equal I18n::Gettext.plural_keys(:zz), [:value1, :value2]
+  end
+
+  test "Returns the plural keys of :en if given locale not present" do
+    assert_equal I18n::Gettext.plural_keys(:yy), [:one, :other]
+  end
+
+  test "Returns the whole hash with no arguments" do
+    assert_equal I18n::Gettext.plural_keys, { :en => [:one, :other], :zz => 
[:value1, :value2] }
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/i18n_test.rb new/test/i18n_test.rb
--- old/test/i18n_test.rb       2017-02-22 03:51:26.000000000 +0100
+++ new/test/i18n_test.rb       2017-05-31 03:43:51.000000000 +0200
@@ -6,6 +6,7 @@
     super
     store_translations(:en, :currency => { :format => { :separator => '.', 
:delimiter => ',', } })
     store_translations(:nl, :currency => { :format => { :separator => ',', 
:delimiter => '.', } })
+    store_translations(:en, "true" => "Yes", "false" => "No")
   end
 
   test "exposes its VERSION constant" do
@@ -224,6 +225,14 @@
     end
   end
 
+  test "translate given true as a key works" do
+    assert_equal "Yes", I18n.t(true)
+  end
+
+  test "translate given false as a key works" do
+    assert_equal "No", I18n.t(false)
+  end
+
   test "available_locales can be replaced at runtime" do
     begin
       I18n.config.enforce_available_locales = true


Reply via email to