Skip to content

Commit

Permalink
Add basic RPM tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
Sutto committed Dec 12, 2011
0 parents commit 016ae1b
Show file tree
Hide file tree
Showing 10 changed files with 134 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
*.gem
*.rbc
.bundle
.config
.yardoc
Gemfile.lock
InstalledFiles
_yardoc
coverage
doc/
lib/bundler/man
pkg
rdoc
spec/reports
test/tmp
test/version_tmp
tmp
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org'

# Specify your gem's dependencies in rocket_pants-rpm.gemspec
gemspec
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2011 Darcy Laycock

MIT License

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# RocketPants::Rpm

TODO: Write a gem description

## Installation

Add this line to your application's Gemfile:

gem 'rocket_pants-rpm'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rocket_pants-rpm

## Usage

TODO: Write usage instructions here

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env rake
require "bundler/gem_tasks"
1 change: 1 addition & 0 deletions lib/rocket_pants-rpm.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require 'rocket_pants/rpm'
5 changes: 5 additions & 0 deletions lib/rocket_pants-rpm/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module RocketPants
module Rpm
VERSION = "0.0.1"
end
end
32 changes: 32 additions & 0 deletions lib/rocket_pants/rpm.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
require "rocket_pants/rpm/version"
require "newrelic_rpm"
require 'new_relic/agent/instrumentation/rails3/action_controller'

module RocketPants
module RPM

DependencyDetection.defer do
@name = :rocketpants_controller

depends_on do
defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i == 3
end

depends_on do
defined?(ActionController) && defined?(ActionController::Base)
end

executes do
NewRelic::Agent.logger.debug 'Installing RocketPants Controller instrumentation'
end

executes do
class RocketPants::Base
include NewRelic::Agent::Instrumentation::ControllerInstrumentation
include NewRelic::Agent::Instrumentation::Rails3::ActionController
end
end
end

end
end
5 changes: 5 additions & 0 deletions lib/rocket_pants/rpm/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module RocketPants
module RPM
VERSION = "0.0.1"
end
end
17 changes: 17 additions & 0 deletions rocket_pants-rpm.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/rocket_pants/rpm/version', __FILE__)

Gem::Specification.new do |gem|
gem.authors = ["Darcy Laycock"]
gem.email = ["sutto@sutto.net"]
gem.description = %q{Integrates RocketPants and RPM for great success.}
gem.summary = %q{Provides rpm-instrumentation for RocketPants.}
gem.homepage = ""

gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
gem.files = `git ls-files`.split("\n")
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
gem.name = "rocket_pants-rpm"
gem.require_paths = ["lib"]
gem.version = RocketPants::RPM::VERSION
end

0 comments on commit 016ae1b

Please sign in to comment.