Sha256: 3862998b6f4f8dc2fa5c885c16721d5dc565c62ca1454f0da130bf93638350ea
Contents?: true
Size: 1007 Bytes
Versions: 14
Compression:
Stored size: 1007 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? find_gem(path.dirname) unless path.root? end end end end end
Version data entries
14 entries across 14 versions & 2 rubygems