Sha256: c168f17f458c5acde57d75ff703ace0bbf2598b192f5b61ff74c69aa7028b95d
Contents?: true
Size: 1013 Bytes
Versions: 157
Compression:
Stored size: 1013 Bytes
Contents
# frozen_string_literal: true require 'avm/eac_ruby_base1/sources/base' require 'eac_ruby_utils/core_ext' module Avm module EacRubyBase1 class Rubocop module Gemfile def gemfile_rubocop_command return nil unless rubocop_gemfile? rubocop_command_by_gemfile_path(mygem.path) end def rubocop_command_by_gemfile_path(path) ::Avm::EacRubyBase1::Sources::Base.new(path).bundle('exec', 'rubocop').chdir_root end def rubocop_gemfile? return false if mygem.blank? mygem.bundle('install').execute! mygem.gemfile_lock_gem_version('rubocop').present? end private def mygem_uncached find_gem(::Pathname.new(base_path).expand_path) end def find_gem(path) r = ::Avm::EacRubyBase1::Sources::Base.new(path) return r if r.gemfile_path.exist? return find_gem(path.dirname) unless path.root? end end end end end
Version data entries
157 entries across 157 versions & 2 rubygems