Closed neanias closed 6 months ago
thank you @neanias this is good to know. As @thdaraujo mentioned, we did something similar for Faker URL and email addresses. I'm sure there are others but there's so many it's hard to spot all opportunities that need to be changed.
We can add a callout for this change when this PR gets released so folks know ahead of bumping the version. Therefore, I am okay with changing it to only generate test numbers by default and add the callout in the release notes.
Since we're working on this file, could you also change check_digit
to be a private method?
@stefannibrasil Ok, happy to just move it to be enabled by default! If we're changing the check_digit
method to be private, should I also remove the related tests? The code paths will be exercised by the british_number
method, I suppose.
@stefannibrasil Ok, happy to just move it to be enabled by default! If we're changing the
check_digit
method to be private, should I also remove the related tests? The code paths will be exercised by thebritish_number
method, I suppose.
Yes, that's the approach I follow too. No need to test private methods 👍
Glad we got it through in the end! 🚀
Hello! Just wondering about this going in the recent changelog. It wasn't mentioned that it's potentially a breaking change for people using the generator and expecting the old range. Is it worth adding it later or is it just done for now?
HI @neanias thanks for the reminder! I've cut a release with a note about this: https://github.com/faker-ruby/faker/releases/tag/v3.4.2
The NHS sets aside a range of numbers for test purposes (999 000 0000 to 999 999 9999). By default, this generator creates valid NHS numbers that may be in use by actual people in the UK health services. This param will switch to using the test range which aren't in use anywhere.
Motivation / Background
This Pull Request has been created because the NHS sets aside a range of numbers for test purposes (999 000 0000 to 999 999 9999). By default, this generator creates valid NHS numbers that may be in use by actual people in the UK health services. This param will switch to using the test range which aren't in use anywhere.
Additional information
NHS Digital documentation about "synthetic" data
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]