Class: Appsignal::CLI::Diagnose::Paths Private

Inherits:
Object
  • Object
show all
Defined in:
lib/appsignal/cli/diagnose/paths.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 1.1.0

Constant Summary collapse

BYTES_TO_READ_FOR_FILES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

2 Mebibytes

Since:

  • 1.1.0

2 * 1024 * 1024

Instance Method Summary collapse

Instance Method Details

#pathsObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 1.1.0



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/appsignal/cli/diagnose/paths.rb', line 17

def paths
  @paths ||=
    begin
      config = Appsignal.config
      log_file_path = config.log_file_path
      {
        :package_install_path => {
          :label => "AppSignal gem path",
          :path => gem_path
        },
        :working_dir => {
          :label => "Current working directory",
          :path => Dir.pwd
        },
        :root_path => {
          :label => "Root path",
          :path => config.root_path
        },
        :log_dir_path => {
          :label => "Log directory",
          :path => log_file_path ? File.dirname(log_file_path) : ""
        },
        "ext/mkmf.log" => {
          :label => "Makefile install log",
          :path => makefile_install_log_path
        },
        "appsignal.log" => {
          :label => "AppSignal log",
          :path => log_file_path
        }
      }
    end
end

#reportObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 1.1.0



9
10
11
12
13
14
15
# File 'lib/appsignal/cli/diagnose/paths.rb', line 9

def report
  {}.tap do |hash|
    paths.each do |filename, config|
      hash[filename] = path_stat(config[:path])
    end
  end
end