Skip to content

Commit

Permalink
Add bundler to supported package managers
Browse files Browse the repository at this point in the history
* fix unit test to preserve the order of supported
  package managers sorted alphabetically

Signed-off-by: Michal Šoltis <[email protected]>
  • Loading branch information
slimreaper35 committed Oct 18, 2024
1 parent 2b510e4 commit 2e49721
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cachi2/core/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
"generic": generic.fetch_generic_source,
Expand Down
5 changes: 0 additions & 5 deletions tests/integration/test_bundler.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
repo="https://github.com/cachito-testing/cachi2-bundler.git",
ref="malformed_ruby_missing_gemfile",
packages=({"path": ".", "type": "bundler"},),
flags=["--dev-package-managers"],
check_output=False,
check_deps_checksums=False,
check_vendor_checksums=False,
Expand All @@ -30,7 +29,6 @@
repo="https://github.com/cachito-testing/cachi2-bundler.git",
ref="malformed_ruby_missing_gemfile_lock",
packages=({"path": ".", "type": "bundler"},),
flags=["--dev-package-managers"],
check_output=False,
check_deps_checksums=False,
check_vendor_checksums=False,
Expand All @@ -44,7 +42,6 @@
repo="https://github.com/cachito-testing/cachi2-bundler.git",
ref="malformed_ruby_missing_git_revision",
packages=({"path": ".", "type": "bundler"},),
flags=["--dev-package-managers"],
check_output=False,
check_deps_checksums=False,
check_vendor_checksums=False,
Expand All @@ -58,7 +55,6 @@
repo="https://github.com/cachito-testing/cachi2-bundler.git",
ref="well_formed_ruby_all_features",
packages=({"path": ".", "type": "bundler"},),
flags=["--dev-package-managers"],
check_output=False,
check_deps_checksums=False,
check_vendor_checksums=False,
Expand All @@ -72,7 +68,6 @@
repo="https://github.com/cachito-testing/cachi2-bundler.git",
ref="well_formed_ruby_without_gemspec",
packages=({"path": ".", "type": "bundler"},),
flags=["--dev-package-managers"],
check_output=False,
check_deps_checksums=False,
check_vendor_checksums=False,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 2e49721

Please sign in to comment.