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

'cache prepare' command #67

Merged
merged 39 commits into from
May 18, 2022
Merged

'cache prepare' command #67

merged 39 commits into from
May 18, 2022

Commits on May 18, 2022

  1. test: add Aruba Cucumber testing

    Configures the project for BDD-based acceptance testing with Aruba
    and Cucumber.
    CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    0b71031 View commit details
    Browse the repository at this point in the history
  2. build: update to .NET 6.0

    ...because, Freshli should be fresh, no? ;)
    Also updates GitHub Action tooling.
    CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    dd648b1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e93d0a7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d254334 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2361362 View commit details
    Browse the repository at this point in the history
  6. refactor: move --output and --format to scan only

    Eliminates some now-unnecessary inheritance with commands,
    wherein all commands would include the --output and
    --format options. Also updates more dependencies to the
    latest versions.
    CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    6b8ef5a View commit details
    Browse the repository at this point in the history
  7. fix Send_Args_ReturnsScanOptions test

    mfcorgi authored and CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    ba6b96d View commit details
    Browse the repository at this point in the history
  8. feat: add 'cache' and 'cache prepare' commands

    Implements the 'cache' command, which has a 'prepare'
    subcommand. At present, this does nothing.
    CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    395dda7 View commit details
    Browse the repository at this point in the history
  9. feat: add global --cache-dir option

    Adds a --cache-dir global option with a default value of
    $HOME/.freshli, for storing temporary files.
    CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    665542a View commit details
    Browse the repository at this point in the history
  10. bug: return code from ScanCommand.Run()

    The ScanCommandRunner.Run() function returns an integer
    return code (0 if successful), and the invocation of
    ScanCommand.Run() expects a return code, but ScanCommand.Run()
    incorrectly is 'void'. This changes the return of Run()
    so it no longer drops this return code.
    CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    e6bdbaf View commit details
    Browse the repository at this point in the history
  11. feat: implement 'cache prepare' command

    Creates the database file at the user-specified
    (or default) location for the cache, and/or
    migrates the existing file. If the file is corrupt,
    the command fails with a non-zero exit code.
    CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    c2a0637 View commit details
    Browse the repository at this point in the history
  12. refactor test: make VerifyAlias test helper function generic

    Tests for other commands will need to use the logic in VerifyAlias.
    This moves VerifyAlias to a new TestHelpers class, and makes the
    function generic, so it can be used with any System.CommandLine.Command
    class.
    CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    7e390a0 View commit details
    Browse the repository at this point in the history
  13. test: --cache-dir global option

    Tests for --cache-dir global option. This can only be tested on
    MainCommand directly, since the normal command building does not
    take place in the tests.
    CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    3b2acfe View commit details
    Browse the repository at this point in the history
  14. test: main command should not itself have a handler

    The main command should not be runnable directly. Instead, one of its
    subcommands must be run instead. This test confirms that as true.
    CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    ec85307 View commit details
    Browse the repository at this point in the history
  15. test: 'cache' and 'cache prepare' commands

    Confirms the following:
    * 'cache' is not directly runnable (no handler)
    * 'cache prepare' is runnable (has handler)
    CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    673b2cc View commit details
    Browse the repository at this point in the history
  16. test: simplify help test

    Cucumber now tests more specific statements within the --help
    output, rather than expecting a large exact block.
    CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    2bbdc4f View commit details
    Browse the repository at this point in the history
  17. test: testing 'cache prepare' produces valid database

    Ensures that 'cache prepare' creates the expected default folder,
    and generates an SQLite database file that passes SQLite's
    "PRAGMA integrity_check".
    
    NOTE: It is not feasible to test for pending migrations with cucumber.
    CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    a5e2f93 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    0cef7b2 View commit details
    Browse the repository at this point in the history
  19. docs: update CONTRIBUTING.md to reflect new architecture

    --format and --output are no longer shared between all commands,
    so all mentions of that are removed. Shows the correct inheritance
    for Commands now that BaseCommand<> has been removed. Adds mention
    of --cache-dir global argument. Documents the new cache command.
    CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    3def57e View commit details
    Browse the repository at this point in the history
  20. docs: fix various typos and formatting issues

    Fixes misspelled words in README.md and CONTRIBUTING.md.
    Improves alignment of columns on Markdown representation of tables
    (thanks to JetBrains). Improves readability of command list in
    Program.cs, to make it easier for future developers to add
    their own. Reordered methods in Program.cs from outermost to
    innermost to make navigating the file a bit easier.
    CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    c30c59e View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    53bfbe4 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    cd3f9e9 View commit details
    Browse the repository at this point in the history
  23. Increments SDK version

    mscottford committed May 18, 2022
    Configuration menu
    Copy the full SHA
    41634c8 View commit details
    Browse the repository at this point in the history
  24. Refreshes devcontainer

    Adds in Ruby 3.1 using the same setup that's used to build the official
    Docker container.
    https://github.com/docker-library/ruby/blob/master/3.1/bullseye/Dockerfile
    mscottford committed May 18, 2022
    Configuration menu
    Copy the full SHA
    ea0f906 View commit details
    Browse the repository at this point in the history
  25. Reduces duplication within option/argument helper methods

    Also changes the name of the methods to make it more clear that a value is being retrieved, not an option/argument.
    mscottford committed May 18, 2022
    Configuration menu
    Copy the full SHA
    937af35 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    dd8ffdd View commit details
    Browse the repository at this point in the history
  27. Normalizes file

    mscottford committed May 18, 2022
    Configuration menu
    Copy the full SHA
    3319499 View commit details
    Browse the repository at this point in the history
  28. Reduces duplication between test methods

    Switches to using `MethodData` and `TheoryData` to represent the set of data to test.
    
    This approach is used instead of the `[InlineData]` attribute because the `ArgumentArity` values are not technically constants, and only constant values can be parameters to attributes.
    mscottford committed May 18, 2022
    Configuration menu
    Copy the full SHA
    287ea21 View commit details
    Browse the repository at this point in the history
  29. fix: eliminate use of environment variable for --cache-dir

    Environment variables on Linux do not persist between process
    executions, so this was not actually enabling the 'dotnet ef'
    tool to work with non-standard locations. Removing all use
    of the environment variable to simplify code.
    CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    7477441 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    5090d35 View commit details
    Browse the repository at this point in the history
  31. style: split classes out into dedicated files

    per PR request
    CodeMouse92 committed May 18, 2022
    Configuration menu
    Copy the full SHA
    07de1d8 View commit details
    Browse the repository at this point in the history
  32. Adds coverlet dotnet tool

    mscottford committed May 18, 2022
    Configuration menu
    Copy the full SHA
    484dc87 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    b9485cf View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    c09b05c View commit details
    Browse the repository at this point in the history
  35. Removes extraneous configuration

    This was erroneously left over after the collect and submit steps were separated.
    mscottford committed May 18, 2022
    Configuration menu
    Copy the full SHA
    071f6c2 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    9f1d82e View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    e626d46 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    849617b View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    2d294b3 View commit details
    Browse the repository at this point in the history