Sha256: c605743e58418a08b3cf7cbd24c97cf93e3656483dac8fae133fdd3672dcfcb6

Contents?: true

Size: 708 Bytes

Versions: 3

Compression:

Stored size: 708 Bytes

Contents

# frozen_string_literal: true

module Avm
  module Apps
    module Sources
      class Configuration < ::EacRubyUtils::Configs
        RUBOCOP_COMMAND_KEY = 'ruby.rubocop.command'
        RUBOCOP_GEMFILE_KEY = 'ruby.rubocop.gemfile'

        def rubocop_command
          read_command(RUBOCOP_COMMAND_KEY)
        end

        def rubocop_gemfile
          gemfile_path = read_entry(RUBOCOP_GEMFILE_KEY)
          return nil if gemfile_path.blank?

          gemfile_path = gemfile_path.to_pathname.expand_path(storage_path.parent)
          return gemfile_path if gemfile_path.file?

          raise "Gemfile path \"#{gemfile_path}\" does not exist or is not a file"
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
avm-tools-0.98.0 vendor/avm-apps/lib/avm/apps/sources/configuration/_rubocop.rb
avm-apps-0.2.0 lib/avm/apps/sources/configuration/_rubocop.rb
avm-tools-0.97.0 vendor/avm-apps/lib/avm/apps/sources/configuration/_rubocop.rb