Loading bin/ruby-build +7 −1 Original line number Diff line number Diff line Loading @@ -847,9 +847,15 @@ isolated_gem_install() { } apply_ruby_patch() { local patchfile case "$1" in ruby-* | jruby-* | rubinius-* ) patch -p0 -i "${2:--}" patchfile="$(mktemp "${TMP}/ruby-patch.XXXXXX")" cat "${2:--}" >"$patchfile" local striplevel=0 grep -q '^diff --git a/' "$patchfile" && striplevel=1 patch -p$striplevel --force -i "$patchfile" ;; esac } Loading test/build.bats +29 −3 Original line number Diff line number Diff line Loading @@ -85,9 +85,9 @@ OUT stub brew false stub_make_install stub_make_install stub patch ' : echo patch "$@" >> build.log' stub patch ' : echo patch "$@" | sed -E "s/\.[[:alnum:]]+$/.XXX/" >> build.log' install_fixture --patch definitions/needs-yaml TMPDIR="$TMP" install_fixture --patch definitions/needs-yaml <<<"" assert_success unstub make Loading @@ -97,7 +97,33 @@ OUT yaml-0.1.6: --prefix=$INSTALL_ROOT make -j 2 make install patch -p0 -i - patch -p0 --force -i $TMP/ruby-patch.XXX ruby-2.0.0: --prefix=$INSTALL_ROOT make -j 2 make install OUT } @test "apply ruby patch from git diff before building" { cached_tarball "yaml-0.1.6" cached_tarball "ruby-2.0.0" stub brew false stub_make_install stub_make_install stub patch ' : echo patch "$@" | sed -E "s/\.[[:alnum:]]+$/.XXX/" >> build.log' TMPDIR="$TMP" install_fixture --patch definitions/needs-yaml <<<"diff --git a/script.rb" assert_success unstub make unstub patch assert_build_log <<OUT yaml-0.1.6: --prefix=$INSTALL_ROOT make -j 2 make install patch -p1 --force -i $TMP/ruby-patch.XXX ruby-2.0.0: --prefix=$INSTALL_ROOT make -j 2 make install Loading Loading
bin/ruby-build +7 −1 Original line number Diff line number Diff line Loading @@ -847,9 +847,15 @@ isolated_gem_install() { } apply_ruby_patch() { local patchfile case "$1" in ruby-* | jruby-* | rubinius-* ) patch -p0 -i "${2:--}" patchfile="$(mktemp "${TMP}/ruby-patch.XXXXXX")" cat "${2:--}" >"$patchfile" local striplevel=0 grep -q '^diff --git a/' "$patchfile" && striplevel=1 patch -p$striplevel --force -i "$patchfile" ;; esac } Loading
test/build.bats +29 −3 Original line number Diff line number Diff line Loading @@ -85,9 +85,9 @@ OUT stub brew false stub_make_install stub_make_install stub patch ' : echo patch "$@" >> build.log' stub patch ' : echo patch "$@" | sed -E "s/\.[[:alnum:]]+$/.XXX/" >> build.log' install_fixture --patch definitions/needs-yaml TMPDIR="$TMP" install_fixture --patch definitions/needs-yaml <<<"" assert_success unstub make Loading @@ -97,7 +97,33 @@ OUT yaml-0.1.6: --prefix=$INSTALL_ROOT make -j 2 make install patch -p0 -i - patch -p0 --force -i $TMP/ruby-patch.XXX ruby-2.0.0: --prefix=$INSTALL_ROOT make -j 2 make install OUT } @test "apply ruby patch from git diff before building" { cached_tarball "yaml-0.1.6" cached_tarball "ruby-2.0.0" stub brew false stub_make_install stub_make_install stub patch ' : echo patch "$@" | sed -E "s/\.[[:alnum:]]+$/.XXX/" >> build.log' TMPDIR="$TMP" install_fixture --patch definitions/needs-yaml <<<"diff --git a/script.rb" assert_success unstub make unstub patch assert_build_log <<OUT yaml-0.1.6: --prefix=$INSTALL_ROOT make -j 2 make install patch -p1 --force -i $TMP/ruby-patch.XXX ruby-2.0.0: --prefix=$INSTALL_ROOT make -j 2 make install Loading