Sha256: b137b544426f3b39430d46df2fc3aa6969ee09b7e577b33f4db084b1b05cfb08
Contents?: true
Size: 1.11 KB
Versions: 9
Compression:
Stored size: 1.11 KB
Contents
# frozen_string_literal: true module EacRubyGemsUtils module Tests class Multiple class DecoratedGem < ::SimpleDelegator enable_console_speaker def prepare return unless gemfile_path.exist? log('running "bundle install"...') return if bundle('install').execute.fetch(:exit_code).zero? if can_remove_gemfile_lock? log('"bundle install" failed, removing Gemfile.lock and trying again...') gemfile_lock_path.unlink if gemfile_lock_path.exist? bundle('install').execute! else raise '"bundle install" failed and the Gemfile.lock is part of gem' \ '(Should be changed by developer)' end end def tests [::EacRubyGemsUtils::Tests::Minitest.new(__getobj__), ::EacRubyGemsUtils::Tests::Rspec.new(__getobj__)] end private def log(message) infov self, message end def can_remove_gemfile_lock? !files.include?(gemfile_lock_path.relative_path_from(root)) end end end end end
Version data entries
9 entries across 9 versions & 2 rubygems