mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 18:11:48 +04:00
Remove use of 'rvm-download' rbenv plugin
This commit is contained in:
parent
5bc56889e9
commit
ab6dab3660
4 changed files with 3 additions and 12 deletions
|
|
@ -91,7 +91,6 @@ def _install_rbenv(
|
||||||
# Only install ruby-build if the version is specified
|
# Only install ruby-build if the version is specified
|
||||||
if version != C.DEFAULT:
|
if version != C.DEFAULT:
|
||||||
plugins_dir = os.path.join(envdir, 'plugins')
|
plugins_dir = os.path.join(envdir, 'plugins')
|
||||||
_extract_resource('ruby-download.tar.gz', plugins_dir)
|
|
||||||
_extract_resource('ruby-build.tar.gz', plugins_dir)
|
_extract_resource('ruby-build.tar.gz', plugins_dir)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -99,10 +98,7 @@ def _install_ruby(
|
||||||
prefix: Prefix,
|
prefix: Prefix,
|
||||||
version: str,
|
version: str,
|
||||||
) -> None: # pragma: win32 no cover
|
) -> None: # pragma: win32 no cover
|
||||||
try:
|
# build from source using rbenv + ruby-build
|
||||||
helpers.run_setup_cmd(prefix, ('rbenv', 'download', version))
|
|
||||||
except CalledProcessError: # pragma: no cover (usually find with download)
|
|
||||||
# Failed to download from mirror for some reason, build it instead
|
|
||||||
helpers.run_setup_cmd(prefix, ('rbenv', 'install', version))
|
helpers.run_setup_cmd(prefix, ('rbenv', 'install', version))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -18,11 +18,6 @@ from typing import Sequence
|
||||||
REPOS = (
|
REPOS = (
|
||||||
('rbenv', 'https://github.com/rbenv/rbenv', '38e1fbb'),
|
('rbenv', 'https://github.com/rbenv/rbenv', '38e1fbb'),
|
||||||
('ruby-build', 'https://github.com/rbenv/ruby-build', '9d92a69'),
|
('ruby-build', 'https://github.com/rbenv/ruby-build', '9d92a69'),
|
||||||
(
|
|
||||||
'ruby-download',
|
|
||||||
'https://github.com/garnieretienne/rvm-download',
|
|
||||||
'09bd7c6',
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ def test_uses_system_if_both_gem_and_ruby_are_available(find_exe_mck):
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'filename',
|
'filename',
|
||||||
('rbenv.tar.gz', 'ruby-build.tar.gz', 'ruby-download.tar.gz'),
|
('rbenv.tar.gz', 'ruby-build.tar.gz'),
|
||||||
)
|
)
|
||||||
def test_archive_root_stat(filename):
|
def test_archive_root_stat(filename):
|
||||||
with resource_bytesio(filename) as f:
|
with resource_bytesio(filename) as f:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue