Sha256: 1103fdc6871e64761f12056796a21d3e12333b8f0b538ebd801227cacd4907d7

Contents?: true

Size: 619 Bytes

Versions: 44

Compression:

Stored size: 619 Bytes

Contents

# frozen_string_literal: true

require 'appmap/service/validator/config_validator'

module AppMap
  module Service
    class ConfigAnalyzer
      attr_reader :config_error

      def initialize(config_file)
        @config_file = config_file
      end

      def app_name
        config_validator.config.to_h['name'] if present?
      end

      def present?
        File.exist?(@config_file)
      end

      def valid?
        config_validator.valid?
      end

      private

      def config_validator
        @validator ||= AppMap::Service::Validator::ConfigValidator.new(@config_file)
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
appmap-0.81.1 lib/appmap/service/config_analyzer.rb
appmap-0.81.0 lib/appmap/service/config_analyzer.rb
appmap-0.80.2 lib/appmap/service/config_analyzer.rb
appmap-0.80.1 lib/appmap/service/config_analyzer.rb
appmap-0.80.0 lib/appmap/service/config_analyzer.rb
appmap-0.79.0 lib/appmap/service/config_analyzer.rb
appmap-0.78.0 lib/appmap/service/config_analyzer.rb
appmap-0.77.4 lib/appmap/service/config_analyzer.rb
appmap-0.77.3 lib/appmap/service/config_analyzer.rb
appmap-0.77.2 lib/appmap/service/config_analyzer.rb
appmap-0.77.1 lib/appmap/service/config_analyzer.rb
appmap-0.77.0 lib/appmap/service/config_analyzer.rb
appmap-0.76.0 lib/appmap/service/config_analyzer.rb
appmap-0.75.0 lib/appmap/service/config_analyzer.rb
appmap-0.74.0 lib/appmap/service/config_analyzer.rb
appmap-0.73.0 lib/appmap/service/config_analyzer.rb
appmap-0.72.5 lib/appmap/service/config_analyzer.rb
appmap-0.72.4 lib/appmap/service/config_analyzer.rb
appmap-0.72.3 lib/appmap/service/config_analyzer.rb
appmap-0.72.2 lib/appmap/service/config_analyzer.rb