Skip to content

Commit

Permalink
Rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tatheerf02 committed Oct 16, 2024
1 parent 4e400f2 commit a148f62
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/faker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require 'psych'
require 'i18n'

Dir.glob(File.join(mydir, 'helpers', '*.rb')).sort.each { |file| require file }
Dir.glob(File.join(mydir, 'helpers', '*.rb')).each { |file| require file }

I18n.load_path += Dir[File.join(mydir, 'locales', '**/*.yml')]

Expand Down Expand Up @@ -275,4 +275,4 @@ def disable_enforce_available_locales
end

# require faker objects
Dir.glob(File.join(mydir, 'faker', '/**/*.rb')).sort.each { |file| require file }
Dir.glob(File.join(mydir, 'faker', '/**/*.rb')).each { |file| require file }
2 changes: 1 addition & 1 deletion lib/faker/default/id_number.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class IdNumber < Base
].freeze
ZA_RACE_DIGIT = '8'
ZA_CITIZENSHIP_DIGITS = %w[0 1].freeze
BRAZILIAN_ID_FORMAT = /(\d{1,2})(\d{3})(\d{3})([\dX])/.freeze
BRAZILIAN_ID_FORMAT = /(\d{1,2})(\d{3})(\d{3})([\dX])/
BRAZILIAN_ID_FROM = 10_000_000
BRAZILIAN_ID_TO = 99_999_999

Expand Down
6 changes: 3 additions & 3 deletions test/faker/default/test_faker_crypto_coin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ class TestFakerCryptoCoin < Test::Unit::TestCase
ACRONYM = 1
URL_LOGO = 2

REGEX_COIN_NAME = /[a-zA-Z .]{3,}/.freeze
REGEX_ACRONYM = /\w+{3,}/.freeze
REGEX_URL_LOGO = /^https:\/\/i.imgur.com\/.......\./.freeze
REGEX_COIN_NAME = /[a-zA-Z .]{3,}/
REGEX_ACRONYM = /\w+{3,}/
REGEX_URL_LOGO = /^https:\/\/i.imgur.com\/.......\./

def setup
@tester = Faker::CryptoCoin
Expand Down
4 changes: 2 additions & 2 deletions test/faker/default/test_faker_vehicle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
require_relative '../../test_helper'

class TestFakerVehicle < Test::Unit::TestCase
WORD_MATCH = /\w+\.?/.freeze
VIN_REGEX = /\A[A-HJ-NPR-Z0-9]{17}\z/.freeze
WORD_MATCH = /\w+\.?/
VIN_REGEX = /\A[A-HJ-NPR-Z0-9]{17}\z/

def setup
@tester = Faker::Vehicle
Expand Down

0 comments on commit a148f62

Please sign in to comment.