-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Rework Faker::Time::between #1417
Merged
Merged
Commits on Oct 16, 2018
-
Add Faker::Time.between_dates, remove period from between
This is an API breaking change. Before this change, issues such as faker-ruby#1280 existed due to some confusion about the behavior of Faker::Time.between. In essence, between could produce values outside of the range of (from..to) if the range is smaller than the provided period. After this change, between now behaves more like Faker::Date.between and as such the period argument has been removed. For the old behavior, a user should switch to calling between_dates, which has the same method signature as the old between method. The :between period is no longer valid. Documentation still needs to be updated, and additional tests need to be written.
Configuration menu - View commit details
-
Copy full SHA for 2a40c51 - Browse repository at this point
Copy the full SHA 2a40c51View commit details -
Remove inheritance of Faker::Date by Faker::Time
This is an API breaking change. Before this change, Faker::Time re-used some behavior of Faker::Date by first inheriting from Date, then using `super`. This relationship was one of convenience, though, and created some odd behavior for Time. For example, calling Faker::Time.birthday was possible, as birthday is defined in Faker::Date, but it would unintuitively return a Date object. Now, Faker::Time explicitly calls out to Faker::Date methods everywhere necessary, and the inheritance relationship has been removed. This does remove Faker::Time::birthday, and Faker::Time::between_except from the interface - but as these methods both return Date objects and are not documented in Faker::Time docs, they were never indicated for direct use anyway.
Configuration menu - View commit details
-
Copy full SHA for d4eeea1 - Browse repository at this point
Copy the full SHA d4eeea1View commit details -
Improve Faker::Time.between tests for v2 behavior
Adds a new test to prevent regression of faker-ruby#1280, and adds return type checking for new method between_dates.
Configuration menu - View commit details
-
Copy full SHA for d716c8b - Browse repository at this point
Copy the full SHA d716c8bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 960f943 - Browse repository at this point
Copy the full SHA 960f943View commit details
Commits on Jul 28, 2019
-
Configuration menu - View commit details
-
Copy full SHA for a19cfce - Browse repository at this point
Copy the full SHA a19cfceView commit details -
Configuration menu - View commit details
-
Copy full SHA for dd1bddf - Browse repository at this point
Copy the full SHA dd1bddfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 62831ea - Browse repository at this point
Copy the full SHA 62831eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for b61258f - Browse repository at this point
Copy the full SHA b61258fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 01237b4 - Browse repository at this point
Copy the full SHA 01237b4View commit details -
Merge branch 'rework-time-between' of github.com:pjohnmeyer/faker int…
…o rework-time-between
Configuration menu - View commit details
-
Copy full SHA for 2bea673 - Browse repository at this point
Copy the full SHA 2bea673View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.