Codebase list ruby-faker / cd659a1
enable more locales Pirate Praveen 7 years ago
4 changed file(s) with 28 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
11
22 * Team upload
33 * New upstream release, failing tests are fixed (Closes: #840664)
4 * Enable more locales for tests
45
56 -- Pirate Praveen <praveen@debian.org> Mon, 31 Oct 2016 16:34:30 +0530
67
22 Last-Update: 2015-09-06
33 ---
44 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
5 --- a/test/test_helper.rb
6 +++ b/test/test_helper.rb
7 @@ -9,4 +9,6 @@
5 Index: ruby-faker/test/test_helper.rb
6 ===================================================================
7 --- ruby-faker.orig/test/test_helper.rb
8 +++ ruby-faker/test/test_helper.rb
9 @@ -2,12 +2,22 @@ require 'test/unit'
10 require 'rubygems'
11 require 'timecop'
12 require 'yaml'
13 +require 'pathname'
14 +
15 YAML::ENGINE.yamler = 'syck' if defined? YAML::ENGINE
16 require File.expand_path(File.dirname(__FILE__) + '/../lib/faker')
17
18 # configure I18n
19 -locales_path = File.expand_path(File.dirname(__FILE__) + '../lib/locales')
20 +relative_locales_path = File.expand_path(File.dirname(__FILE__) + '../lib/locales')
21 +system_locales_path = File.expand_path(File.join(File.dirname(`gem which ruby-saml`),'locales'))
22 +locales_path = Pathname.new(relative_locales_path).directory? ? relative_locales_path : system_locales_path
823 I18n.available_locales = Dir[locales_path + '/*'].map do |file|
924 file.split('.').first
1025 end
1126 +
12 +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
27 +I18n.config.available_locales = [:"ca-CAT", :ca, :"da-DK", :"de-AT", :"de-CH",
28 +:de, :"en-AU", "en-BORK", "en-CA", :"en-GB", :"en-IND", :"en-NEP", :"en-NZ",
29 +:"en-PAK", "en-US", "en-UG", :en, "en-au-ocker", "es", :"es-MX", :fa, :fi,
30 +:"fi-FI", :fr, :he, :it, :nep, :pl, :pt, :sv, :uk, :shire, :home, :work,
31 +:kindergarden, :xx, :xy]
1332 I18n.enforce_available_locales = true
00 require 'gem2deb/rake/testtask'
11
22 Gem2Deb::Rake::TestTask.new do |t|
3 t.libs << 'test'
3 t.libs << 'test' << 'lib'
44 t.test_files = FileList['test/test_*.rb']
55 end
00 #!/usr/bin/make -f
1 #export DH_VERBOSE=1
2 #
3 # Uncomment to ignore all test failures (but the tests will run anyway)
4 #export DH_RUBY_IGNORE_TESTS=all
5 #
6 # Uncomment to ignore some test failures (but the tests will run anyway).
7 # Valid values:
8 #export DH_RUBY_IGNORE_TESTS=ruby2.1 ruby2.2
9 #
10 # If you need to specify the .gemspec (eg there is more than one)
11 #export DH_RUBY_GEMSPEC=gem.gemspec
12 #
13 # Uncomment to check dependencies during build:
14 # export GEM2DEB_TEST_RUNNER = --check-dependencies
1
2 export DH_MAKE = --gem-install
3 export GEM2DEB_TEST_RUNNER = --check-dependencies
154
165 %:
176 dh $@ --buildsystem=ruby --with ruby