Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Although we maintain Faker in our free time, we try to respond to contributions

## Setting up your environment

Faker requires Ruby version >= 2.7. After forking, and cloning the repo, navigate to the directory, and run:
Faker requires Ruby version >= 3.2. After forking, and cloning the repo, navigate to the directory, and run:

```ruby
bundle install
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ gemspec
gem 'irb'
gem 'minitest'
gem 'minitest-mock'
gem 'parallel', '< 2.0' # transitive dependency (requires Ruby 3.3)
gem 'pry'
gem 'rake'
gem 'rbs', '< 4.2.0' # transitive dependency (requires Ruby 3.3)
gem 'rdoc'
gem 'rubocop'
gem 'rubocop-minitest'
Expand Down
61 changes: 27 additions & 34 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,18 @@ GEM
benchmark (0.5.0)
benchmark-ips (2.15.1)
coderay (1.1.3)
concurrent-ruby (1.3.7)
docile (1.4.1)
concurrent-ruby (1.3.8)
drb (2.2.3)
erb (6.0.4)
erb (6.0.7)
i18n (1.15.2)
concurrent-ruby (~> 1.0)
io-console (0.8.2)
io-console (0.9.2)
irb (1.18.0)
pp (>= 0.6.0)
prism (>= 1.3.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.20.0)
json (2.21.2)
language_server-protocol (3.17.0.6)
lint_roller (1.1.0)
logger (1.7.0)
Expand All @@ -33,10 +32,10 @@ GEM
prism (~> 1.5)
minitest-mock (5.27.0)
parallel (1.28.0)
parser (3.3.11.1)
parser (3.3.12.0)
ast (~> 2.4.1)
racc
power_assert (3.0.1)
power_assert (3.1.0)
pp (0.6.4)
prettyprint
prettyprint (0.2.0)
Expand All @@ -48,7 +47,7 @@ GEM
racc (1.8.1)
rainbow (3.1.1)
rake (13.4.2)
rbs (4.0.3)
rbs (4.1.3)
logger
prism (>= 1.6.0)
tsort
Expand All @@ -58,10 +57,10 @@ GEM
rbs (>= 4.0.0)
tsort
regexp_parser (2.12.0)
reline (0.6.3)
reline (0.7.0)
io-console (~> 0.5)
rubocop (1.88.1)
json (~> 2.3)
rubocop (1.90.0)
json (>= 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (>= 1.10)
Expand All @@ -74,28 +73,23 @@ GEM
rubocop-ast (1.50.0)
parser (>= 3.3.7.2)
prism (~> 1.7)
rubocop-minitest (0.39.1)
rubocop-minitest (0.40.0)
lint_roller (~> 1.1)
rubocop (>= 1.75.0, < 2.0)
rubocop-ast (>= 1.38.0, < 2.0)
rubocop-rake (0.7.1)
lint_roller (~> 1.1)
rubocop (>= 1.72.1)
ruby-progressbar (1.13.0)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.13.2)
simplecov_json_formatter (0.1.4)
simplecov (1.1.1)
test-unit (3.7.8)
power_assert
timecop (0.9.11)
tsort (0.2.0)
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.2.0)
yard (0.9.44)
yard (0.9.45)

PLATFORMS
arm64-darwin
Expand All @@ -109,8 +103,10 @@ DEPENDENCIES
irb
minitest
minitest-mock
parallel (< 2.0)
pry
rake
rbs (< 4.2.0)
rdoc
rubocop
rubocop-minitest
Expand All @@ -126,49 +122,46 @@ CHECKSUMS
benchmark-ips (2.15.1) sha256=07a1a9f3c6105ecaf68c174fc3fbcddd71a0e9ada6236ae03093a0dcfd812d59
bundler (4.0.15) sha256=a4ceb882fe94a0e0ac63cd0813932bbfd631a14e5ac0b7975189b19a4d28d9e7
coderay (1.1.3) sha256=dc530018a4684512f8f38143cd2a096c9f02a1fc2459edcfe534787a7fc77d4b
concurrent-ruby (1.3.7) sha256=4412caec3a5ea2e5fdc52076724c071a81f2c0593d83b2ac8cbb8ca63b3151b0
docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
erb (6.0.4) sha256=38e3803694be357fe2bfe312487c74beaf9fb4e5beb3e22498952fe1645b95d9
erb (6.0.7) sha256=c5ca6dc25b0ef974a44dc8f59fe847577122483b1968a38dec305c60bf91ee92
faker (3.8.0)
i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5
io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
io-console (0.9.2) sha256=efa74f891dd03c0939a931dfc6e74c2813d904763d456ea9762b0525e748db08
irb (1.18.0) sha256=de9454a0703a54704b9811a5ef31a60c86949fbf4013fcf244fabc7c775248e3
json (2.20.0) sha256=9362bc6e55a952b056abf9167cf053358181c904cb70cd6eee0808ea830fc32b
json (2.21.2) sha256=1f1d3b7cf2b3ba1a69beca0bb6db13d5438b80bff3cd54cdaaa620b9b07c1c6a
language_server-protocol (3.17.0.6) sha256=5ef2c0c138f8267e1bc631d3328347d354f96724b0af22f2c79516120443b7f0
lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
method_source (1.1.0) sha256=181301c9c45b731b4769bc81e8860e72f9161ad7d66dd99103c9ab84f560f5c5
minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1
minitest-mock (5.27.0) sha256=7040ed7185417a966920987eaa6eaf1be4ea1fc5b25bb03ff4703f98564a55b0
parallel (1.28.0) sha256=33e6de1484baf2524792d178b0913fc8eb94c628d6cfe45599ad4458c638c970
parser (3.3.11.1) sha256=d17ace7aabe3e72c3cc94043714be27cc6f852f104d81aa284c2281aecc65d54
power_assert (3.0.1) sha256=8ce9876716cc74e863fcd4cdcdc52d792bd983598d1af3447083a3a9a4d34103
parser (3.3.12.0) sha256=21a6d7f755d5a24dfbdc6e6b772e4e879a52e7631a88bc5a3a134606052c9828
power_assert (3.1.0) sha256=fefe98ed5d3140628138f3f9f9194d6ece01f1320e69700d3c928adca7518251
pp (0.6.4) sha256=dfcb0fce700c41456265922884f9fe195d7fbb0674a3578e6c0f69588e82b570
prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
pry (0.16.0) sha256=d76c69065698ed1f85e717bd33d7942c38a50868f6b0673c636192b3d1b6054e
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
rbs (4.0.3) sha256=5a7bf70e2628549d9a1f44eae447b2cfe55968a9c60cfff52693a4bdcc020e14
rbs (4.1.3) sha256=0c4474a9751cdc14364bfad0b3e53678323bbdc2c31683b0445932867dbab8c4
rdoc (8.0.0) sha256=03bf8c08a9639658855a0cfd77c0abca8325c227693f7f33f82957811348c469
regexp_parser (2.12.0) sha256=35a916a1d63190ab5c9009457136ae5f3c0c7512d60291d0d1378ba18ce08ebb
reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835
rubocop (1.88.1) sha256=726af773d6bc169ed3ff852f3ca020b7c58d39c34e7a8d879a8e0147cc994f26
reline (0.7.0) sha256=5b012d8e55dbf9d450f12bde2cf7d15ff546ae80b3f8f3b30e570d431815583d
rubocop (1.90.0) sha256=9eb4c065b5c5154e4ef554c547972f3905a9eb6b53e657e580b6796b54bf8242
rubocop-ast (1.50.0) sha256=b9ca88300da0803ee222ad20cdb30494c0a784eed06fdc35d254b06d662788db
rubocop-minitest (0.39.1) sha256=998398d6da4026d297f0f9bf709a1eac5f2b6947c24431f94af08138510cf7ed
rubocop-minitest (0.40.0) sha256=353c698199115f12151144cf0b5a96f69bb9d77b660cf6536df2c4250c672a9d
rubocop-rake (0.7.1) sha256=3797f2b6810c3e9df7376c26d5f44f3475eda59eb1adc38e6f62ecf027cbae4d
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5
simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246
simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428
simplecov (1.1.1) sha256=25825ef13f0b2e74694d769817dad6ab8e90131dabdaa666e522fea105521e78
test-unit (3.7.8) sha256=689d1ca53f4d46f678b4e5d68d8e4294f87fc5e8b9238cc4de7c5727e8d65943
timecop (0.9.11) sha256=41284dc6e5041f2184f781ace766f942108c842f8d8c1386a26e6343decc7542
tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
yard (0.9.44) sha256=eb087e9b631ccd887b049f303d489963945452d5e2a7eb49a5a74a7cf6887f28
yard (0.9.45) sha256=52e211493f7cb8a3ebf7e104a25a1e73937a3103092545d34cb88fafebb3dc51

BUNDLED WITH
4.0.15
2 changes: 1 addition & 1 deletion lib/faker/default/stripe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def month
#
# @faker.version 1.9.0
def year
start_year = ::Time.new.year + 1
start_year = ::Time.now.year + 1
rand_in_range(start_year, start_year + 5).to_s
end

Expand Down
6 changes: 3 additions & 3 deletions lib/helpers/char.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ def self.romanize_cyrillic(string)
end

if Faker::Config.locale == 'ru'
# Based on conventions abopted by BGN/PCGN for Russian
# Based on conventions adopted by BGN/PCGN for Russian
ru_chars = {
'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'h', 'д' => 'd', 'е' => 'e',
'ё' => 'ye', 'ж' => 'zh', 'з' => 'z', 'и' => 'i', 'й' => 'y', 'к' => 'k',
'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o', 'п' => 'p', 'р' => 'r',
'с' => 's', 'т' => 't', 'у' => 'u', 'ф' => 'f', 'х' => 'kh', 'ц' => 'ts',
'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o', 'п' => 'p', 'р' => 'r',
'с' => 's', 'т' => 't', 'у' => 'u', 'ф' => 'f', 'х' => 'kh', 'ц' => 'ts',
'ч' => 'ch', 'ш' => 'sh', 'щ' => 'shch', 'ы' => 'у', 'э' => 'e', 'ю' => 'yu',
'я' => 'ya', 'А' => 'a', 'Б' => 'b', 'В' => 'v', 'Г' => 'h', 'Д' => 'd',
'Е' => 'e', 'Ё' => 'ye', 'Ж' => 'zh', 'З' => 'z', 'И' => 'i', 'Й' => 'y',
Expand Down
3 changes: 1 addition & 2 deletions lib/helpers/deprecator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Based on Rails ActiveSupport Deprecator
# https://github.com/rails/rails/blob/main/activesupport/lib/active_support/deprecation/constant_accessor.rb

# rubocop:disable Style/ClassVars
# rubocop:disable-next Style/ClassVars
module Faker
# Provides a way to rename generators, including their namespaces, with a deprecation cycle in which
# both the old and new names work, but using the old one prints a deprecation message.
Expand Down Expand Up @@ -115,4 +115,3 @@ def self.skip=(value)
end
end
end
# rubocop:enable Style/ClassVars
3 changes: 1 addition & 2 deletions test/faker/default/test_faker_city.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def setup
I18n.config.available_locales += [:xx]
I18n.backend.store_translations(:xx, xx)

# rubocop:disable Lint/InterpolationCheck
# rubocop:disable-next Lint/InterpolationCheck
xy = {
faker: {
address: {
Expand All @@ -26,7 +26,6 @@ def setup
}
}
}
# rubocop:enable Lint/InterpolationCheck
I18n.config.available_locales += [:xy]
I18n.backend.store_translations(:xy, xy)
end
Expand Down
3 changes: 1 addition & 2 deletions test/faker/default/test_faker_street.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class TestFakerStreet < Test::Unit::TestCase
def setup
@tester = Faker::Address
@old_locales = I18n.config.available_locales
# rubocop:disable Lint/InterpolationCheck
# rubocop:disable-next Lint/InterpolationCheck
shire = {
faker: {
address: {
Expand All @@ -23,7 +23,6 @@ def setup
}
}
}
# rubocop:enable Lint/InterpolationCheck
I18n.config.available_locales += [:shire]
I18n.backend.store_translations(:shire, shire)
end
Expand Down
3 changes: 1 addition & 2 deletions test/test_determinism.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'minitest/mock'
require_relative 'test_helper'

# rubocop:disable Security/Eval,Style/EvalWithLocation
# rubocop:disable-next Security/Eval,Style/EvalWithLocation
class TestDeterminism < Test::Unit::TestCase
def setup
@all_methods = all_methods.freeze
Expand Down Expand Up @@ -98,4 +98,3 @@ def skipped_classes
]
end
end
# rubocop:enable Security/Eval,Style/EvalWithLocation
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter

SimpleCov.start do
add_filter ['.bundle', 'lib/extensions', 'test']
skip ['.bundle', 'lib/extensions', 'test']
end

require_relative 'support/assert_not_english'
Expand Down
Loading