fiveruns-dash-merb 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +65 -0
- data/VERSION.yml +4 -0
- data/lib/dash-merb.rb +16 -0
- data/lib/fiveruns/dash/merb/recipe.rb +5 -0
- data/lib/fiveruns/dash/merb.rb +18 -0
- metadata +70 -0
data/README.rdoc
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
= FiveRuns Dash library for Merb
|
2
|
+
|
3
|
+
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.
|
4
|
+
|
5
|
+
You'll need a Dash account before using this library.
|
6
|
+
|
7
|
+
== Installation
|
8
|
+
|
9
|
+
This library is released as a gem from the official repository at http://github.com/fiveruns/dash-merb
|
10
|
+
|
11
|
+
sudo gem install fiveruns-dash-merb --source http://gems.github.com
|
12
|
+
|
13
|
+
== Usage
|
14
|
+
|
15
|
+
See the Ruby support pages, http://support.fiveruns.com/faqs/dash/merb, for information on how to use this library.
|
16
|
+
|
17
|
+
== Authors
|
18
|
+
|
19
|
+
The FiveRuns Development Team & Dash community
|
20
|
+
|
21
|
+
== Dependencies
|
22
|
+
|
23
|
+
* fiveruns-dash-ruby (and dependencies)
|
24
|
+
* Merb 1.0+
|
25
|
+
|
26
|
+
== Contributing
|
27
|
+
|
28
|
+
As an open source project, we welcome community contributions!
|
29
|
+
|
30
|
+
The best way to contribute is by sending pull requests via GitHub. The official repository for this project is:
|
31
|
+
|
32
|
+
http://github.com/fiveruns/dash-merb
|
33
|
+
|
34
|
+
== Support
|
35
|
+
|
36
|
+
Please join the dash-users Google group, http://groups.google.com/group/dash-users
|
37
|
+
|
38
|
+
You can also contact us via Twitter, Campfire, or email; see the main help page, http://support.fiveruns.com, for details.
|
39
|
+
|
40
|
+
== License
|
41
|
+
|
42
|
+
# (The FiveRuns License)
|
43
|
+
#
|
44
|
+
# Copyright (c) 2006-2008 FiveRuns Corporation
|
45
|
+
#
|
46
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
47
|
+
# a copy of this software and associated documentation files (the
|
48
|
+
# 'Software'), to deal in the Software without restriction, including
|
49
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
50
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
51
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
52
|
+
# the following conditions:
|
53
|
+
#
|
54
|
+
# The above copyright notice and this permission notice shall be
|
55
|
+
# included in all copies or substantial portions of the Software.
|
56
|
+
#
|
57
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
58
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
59
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
60
|
+
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
61
|
+
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
62
|
+
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
63
|
+
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
64
|
+
|
65
|
+
|
data/VERSION.yml
ADDED
data/lib/dash-merb.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Depends on non-ActiveSupport fiveruns-dash-ruby (>= 0.8.0)
|
2
|
+
dependency 'fiveruns-dash-ruby', '>= 0.8.0', :require_as => 'fiveruns/dash',
|
3
|
+
:immediate => true
|
4
|
+
Merb::Config[:dash] = {
|
5
|
+
:token => nil,
|
6
|
+
:recipes => [
|
7
|
+
# This recipe can be removed, if desired
|
8
|
+
[:merb, 'http://dash.fiveruns.com']
|
9
|
+
]
|
10
|
+
}
|
11
|
+
|
12
|
+
Merb::BootLoader.after_app_loads do
|
13
|
+
Fiveruns::Dash.logger = Merb.logger
|
14
|
+
require 'fiveruns/dash/merb'
|
15
|
+
Fiveruns::Dash::Merb.start if Merb::Config[:dash][:token]
|
16
|
+
end
|
@@ -0,0 +1,5 @@
|
|
1
|
+
Fiveruns::Dash.register_recipe :merb, :url => 'http://dash.fiveruns.com' do |recipe|
|
2
|
+
recipe.time 'response_time', :method => 'Merb::Request#dispatch_action'
|
3
|
+
recipe.counter 'requests', :incremented_by => 'Merb::Request#dispatch_action'
|
4
|
+
recipe.time 'render_time', :method => 'Merb::RenderMixin#render'
|
5
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'fiveruns/dash/merb/recipe'
|
2
|
+
|
3
|
+
module Fiveruns::Dash
|
4
|
+
module Merb
|
5
|
+
|
6
|
+
def self.start
|
7
|
+
::Fiveruns::Dash.logger.info "Starting FiveRuns Dash"
|
8
|
+
Fiveruns::Dash.start(:app => ::Merb::Config[:dash][:token]) do |config|
|
9
|
+
Array(::Merb::Config[:dash][:recipes]).each do |set|
|
10
|
+
name, url = Array(set)
|
11
|
+
::Fiveruns::Dash.logger.debug "Adding FiveRuns Dash recipe: #{set.inspect}"
|
12
|
+
config.add_recipe(name, :url => url)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fiveruns-dash-merb
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.6.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- FiveRuns Development Team
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-02-17 00:00:00 -08:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: fiveruns-dash-ruby
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.8.0
|
24
|
+
version:
|
25
|
+
description: Provides an API to send metrics from Merb 1.0+ applications to the FiveRuns Dash service
|
26
|
+
email: dev@fiveruns.com
|
27
|
+
executables: []
|
28
|
+
|
29
|
+
extensions: []
|
30
|
+
|
31
|
+
extra_rdoc_files: []
|
32
|
+
|
33
|
+
files:
|
34
|
+
- README.rdoc
|
35
|
+
- VERSION.yml
|
36
|
+
- lib/dash-merb.rb
|
37
|
+
- lib/fiveruns
|
38
|
+
- lib/fiveruns/dash
|
39
|
+
- lib/fiveruns/dash/merb
|
40
|
+
- lib/fiveruns/dash/merb/recipe.rb
|
41
|
+
- lib/fiveruns/dash/merb.rb
|
42
|
+
has_rdoc: true
|
43
|
+
homepage: http://github.com/fiveruns/dash-merb
|
44
|
+
post_install_message:
|
45
|
+
rdoc_options:
|
46
|
+
- --inline-source
|
47
|
+
- --charset=UTF-8
|
48
|
+
require_paths:
|
49
|
+
- lib
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: "0"
|
55
|
+
version:
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: "0"
|
61
|
+
version:
|
62
|
+
requirements: []
|
63
|
+
|
64
|
+
rubyforge_project:
|
65
|
+
rubygems_version: 1.2.0
|
66
|
+
signing_key:
|
67
|
+
specification_version: 2
|
68
|
+
summary: FiveRuns Dash library for Merb
|
69
|
+
test_files: []
|
70
|
+
|