Hello community,

here is the log from the commit of package rubygem-gettext-setup for 
openSUSE:Factory checked in at 2017-04-11 09:32:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-gettext-setup (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-gettext-setup"

Tue Apr 11 09:32:58 2017 rev:7 rq:482296 version:0.18

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-gettext-setup/rubygem-gettext-setup.changes  
    2017-01-25 23:27:27.365500971 +0100
+++ 
/work/SRC/openSUSE:Factory/.rubygem-gettext-setup.new/rubygem-gettext-setup.changes
 2017-04-11 09:32:58.888330577 +0200
@@ -1,0 +2,24 @@
+Wed Mar 22 05:29:45 UTC 2017 - [email protected]
+
+- updated to version 0.18
+  no changelog found
+
+-------------------------------------------------------------------
+Thu Mar 16 05:31:42 UTC 2017 - [email protected]
+
+- updated to version 0.16
+  no changelog found
+
+-------------------------------------------------------------------
+Fri Mar  3 05:57:40 UTC 2017 - [email protected]
+
+- updated to version 0.14
+  no changelog found
+
+-------------------------------------------------------------------
+Wed Jan 25 05:34:49 UTC 2017 - [email protected]
+
+- updated to version 0.13
+  no changelog found
+
+-------------------------------------------------------------------

Old:
----
  gettext-setup-0.12.gem

New:
----
  gettext-setup-0.18.gem

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

Other differences:
------------------
++++++ rubygem-gettext-setup.spec ++++++
--- /var/tmp/diff_new_pack.D2HgpT/_old  2017-04-11 09:32:59.636224927 +0200
+++ /var/tmp/diff_new_pack.D2HgpT/_new  2017-04-11 09:32:59.636224927 +0200
@@ -24,13 +24,13 @@
 #
 
 Name:           rubygem-gettext-setup
-Version:        0.12
+Version:        0.18
 Release:        0
 %define mod_name gettext-setup
 %define mod_full_name %{mod_name}-%{version}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+BuildRequires:  %{ruby >= 1.9.2}
 BuildRequires:  %{rubygem gem2rpm}
-BuildRequires:  %{ruby}
 BuildRequires:  ruby-macros >= 5
 Url:            https://github.com/puppetlabs/gettext-setup-gem
 Source:         http://rubygems.org/gems/%{mod_full_name}.gem

++++++ gettext-setup-0.12.gem -> gettext-setup-0.18.gem ++++++
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/gettext-setup/gettext_setup.rb 
new/lib/gettext-setup/gettext_setup.rb
--- old/lib/gettext-setup/gettext_setup.rb      2017-01-18 19:57:49.000000000 
+0100
+++ new/lib/gettext-setup/gettext_setup.rb      2017-03-22 00:05:44.000000000 
+0100
@@ -5,6 +5,8 @@
 
 module GettextSetup
   @@config = nil
+  @@translation_repositories = {}
+  FastGettext.default_available_locales = []
 
   # `locales_path` should include:
   # - config.yaml
@@ -24,19 +26,28 @@
     # Define our text domain, and set the path into our root.  I would prefer 
to
     # have something smarter, but we really want this up earlier even than our
     # config loading happens so that errors there can be translated.
-    FastGettext.add_text_domain(config['project_name'],
-                                :path => locales_path,
-                                :type => options[:file_format] || :po,
-                                :ignore_fuzzy => false)
-    FastGettext.default_text_domain = config['project_name']
+    add_repository_to_chain(config['project_name'], options)
+
+    # 'chain' is the only available multi-domain type in fast_gettext 1.1.0 We 
should consider
+    # investigating 'merge' once we can bump our dependency
+    FastGettext.add_text_domain('master_domain', type: :chain, chain: 
@@translation_repositories.values)
+    FastGettext.default_text_domain = 'master_domain'
 
     # Likewise, be explicit in our default language choice.
     FastGettext.default_locale = default_locale
-    FastGettext.default_available_locales = locales
+    FastGettext.default_available_locales = 
FastGettext.default_available_locales | locales
 
     Locale.set_default(default_locale)
   end
 
+  def self.add_repository_to_chain(project_name,options)
+    repository = FastGettext::TranslationRepository.build(project_name,
+                                                          :path => 
locales_path,
+                                                          :type => 
options[:file_format] || :po,
+                                                          :ignore_fuzzy => 
false)
+    @@translation_repositories[project_name] = repository unless 
@@translation_repositories.key? project_name
+  end
+
   def self.locales_path
     @@locales_path
   end
@@ -45,6 +56,10 @@
     @@config ||= {}
   end
 
+  def self.translation_repositories
+    @@translation_repositories
+  end
+
   def self.default_locale
     config['default_locale'] || "en"
   end
@@ -86,12 +101,12 @@
       pair[0] = FastGettext.default_locale if pair[0] == '*'
       pair
     end.sort_by do |(locale,qvalue)|
-      qvalue.to_f
+      -1 * qvalue.to_f
     end.select do |(locale,_)|
       FastGettext.available_locales.include?(locale)
     end
-    if available_locales and available_locales.last
-      available_locales.last.first
+    if available_locales and available_locales.first
+      available_locales.first.first
     else
       # We can't satisfy the request preference. Just use the default locale.
       default_locale
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/tasks/gettext.rake new/lib/tasks/gettext.rake
--- old/lib/tasks/gettext.rake  2017-01-18 19:57:49.000000000 +0100
+++ new/lib/tasks/gettext.rake  2017-03-22 00:05:44.000000000 +0100
@@ -2,6 +2,7 @@
 # puts File.absolute_path('Gemfile', Dir.pwd)
 # Bundler.read_file(File.absolute_path('Gemfile', Dir.pwd))
 #
+require 'open3'
 require_relative '../gettext-setup/gettext_setup'
 #
 # GettextSetup.initialize(File.absolute_path('locales', Dir.pwd))
@@ -25,15 +26,17 @@
     exclusions = (GettextSetup.config['exclude_files'] || []).map do |p|
       Dir.glob(p)
     end.flatten
-    files - exclusions
+
+    # if file is a directory, take it out of the array. directories
+    # cause rxgettext to error out.
+    (files - exclusions).reject { |file| File.directory?(file) }
   end
 
   def pot_file_path
     File.join(locale_path, GettextSetup.config['project_name'] + ".pot")
   end
 
-  desc "Update pot files"
-  task :pot do
+  def generate_new_pot
     config = GettextSetup.config
     package_name = config['package_name']
     project_name = config['project_name']
@@ -52,10 +55,40 @@
            "--package-version '#{version}' " +
            "--copyright-holder='#{copyright_holder}' 
--copyright-year=#{Time.now.year} " +
            "#{files_to_translate.join(" ")}")
-    puts "POT file locales/#{project_name}.pot has been updated"
   end
 
-  desc "Update po file for a specific language"
+  desc "Generate a new POT file and replace old if strings changed"
+  task :update_pot do
+    if !File.exists? pot_file_path
+      puts "No existing POT file, generating new"
+      generate_new_pot
+    else
+      old_pot = pot_file_path + ".old"
+      File.rename(pot_file_path, old_pot)
+      generate_new_pot
+      begin
+        _, stderr, status = Open3.capture3("msgcmp --use-untranslated 
'#{old_pot}' '#{pot_file_path}'")
+        if status == 1 || /this message is not used/.match(stderr)
+          File.delete(old_pot)
+          puts "String changes detected, replacing with updated POT file"
+        else
+          puts "No string changes detected, keeping old POT file"
+          File.rename(old_pot, pot_file_path)
+        end
+      rescue IOError
+        # Ignore; probably means msgcmp isn't installed.
+        File.delete(old_pot)
+      end
+    end
+  end
+
+  desc "Generate POT file"
+  task :pot do
+    generate_new_pot
+    puts "POT file #{pot_file_path} has been generated"
+  end
+
+  desc "Update PO file for a specific language"
   task :po, [:language] do |_, args|
     language = args.language || ENV["LANGUAGE"]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2017-01-18 19:57:49.000000000 +0100
+++ new/metadata        2017-03-22 00:05:44.000000000 +0100
@@ -1,181 +1,195 @@
 --- !ruby/object:Gem::Specification
 name: gettext-setup
 version: !ruby/object:Gem::Version
-  version: '0.12'
+  version: '0.18'
 platform: ruby
 authors:
 - Puppet
-autorequire:
+autorequire: 
 bindir: bin
 cert_chain: []
-date: 2017-01-18 00:00:00.000000000 Z
+date: 2017-03-21 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
+  name: fast_gettext
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - '>='
+    - - "~>"
       - !ruby/object:Gem::Version
-        version: 3.0.2
-  name: gettext
-  prerelease: false
+        version: 1.1.0
   type: :runtime
+  prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - '>='
+    - - "~>"
       - !ruby/object:Gem::Version
-        version: 3.0.2
+        version: 1.1.0
 - !ruby/object:Gem::Dependency
+  name: gettext
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - ~>
+    - - ">="
       - !ruby/object:Gem::Version
-        version: 1.1.0
-  name: fast_gettext
-  prerelease: false
+        version: 3.0.2
   type: :runtime
+  prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - ~>
+    - - ">="
       - !ruby/object:Gem::Version
-        version: 1.1.0
+        version: 3.0.2
 - !ruby/object:Gem::Dependency
+  name: locale
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - '>='
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
-  name: locale
-  prerelease: false
   type: :runtime
+  prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - '>='
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
 - !ruby/object:Gem::Dependency
+  name: bundler
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - ~>
+    - - "~>"
       - !ruby/object:Gem::Version
         version: '1.3'
-  name: bundler
-  prerelease: false
   type: :development
+  prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - ~>
+    - - "~>"
       - !ruby/object:Gem::Version
         version: '1.3'
 - !ruby/object:Gem::Dependency
+  name: rake
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - '>='
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
-  name: rake
-  prerelease: false
   type: :development
+  prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - '>='
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
 - !ruby/object:Gem::Dependency
+  name: rack-test
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - '>='
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
-  name: rack-test
-  prerelease: false
   type: :development
+  prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - '>='
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
 - !ruby/object:Gem::Dependency
+  name: rspec
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - ~>
+    - - "~>"
       - !ruby/object:Gem::Version
         version: '3.1'
-  name: rspec
-  prerelease: false
   type: :development
+  prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - ~>
+    - - "~>"
       - !ruby/object:Gem::Version
         version: '3.1'
 - !ruby/object:Gem::Dependency
+  name: rspec-core
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - ~>
+    - - "~>"
       - !ruby/object:Gem::Version
         version: '3.1'
-  name: rspec-core
-  prerelease: false
   type: :development
+  prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - ~>
+    - - "~>"
       - !ruby/object:Gem::Version
         version: '3.1'
 - !ruby/object:Gem::Dependency
+  name: rspec-expectations
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - ~>
+    - - "~>"
       - !ruby/object:Gem::Version
         version: '3.1'
-  name: rspec-expectations
-  prerelease: false
   type: :development
+  prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - ~>
+    - - "~>"
       - !ruby/object:Gem::Version
         version: '3.1'
 - !ruby/object:Gem::Dependency
+  name: rspec-mocks
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - ~>
+    - - "~>"
       - !ruby/object:Gem::Version
         version: '3.1'
-  name: rspec-mocks
-  prerelease: false
   type: :development
+  prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - ~>
+    - - "~>"
       - !ruby/object:Gem::Version
         version: '3.1'
 - !ruby/object:Gem::Dependency
+  name: simplecov
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - '>='
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
-  name: simplecov
-  prerelease: false
   type: :development
+  prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - '>='
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
 - !ruby/object:Gem::Dependency
+  name: webmock
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - '>='
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
-  name: webmock
+  type: :development
   prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
+- !ruby/object:Gem::Dependency
+  name: rubocop
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
   type: :development
+  prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - '>='
+    - - ">="
       - !ruby/object:Gem::Version
         version: '0'
 description: A gem to ease i18n
@@ -191,6 +205,9 @@
 - lib/gettext-setup/gettext_setup.rb
 - lib/tasks/gettext.rake
 - locales/config-sample.yaml
+- spec/fixtures/alt_locales/alt_locales.pot
+- spec/fixtures/alt_locales/config.yaml
+- spec/fixtures/alt_locales/jp/alt_locales.po
 - spec/fixtures/locales/config.yaml
 - spec/fixtures/locales/de/sinatra-i18n.po
 - spec/fixtures/locales/sinatra-i18n.pot
@@ -200,29 +217,33 @@
 licenses:
 - Apache-2.0
 metadata: {}
-post_install_message:
+post_install_message: 
 rdoc_options: []
 require_paths:
 - lib
 required_ruby_version: !ruby/object:Gem::Requirement
   requirements:
-  - - '>='
+  - - ">="
     - !ruby/object:Gem::Version
-      version: '0'
+      version: 1.9.2
 required_rubygems_version: !ruby/object:Gem::Requirement
   requirements:
-  - - '>='
+  - - ">="
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubyforge_project:
-rubygems_version: 2.4.5
-signing_key:
+rubyforge_project: 
+rubygems_version: 2.5.1
+signing_key: 
 specification_version: 4
 summary: A gem to ease internationalization with fast_gettext
 test_files:
-- spec/spec_helper.rb
+- spec/fixtures/alt_locales/alt_locales.pot
+- spec/fixtures/alt_locales/config.yaml
+- spec/fixtures/alt_locales/jp/alt_locales.po
 - spec/fixtures/locales/config.yaml
-- spec/fixtures/locales/sinatra-i18n.pot
 - spec/fixtures/locales/de/sinatra-i18n.po
+- spec/fixtures/locales/sinatra-i18n.pot
 - spec/lib/gettext_setup_spec.rb
+- spec/spec_helper.rb
+has_rdoc: 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/fixtures/alt_locales/alt_locales.pot 
new/spec/fixtures/alt_locales/alt_locales.pot
--- old/spec/fixtures/alt_locales/alt_locales.pot       1970-01-01 
01:00:00.000000000 +0100
+++ new/spec/fixtures/alt_locales/alt_locales.pot       2017-03-22 
00:05:44.000000000 +0100
@@ -0,0 +1,25 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2016 Puppet Labs, LLC.
+# This file is distributed under the same license as the Sinatra i18n demo 
package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2016.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: alt_locales init-11-ga532a06\n"
+"\n"
+"Report-Msgid-Bugs-To: [email protected]\n"
+"POT-Creation-Date: 2016-06-07 17:38-0500\n"
+"PO-Revision-Date: 2016-06-07 17:38-0500\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <[email protected]>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
+
+#. GettextSetup.initialize(File::join(File::dirname(File::dirname(__FILE__)), 
'fixtures'))
+#: ../../lib/gettext_setup_spec.rb:25
+msgid "Hello, world!"
+msgstr ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/fixtures/alt_locales/config.yaml 
new/spec/fixtures/alt_locales/config.yaml
--- old/spec/fixtures/alt_locales/config.yaml   1970-01-01 01:00:00.000000000 
+0100
+++ new/spec/fixtures/alt_locales/config.yaml   2017-03-22 00:05:44.000000000 
+0100
@@ -0,0 +1,22 @@
+---
+# This is the project-specific configuration file for setting up
+# fast_gettext for your project.
+gettext:
+  # This is used for the name of the .pot and .po files; they will be
+  # called <project_name>.pot?
+  project_name: 'alt_locales'
+  # This is used in comments in the .pot and .po files to indicate what
+  # project the files belong to and should bea little more desctiptive than
+  # <project_name>
+  package_name: alt_locales
+  # The locale that the default messages in the .pot file are in
+  default_locale: en
+  # The email used for sending bug reports.
+  bugs_address: [email protected]
+  # The holder of the copyright.
+  copyright_holder: Puppet Labs, LLC.
+  # Patterns for +Dir.glob+ used to find all files that might contain
+  # translatable content, relative to the project root directory
+  source_files:
+    - 'test_translation.rb'
+    - '../lib/**/*.rb'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/fixtures/alt_locales/jp/alt_locales.po 
new/spec/fixtures/alt_locales/jp/alt_locales.po
--- old/spec/fixtures/alt_locales/jp/alt_locales.po     1970-01-01 
01:00:00.000000000 +0100
+++ new/spec/fixtures/alt_locales/jp/alt_locales.po     2017-03-22 
00:05:44.000000000 +0100
@@ -0,0 +1,23 @@
+# German translations for Sinatra i18n demo package.
+# Copyright (C) 2016 Puppet Labs, LLC.
+# This file is distributed under the same license as the Sinatra i18n demo 
package.
+# Automatically generated, 2016.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Sinatra i18n demo \n"
+"Report-Msgid-Bugs-To: [email protected]\n"
+"POT-Creation-Date: 2016-04-05 10:39-0700\n"
+"PO-Revision-Date: 2016-02-26 18:21-0800\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"Language: jp\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../app.rb:14
+msgid "Hello, world!"
+msgstr "こんにちは世界"
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/lib/gettext_setup_spec.rb 
new/spec/lib/gettext_setup_spec.rb
--- old/spec/lib/gettext_setup_spec.rb  2017-01-18 19:57:49.000000000 +0100
+++ new/spec/lib/gettext_setup_spec.rb  2017-03-22 00:05:44.000000000 +0100
@@ -31,6 +31,9 @@
       expect(GettextSetup.negotiate_locale('en;q=1, de;q=2')).to eq('de')
       expect(GettextSetup.negotiate_locale('en;q=1, de;q=0')).to eq('en')
     end
+    it "chooses the first value when q values are equal" do
+      expect(GettextSetup.negotiate_locale('de;q=1, en;q=1')).to eq('de')
+    end
   end
   context 'set_default_locale' do
     before :each do
@@ -45,10 +48,51 @@
   context 'clear' do
     it "can clear the locale" do
       expect(GettextSetup.default_locale).to eq('en')
-      expect(GettextSetup.candidate_locales).to eq('en_US,en')
+      expect(GettextSetup.candidate_locales).to include('en')
       GettextSetup.clear
       ENV['LANG'] = 'de_DE'
       expect(GettextSetup.candidate_locales).to eq('de_DE,de,en')
     end
   end
+  context 'multiple locales' do
+    # locales/ loads the de locale and alt_locales/ loads the jp locale
+    before(:all) do
+      
GettextSetup.initialize(File::join(File::dirname(File::dirname(__FILE__)), 
'fixtures', 'alt_locales'))
+    end
+    it 'can aggregate locales across projects' do
+      expect(FastGettext.default_available_locales).to include('en','de','jp')
+    end
+    it 'can switch to loaded locale' do
+      FastGettext.locale = GettextSetup.negotiate_locale('de,en')
+      expect(FastGettext.locale).to eq('de')
+      FastGettext.locale = GettextSetup.negotiate_locale('jp')
+      expect(FastGettext.locale).to eq('jp')
+    end
+  end
+  context 'translation repository chain' do
+    before(:all) do
+      
GettextSetup.initialize(File::join(File::dirname(File::dirname(__FILE__)), 
'fixtures', 'alt_locales'))
+    end
+    it 'chain is not nil' do
+      expect(GettextSetup.translation_repositories).not_to be_nil
+    end
+    it 'can translate without switching text domains' do
+      FastGettext.locale = "de"
+      expect(_('Hello, world!')).to eq('Hallo, Welt!')
+      FastGettext.locale = "jp"
+      expect(_('Hello, world!')).to eq('こんにちは世界')
+    end
+    it 'does not allow duplicate repositories' do
+      
GettextSetup.initialize(File::join(File::dirname(File::dirname(__FILE__)), 
'fixtures', 'alt_locales'))
+      repos = GettextSetup.translation_repositories
+      expect(repos.select { |k,v| k == 'alt_locales' }.size).to eq(1)
+    end
+    it 'does allow multiple unique domains' do
+      
GettextSetup.initialize(File::join(File::dirname(File::dirname(__FILE__)), 
'fixtures', 'locales'))
+      repos = GettextSetup.translation_repositories
+      expect(repos.size) == 2
+      expect(repos.select { |k,v| k == 'alt_locales' }.size).to eq(1)
+      expect(repos.select { |k,v| k == 'sinatra-i18n' }.size).to eq(1)
+    end
+  end
 end


Reply via email to