Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix keyword argument not applied #3

Closed
rept opened this issue Mar 13, 2020 · 1 comment
Closed

Fix keyword argument not applied #3

rept opened this issue Mar 13, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@rept
Copy link

rept commented Mar 13, 2020

I got this error message:

ruby-2.6.5/gems/faker-2.10.2/lib/helpers/unique_generator.rb:22: Passing `number` with the 1st argument of `characters` is deprecated. Use keyword argument like `characters(number: ...)` instead.

To automatically update from positional arguments to keyword arguments,
install rubocop-faker and run:

rubocop \
  --require rubocop-faker \
  --only Faker/DeprecatedArguments \
  --auto-correct

Although I have ran the rubocop-faker (and it fixed some issues).

This code I have in a factory wasn't fixed however :

public_key { Faker::Lorem.unique.characters(255) }

Changing it into

public_key { Faker::Lorem.unique.characters(number: 255) }

Resolved the issue.

@koic koic added the enhancement New feature or request label Mar 13, 2020
@koic koic closed this as completed in 8ecdfe8 Mar 14, 2020
@koic
Copy link
Owner

koic commented Mar 14, 2020

Thanks for the feedback. RuboCop Faker 1.0 has been released and this issue has been fixed.
https://rubygems.org/gems/rubocop-faker/versions/1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants