Loading script/brew-publish +1 −1 Original line number Diff line number Diff line #!/bin/bash #!/usr/bin/env bash # Usage: script/brew-publish <formula-name> <repo> <version> set -euo pipefail Loading script/release +1 −1 Original line number Diff line number Diff line #!/bin/bash #!/usr/bin/env bash # Usage: script/release # # - checks out the master branch Loading test/build.bats +14 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ assert_build_log() { cached_tarball "yaml-0.1.6" cached_tarball "ruby-2.0.0" stub uname '-s : echo Linux' stub brew false stub_make_install stub_make_install Loading @@ -69,6 +70,7 @@ assert_build_log() { install_fixture definitions/needs-yaml assert_success unstub uname unstub make assert_build_log <<OUT Loading @@ -85,6 +87,7 @@ OUT cached_tarball "yaml-0.1.6" cached_tarball "ruby-2.0.0" stub uname '-s : echo Linux' stub brew false stub_make_install stub_make_install Loading @@ -93,6 +96,7 @@ OUT TMPDIR="$TMP" install_fixture --patch definitions/needs-yaml <<<"" assert_success unstub uname unstub make unstub patch Loading @@ -111,6 +115,7 @@ OUT cached_tarball "yaml-0.1.6" cached_tarball "ruby-2.0.0" stub uname '-s : echo Linux' stub brew false stub_make_install stub_make_install Loading @@ -119,6 +124,7 @@ OUT TMPDIR="$TMP" install_fixture --patch definitions/needs-yaml <<<"diff --git a/script.rb" assert_success unstub uname unstub make unstub patch Loading @@ -139,12 +145,14 @@ OUT brew_libdir="$TMP/homebrew-yaml" mkdir -p "$brew_libdir" stub uname '-s : echo Linux' stub brew "--prefix libyaml : echo '$brew_libdir'" false stub_make_install install_fixture definitions/needs-yaml assert_success unstub uname unstub brew unstub make Loading Loading @@ -275,6 +283,7 @@ OUT @test "setting RUBY_MAKE_INSTALL_OPTS to a multi-word string" { cached_tarball "ruby-2.0.0" stub uname '-s : echo Linux' stub_make_install export RUBY_MAKE_INSTALL_OPTS="DOGE=\"such wow\"" Loading @@ -283,6 +292,7 @@ install_package "ruby-2.0.0" "http://ruby-lang.org/ruby/2.0/ruby-2.0.0.tar.gz" DEF assert_success unstub uname unstub make assert_build_log <<OUT Loading @@ -295,6 +305,7 @@ OUT @test "setting MAKE_INSTALL_OPTS to a multi-word string" { cached_tarball "ruby-2.0.0" stub uname '-s : echo Linux' stub_make_install export MAKE_INSTALL_OPTS="DOGE=\"such wow\"" Loading @@ -303,6 +314,7 @@ install_package "ruby-2.0.0" "http://ruby-lang.org/ruby/2.0/ruby-2.0.0.tar.gz" DEF assert_success unstub uname unstub make assert_build_log <<OUT Loading Loading @@ -355,6 +367,7 @@ apply -p1 -i /my/patch.diff exec ./configure "\$@" CONF stub uname '-s : echo Linux' stub apply 'echo apply "$@" >> build.log' stub_make_install Loading @@ -364,6 +377,7 @@ install_package "ruby-2.0.0" "http://ruby-lang.org/pub/ruby-2.0.0.tar.gz" DEF assert_success unstub uname unstub make unstub apply Loading test/test_helper.bash +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ export TMP="$BATS_TEST_DIRNAME/tmp" if [ "$FIXTURE_ROOT" != "$BATS_TEST_DIRNAME/fixtures" ]; then export FIXTURE_ROOT="$BATS_TEST_DIRNAME/fixtures" export INSTALL_ROOT="$TMP/install" PATH=/usr/bin:/usr/sbin:/bin/:/sbin PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" PATH="$BATS_TEST_DIRNAME/../bin:$PATH" PATH="$TMP/bin:$PATH" export PATH Loading Loading
script/brew-publish +1 −1 Original line number Diff line number Diff line #!/bin/bash #!/usr/bin/env bash # Usage: script/brew-publish <formula-name> <repo> <version> set -euo pipefail Loading
script/release +1 −1 Original line number Diff line number Diff line #!/bin/bash #!/usr/bin/env bash # Usage: script/release # # - checks out the master branch Loading
test/build.bats +14 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ assert_build_log() { cached_tarball "yaml-0.1.6" cached_tarball "ruby-2.0.0" stub uname '-s : echo Linux' stub brew false stub_make_install stub_make_install Loading @@ -69,6 +70,7 @@ assert_build_log() { install_fixture definitions/needs-yaml assert_success unstub uname unstub make assert_build_log <<OUT Loading @@ -85,6 +87,7 @@ OUT cached_tarball "yaml-0.1.6" cached_tarball "ruby-2.0.0" stub uname '-s : echo Linux' stub brew false stub_make_install stub_make_install Loading @@ -93,6 +96,7 @@ OUT TMPDIR="$TMP" install_fixture --patch definitions/needs-yaml <<<"" assert_success unstub uname unstub make unstub patch Loading @@ -111,6 +115,7 @@ OUT cached_tarball "yaml-0.1.6" cached_tarball "ruby-2.0.0" stub uname '-s : echo Linux' stub brew false stub_make_install stub_make_install Loading @@ -119,6 +124,7 @@ OUT TMPDIR="$TMP" install_fixture --patch definitions/needs-yaml <<<"diff --git a/script.rb" assert_success unstub uname unstub make unstub patch Loading @@ -139,12 +145,14 @@ OUT brew_libdir="$TMP/homebrew-yaml" mkdir -p "$brew_libdir" stub uname '-s : echo Linux' stub brew "--prefix libyaml : echo '$brew_libdir'" false stub_make_install install_fixture definitions/needs-yaml assert_success unstub uname unstub brew unstub make Loading Loading @@ -275,6 +283,7 @@ OUT @test "setting RUBY_MAKE_INSTALL_OPTS to a multi-word string" { cached_tarball "ruby-2.0.0" stub uname '-s : echo Linux' stub_make_install export RUBY_MAKE_INSTALL_OPTS="DOGE=\"such wow\"" Loading @@ -283,6 +292,7 @@ install_package "ruby-2.0.0" "http://ruby-lang.org/ruby/2.0/ruby-2.0.0.tar.gz" DEF assert_success unstub uname unstub make assert_build_log <<OUT Loading @@ -295,6 +305,7 @@ OUT @test "setting MAKE_INSTALL_OPTS to a multi-word string" { cached_tarball "ruby-2.0.0" stub uname '-s : echo Linux' stub_make_install export MAKE_INSTALL_OPTS="DOGE=\"such wow\"" Loading @@ -303,6 +314,7 @@ install_package "ruby-2.0.0" "http://ruby-lang.org/ruby/2.0/ruby-2.0.0.tar.gz" DEF assert_success unstub uname unstub make assert_build_log <<OUT Loading Loading @@ -355,6 +367,7 @@ apply -p1 -i /my/patch.diff exec ./configure "\$@" CONF stub uname '-s : echo Linux' stub apply 'echo apply "$@" >> build.log' stub_make_install Loading @@ -364,6 +377,7 @@ install_package "ruby-2.0.0" "http://ruby-lang.org/pub/ruby-2.0.0.tar.gz" DEF assert_success unstub uname unstub make unstub apply Loading
test/test_helper.bash +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ export TMP="$BATS_TEST_DIRNAME/tmp" if [ "$FIXTURE_ROOT" != "$BATS_TEST_DIRNAME/fixtures" ]; then export FIXTURE_ROOT="$BATS_TEST_DIRNAME/fixtures" export INSTALL_ROOT="$TMP/install" PATH=/usr/bin:/usr/sbin:/bin/:/sbin PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" PATH="$BATS_TEST_DIRNAME/../bin:$PATH" PATH="$TMP/bin:$PATH" export PATH Loading