We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb1a0d2 commit 1709374Copy full SHA for 1709374
lib/appmap.rb
@@ -51,6 +51,14 @@ def initialize(config_file_path = 'appmap.yml')
51
end
52
53
54
+ def info(msg)
55
+ if defined?(::Rails)
56
+ ::Rails.logger.info msg
57
+ else
58
+ warn msg
59
+ end
60
61
+
62
# Used to start tracing, stop tracing, and record events.
63
def tracing
64
@tracing ||= Trace::Tracing.new
@@ -97,5 +105,17 @@ def detect_metadata
97
105
98
106
99
107
100
-require 'appmap/railtie' if defined?(::Rails::Railtie)
108
+if defined?(::Rails::Railtie)
109
+ require 'appmap/railtie'
110
+end
111
112
+if defined?(::RSpec)
113
+ require 'appmap/rspec'
114
115
116
+# defined?(::Minitest) returns nil...
117
+if Gem.loaded_specs['minitest']
118
+ require 'appmap/minitest'
119
120
101
121
AppMap.initialize if ENV['APPMAP'] == 'true'
0 commit comments