Skip to content

Instantly share code, notes, and snippets.

@gma
Created August 12, 2013 16:45
Show Gist options
  • Save gma/6212712 to your computer and use it in GitHub Desktop.
Save gma/6212712 to your computer and use it in GitHub Desktop.
Handy stuff for running gems via bundler, without bundling them
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
}
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