[DRE-commits] [ruby-faker] 05/10: enable more locales
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Mon Oct 31 17:24:07 UTC 2016
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch master
in repository ruby-faker.
commit cd659a15c1926d029a357d5071747f1570e35e70
Author: Pirate Praveen <praveen at debian.org>
Date: Mon Oct 31 18:11:35 2016 +0530
enable more locales
---
debian/changelog | 1 +
debian/patches/set-available-locale.patch | 27 +++++++++++++++++++++++----
debian/ruby-tests.rake | 2 +-
debian/rules | 17 +++--------------
4 files changed, 28 insertions(+), 19 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 48bc332..0061830 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ ruby-faker (1.6.6-1) unstable; urgency=medium
* Team upload
* New upstream release, failing tests are fixed (Closes: #840664)
+ * Enable more locales for tests
-- Pirate Praveen <praveen at debian.org> Mon, 31 Oct 2016 16:34:30 +0530
diff --git a/debian/patches/set-available-locale.patch b/debian/patches/set-available-locale.patch
index 79b9d2a..d4a8d08 100644
--- a/debian/patches/set-available-locale.patch
+++ b/debian/patches/set-available-locale.patch
@@ -3,12 +3,31 @@ Author: Balasankar C <balasankarc at autistici.org>
Last-Update: 2015-09-06
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/test/test_helper.rb
-+++ b/test/test_helper.rb
-@@ -9,4 +9,6 @@
+Index: ruby-faker/test/test_helper.rb
+===================================================================
+--- ruby-faker.orig/test/test_helper.rb
++++ ruby-faker/test/test_helper.rb
+@@ -2,12 +2,22 @@ require 'test/unit'
+ require 'rubygems'
+ require 'timecop'
+ require 'yaml'
++require 'pathname'
++
+ YAML::ENGINE.yamler = 'syck' if defined? YAML::ENGINE
+ require File.expand_path(File.dirname(__FILE__) + '/../lib/faker')
+
+ # configure I18n
+-locales_path = File.expand_path(File.dirname(__FILE__) + '../lib/locales')
++relative_locales_path = File.expand_path(File.dirname(__FILE__) + '../lib/locales')
++system_locales_path = File.expand_path(File.join(File.dirname(`gem which ruby-saml`),'locales'))
++locales_path = Pathname.new(relative_locales_path).directory? ? relative_locales_path : system_locales_path
I18n.available_locales = Dir[locales_path + '/*'].map do |file|
file.split('.').first
end
+
-+I18n.config.available_locales = :en, :xy, "en-US", "en-CA", "en-UG", "en-au-ocker", "es", :xx, :shire, :home, :work, :kindergarden, "en-BORK", :pl, "uk", "en-GB", :de
++I18n.config.available_locales = [:"ca-CAT", :ca, :"da-DK", :"de-AT", :"de-CH",
++:de, :"en-AU", "en-BORK", "en-CA", :"en-GB", :"en-IND", :"en-NEP", :"en-NZ",
++:"en-PAK", "en-US", "en-UG", :en, "en-au-ocker", "es", :"es-MX", :fa, :fi,
++:"fi-FI", :fr, :he, :it, :nep, :pl, :pt, :sv, :uk, :shire, :home, :work,
++:kindergarden, :xx, :xy]
I18n.enforce_available_locales = true
diff --git a/debian/ruby-tests.rake b/debian/ruby-tests.rake
index 7c42769..22daaca 100644
--- a/debian/ruby-tests.rake
+++ b/debian/ruby-tests.rake
@@ -1,6 +1,6 @@
require 'gem2deb/rake/testtask'
Gem2Deb::Rake::TestTask.new do |t|
- t.libs << 'test'
+ t.libs << 'test' << 'lib'
t.test_files = FileList['test/test_*.rb']
end
diff --git a/debian/rules b/debian/rules
index e71035f..f64b3d3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,18 +1,7 @@
#!/usr/bin/make -f
-#export DH_VERBOSE=1
-#
-# Uncomment to ignore all test failures (but the tests will run anyway)
-#export DH_RUBY_IGNORE_TESTS=all
-#
-# Uncomment to ignore some test failures (but the tests will run anyway).
-# Valid values:
-#export DH_RUBY_IGNORE_TESTS=ruby2.1 ruby2.2
-#
-# If you need to specify the .gemspec (eg there is more than one)
-#export DH_RUBY_GEMSPEC=gem.gemspec
-#
-# Uncomment to check dependencies during build:
-# export GEM2DEB_TEST_RUNNER = --check-dependencies
+
+export DH_MAKE = --gem-install
+export GEM2DEB_TEST_RUNNER = --check-dependencies
%:
dh $@ --buildsystem=ruby --with ruby
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-faker.git
More information about the Pkg-ruby-extras-commits
mailing list