rails-api-newrelic 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,2 @@
1
1
  require "rails-api-newrelic/version"
2
-
3
- require "new_relic/agent/instrumentation/rails3/action_controller"
4
- require "new_relic/agent/instrumentation/rails3/errors"
5
-
6
- class ActionController::API
7
-
8
- include NewRelic::Agent::Instrumentation::ControllerInstrumentation
9
- include NewRelic::Agent::Instrumentation::Rails3::ActionController
10
- include NewRelic::Agent::Instrumentation::Rails3::Errors
11
-
12
- end
2
+ require "rails-api-newrelic/rails"
@@ -0,0 +1,24 @@
1
+ module RailsAPINewrelic
2
+
3
+ AFTER_INITIALIZER = lambda do |app|
4
+
5
+ require "new_relic/agent/instrumentation/rails3/action_controller"
6
+ require "new_relic/agent/instrumentation/rails3/errors"
7
+
8
+ class ActionController::API
9
+
10
+ include NewRelic::Agent::Instrumentation::ControllerInstrumentation
11
+ include NewRelic::Agent::Instrumentation::Rails3::ActionController
12
+ include NewRelic::Agent::Instrumentation::Rails3::Errors
13
+
14
+ end
15
+
16
+ end
17
+
18
+ class Engine < ::Rails::Engine
19
+
20
+ initializer "finisher_hook", &AFTER_INITIALIZER
21
+
22
+ end
23
+
24
+ end
@@ -1,3 +1,3 @@
1
1
  module RailsAPINewrelic
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-api-newrelic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -88,6 +88,7 @@ files:
88
88
  - README.md
89
89
  - Rakefile
90
90
  - lib/rails-api-newrelic.rb
91
+ - lib/rails-api-newrelic/rails.rb
91
92
  - lib/rails-api-newrelic/version.rb
92
93
  - rails-api-newrelic.gemspec
93
94
  homepage: ''