Module: AppMap::Metadata

Defined in:
lib/appmap/metadata.rb

Class Method Summary collapse

Class Method Details

.detectObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/appmap/metadata.rb', line 8

def detect
  {
    app: AppMap.configuration.name,
    language: {
      name: "ruby",
      engine: RUBY_ENGINE,
      version: RUBY_VERSION
    },
    client: {
      name: "appmap",
      url: AppMap::URL,
      version: AppMap::VERSION
    }
  }.tap do |m|
    if defined?(::Rails) && defined?(::Rails.version)
      m[:frameworks] ||= []
      m[:frameworks] << {
        name: "rails",
        version: ::Rails.version
      }
    end
    m[:git] =  if git_available
  end
end