Commit 42aa6ccf by Mislav Marohnić

Merge master into docwhat-homebrew-yaml

Conflicts:
	share/ruby-build/1.9.1-p378
	share/ruby-build/1.9.1-p430
	share/ruby-build/1.9.2-p0
	share/ruby-build/1.9.2-p180
	share/ruby-build/1.9.2-p290
	share/ruby-build/1.9.2-p318
	share/ruby-build/1.9.2-p320
	share/ruby-build/1.9.3-p0
	share/ruby-build/1.9.3-p125
	share/ruby-build/1.9.3-p194
	share/ruby-build/1.9.3-p286
	share/ruby-build/1.9.3-p327
	share/ruby-build/1.9.3-p362
	share/ruby-build/1.9.3-p374
	share/ruby-build/1.9.3-p385
	share/ruby-build/1.9.3-p392
	share/ruby-build/1.9.3-p429
	share/ruby-build/1.9.3-p448
	share/ruby-build/1.9.3-preview1
	share/ruby-build/1.9.3-rc1
	share/ruby-build/2.0.0-preview1
parents 50dc0c99 cd499e2c
install: git clone https://github.com/sstephenson/bats.git
script: script/test
language: c
env:
global:
- AMAZON_S3_BUCKET=ruby-build-mirror
- AMAZON_ACCESS_KEY_ID=AKIAJKAUQVHU6X4CODDQ
- secure: LTSvDP2o72nbECDwWsfwnsiETF4VpqrYN3y/ve68AZIMzfNWDB5vhqzMLU1ltFnSNxd71gTCGX2OEcsxdrfnG+Msu52v8FtJ7lz/b9xn83gGYrGnmEMzARtd1fnuzlWQh/1eNL9jrNl8FDhgjoTqKl2gF6fZBsQxcHRnvRSXcqE=
## Version History ## Version History
#### 20131024
* Added a definition for JRuby 1.7.6
* Added a definition for Rubinius 2.1.0
* Added a definition for Rubinius 2.1.1
#### 20131008
* Added a definition for JRuby 1.7.5
* Added a definition for Rubinius 2.0.0
#### 20130923
* Added a definition for 2.1.0-preview1
#### 20130907
* Revert using mirror site
#### 20130901
* Use www.dnsbalance.ring.gr.jp
* Do not set the Rubinius gems directory to the prefix
#### 20130806
* Change protocol of the ruby-lang.org server from HTTP to FTP
#### 20130628 #### 20130628
* Added a definition for Ruby 2.0.0-p247 * Added a definition for Ruby 2.0.0-p247
* Added a definition for Ruby 1.9.3-p448 * Added a definition for Ruby 1.9.3-p448
......
Copyright (c) 2012 Sam Stephenson Copyright (c) 2012-2013 Sam Stephenson
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining a copy of
a copy of this software and associated documentation files (the this software and associated documentation files (the "Software"), to deal in
"Software"), to deal in the Software without restriction, including the Software without restriction, including without limitation the rights to
without limitation the rights to use, copy, modify, merge, publish, use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
distribute, sublicense, and/or sell copies of the Software, and to of the Software, and to permit persons to whom the Software is furnished to do
permit persons to whom the Software is furnished to do so, subject to so, subject to the following conditions:
the following conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be included in all
included in all copies or substantial portions of the Software. copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. SOFTWARE.
#!/usr/bin/env bash #!/usr/bin/env bash
RUBY_BUILD_VERSION="20130628" RUBY_BUILD_VERSION="20131024"
set -E set -E
exec 3<&2 # preserve original stderr at fd 3 exec 3<&2 # preserve original stderr at fd 3
...@@ -236,7 +236,14 @@ fetch_tarball() { ...@@ -236,7 +236,14 @@ fetch_tarball() {
fi fi
fi fi
local tar_args="xzvf"
local package_filename="${package_name}.tar.gz" local package_filename="${package_name}.tar.gz"
if [ "$package_url" != "${package_url%bz2}" ]; then
package_filename="${package_filename%.gz}.bz2"
tar_args="${tar_args/z/j}"
fi
symlink_tarball_from_cache "$package_filename" "$checksum" || { symlink_tarball_from_cache "$package_filename" "$checksum" || {
echo "Downloading ${package_filename}..." >&2 echo "Downloading ${package_filename}..." >&2
{ http head "$mirror_url" && { http head "$mirror_url" &&
...@@ -245,7 +252,7 @@ fetch_tarball() { ...@@ -245,7 +252,7 @@ fetch_tarball() {
download_tarball "$package_url" "$package_filename" "$checksum" download_tarball "$package_url" "$package_filename" "$checksum"
} }
{ if tar xzvf "$package_filename"; then { if tar $tar_args "$package_filename"; then
if [ -z "$KEEP_BUILD_PATH" ]; then if [ -z "$KEEP_BUILD_PATH" ]; then
rm -f "$package_filename" rm -f "$package_filename"
else else
...@@ -428,8 +435,10 @@ build_package_ree_installer() { ...@@ -428,8 +435,10 @@ build_package_ree_installer() {
build_package_rbx() { build_package_rbx() {
local package_name="$1" local package_name="$1"
{ ./configure --prefix="$PREFIX_PATH" --gemsdir="$PREFIX_PATH" $RUBY_CONFIGURE_OPTS { bundle
./configure --prefix="$PREFIX_PATH" $RUBY_CONFIGURE_OPTS
rake install rake install
fix_rbx_gem_binstubs "$PREFIX_PATH"
} >&4 2>&1 } >&4 2>&1
} }
...@@ -515,6 +524,20 @@ fix_directory_permissions() { ...@@ -515,6 +524,20 @@ fix_directory_permissions() {
find "$PREFIX_PATH" -type d \( -perm -020 -o -perm -002 \) -exec chmod go-w {} \; find "$PREFIX_PATH" -type d \( -perm -020 -o -perm -002 \) -exec chmod go-w {} \;
} }
fix_rbx_gem_binstubs() {
local prefix="$1"
local gemdir="${prefix}/gems/bin"
local bindir="${prefix}/bin"
# Symlink Rubinius' `gems/bin/` into `bin/`
if [ -d "$gemdir" ]; then
for file in "$gemdir"/*; do
[ -x "$file" ] && mv "$file" "$bindir"
done
rm -rf "$gemdir"
ln -s ../bin "$gemdir"
fi
}
require_gcc() { require_gcc() {
local gcc="$(locate_gcc || true)" local gcc="$(locate_gcc || true)"
......
#!/usr/bin/env bash
# Usage: script/mirror update <COMMIT-RANGE>
# script/mirror stats
set -e
commit_range="${1?}"
eval "$(grep RUBY_BUILD_MIRROR_URL= ./bin/ruby-build | head -1)"
test_mirrored() {
curl -qsSfIL "$RUBY_BUILD_MIRROR_URL/$1" >/dev/null 2>&1
}
compute_md5() {
local output="$(openssl md5)"
echo "${output##* }" | tr '[A-Z]' '[a-z]'
}
download_package() {
curl -qsSfL -o "$2" "$1"
}
download_and_verify() {
local checksum
local url="$1"
local file="$2"
local expected="$3"
download_package "$url" "$file"
checksum="$(compute_md5 < "$file")"
if [ "$checksum" != "$expected" ]; then
echo "Error: $url doesn't match its checksum $expected" >&2
return 1
fi
}
changed_files() {
git diff --name-only --diff-filter=ACMR "$@"
}
potentially_new_packages() {
local files="$(changed_files "$1" -- ./share/ruby-build)"
[ -n "$files" ] && extract_urls $files
}
extract_urls() {
grep -hoe 'http[^"]\+#[^"]\+' "$@"
}
update() {
local url
local checksum
local file
for url in $(potentially_new_packages "$1"); do
checksum="${url#*#}"
url="${url%#*}"
if test_mirrored "$checksum"; then
echo "Already mirrored: $url"
else
echo "Mirroring: $url"
file="${TMPDIR:-/tmp}/$checksum"
download_and_verify "$url" "$file" "$checksum"
./script/s3-put "$file" "${AMAZON_S3_BUCKET?}"
fi
done
}
stats() {
local packages=( $(extract_urls ./share/ruby-build/*) )
local total="${#packages[@]}"
local confirmed=0
local checksum
for url in "${packages[@]}"; do
checksum="${url#*#}"
if test_mirrored "$checksum"; then
confirmed="$((confirmed + 1))"
else
echo "failed: $url" >&2
fi
echo -n "."
done
echo
echo "$confirmed/$total mirrored"
}
cmd="${1?}"
shift 1
"$cmd" "$@"
#!/usr/bin/env bash
# Usage: s3-put <FILE> <S3_BUCKET> [<CONTENT_TYPE>]
#
# Uploads a file to the Amazon S3 service.
#
# Depends on AWS credentials being set via env:
# - AMAZON_ACCESS_KEY_ID
# - AMAZON_SECRET_ACCESS_KEY
#
# Outputs the URL of the newly uploaded file.
set -e
authorization() {
local signature="$(string_to_sign | hmac_sha1 | base64)"
echo "AWS ${AMAZON_ACCESS_KEY_ID?}:${signature}"
}
hmac_sha1() {
openssl dgst -binary -sha1 -hmac "${AMAZON_SECRET_ACCESS_KEY?}"
}
base64() {
openssl enc -base64
}
bin_md5() {
openssl dgst -binary -md5
}
string_to_sign() {
echo "$http_method"
echo "$content_md5"
echo "$content_type"
echo "$date"
echo "x-amz-acl:$acl"
printf "/$bucket/$remote_path"
}
date_string() {
LC_TIME=C date "+%a, %d %h %Y %T %z"
}
file="$1"
bucket="$2"
content_type="$3"
http_method=PUT
acl="public-read"
remote_path="${file##*/}"
content_md5="$(bin_md5 < "$file" | base64)"
date="$(date_string)"
url="https://$bucket.s3.amazonaws.com/$remote_path"
curl -qsSf -T "$file" \
-H "Authorization: $(authorization)" \
-H "x-amz-acl: $acl" \
-H "Date: $date" \
-H "Content-MD5: $content_md5" \
-H "Content-Type: $content_type" \
"$url"
echo "$url"
#!/usr/bin/env bash
set -e
[ -d ./bats/bin ] && export PATH=./bats/bin:"$PATH"
bats -t test
if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then
./script/mirror update "$TRAVIS_COMMIT_RANGE"
fi
require_gcc require_gcc
install_package "ruby-1.8.6-p383" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p383.tar.gz#4f49544d4a4d0d34e9d86c41e853db2e" install_package "ruby-1.8.6-p383" "http://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p383.tar.gz#4f49544d4a4d0d34e9d86c41e853db2e"
install_package "rubygems-1.3.7" "http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz#e85cfadd025ff6ab689375adbf344bbe" ruby install_package "rubygems-1.3.7" "http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz#e85cfadd025ff6ab689375adbf344bbe" ruby
require_gcc require_gcc
install_package "ruby-1.8.6-p420" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p420.tar.gz#ca1eee44f842e93b5098bc5a2bb9a40b" install_package "ruby-1.8.6-p420" "http://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p420.tar.gz#ca1eee44f842e93b5098bc5a2bb9a40b"
install_package "rubygems-1.3.7" "http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz#e85cfadd025ff6ab689375adbf344bbe" ruby install_package "rubygems-1.3.7" "http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz#e85cfadd025ff6ab689375adbf344bbe" ruby
require_gcc require_gcc
install_package "ruby-1.8.7-p249" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p249.tar.gz#d7db7763cffad279952eb7e9bbfc221c" install_package "ruby-1.8.7-p249" "http://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p249.tar.gz#d7db7763cffad279952eb7e9bbfc221c"
install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby
require_gcc require_gcc
install_package "ruby-1.8.7-p302" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p302.tar.gz#f446550dfde0d8162a6ed8d5a38b3ac2" install_package "ruby-1.8.7-p302" "http://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p302.tar.gz#f446550dfde0d8162a6ed8d5a38b3ac2"
install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby
require_gcc require_gcc
install_package "ruby-1.8.7-p334" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p334.tar.gz#aacb6ee5dfe2367682bba56af7f415b8" install_package "ruby-1.8.7-p334" "http://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p334.tar.gz#aacb6ee5dfe2367682bba56af7f415b8"
install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby
require_gcc require_gcc
install_package "ruby-1.8.7-p352" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p352.tar.gz#0c33f663a10a540ea65677bb755e57a7" install_package "ruby-1.8.7-p352" "http://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p352.tar.gz#0c33f663a10a540ea65677bb755e57a7"
install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby
require_gcc require_gcc
install_package "ruby-1.8.7-p357" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p357.tar.gz#b2b8248ff5097cfd629f5b9768d1df82" install_package "ruby-1.8.7-p357" "http://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p357.tar.gz#b2b8248ff5097cfd629f5b9768d1df82"
install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby
require_gcc require_gcc
install_package "ruby-1.8.7-p358" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p358.tar.gz#26bd55358847459a7752acdbd33a535f" install_package "ruby-1.8.7-p358" "http://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p358.tar.gz#26bd55358847459a7752acdbd33a535f"
install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby
require_gcc require_gcc
install_package "ruby-1.8.7-p370" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p370.tar.gz#98b00bbd1cdde3116155edb6e555b781" install_package "ruby-1.8.7-p370" "http://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p370.tar.gz#98b00bbd1cdde3116155edb6e555b781"
install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby
require_gcc require_gcc
install_package "ruby-1.8.7-p371" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p371.tar.gz#653f07bb45f03d0bf3910491288764df" install_package "ruby-1.8.7-p371" "http://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p371.tar.gz#653f07bb45f03d0bf3910491288764df"
install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby
require_gcc require_gcc
install_package "ruby-1.8.7-p374" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p374.tar.gz#b72a0bc5b824398537762e5272bbb8dc" install_package "ruby-1.8.7-p374" "http://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p374.tar.gz#b72a0bc5b824398537762e5272bbb8dc"
install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz#0c95a9869914ba1a45bf71d3b8048420" ruby
require_gcc require_gcc
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.1-p378" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p378.tar.gz#9fc5941bda150ac0a33b299e1e53654c" install_package "ruby-1.9.1-p378" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p378.tar.gz#9fc5941bda150ac0a33b299e1e53654c"
install_package "rubygems-1.3.7" "http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz#e85cfadd025ff6ab689375adbf344bbe" ruby install_package "rubygems-1.3.7" "http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz#e85cfadd025ff6ab689375adbf344bbe" ruby
require_gcc require_gcc
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.1-p430" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p430.tar.gz#093d17e911b1f7306de95422ec332826" install_package "ruby-1.9.1-p430" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p430.tar.gz#093d17e911b1f7306de95422ec332826"
install_package "rubygems-1.3.7" "http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz#e85cfadd025ff6ab689375adbf344bbe" ruby install_package "rubygems-1.3.7" "http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz#e85cfadd025ff6ab689375adbf344bbe" ruby
require_gcc require_gcc
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.2-p0" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.gz#755aba44607c580fddc25e7c89260460" install_package "ruby-1.9.2-p0" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.gz#755aba44607c580fddc25e7c89260460"
install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby
require_gcc require_gcc
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.2-p180" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz#0d6953820c9918820dd916e79f4bfde8" install_package "ruby-1.9.2-p180" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.gz#0d6953820c9918820dd916e79f4bfde8"
install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby
require_gcc require_gcc
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.2-p290" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz#604da71839a6ae02b5b5b5e1b792d5eb" install_package "ruby-1.9.2-p290" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz#604da71839a6ae02b5b5b5e1b792d5eb"
install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby
require_gcc require_gcc
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.2-p318" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p318.tar.gz#cc7bf1025128e1985882ae243f348802" install_package "ruby-1.9.2-p318" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p318.tar.gz#cc7bf1025128e1985882ae243f348802"
install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby
require_gcc require_gcc
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.2-p320" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p320.tar.gz#5ef5d9c07af207710bd9c2ad1cef4b42" install_package "ruby-1.9.2-p320" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p320.tar.gz#5ef5d9c07af207710bd9c2ad1cef4b42"
install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby
require_gcc require_gcc
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.3-p0" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz#8e2fef56185cfbaf29d0c8329fc77c05" install_package "ruby-1.9.3-p0" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz#8e2fef56185cfbaf29d0c8329fc77c05"
install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby
[ -n "$CC" ] || export CC=cc [ -n "$CC" ] || export CC=cc
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.3-p125" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz#e3ea86b9d3fc2d3ec867f66969ae3b92" install_package "ruby-1.9.3-p125" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz#e3ea86b9d3fc2d3ec867f66969ae3b92"
install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.3-p194" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz#bc0c715c69da4d1d8bd57069c19f6c0e" install_package "ruby-1.9.3-p194" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz#bc0c715c69da4d1d8bd57069c19f6c0e"
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.3-p286" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p286.tar.gz#e2469b55c2a3d0d643097d47fe4984bb" install_package "ruby-1.9.3-p286" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p286.tar.gz#e2469b55c2a3d0d643097d47fe4984bb"
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.3-p327" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz#96118e856b502b5d7b3a4398e6c6e98c" install_package "ruby-1.9.3-p327" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz#96118e856b502b5d7b3a4398e6c6e98c"
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.3-p362" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p362.tar.gz#1efc2316dc50e97591792d90647fade2" install_package "ruby-1.9.3-p362" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p362.tar.gz#1efc2316dc50e97591792d90647fade2"
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.3-p374" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p374.tar.gz#90b6c327abcdf30a954c2d6ae44da2a9" install_package "ruby-1.9.3-p374" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p374.tar.gz#90b6c327abcdf30a954c2d6ae44da2a9"
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.3-p385" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p385.tar.gz#3e0d7f8512400c1a6732327728a56f1d" install_package "ruby-1.9.3-p385" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p385.tar.gz#3e0d7f8512400c1a6732327728a56f1d"
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.3-p392" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz#f689a7b61379f83cbbed3c7077d83859" install_package "ruby-1.9.3-p392" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz#f689a7b61379f83cbbed3c7077d83859"
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.3-p429" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p429.tar.gz#993c72f7f805a9eb453f90b0b7fe0d2b" install_package "ruby-1.9.3-p429" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p429.tar.gz#993c72f7f805a9eb453f90b0b7fe0d2b"
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.3-p448" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p448.tar.gz#a893cff26bcf351b8975ebf2a63b1023" install_package "ruby-1.9.3-p448" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p448.tar.gz#a893cff26bcf351b8975ebf2a63b1023"
require_gcc require_gcc
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.3-preview1" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-preview1.tar.gz#0f0220be4cc7c51a82c1bd8f6a0969f3" install_package "ruby-1.9.3-preview1" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-preview1.tar.gz#0f0220be4cc7c51a82c1bd8f6a0969f3"
install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby install_package "rubygems-1.8.23" "http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz#178b0ebae78dbb46963c51ad29bb6bd9" ruby
require_gcc require_gcc
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-1.9.3-rc1" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-rc1.tar.gz#46a2a481536ca0ca0b80ad2b091df68e" install_package "ruby-1.9.3-rc1" "http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-rc1.tar.gz#46a2a481536ca0ca0b80ad2b091df68e"
install_package "openssl-1.0.1e" "https://www.openssl.org/source/openssl-1.0.1e.tar.gz#66bf6f10f060d561929de96f9dfe5b8c" mac_openssl --if has_broken_mac_openssl install_package "openssl-1.0.1e" "https://www.openssl.org/source/openssl-1.0.1e.tar.gz#66bf6f10f060d561929de96f9dfe5b8c" mac_openssl --if has_broken_mac_openssl
install_package "ruby-2.0.0-p0" "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz#50d307c4dc9297ae59952527be4e755d" standard verify_openssl install_package "ruby-2.0.0-p0" "http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz#50d307c4dc9297ae59952527be4e755d" standard verify_openssl
install_package "openssl-1.0.1e" "https://www.openssl.org/source/openssl-1.0.1e.tar.gz#66bf6f10f060d561929de96f9dfe5b8c" mac_openssl --if has_broken_mac_openssl install_package "openssl-1.0.1e" "https://www.openssl.org/source/openssl-1.0.1e.tar.gz#66bf6f10f060d561929de96f9dfe5b8c" mac_openssl --if has_broken_mac_openssl
install_package "ruby-2.0.0-p195" "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p195.tar.gz#0672e5af309ae99d1703d0e96eff8ea5" standard verify_openssl install_package "ruby-2.0.0-p195" "http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p195.tar.gz#0672e5af309ae99d1703d0e96eff8ea5" standard verify_openssl
install_package "openssl-1.0.1e" "https://www.openssl.org/source/openssl-1.0.1e.tar.gz#66bf6f10f060d561929de96f9dfe5b8c" mac_openssl --if has_broken_mac_openssl install_package "openssl-1.0.1e" "https://www.openssl.org/source/openssl-1.0.1e.tar.gz#66bf6f10f060d561929de96f9dfe5b8c" mac_openssl --if has_broken_mac_openssl
install_package "ruby-2.0.0-p247" "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz#c351450a0bed670e0f5ca07da3458a5b" standard verify_openssl install_package "ruby-2.0.0-p247" "http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz#c351450a0bed670e0f5ca07da3458a5b" standard verify_openssl
install_package "openssl-1.0.1e" "https://www.openssl.org/source/openssl-1.0.1e.tar.gz#66bf6f10f060d561929de96f9dfe5b8c" mac_openssl --if has_broken_mac_openssl install_package "openssl-1.0.1e" "https://www.openssl.org/source/openssl-1.0.1e.tar.gz#66bf6f10f060d561929de96f9dfe5b8c" mac_openssl --if has_broken_mac_openssl
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" --if needs_yaml
install_package "ruby-2.0.0-preview1" "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-preview1.tar.gz#c7d73f3ddb6d25e7733626ddbad04158" standard verify_openssl install_package "ruby-2.0.0-preview1" "http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-preview1.tar.gz#c7d73f3ddb6d25e7733626ddbad04158" standard verify_openssl
install_package "openssl-1.0.1e" "https://www.openssl.org/source/openssl-1.0.1e.tar.gz#66bf6f10f060d561929de96f9dfe5b8c" mac_openssl --if has_broken_mac_openssl install_package "openssl-1.0.1e" "https://www.openssl.org/source/openssl-1.0.1e.tar.gz#66bf6f10f060d561929de96f9dfe5b8c" mac_openssl --if has_broken_mac_openssl
install_package "ruby-2.0.0-preview2" "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-preview2.tar.gz#eaddcbf63dc775708de45c7a81ab54b9" standard verify_openssl install_package "ruby-2.0.0-preview2" "http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-preview2.tar.gz#eaddcbf63dc775708de45c7a81ab54b9" standard verify_openssl
install_package "openssl-1.0.1e" "https://www.openssl.org/source/openssl-1.0.1e.tar.gz#66bf6f10f060d561929de96f9dfe5b8c" mac_openssl --if has_broken_mac_openssl install_package "openssl-1.0.1e" "https://www.openssl.org/source/openssl-1.0.1e.tar.gz#66bf6f10f060d561929de96f9dfe5b8c" mac_openssl --if has_broken_mac_openssl
install_package "ruby-2.0.0-rc1" "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-rc1.tar.gz#7d587dde85e0edf7a2e4f6783e6c0e2e" standard verify_openssl install_package "ruby-2.0.0-rc1" "http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-rc1.tar.gz#7d587dde85e0edf7a2e4f6783e6c0e2e" standard verify_openssl
install_package "openssl-1.0.1e" "https://www.openssl.org/source/openssl-1.0.1e.tar.gz#66bf6f10f060d561929de96f9dfe5b8c" mac_openssl --if has_broken_mac_openssl install_package "openssl-1.0.1e" "https://www.openssl.org/source/openssl-1.0.1e.tar.gz#66bf6f10f060d561929de96f9dfe5b8c" mac_openssl --if has_broken_mac_openssl
install_package "ruby-2.0.0-rc2" "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-rc2.tar.gz#9d5e6f26db7c8c3ddefc81fdb19bd41a" standard verify_openssl install_package "ruby-2.0.0-rc2" "http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-rc2.tar.gz#9d5e6f26db7c8c3ddefc81fdb19bd41a" standard verify_openssl
install_package "openssl-1.0.1e" "https://www.openssl.org/source/openssl-1.0.1e.tar.gz#66bf6f10f060d561929de96f9dfe5b8c" mac_openssl --if has_broken_mac_openssl
install_package "ruby-2.1.0-preview1" "http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.0-preview1.tar.gz#9df4f546f6b961895ba58a8afdf857da" standard verify_openssl
install_package "jruby-1.7.5" "http://jruby.org.s3.amazonaws.com/downloads/1.7.5/jruby-bin-1.7.5.tar.gz#c2a28c43c8095127d4a4aee0cf9b1439" jruby
install_package "jruby-1.7.6" "http://jruby.org.s3.amazonaws.com/downloads/1.7.6/jruby-bin-1.7.6.tar.gz#5d10011516a3d3bde10209b60cfcc0ef" jruby
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
install_package "rubinius-2.0.0" "http://releases.rubini.us/rubinius-2.0.0.tar.bz2#62e379e044c822b81e7b20a27daf133e" rbx
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
install_package "rubinius-2.1.0" "http://releases.rubini.us/rubinius-2.1.0.tar.bz2#908053f38fd840c75a93aab7487c20a5" rbx
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
install_package "rubinius-2.1.1" "http://releases.rubini.us/rubinius-2.1.1.tar.bz2#6b4df0caec5ea88373e113f97a3b4c72" rbx
...@@ -11,7 +11,7 @@ setup() { ...@@ -11,7 +11,7 @@ setup() {
@test "packages are saved to download cache" { @test "packages are saved to download cache" {
stub md5 true stub md5 true
stub curl "-*S* : cat package-1.0.0.tar.gz" stub curl "-C - -o * -*S* http://example.com/* : cp $FIXTURE_ROOT/\${6##*/} \$4"
install_fixture definitions/without-checksum install_fixture definitions/without-checksum
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
...@@ -58,7 +58,8 @@ setup() { ...@@ -58,7 +58,8 @@ setup() {
local checksum="83e6d7725e20166024a1eb74cde80677" local checksum="83e6d7725e20166024a1eb74cde80677"
stub md5 true "echo invalid" "echo $checksum" stub md5 true "echo invalid" "echo $checksum"
stub curl "-*I* : true" "-*S* http://?*/$checksum : cat package-1.0.0.tar.gz" stub curl "-*I* : true" \
"-C - -o * -*S* http://?*/$checksum : cp $FIXTURE_ROOT/package-1.0.0.tar.gz \$4"
touch "${RUBY_BUILD_CACHE_PATH}/package-1.0.0.tar.gz" touch "${RUBY_BUILD_CACHE_PATH}/package-1.0.0.tar.gz"
...@@ -75,7 +76,7 @@ setup() { ...@@ -75,7 +76,7 @@ setup() {
@test "nonexistent cache directory is ignored" { @test "nonexistent cache directory is ignored" {
stub md5 true stub md5 true
stub curl "-*S* : cat package-1.0.0.tar.gz" stub curl "-C - -o * -*S* http://example.com/* : cp $FIXTURE_ROOT/\${6##*/} \$4"
export RUBY_BUILD_CACHE_PATH="${TMP}/nonexistent" export RUBY_BUILD_CACHE_PATH="${TMP}/nonexistent"
......
...@@ -7,7 +7,7 @@ export RUBY_BUILD_CACHE_PATH= ...@@ -7,7 +7,7 @@ export RUBY_BUILD_CACHE_PATH=
@test "package URL without checksum" { @test "package URL without checksum" {
stub md5 true stub md5 true
stub curl "-*S* : cat package-1.0.0.tar.gz" stub curl "-C - -o * -*S* http://example.com/* : cp $FIXTURE_ROOT/\${6##*/} \$4"
install_fixture definitions/without-checksum install_fixture definitions/without-checksum
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
...@@ -20,7 +20,7 @@ export RUBY_BUILD_CACHE_PATH= ...@@ -20,7 +20,7 @@ export RUBY_BUILD_CACHE_PATH=
@test "package URL with valid checksum" { @test "package URL with valid checksum" {
stub md5 true "echo 83e6d7725e20166024a1eb74cde80677" stub md5 true "echo 83e6d7725e20166024a1eb74cde80677"
stub curl "-*S* : cat package-1.0.0.tar.gz" stub curl "-C - -o * -*S* http://example.com/* : cp $FIXTURE_ROOT/\${6##*/} \$4"
install_fixture definitions/with-checksum install_fixture definitions/with-checksum
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
...@@ -33,7 +33,7 @@ export RUBY_BUILD_CACHE_PATH= ...@@ -33,7 +33,7 @@ export RUBY_BUILD_CACHE_PATH=
@test "package URL with invalid checksum" { @test "package URL with invalid checksum" {
stub md5 true "echo 83e6d7725e20166024a1eb74cde80677" stub md5 true "echo 83e6d7725e20166024a1eb74cde80677"
stub curl "-*S* : cat package-1.0.0.tar.gz" stub curl "-C - -o * -*S* http://example.com/* : cp $FIXTURE_ROOT/\${6##*/} \$4"
install_fixture definitions/with-invalid-checksum install_fixture definitions/with-invalid-checksum
[ "$status" -eq 1 ] [ "$status" -eq 1 ]
...@@ -46,7 +46,7 @@ export RUBY_BUILD_CACHE_PATH= ...@@ -46,7 +46,7 @@ export RUBY_BUILD_CACHE_PATH=
@test "package URL with checksum but no MD5 support" { @test "package URL with checksum but no MD5 support" {
stub md5 false stub md5 false
stub curl "-*S* : cat package-1.0.0.tar.gz" stub curl "-C - -o * -*S* http://example.com/* : cp $FIXTURE_ROOT/\${6##*/} \$4"
install_fixture definitions/with-checksum install_fixture definitions/with-checksum
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
...@@ -59,7 +59,7 @@ export RUBY_BUILD_CACHE_PATH= ...@@ -59,7 +59,7 @@ export RUBY_BUILD_CACHE_PATH=
@test "package with invalid checksum" { @test "package with invalid checksum" {
stub md5 true "echo invalid" stub md5 true "echo invalid"
stub curl "-*S* : cat package-1.0.0.tar.gz" stub curl "-C - -o * -*S* http://example.com/* : cp $FIXTURE_ROOT/\${6##*/} \$4"
install_fixture definitions/with-checksum install_fixture definitions/with-checksum
[ "$status" -eq 1 ] [ "$status" -eq 1 ]
......
...@@ -8,9 +8,10 @@ export RUBY_BUILD_MIRROR_URL=http://mirror.example.com ...@@ -8,9 +8,10 @@ export RUBY_BUILD_MIRROR_URL=http://mirror.example.com
@test "package URL without checksum bypasses mirror" { @test "package URL without checksum bypasses mirror" {
stub md5 true stub md5 true
stub curl "-*S* http://example.com/* : cat package-1.0.0.tar.gz" stub curl "-C - -o * -*S* http://example.com/* : cp $FIXTURE_ROOT/\${6##*/} \$4"
install_fixture definitions/without-checksum install_fixture definitions/without-checksum
echo "$output" >&2
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
[ -x "${INSTALL_ROOT}/bin/package" ] [ -x "${INSTALL_ROOT}/bin/package" ]
...@@ -21,7 +22,7 @@ export RUBY_BUILD_MIRROR_URL=http://mirror.example.com ...@@ -21,7 +22,7 @@ export RUBY_BUILD_MIRROR_URL=http://mirror.example.com
@test "package URL with checksum but no MD5 support bypasses mirror" { @test "package URL with checksum but no MD5 support bypasses mirror" {
stub md5 false stub md5 false
stub curl "-*S* http://example.com/* : cat package-1.0.0.tar.gz" stub curl "-C - -o * -*S* http://example.com/* : cp $FIXTURE_ROOT/\${6##*/} \$4"
install_fixture definitions/with-checksum install_fixture definitions/with-checksum
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
...@@ -37,7 +38,8 @@ export RUBY_BUILD_MIRROR_URL=http://mirror.example.com ...@@ -37,7 +38,8 @@ export RUBY_BUILD_MIRROR_URL=http://mirror.example.com
local mirror_url="${RUBY_BUILD_MIRROR_URL}/$checksum" local mirror_url="${RUBY_BUILD_MIRROR_URL}/$checksum"
stub md5 true "echo $checksum" stub md5 true "echo $checksum"
stub curl "-*I* $mirror_url : true" "-*S* $mirror_url : cat package-1.0.0.tar.gz" stub curl "-*I* $mirror_url : true" \
"-C - -o * -*S* $mirror_url : cp $FIXTURE_ROOT/package-1.0.0.tar.gz \$4"
install_fixture definitions/with-checksum install_fixture definitions/with-checksum
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
...@@ -51,10 +53,10 @@ export RUBY_BUILD_MIRROR_URL=http://mirror.example.com ...@@ -51,10 +53,10 @@ export RUBY_BUILD_MIRROR_URL=http://mirror.example.com
@test "package is fetched from original URL if mirror download fails" { @test "package is fetched from original URL if mirror download fails" {
local checksum="83e6d7725e20166024a1eb74cde80677" local checksum="83e6d7725e20166024a1eb74cde80677"
local mirror_url="${RUBY_BUILD_MIRROR_URL}/$checksum" local mirror_url="${RUBY_BUILD_MIRROR_URL}/$checksum"
local original_url="http://example.com/packages/package-1.0.0.tar.gz"
stub md5 true "echo $checksum" stub md5 true "echo $checksum"
stub curl "-*I* $mirror_url : false" "-*S* $original_url : cat package-1.0.0.tar.gz" stub curl "-*I* $mirror_url : false" \
"-C - -o * -*S* http://example.com/* : cp $FIXTURE_ROOT/\${6##*/} \$4"
install_fixture definitions/with-checksum install_fixture definitions/with-checksum
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
...@@ -68,12 +70,14 @@ export RUBY_BUILD_MIRROR_URL=http://mirror.example.com ...@@ -68,12 +70,14 @@ export RUBY_BUILD_MIRROR_URL=http://mirror.example.com
@test "package is fetched from original URL if mirror download checksum is invalid" { @test "package is fetched from original URL if mirror download checksum is invalid" {
local checksum="83e6d7725e20166024a1eb74cde80677" local checksum="83e6d7725e20166024a1eb74cde80677"
local mirror_url="${RUBY_BUILD_MIRROR_URL}/$checksum" local mirror_url="${RUBY_BUILD_MIRROR_URL}/$checksum"
local original_url="http://example.com/packages/package-1.0.0.tar.gz"
stub md5 true "echo invalid" "echo $checksum" stub md5 true "echo invalid" "echo $checksum"
stub curl "-*I* $mirror_url : true" "-*S* $mirror_url : cat package-1.0.0.tar.gz" "-*S* $original_url : cat package-1.0.0.tar.gz" stub curl "-*I* $mirror_url : true" \
"-C - -o * -*S* $mirror_url : cp $FIXTURE_ROOT/package-1.0.0.tar.gz \$4" \
"-C - -o * -*S* http://example.com/* : cp $FIXTURE_ROOT/\${6##*/} \$4"
install_fixture definitions/with-checksum install_fixture definitions/with-checksum
echo "$output" >&2
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
[ -x "${INSTALL_ROOT}/bin/package" ] [ -x "${INSTALL_ROOT}/bin/package" ]
...@@ -87,7 +91,8 @@ export RUBY_BUILD_MIRROR_URL=http://mirror.example.com ...@@ -87,7 +91,8 @@ export RUBY_BUILD_MIRROR_URL=http://mirror.example.com
local checksum="83e6d7725e20166024a1eb74cde80677" local checksum="83e6d7725e20166024a1eb74cde80677"
stub md5 true "echo $checksum" stub md5 true "echo $checksum"
stub curl "-*I* : true" "-*S* http://?*/$checksum : cat package-1.0.0.tar.gz" stub curl "-*I* : true" \
"-C - -o * -*S* http://?*/$checksum : cp $FIXTURE_ROOT/package-1.0.0.tar.gz \$4" \
install_fixture definitions/with-checksum install_fixture definitions/with-checksum
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
......
...@@ -8,7 +8,6 @@ PROGRAM="$(echo "$program" | tr a-z A-Z)" ...@@ -8,7 +8,6 @@ PROGRAM="$(echo "$program" | tr a-z A-Z)"
_STUB_PLAN="${PROGRAM}_STUB_PLAN" _STUB_PLAN="${PROGRAM}_STUB_PLAN"
_STUB_RUN="${PROGRAM}_STUB_RUN" _STUB_RUN="${PROGRAM}_STUB_RUN"
_STUB_DIR="${PROGRAM}_STUB_DIR"
_STUB_INDEX="${PROGRAM}_STUB_INDEX" _STUB_INDEX="${PROGRAM}_STUB_INDEX"
_STUB_RESULT="${PROGRAM}_STUB_RESULT" _STUB_RESULT="${PROGRAM}_STUB_RESULT"
_STUB_END="${PROGRAM}_STUB_END" _STUB_END="${PROGRAM}_STUB_END"
...@@ -62,10 +61,8 @@ while IFS= read -r line; do ...@@ -62,10 +61,8 @@ while IFS= read -r line; do
# If the arguments matched, evaluate the command # If the arguments matched, evaluate the command
# in a subshell. Otherwise, log the failure. # in a subshell. Otherwise, log the failure.
if [ $result -eq 0 ] ; then if [ $result -eq 0 ] ; then
dir="$(pwd)"
[ ! -d "${!_STUB_DIR}" ] || dir="${!_STUB_DIR}"
set +e set +e
( cd "$dir" ; eval "$command" ) ( eval "$command" )
status="$?" status="$?"
set -e set -e
else else
......
...@@ -14,7 +14,6 @@ stub() { ...@@ -14,7 +14,6 @@ stub() {
export "${prefix}_STUB_PLAN"="${TMP}/${program}-stub-plan" export "${prefix}_STUB_PLAN"="${TMP}/${program}-stub-plan"
export "${prefix}_STUB_RUN"="${TMP}/${program}-stub-run" export "${prefix}_STUB_RUN"="${TMP}/${program}-stub-run"
export "${prefix}_STUB_DIR"="$FIXTURE_ROOT"
export "${prefix}_STUB_END"= export "${prefix}_STUB_END"=
export PATH="${BATS_TEST_DIRNAME}/stubs/${program}:$PATH" export PATH="${BATS_TEST_DIRNAME}/stubs/${program}:$PATH"
...@@ -28,7 +27,6 @@ unstub() { ...@@ -28,7 +27,6 @@ unstub() {
local program="$1" local program="$1"
local prefix="$(echo "$program" | tr a-z A-Z)" local prefix="$(echo "$program" | tr a-z A-Z)"
export "${prefix}_STUB_DIR"=
export "${prefix}_STUB_END"=1 export "${prefix}_STUB_END"=1
local path="${BATS_TEST_DIRNAME}/stubs/$program" local path="${BATS_TEST_DIRNAME}/stubs/$program"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment