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

Add mockable home fn and Env trait #29

Merged
merged 6 commits into from
Oct 10, 2022
Merged

Add mockable home fn and Env trait #29

merged 6 commits into from
Oct 10, 2022

Commits on Sep 19, 2022

  1. Add _from variants to support threaded tests

    These permit abstracting over some common global process state and allow
    the use of home in project where in-process threaded tests are
    desirable, and where rustup / cargo state is changed during the tests.
    rbtcollins authored and LucioFranco committed Sep 19, 2022
    Configuration menu
    Copy the full SHA
    0467bc2 View commit details
    Browse the repository at this point in the history
  2. Publically export OS_ENV

    This needs to be public to allow rustup to cleanly call the from family
    of functions but still benefit from the Windows specific codepath.
    rbtcollins authored and LucioFranco committed Sep 19, 2022
    Configuration menu
    Copy the full SHA
    660ccbc View commit details
    Browse the repository at this point in the history
  3. Review feedback

    rbtcollins authored and LucioFranco committed Sep 19, 2022
    Configuration menu
    Copy the full SHA
    c77b640 View commit details
    Browse the repository at this point in the history
  4. Add mockable home fn and Env trait

    This PR follows up and replaces on #23 which intended to add mockable
    functions to the `home` crate. This PR follows in similar vain except
    for a few changes.
    
    - All mockable fn and the `Env` trait moved into a new `env` module to
        keep the docs clean from all the extra methods that are usually not
        required for most users of the crate.
    - Rename the functions to be `with_env` instead of just having `_from`.
    
    The goal of this PR is to enable `rustup` and hopefully `cargo` in the
    future to be able to write tests which mockout the environment while
    still going through the core logic of this crate.
    LucioFranco committed Sep 19, 2022
    Configuration menu
    Copy the full SHA
    e3e570d View commit details
    Browse the repository at this point in the history
  5. update changelog

    LucioFranco committed Sep 19, 2022
    Configuration menu
    Copy the full SHA
    38c610a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fb34fe9 View commit details
    Browse the repository at this point in the history