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

Rework Faker::Time::between #1417

Merged
merged 10 commits into from
Jul 28, 2019
Merged

Commits on Oct 16, 2018

  1. 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.
    pjohnmeyer committed Oct 16, 2018
    Configuration menu
    Copy the full SHA
    2a40c51 View commit details
    Browse the repository at this point in the history
  2. 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.
    pjohnmeyer committed Oct 16, 2018
    Configuration menu
    Copy the full SHA
    d4eeea1 View commit details
    Browse the repository at this point in the history
  3. 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.
    pjohnmeyer committed Oct 16, 2018
    Configuration menu
    Copy the full SHA
    d716c8b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    960f943 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2019

  1. Fix merge issues

    vbrazo committed Jul 28, 2019
    Configuration menu
    Copy the full SHA
    a19cfce View commit details
    Browse the repository at this point in the history
  2. Update docs

    vbrazo committed Jul 28, 2019
    Configuration menu
    Copy the full SHA
    dd1bddf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    62831ea View commit details
    Browse the repository at this point in the history
  4. Delete time.md

    vbrazo authored Jul 28, 2019
    Configuration menu
    Copy the full SHA
    b61258f View commit details
    Browse the repository at this point in the history
  5. Docs

    vbrazo committed Jul 28, 2019
    Configuration menu
    Copy the full SHA
    01237b4 View commit details
    Browse the repository at this point in the history
  6. Merge branch 'rework-time-between' of github.com:pjohnmeyer/faker int…

    …o rework-time-between
    vbrazo committed Jul 28, 2019
    Configuration menu
    Copy the full SHA
    2bea673 View commit details
    Browse the repository at this point in the history