From 5c6b4720158b4fb0afadca8506947b10e0283db4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0oltis?= Date: Fri, 4 Oct 2024 12:45:08 +0200 Subject: [PATCH] Add bundler to supported package managers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix unit test to preserve the order of supported package managers sorted alphabetically Signed-off-by: Michal Ĺ oltis --- cachi2/core/resolver.py | 2 +- tests/unit/test_cli.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cachi2/core/resolver.py b/cachi2/core/resolver.py index 441e20bea..f4043c611 100644 --- a/cachi2/core/resolver.py +++ b/cachi2/core/resolver.py @@ -13,6 +13,7 @@ Handler = Callable[[Request], RequestOutput] _package_managers: dict[PackageManagerType, Handler] = { + "bundler": bundler.fetch_bundler_source, "gomod": gomod.fetch_gomod_source, "npm": npm.fetch_npm_source, "pip": pip.fetch_pip_source, @@ -22,7 +23,6 @@ # This is where we put package managers currently under development in order to # invoke them via CLI _dev_package_managers: dict[PackageManagerType, Handler] = { - "bundler": bundler.fetch_bundler_source, "rpm": rpm.fetch_rpm_source, "yarn-classic": yarn_classic.fetch_yarn_source, } diff --git a/tests/unit/test_cli.py b/tests/unit/test_cli.py index 37e044cba..bbca9c853 100644 --- a/tests/unit/test_cli.py +++ b/tests/unit/test_cli.py @@ -83,7 +83,7 @@ def test_version_option(self) -> None: result = invoke_expecting_sucess(app, ["--version"]) lines = result.output.splitlines() assert lines[0] == f"cachi2 {expect_version}" - assert lines[1].startswith("Supported package managers: gomod") + assert lines[1].startswith("Supported package managers: bundler") @pytest.mark.parametrize( "file, file_text",