Module: Avm::EacRubyBase1::Rubocop::Gemfile
- Defined in:
- lib/avm/eac_ruby_base1/rubocop/gemfile.rb
Instance Method Summary collapse
- #gemfile_rubocop_command ⇒ Object
- #rubocop_command_by_gemfile_path(path) ⇒ Object
- #rubocop_gemfile? ⇒ Boolean
Instance Method Details
#gemfile_rubocop_command ⇒ Object
10 11 12 13 14 |
# File 'lib/avm/eac_ruby_base1/rubocop/gemfile.rb', line 10 def gemfile_rubocop_command return nil unless rubocop_gemfile? rubocop_command_by_gemfile_path(mygem.path) end |
#rubocop_command_by_gemfile_path(path) ⇒ Object
16 17 18 |
# File 'lib/avm/eac_ruby_base1/rubocop/gemfile.rb', line 16 def rubocop_command_by_gemfile_path(path) ::Avm::EacRubyBase1::Sources::Base.new(path).bundle('exec', 'rubocop').chdir_root end |
#rubocop_gemfile? ⇒ Boolean
20 21 22 23 24 25 |
# File 'lib/avm/eac_ruby_base1/rubocop/gemfile.rb', line 20 def rubocop_gemfile? return false if mygem.blank? mygem.bundle('install').execute! mygem.gemfile_lock_gem_version('rubocop').present? end |