Skip to content

@zph /alt_solutions.rb forked from anthonymoralez/gist:4627717
Last active

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
# Re-write for run by @_ZPH
# OO Ruby
gem = File.open('Gemfile').readlines.reject { |l| l =~ /lame/ }.join
File.write('Gemfile', gem)
# obtuse bash
grep -v "lame" Gemfile > !!3.new && mv !!3{.new,}
# ruby one liner
ruby -i -ne 'print unless /lame/' Gemfile
@iwakura

Other variant:
sed -i'.bak' '/factory_girl_rails/d' Gemfile && rm "Gemfile.bak"

@rosenfeld
File.write('Gemfile', File.read('Gemfile').gsub(/.*['"]lame['"].*\n/, ''))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.