Skip to content

Commit ec545a5

Browse files
authored
Merge branch 'main' into feature/extend-arabic-locales
2 parents 8f6b05d + 0fe0b21 commit ec545a5

File tree

10 files changed

+65
-22
lines changed

10 files changed

+65
-22
lines changed

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ gemspec
88
gem 'benchmark'
99
gem 'minitest', '5.25.5'
1010
gem 'pry', '0.15.2'
11-
gem 'rake', '13.3.0'
11+
gem 'rake', '13.3.1'
1212
gem 'rubocop', '1.75.4'
1313
gem 'rubocop-minitest', '0.38.1'
1414
gem 'rubocop-rake', '0.7.1'
1515
gem 'simplecov', '0.22.0'
16-
gem 'test-unit', '3.6.9'
16+
gem 'test-unit', '3.7.0'
1717
gem 'timecop', '0.9.10'
1818
gem 'yard', '0.9.37'

Gemfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ GEM
88
remote: https://rubygems.org/
99
specs:
1010
ast (2.4.3)
11-
benchmark (0.4.1)
11+
benchmark (0.5.0)
1212
coderay (1.1.3)
1313
concurrent-ruby (1.3.5)
1414
docile (1.4.1)
@@ -30,7 +30,7 @@ GEM
3030
method_source (~> 1.0)
3131
racc (1.8.1)
3232
rainbow (3.1.1)
33-
rake (13.3.0)
33+
rake (13.3.1)
3434
regexp_parser (2.10.0)
3535
rubocop (1.75.4)
3636
json (~> 2.3)
@@ -60,7 +60,7 @@ GEM
6060
simplecov_json_formatter (~> 0.1)
6161
simplecov-html (0.13.1)
6262
simplecov_json_formatter (0.1.4)
63-
test-unit (3.6.9)
63+
test-unit (3.7.0)
6464
power_assert
6565
timecop (0.9.10)
6666
unicode-display_width (3.1.4)
@@ -77,12 +77,12 @@ DEPENDENCIES
7777
faker!
7878
minitest (= 5.25.5)
7979
pry (= 0.15.2)
80-
rake (= 13.3.0)
80+
rake (= 13.3.1)
8181
rubocop (= 1.75.4)
8282
rubocop-minitest (= 0.38.1)
8383
rubocop-rake (= 0.7.1)
8484
simplecov (= 0.22.0)
85-
test-unit (= 3.6.9)
85+
test-unit (= 3.7.0)
8686
timecop (= 0.9.10)
8787
yard (= 0.9.37)
8888

lib/faker/default/bank.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ class << self
1717
#
1818
# @faker.version 1.9.1
1919
def account_number(digits: 10)
20-
output = ''
21-
22-
output += rand.to_s[2..] while output.length < digits
23-
24-
output[0...digits]
20+
Array.new(digits) { rand(10) }.join
2521
end
2622

2723
##

lib/locales/en/hobby.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ en:
33
hobby:
44
activity:
55
- 3D printing
6-
- amateur radio
76
- scrapbook
87
- Amateur radio
98
- Acting

lib/locales/en/overwatch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ en:
865865
- good morning
866866
- Happy birthday
867867
- Have a nice day
868-
- Its the little things
868+
- It's the little things
869869
- Kaboom!
870870
- Shiny
871871
- Smile!

lib/locales/en/rajnikanth.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ en:
5858
"When RAJNI had surgery, the anesthesia was applied to the doctors.",
5959
"The apple which fell on newton was actually thrown by Rajinikanth.",
6060
"Only Rajinijanth has 32 wisdom teeth.",
61-
"When Rajinikanth goes thru immigration.. the officers show him thier passports.",
61+
"When Rajinikanth goes thru immigration... the officers show him their passports.",
6262
"Sun doesn't rise until Rajinikanth says 'Good Morning'",
6363
"Once Rajnikant, after chewing the 'PAAN', spit on the wall of a building.",
6464
"Today that building is popularly known as THE RED FORT..",

lib/locales/en/street_fighter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ en:
207207
- My psycho power feeds on hatred and death!
208208
- I demand an opponent worthy of my strength!
209209
- When I control the planet, I shall purge it of all hope!
210-
- Anyone who defies me willingly invites thier own death!
210+
- Anyone who defies me willingly invites their own death!
211211
- Close your eyes! An endless nightmare awaits!
212212
- Embrace your fear as you are enveloped by an eternal nightmare!
213213
- Kneel before me or die beneath my heal. The choice is yours to make freely!

lib/locales/ja/artist.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
ja:
2+
faker:
3+
artist:
4+
names:
5+
- "ドナテロ"
6+
- "ボッティチェッリ"
7+
- "ミケランジェロ"
8+
- "ラファエロ"
9+
- "ティツィアーノ"
10+
- "デューラー"
11+
- "カラヴァッジョ"
12+
- "ルーベンス"
13+
- "ベルニーニ"
14+
- "レンブラント"
15+
- "ピサロ"
16+
- "マネ"
17+
- "ドガ"
18+
- "セザンヌ"
19+
- "モネ"
20+
- "ルノワール"
21+
- "カサット"
22+
- "ゴーギャン"
23+
- "ムンク"
24+
- "クリムト"
25+
- "マティス"
26+
- "ピカソ"
27+
- "カンディンスキー"
28+
- "シャガール"
29+
- "スーラ"
30+
- "マグリット"
31+
- "エッシャー"
32+
- "ロスコ"
33+
- "ダリ"
34+
- "カーロ"
35+
- "ポロック"
36+
- "ウォーホル"
37+
- "ヴェトリアーノ"
38+
- "ダ・ヴィンチ"
39+
- "エル・グレコ"
40+
- "ウィンスロー・ホーマー"
41+
- "パウル・クレー"
42+
- "エドワード・ホッパー"
43+
- "ディエゴ・リベラ"
44+
- "フィンセント・ファン・ゴッホ"
45+
- "ジョアン・ミロ"
46+
- "アンセル・アダムス"

test/faker/default/test_faker_id_number.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test_invalid_south_african_id_number
6666
sample = @tester.invalid_south_african_id_number
6767

6868
assert_raises Date::Error do
69-
Date.parse(south_african_id_number_to_date_of_birth_string(sample))
69+
Date.parse(sample[0..5])
7070
end
7171
end
7272

@@ -276,15 +276,12 @@ def test_danish_id_number_invalid_gender
276276

277277
private
278278

279-
def south_african_id_number_to_date_of_birth_string(sample)
280-
"19#{sample[0..1]}/#{sample[2..3]}/#{sample[4..5]}}"
281-
end
282-
283279
def assert_valid_south_african_id_number(sample)
284280
assert_equal 13, sample.length
285281
assert_match(/^\d{13}$/, sample)
286282
assert_include Faker::IdNumber::ZA_CITIZENSHIP_DIGITS, sample[10]
287283
assert_equal Faker::IdNumber::ZA_RACE_DIGIT, sample[11]
288-
assert Date.parse(south_african_id_number_to_date_of_birth_string(sample))
284+
285+
assert Date.parse(sample[0..5])
289286
end
290287
end

test/test_ja_locale.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ def test_ja_ancient_methods
4242
assert_not_english(Faker::Ancient.god)
4343
end
4444

45+
def test_ja_artist_method
46+
assert_kind_of String, Faker::Artist.name
47+
assert_not_english(Faker::Artist.name)
48+
end
49+
4550
def test_ja_cat_methods
4651
assert_kind_of String, Faker::Creature::Cat.breed
4752
assert_not_match(/[a-zA-Z]/, Faker::Creature::Cat.breed)

0 commit comments

Comments
 (0)