Created
August 12, 2013 16:45
-
-
Save gma/6212712 to your computer and use it in GitHub Desktop.
Handy stuff for running gems via bundler, without bundling them
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
bundle-local () | |
{ | |
local command="$1"; | |
if [ "$command" = "on" ]; then | |
if ! grep --color=auto -qs Gemfile.local Gemfile; then | |
echo "eval File.read('Gemfile.local')" >> Gemfile; | |
bundle; | |
git update-index --assume-unchanged Gemfile Gemfile.lock; | |
fi; | |
else | |
if [ "$command" = "off" ]; then | |
sed -i '/Gemfile.local/d' Gemfile; | |
bundle; | |
git update-index --no-assume-unchanged Gemfile Gemfile.lock; | |
else | |
echo "Usage: bundle-local <on|off>" 1>&2; | |
return 1; | |
fi; | |
fi | |
} |
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
group :development do | |
gem 'debugger' | |
gem 'spring' | |
end | |
group :test do | |
gem 'minitest', '4.3.0' | |
gem 'tconsole', '1.2.8' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment