bundler/lib/bundler/injector.rb
# evaluates a gemfile to remove the specified gem
# from it.
evaluates a gemfile to remove the specified gem
from it.
evaluates a gemfile to remove the specified gem from it .
def remove_deps(gemfile_path)
      initial_gemfile = File.readlines(gemfile_path)
      Bundler.ui.info "Removing gems from #{gemfile_path}"
      builder = Dsl.new
      builder.eval_gemfile(gemfile_path)
      removed_deps = remove_gems_from_dependencies(builder, @deps, gemfile_path)
      return [] if removed_deps.empty?
      cleaned_gemfile = remove_gems_from_gemfile(@deps, gemfile_path)
      SharedHelpers.write_to_gemfile(gemfile_path, cleaned_gemfile)
      cross_check_for_errors(gemfile_path, builder.dependencies, removed_deps, initial_gemfile)
    end
def remove_deps ( gemfile_path ) initial_gemfile = File . readlines ( gemfile_path ) Bundler . ui . info "Removing gems from #{gemfile_path}" builder = Dsl . new builder . eval_gemfile ( gemfile_path ) removed_deps = remove_gems_from_dependencies ( builder , @deps , gemfile_path ) return [ ] if removed_deps . empty? cleaned_gemfile = remove_gems_from_gemfile ( @deps , gemfile_path ) SharedHelpers . write_to_gemfile ( gemfile_path , cleaned_gemfile ) cross_check_for_errors ( gemfile_path , builder . dependencies , removed_deps , initial_gemfile ) end
evaluates a gemfile to remove the specified gem
from it.
evaluates a gemfile to remove the specified gem from it .
# evaluate the Gemfile we have # abort the operation if no gems were removed # no need to operate on gemfile further # check for errors # including extra gems being removed # or some gems not being removed # and return the actual removed deps
gemfile_path
<not_specific>