Loading bin/ruby-build +14 −8 Original line number Diff line number Diff line Loading @@ -304,16 +304,22 @@ http() { local file="$3" [ -n "$url" ] || return 1 local http_client if [ -n "${RUBY_BUILD_HTTP_CLIENT}" ]; then http_client="http_${method}_${RUBY_BUILD_HTTP_CLIENT}" else if type aria2c &>/dev/null; then "http_${method}_aria2c" "$url" "$file" http_client="http_${method}_aria2c" elif type curl &>/dev/null; then "http_${method}_curl" "$url" "$file" http_client="http_${method}_curl" elif type wget &>/dev/null; then "http_${method}_wget" "$url" "$file" http_client="http_${method}_wget" else echo "error: please install \`aria2c\`, \`curl\` or \`wget\` and try again" >&2 exit 1 fi fi "${http_client}" "$url" "$file" } http_head_aria2c() { Loading test/build.bats +0 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ export CC=cc export -n RUBY_CONFIGURE_OPTS setup() { ensure_not_found_in_path aria2c mkdir -p "$INSTALL_ROOT" stub md5 false stub curl false Loading test/cache.bats +0 −2 Original line number Diff line number Diff line Loading @@ -3,10 +3,8 @@ load test_helper export RUBY_BUILD_SKIP_MIRROR=1 export RUBY_BUILD_CACHE_PATH="$TMP/cache" export RUBY_BUILD_CURL_OPTS= setup() { ensure_not_found_in_path aria2c mkdir "$RUBY_BUILD_CACHE_PATH" } Loading test/checksum.bats +0 −5 Original line number Diff line number Diff line Loading @@ -3,11 +3,6 @@ load test_helper export RUBY_BUILD_SKIP_MIRROR=1 export RUBY_BUILD_CACHE_PATH= export RUBY_BUILD_CURL_OPTS= setup() { ensure_not_found_in_path aria2c } @test "package URL without checksum" { Loading test/fetch.bats +2 −2 Original line number Diff line number Diff line Loading @@ -3,10 +3,8 @@ load test_helper export RUBY_BUILD_SKIP_MIRROR=1 export RUBY_BUILD_CACHE_PATH= export RUBY_BUILD_ARIA2_OPTS= setup() { ensure_not_found_in_path aria2c export RUBY_BUILD_BUILD_PATH="${TMP}/source" mkdir -p "${RUBY_BUILD_BUILD_PATH}" } Loading @@ -21,6 +19,8 @@ setup() { } @test "using aria2c if available" { export RUBY_BUILD_ARIA2_OPTS= export RUBY_BUILD_HTTP_CLIENT="aria2c" stub aria2c "--allow-overwrite=true --no-conf=true -o * http://example.com/* : cp $FIXTURE_ROOT/\${5##*/} \$4" install_fixture definitions/without-checksum Loading Loading
bin/ruby-build +14 −8 Original line number Diff line number Diff line Loading @@ -304,16 +304,22 @@ http() { local file="$3" [ -n "$url" ] || return 1 local http_client if [ -n "${RUBY_BUILD_HTTP_CLIENT}" ]; then http_client="http_${method}_${RUBY_BUILD_HTTP_CLIENT}" else if type aria2c &>/dev/null; then "http_${method}_aria2c" "$url" "$file" http_client="http_${method}_aria2c" elif type curl &>/dev/null; then "http_${method}_curl" "$url" "$file" http_client="http_${method}_curl" elif type wget &>/dev/null; then "http_${method}_wget" "$url" "$file" http_client="http_${method}_wget" else echo "error: please install \`aria2c\`, \`curl\` or \`wget\` and try again" >&2 exit 1 fi fi "${http_client}" "$url" "$file" } http_head_aria2c() { Loading
test/build.bats +0 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ export CC=cc export -n RUBY_CONFIGURE_OPTS setup() { ensure_not_found_in_path aria2c mkdir -p "$INSTALL_ROOT" stub md5 false stub curl false Loading
test/cache.bats +0 −2 Original line number Diff line number Diff line Loading @@ -3,10 +3,8 @@ load test_helper export RUBY_BUILD_SKIP_MIRROR=1 export RUBY_BUILD_CACHE_PATH="$TMP/cache" export RUBY_BUILD_CURL_OPTS= setup() { ensure_not_found_in_path aria2c mkdir "$RUBY_BUILD_CACHE_PATH" } Loading
test/checksum.bats +0 −5 Original line number Diff line number Diff line Loading @@ -3,11 +3,6 @@ load test_helper export RUBY_BUILD_SKIP_MIRROR=1 export RUBY_BUILD_CACHE_PATH= export RUBY_BUILD_CURL_OPTS= setup() { ensure_not_found_in_path aria2c } @test "package URL without checksum" { Loading
test/fetch.bats +2 −2 Original line number Diff line number Diff line Loading @@ -3,10 +3,8 @@ load test_helper export RUBY_BUILD_SKIP_MIRROR=1 export RUBY_BUILD_CACHE_PATH= export RUBY_BUILD_ARIA2_OPTS= setup() { ensure_not_found_in_path aria2c export RUBY_BUILD_BUILD_PATH="${TMP}/source" mkdir -p "${RUBY_BUILD_BUILD_PATH}" } Loading @@ -21,6 +19,8 @@ setup() { } @test "using aria2c if available" { export RUBY_BUILD_ARIA2_OPTS= export RUBY_BUILD_HTTP_CLIENT="aria2c" stub aria2c "--allow-overwrite=true --no-conf=true -o * http://example.com/* : cp $FIXTURE_ROOT/\${5##*/} \$4" install_fixture definitions/without-checksum Loading