skylight 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/skylight/railtie.rb +9 -7
- data/lib/skylight/version.rb +1 -1
- metadata +1 -1
data/lib/skylight/railtie.rb
CHANGED
@@ -14,15 +14,17 @@ module Skylight
|
|
14
14
|
attr_accessor :instrumenter
|
15
15
|
|
16
16
|
initializer "skylight.configure" do |app|
|
17
|
-
|
17
|
+
if environments.include?(Rails.env.to_s)
|
18
|
+
config = load_config(app)
|
18
19
|
|
19
|
-
|
20
|
-
|
20
|
+
if good_to_go?(app, config)
|
21
|
+
@instrumenter = Instrumenter.new(config)
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
Rails.logger.debug "[SKYLIGHT] Installing middleware"
|
24
|
+
app.middleware.insert 0, Middleware, @instrumenter
|
25
|
+
else
|
26
|
+
puts "[SKYLIGHT] Skipping Skylight boot"
|
27
|
+
end
|
26
28
|
end
|
27
29
|
end
|
28
30
|
|
data/lib/skylight/version.rb
CHANGED