Brian C. Lane
052a8ba991
Add recipe_diff function and helpers.
...
This takes a pair of Recipe objects and returns a list of diff dicts
that include what was changed between the two recipes.
2018-06-11 16:54:57 -07:00
Brian C. Lane
7f1adf120c
Add tag_recipe_commit helper function
...
And change tests to use it so that both it and tag_file_commit are used.
2018-06-11 16:54:57 -07:00
Brian C. Lane
639d325a0c
Change read_recipe_commit to use the recipe name
...
Callers really shouldn't need to know the details of the filenames, so
change it to convert it internally.
2018-06-11 16:54:57 -07:00
Brian C. Lane
ab6decec0b
Add revert_recipe function
...
And adjust the tests to use it so that it covers both revert_recipe and
revert_file.
2018-06-11 16:54:57 -07:00
Brian C. Lane
c937e69d3b
Add delete_recipe helper function and test
...
Use delete_recipe in the test so that both it and delete_file are
covered.
2018-06-11 16:54:57 -07:00
Brian C. Lane
7b5115d19c
Split recipe_from_toml into recipe_from_dict helper.
...
This will be useful for creating Recipe objects from json created dicts.
2018-06-11 16:54:57 -07:00
Brian C. Lane
3c75711b30
Fix the recipe version bumping
...
Recipe should have its version bumped based on the version from the
previous commit, and not be bumped on the first commit. Fix the code and
the tests.
2018-06-11 16:54:57 -07:00
Brian C. Lane
90a8798f4c
Move the git repo into a subdirectory
...
And fix the import of recipes (needs to have full path passed in).
2018-06-11 16:54:57 -07:00
Brian C. Lane
596f06d5c0
Fix list_commits sort order.
...
It appears that with libgit2 v0.24.6 reverse causes it to list them
newest first. In 0.25.1 it lists them oldest first. On both versions
just using SortMode.TIME gives the desired result of oldest first.
2018-06-11 16:54:57 -07:00
Brian C. Lane
afdb320266
Add tests for the pylorax.api.recipes module
2018-06-11 16:54:57 -07:00