forked from fiveruns/dash-merb
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic functions, docs; technical preview
Requires fiveruns-dash-ruby >= 0.8.0 (remove-active-support branch, not merged to master w/ gem yet)
- Loading branch information
Bruce Williams
committed
Feb 17, 2009
1 parent
a95bbe8
commit 854e678
Showing
14 changed files
with
142 additions
and
58 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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
= FiveRuns Dash library for Merb | ||
|
||
Provides a Ruby API to push metrics to the FiveRuns Dash service, http://dash.fiveruns.com, currently in beta, from Merb, providing basic logging and a few metrics. | ||
|
||
You'll need a Dash account before using this library. | ||
|
||
== Installation | ||
|
||
This library is released as a gem from the official repository at http://github.com/fiveruns/dash-merb | ||
|
||
sudo gem install fiveruns-dash-merb --source http://gems.github.com | ||
|
||
== Usage | ||
|
||
See the Ruby support pages, http://support.fiveruns.com/faqs/dash/merb, for information on how to use this library. | ||
|
||
== Authors | ||
|
||
The FiveRuns Development Team & Dash community | ||
|
||
== Dependencies | ||
|
||
* fiveruns-dash-ruby (and dependencies) | ||
* Merb 1.0+ | ||
|
||
== Contributing | ||
|
||
As an open source project, we welcome community contributions! | ||
|
||
The best way to contribute is by sending pull requests via GitHub. The official repository for this project is: | ||
|
||
http://github.com/fiveruns/dash-merb | ||
|
||
== Support | ||
|
||
Please join the dash-users Google group, http://groups.google.com/group/dash-users | ||
|
||
You can also contact us via Twitter, Campfire, or email; see the main help page, http://support.fiveruns.com, for details. | ||
|
||
== License | ||
|
||
# (The FiveRuns License) | ||
# | ||
# Copyright (c) 2006-2008 FiveRuns Corporation | ||
# | ||
# 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. | ||
|
||
|
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
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,4 +1,4 @@ | ||
--- | ||
:minor: 1 | ||
:minor: 6 | ||
:patch: 0 | ||
:major: 0 |
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,32 @@ | ||
# -*- encoding: utf-8 -*- | ||
|
||
Gem::Specification.new do |s| | ||
s.name = %q{dash-merb} | ||
s.version = "0.6.0" | ||
|
||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= | ||
s.authors = ["FiveRuns Development Team"] | ||
s.date = %q{2009-02-17} | ||
s.description = %q{Provides an API to send metrics from Merb 1.0+ applications to the FiveRuns Dash service} | ||
s.email = %q{dev@fiveruns.com} | ||
s.files = ["README.rdoc", "VERSION.yml", "lib/dash-merb.rb", "lib/fiveruns", "lib/fiveruns/dash", "lib/fiveruns/dash/merb", "lib/fiveruns/dash/merb/recipe.rb", "lib/fiveruns/dash/merb.rb"] | ||
s.has_rdoc = true | ||
s.homepage = %q{http://github.com/fiveruns/dash-merb} | ||
s.rdoc_options = ["--inline-source", "--charset=UTF-8"] | ||
s.require_paths = ["lib"] | ||
s.rubygems_version = %q{1.3.1} | ||
s.summary = %q{FiveRuns Dash library for Merb} | ||
|
||
if s.respond_to? :specification_version then | ||
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION | ||
s.specification_version = 2 | ||
|
||
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then | ||
s.add_runtime_dependency(%q<fiveruns-dash-ruby>, [">= 0.8.0"]) | ||
else | ||
s.add_dependency(%q<fiveruns-dash-ruby>, [">= 0.8.0"]) | ||
end | ||
else | ||
s.add_dependency(%q<fiveruns-dash-ruby>, [">= 0.8.0"]) | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
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,16 @@ | ||
# Depends on non-ActiveSupport fiveruns-dash-ruby (>= 0.8.0) | ||
dependency 'fiveruns-dash-ruby', '>= 0.8.0', :require_as => 'fiveruns/dash', | ||
:immediate => true | ||
Merb::Config[:dash] = { | ||
:token => nil, | ||
:recipes => [ | ||
# This recipe can be removed, if desired | ||
[:merb, 'http://dash.fiveruns.com'] | ||
] | ||
} | ||
|
||
Merb::BootLoader.after_app_loads do | ||
Fiveruns::Dash.logger = Merb.logger | ||
require 'fiveruns/dash/merb' | ||
Fiveruns::Dash::Merb.start if Merb::Config[:dash][:token] | ||
end |
Empty file.
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,18 @@ | ||
require 'fiveruns/dash/merb/recipe' | ||
|
||
module Fiveruns::Dash | ||
module Merb | ||
|
||
def self.start | ||
::Fiveruns::Dash.logger.info "Starting FiveRuns Dash" | ||
Fiveruns::Dash.start(:app => ::Merb::Config[:dash][:token]) do |config| | ||
Array(::Merb::Config[:dash][:recipes]).each do |set| | ||
name, url = Array(set) | ||
::Fiveruns::Dash.logger.debug "Adding FiveRuns Dash recipe: #{set.inspect}" | ||
config.add_recipe(name, :url => url) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Fiveruns::Dash.register_recipe :merb, :url => 'http://dash.fiveruns.com' do |recipe| | ||
recipe.time 'response_time', :method => 'Merb::Request#dispatch_action' | ||
recipe.counter 'requests', :incremented_by => 'Merb::Request#dispatch_action' | ||
recipe.time 'render_time', :method => 'Merb::RenderMixin#render' | ||
end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.