-
-
Notifications
You must be signed in to change notification settings - Fork 897
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev: add darwin gems to build-gems; test-gem-set for batch testing
also delete unneeded script to set up darwin rake-compiler env
- Loading branch information
1 parent
48038a7
commit 046147b
Showing
3 changed files
with
67 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#! /usr/bin/env bash | ||
# | ||
# script to test a set of gem files | ||
# - test-gem-file-contents | ||
# - conditionally, if the local system can do it, test-gem-installation | ||
# | ||
source "$HOME/.rvm/scripts/rvm" | ||
|
||
set -o errexit | ||
set -o pipefail | ||
|
||
gem_platform_local=`ruby -e "puts Gem::Platform.local.to_s"` | ||
|
||
function remove_all_nokogiris { | ||
yes | gem uninstall --force nokogiri || true | ||
} | ||
|
||
function install_and_test { | ||
gem=$1 | ||
if [[ $gem =~ "java" ]] ; then | ||
rvm use jruby | ||
else | ||
rvm use default | ||
fi | ||
remove_all_nokogiris | ||
gem install --local $gem | ||
./scripts/test-gem-installation | ||
|
||
if [[ $gem =~ nokogiri-[^-]*\.gem ]] ; then | ||
remove_all_nokogiris | ||
NOKOGIRI_USE_SYSTEM_LIBRARIES=t gem install --local $gem | ||
./scripts/test-gem-installation | ||
fi | ||
} | ||
|
||
gems=$* | ||
|
||
rvm use default | ||
|
||
for gem in $gems ; do | ||
./scripts/test-gem-file-contents $gem | ||
done | ||
|
||
for gem in $gems ; do | ||
if [[ $gem =~ nokogiri-[^-]+(-(${gem_platform_local}|java))?\.gem$ ]] ; then | ||
install_and_test $gem | ||
fi | ||
done |