forked from newrelic/rpm_contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved support for Camping framework
- Loading branch information
Bill Kayser
committed
Mar 5, 2010
1 parent
dad1d1a
commit 4f58aa3
Showing
4 changed files
with
56 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
* Version 1.0.2 | ||
|
||
Improved Camping support | ||
|
||
* Version 1.0.1 | ||
|
||
Removed DelayedJob, put back in core agent | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
require 'new_relic/control/ruby' | ||
# This is the framework control object for Camping apps. | ||
# It is loaded by virtue of detecting 'camping' as the framework | ||
# in the rpm_contrib/detection/camping.rb file. It gets loaded | ||
# by the new_relic/control.rb file. | ||
class NewRelic::Control::Camping < NewRelic::Control::Ruby | ||
def init_config(options) | ||
super | ||
@local_env.dispatcher = 'camping' | ||
self['app_name'] ||= 'Camping Application' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Detect when running under camping and set the framework and dispatcher. | ||
|
||
module NewRelic | ||
class LocalEnvironment | ||
module Camping | ||
def discover_framework | ||
if defined?(::Camping) | ||
puts "framework is camping" | ||
@framework = 'camping' | ||
else | ||
super | ||
end | ||
end | ||
def discover_dispatcher | ||
super | ||
if defined?(::Camping) && @dispatcher.nil? | ||
@dispatcher = 'camping' | ||
end | ||
end | ||
end | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters