Codebase list ruby-faker / d8833db
Recover original patch by Balasankar Antonio Terceiro 5 years ago
4 changed file(s) with 45 addition(s) and 32 deletion(s). Raw diff Collapse all Expand all
22 * Team upload.
33 * New upstream version 1.9.1
44 - new build dependency: ruby-simplecov
5 * Drop patches, not necessary anymore
5 * Refresh patches:
6 - disable-randomly-failing-tests.patch: dropped, not necessary anymore
7 - set-available-locale.patch: renamed to 0002-Specify-available-locales-in-tests.patch
8 - added 0001-test_middle_name-accept-2-letter-middle-names.patch: fix test that
9 fails under sbuild.
610 * debian/rules: install CHANGELOG.md as upstream changelog
711 * debian/ruby-tests.rake: reset to dh-make-ruby template
8 * 0001-test_middle_name-accept-2-letter-middle-names.patch: fix test that
9 fails under sbuild.
10 * 0002-test-adjust-paths.patch: make tests work against installed
11 package
1212 * debian/control:
1313 - Update (build) dependencies
1414 - Bump debhelper compatibility level to 11
0 From: Balasankar C <balasankarc@autistici.org>
1 Date: Sat, 2 Feb 2019 13:05:13 -0200
2 Subject: Specify available locales in tests
3
4 Signed-off-by: Antonio Terceiro <terceiro@debian.org>
5 ---
6 test/test_helper.rb | 11 ++++++++++-
7 1 file changed, 10 insertions(+), 1 deletion(-)
8
9 diff --git a/test/test_helper.rb b/test/test_helper.rb
10 index cc6c686..41a2d93 100644
11 --- a/test/test_helper.rb
12 +++ b/test/test_helper.rb
13 @@ -8,15 +8,24 @@ require 'test/unit'
14 require 'rubygems'
15 require 'timecop'
16 require 'yaml'
17 +require 'pathname'
18
19 YAML::ENGINE.yamler = 'psych' if defined? YAML::ENGINE
20 -require File.expand_path(File.dirname(__FILE__) + '/../lib/faker')
21 +require 'faker'
22
23 # configure I18n
24 locales_path = File.expand_path(File.dirname(__FILE__) + '../lib/locales')
25 +relative_locales_path = File.expand_path(File.dirname(__FILE__) + '../lib/locales')
26 +system_locales_path = File.expand_path(File.join(File.dirname(`gem which faker`),'locales'))
27 +locales_path = Pathname.new(relative_locales_path).directory? ? relative_locales_path : system_locales_path
28 I18n.available_locales = Dir[locales_path + '/*'].map do |file|
29 file.split('.').first
30 end
31 +I18n.config.available_locales = [:"ca-CAT", :ca, :"da-DK", :"de-AT", :"de-CH",
32 +:de, :"en-AU", "en-BORK", "en-CA", :"en-GB", :"en-IND", :"en-NEP", :"en-NZ",
33 +:"en-PAK", "en-US", "en-UG", :en, "en-au-ocker", "es", :"es-MX", :fa, :fi,
34 +:"fi-FI", :fr, :he, :it, :nep, :pl, :pt, :sv, :uk, :shire, :home, :work,
35 +:kindergarden, :xx, :xy]
36 I18n.enforce_available_locales = true
37
38 # deterministically_verify executes the test provided in the block successive
+0
-26
debian/patches/0002-test-adjust-paths.patch less more
0 From: Antonio Terceiro <terceiro@debian.org>
1 Date: Sat, 2 Feb 2019 12:43:07 -0200
2 Subject: test: adjust paths
3
4 This fixes running the tests against the installed package.
5 ---
6 test/test_helper.rb | 4 ++--
7 1 file changed, 2 insertions(+), 2 deletions(-)
8
9 diff --git a/test/test_helper.rb b/test/test_helper.rb
10 index cc6c686..8da2940 100644
11 --- a/test/test_helper.rb
12 +++ b/test/test_helper.rb
13 @@ -10,10 +10,10 @@ require 'timecop'
14 require 'yaml'
15
16 YAML::ENGINE.yamler = 'psych' if defined? YAML::ENGINE
17 -require File.expand_path(File.dirname(__FILE__) + '/../lib/faker')
18 +require 'faker'
19
20 # configure I18n
21 -locales_path = File.expand_path(File.dirname(__FILE__) + '../lib/locales')
22 +locales_path = File.expand_path(File.dirname(`gem which faker`.strip) + '/locales')
23 I18n.available_locales = Dir[locales_path + '/*'].map do |file|
24 file.split('.').first
25 end
00 0001-test_middle_name-accept-2-letter-middle-names.patch
1 0002-test-adjust-paths.patch
1 0002-Specify-available-locales-in-tests.patch