librato-rails 0.10.3 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 481fc3dec85887b6db3aa6c70fea21292dbd0fb2
4
+ data.tar.gz: 04a8dee235d4e3d60292fe55634f059ab4b30b84
5
+ SHA512:
6
+ metadata.gz: 01a97257228233f3a73574c3560ec65e7ff2b4a7cb4d11fcbcbdfac1691c7ddae763da52ef5631e92f504741feb067c175a044995d82d6c8b2992ad6ad956b65
7
+ data.tar.gz: ba49549876186a7ca0e80e95edc38d5a9994666a84be9cbc771215cb97f49e2c63dc7d2cf0e2eedbf2d284afdacefacb7f61a6297e0cd66f5edb22649e923479
checksums.yaml.gz.sig ADDED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### Version 0.11.0
2
+ * Add instrument_action for profiling a specific controller action
3
+
1
4
  ### Version 0.10.3
2
5
  * Relax rails loading requirements
3
6
 
data/README.md CHANGED
@@ -3,7 +3,7 @@ librato-rails
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/librato-rails.png)](http://badge.fury.io/rb/librato-rails) [![Build Status](https://secure.travis-ci.org/librato/librato-rails.png?branch=master)](http://travis-ci.org/librato/librato-rails) [![Code Climate](https://codeclimate.com/github/librato/librato-rails.png)](https://codeclimate.com/github/librato/librato-rails)
5
5
 
6
- `librato-rails` will report key statistics for your Rails app to [Librato Metrics](https://metrics.librato.com/) and allow you to easily track your own custom metrics. Metrics are delivered asynchronously behind the scenes so they won't affect performance of your requests.
6
+ `librato-rails` will report key statistics for your Rails app to [Librato](https://metrics.librato.com/) and allow you to easily track your own custom metrics. Metrics are delivered asynchronously behind the scenes so they won't affect performance of your requests.
7
7
 
8
8
  Currently Rails 3.0+ and Ruby 1.9.2+ are required.
9
9
 
@@ -11,7 +11,7 @@ You may want to read the [notes on upgrading](https://github.com/librato/librato
11
11
 
12
12
  ## Quick Start
13
13
 
14
- Installing `librato-rails` and relaunching your application will automatically start the reporting of metrics to your Metrics account.
14
+ Installing `librato-rails` and relaunching your application will automatically start the reporting of metrics to your Librato account.
15
15
 
16
16
  After installation `librato-rails` will detect your environment and start reporting available performance information for your application.
17
17
 
@@ -40,7 +40,7 @@ Then run `bundle install`.
40
40
 
41
41
  ## Configuration
42
42
 
43
- If you don't have a Metrics account already, [sign up](https://metrics.librato.com/). In order to send measurements to Metrics you need to provide your account credentials to `librato-rails`. You can provide these one of two ways:
43
+ If you don't have a Librato account already, [sign up](https://metrics.librato.com/). In order to send measurements to Librato you need to provide your account credentials to `librato-rails`. You can provide these one of two ways:
44
44
 
45
45
  ##### Use a config file
46
46
 
@@ -66,7 +66,7 @@ For more information on combining config files and environment variables, see th
66
66
 
67
67
  ##### Running on Heroku
68
68
 
69
- If you are using the Librato Metrics Heroku addon, your user and token environment variables will already be set in your Heroku environment. If you are running without the addon you will need to provide them yourself.
69
+ If you are using the Librato Heroku addon, your user and token environment variables will already be set in your Heroku environment. If you are running without the addon you will need to provide them yourself.
70
70
 
71
71
  In either case you will need to specify a custom source for your app to track properly. If `librato-rails` does not detect an explicit source it will not start. You can set the source in your environment:
72
72
 
@@ -80,13 +80,13 @@ Note that if Heroku idles your application measurements will not be sent until i
80
80
 
81
81
  ## Automatic Measurements
82
82
 
83
- After installing `librato-rails` and restarting your app and you will see a number of new metrics appear in your Metrics account. These track request performance, sql queries, mail handling, and other key stats.
83
+ After installing `librato-rails` and restarting your app and you will see a number of new metrics appear in your Librato account. These track request performance, sql queries, mail handling, and other key stats.
84
84
 
85
85
  Built-in performance metrics will start with either `rack` or `rails`, depending on the level they are being sampled from. For example: `rails.request.total` is the total number of requests rails has received each minute.
86
86
 
87
87
  ## Custom Measurements
88
88
 
89
- Tracking anything that interests you is easy with Metrics. There are four primary helpers available:
89
+ Tracking anything that interests you is easy with Librato. There are four primary helpers available to use anywhere in your application:
90
90
 
91
91
  #### increment
92
92
 
@@ -97,10 +97,10 @@ Use for tracking a running total of something _across_ requests, examples:
97
97
  Librato.increment 'sales_completed'
98
98
 
99
99
  # increment by five
100
- Librato.increment 'items_purchased', :by => 5
100
+ Librato.increment 'items_purchased', by: 5
101
101
 
102
102
  # increment with a custom source
103
- Librato.increment 'user.purchases', :source => user.id
103
+ Librato.increment 'user.purchases', source: user.id
104
104
  ```
105
105
 
106
106
  Other things you might track this way: user signups, requests of a certain type or to a certain route, total jobs queued or processed, emails sent or received
@@ -113,7 +113,7 @@ Especially with custom sources you may want the opposite behavior - reporting a
113
113
 
114
114
  ```ruby
115
115
  # report a value for 'user.uploaded_file' only during non-zero intervals
116
- Librato.increment 'user.uploaded_file', :source => user.id, :sporadic => true
116
+ Librato.increment 'user.uploaded_file', source: user.id, sporadic: true
117
117
  ```
118
118
 
119
119
  #### measure
@@ -124,7 +124,7 @@ Use when you want to track an average value _per_-request. Examples:
124
124
  Librato.measure 'user.social_graph.nodes', 212
125
125
 
126
126
  # report from a custom source
127
- Librato.measure 'jobs.queued', 3, :source => 'worker.12'
127
+ Librato.measure 'jobs.queued', 3, source: 'worker.12'
128
128
  ```
129
129
 
130
130
  #### timing
@@ -165,6 +165,30 @@ end
165
165
 
166
166
  Symbols can be used interchangably with strings for metric names.
167
167
 
168
+ ## Controller Helpers
169
+
170
+ `librato-rails` also has special helpers which are available inside your controllers:
171
+
172
+ #### instrument_action
173
+
174
+ Use when you want to profile execution time or request volume for a specific controller action:
175
+
176
+ ```ruby
177
+ class CommentController < ApplicationController
178
+ instrument_action :create # can accept a list
179
+
180
+ def create
181
+ # ...
182
+ end
183
+ end
184
+ ```
185
+
186
+ Once you instrument an action, `librato-rails` will start reporting a set of metrics specific to that action including # of requests, total time used per request, and db and view time used per request.
187
+
188
+ Action instrumentation metrics are named following the format `rails.action.<controller>.<action>.<format>.*`.
189
+
190
+ IMPORTANT NOTE: Metrics from `instrument_action` take into account all time spent in the ActionController stack for that action, including before/after filters and any global processing. They are _not_ equivalent to using a `Librato.timing` block inside the method body.
191
+
168
192
  ## Use with ActiveSupport::Notifications
169
193
 
170
194
  `librato-rails` and [ActiveSupport::Notifications](http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html) work great together. In fact, many of the Rails metrics provided are produced by subscribing to the [instrumentation events](http://edgeguides.rubyonrails.org/active_support_instrumentation.html) built into Rails.
@@ -172,7 +196,7 @@ Symbols can be used interchangably with strings for metric names.
172
196
  Assume you have a custom event:
173
197
 
174
198
  ```ruby
175
- ActiveSupport::Notifications.instrument 'my.event', :user => user do
199
+ ActiveSupport::Notifications.instrument 'my.event', user: user do
176
200
  # do work..
177
201
  end
178
202
  ```
@@ -191,7 +215,7 @@ ActiveSupport::Notifications.subscribe 'my.event' do |*args|
191
215
  Librato.timing 'my.event.time', event.duration
192
216
 
193
217
  # use payload data to do user-specific tracking
194
- Librato.increment 'user.did.event', :source => user.id, :sporadic => true
218
+ Librato.increment 'user.did.event', source: user.id, sporadic: true
195
219
 
196
220
  # do conditional tracking
197
221
  if user.feature_on?(:sample_group)
@@ -222,7 +246,7 @@ Never fear, [we have some guidelines](https://github.com/librato/librato-rails/w
222
246
 
223
247
  `librato-rails` submits measurements back to the Librato platform on a _per-process_ basis. By default these measurements are then combined into a single measurement per source (default is your hostname) before persisting the data.
224
248
 
225
- For example if you have 4 hosts with 8 unicorn instances each (i.e. 32 processes total), on the Metrics site you'll find 4 data streams (1 per host) instead of 32.
249
+ For example if you have 4 hosts with 8 unicorn instances each (i.e. 32 processes total), on the Librato site you'll find 4 data streams (1 per host) instead of 32.
226
250
  Current pricing applies after aggregation, so in this case you will be charged for 4 streams instead of 32.
227
251
 
228
252
  If you want to report per-process instead, you can set `source_pids` to `true` in
@@ -230,11 +254,11 @@ your config, which will append the process id to the source name used by each th
230
254
 
231
255
  ## Troubleshooting
232
256
 
233
- Note that it may take 2-3 minutes for the first results to show up in your Metrics account after you have started your servers with `librato-rails` enabled and the first request has been received.
257
+ Note that it may take 2-3 minutes for the first results to show up in your Librato account after you have started your servers with `librato-rails` enabled and the first request has been received.
234
258
 
235
259
  #### Verbose Logging
236
260
 
237
- If you want to get more information about `librato-rails` submissions to the Metrics service you can set your `log_level` to `debug` (see [configuration](https://github.com/librato/librato-rails/wiki/Configuration)) to get detailed information added to your logs about the settings `librato-rails` is seeing at startup and when it is submitting.
261
+ If you want to get more information about `librato-rails` submissions to the Librato service you can set your `log_level` to `debug` (see [configuration](https://github.com/librato/librato-rails/wiki/Configuration)) to get detailed information added to your logs about the settings `librato-rails` is seeing at startup and when it is submitting.
238
262
 
239
263
  Be sure to tail your logs manually (`tail -F <logfile>`) as the log output you get when using the `rails server` command often skips startup log lines.
240
264
 
@@ -0,0 +1,16 @@
1
+ module Librato
2
+ module Rails
3
+ module Helpers
4
+ module Controller
5
+
6
+ # Mark a specific controller action for more detailed instrumenting
7
+ def instrument_action(*actions)
8
+ actions.each do |action|
9
+ Subscribers.watch_controller_action(self.to_s, action)
10
+ end
11
+ end
12
+
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,8 @@
1
+ module Librato
2
+ module Rails
3
+ module Helpers
4
+ end
5
+ end
6
+ end
7
+
8
+ require_relative 'helpers/controller'
@@ -13,9 +13,13 @@ module Librato
13
13
  config.librato_rails.tracker = tracker
14
14
  Librato.register_tracker(tracker)
15
15
 
16
- unless ::Rails.env.test?
16
+ initializer 'librato_rails.setup' do |app|
17
17
 
18
- initializer 'librato_rails.setup' do |app|
18
+ ActiveSupport.on_load :action_controller do
19
+ extend Librato::Rails::Helpers::Controller
20
+ end
21
+
22
+ unless ::Rails.env.test?
19
23
  # set up logging; heroku needs logging to STDOUT
20
24
  if on_heroku
21
25
  logger = Logger.new(STDOUT)
@@ -4,9 +4,15 @@ module Librato
4
4
 
5
5
  # Controllers
6
6
 
7
- ActiveSupport::Notifications.subscribe 'process_action.action_controller' do |*args|
7
+ def self.watch_controller_action(controller, action)
8
+ @watches ||= []
9
+ @watches << "#{controller}##{action}".freeze
10
+ end
8
11
 
9
- event = ActiveSupport::Notifications::Event.new(*args)
12
+ AS = ActiveSupport
13
+ AS::Notifications.subscribe 'process_action.action_controller' do |*args|
14
+
15
+ event = AS::Notifications::Event.new(*args)
10
16
  controller = event.payload[:controller]
11
17
  action = event.payload[:action]
12
18
 
@@ -49,6 +55,23 @@ module Librato
49
55
  r.increment 'slow' if event.duration > 200.0
50
56
  end # end group
51
57
 
58
+ if @watches && @watches.index("#{controller}##{action}")
59
+ page_key = "#{controller}.#{action}.#{format}"
60
+ collector.group "rails.action.#{page_key}" do |r|
61
+
62
+ r.increment 'total'
63
+ r.timing 'time', event.duration
64
+
65
+ if exception
66
+ r.increment 'exceptions'
67
+ else
68
+ r.timing 'time.db', event.payload[:db_runtime] || 0
69
+ r.timing 'time.view', event.payload[:view_runtime] || 0
70
+ end
71
+
72
+ end
73
+ end
74
+
52
75
  end # end subscribe
53
76
 
54
77
  end
@@ -8,7 +8,7 @@ module Librato
8
8
  payload = args.last
9
9
 
10
10
  collector.group "rails.sql" do |s|
11
- # puts (event.payload[:name] || 'nil') + ":" + event.payload[:sql] + "\n"
11
+ # puts (payload[:name] || 'nil') + ":" + payload[:sql] + "\n\n"
12
12
  s.increment 'queries'
13
13
 
14
14
  sql = payload[:sql].strip
@@ -1,5 +1,5 @@
1
1
  module Librato
2
2
  module Rails
3
- VERSION = "0.10.3"
3
+ VERSION = "0.11.0"
4
4
  end
5
5
  end
data/lib/librato/rails.rb CHANGED
@@ -7,4 +7,5 @@ require_relative 'rails/version'
7
7
  if defined?(Rails)
8
8
  require_relative 'rails/railtie'
9
9
  require_relative 'rails/subscribers'
10
+ require_relative 'rails/helpers'
10
11
  end
@@ -0,0 +1,22 @@
1
+ class InstrumentActionController < ApplicationController
2
+ # extend Librato::Rails::Helpers::Controller
3
+ # before_filter :before
4
+
5
+ instrument_action :inst, :inst_too
6
+
7
+ def inst
8
+ Librato.timing 'internal execution' do
9
+ render nothing: true
10
+ end
11
+ end
12
+
13
+ def not_instrumented
14
+ render nothing: true
15
+ end
16
+
17
+ private
18
+
19
+ def before
20
+ sleep 1
21
+ end
22
+ end
@@ -17,6 +17,9 @@ Dummy::Application.routes.draw do
17
17
  get 'render/partial' => 'render#partial', :as => :render_partial
18
18
  get 'render/template' => 'render#template', :as => :render_template
19
19
 
20
+ get 'instrument/inst' => 'instrument_action#inst', :as => :instrument_action
21
+ get 'instrument/not' => 'instrument_action#not', :as => :not_instrumented
22
+
20
23
  # The priority is based upon order of creation:
21
24
  # first created -> highest priority.
22
25
 
@@ -0,0 +1,21 @@
1
+ require 'test_helper'
2
+
3
+ class InstrumentActionTest < ActiveSupport::IntegrationCase
4
+
5
+ test 'instrument controller action' do
6
+ visit instrument_action_path
7
+
8
+ # puts aggregate.instance_variable_get(:@cache).queued.inspect
9
+ # puts counters.instance_variable_get(:@cache).inspect
10
+
11
+ base = 'rails.action.InstrumentActionController.inst.html'
12
+
13
+ timings = %w{time time.db time.view}
14
+ timings.each do |t|
15
+ assert_equal 1, aggregate["#{base}.#{t}"][:count]
16
+ end
17
+
18
+ assert_equal 1, counters["#{base}.total"]
19
+ end
20
+
21
+ end
@@ -24,9 +24,12 @@ class RequestTest < ActiveSupport::IntegrationCase
24
24
  visit root_path
25
25
 
26
26
  # common for all paths
27
- assert_equal 1, aggregate["rails.request.time"][:count], 'should record total time'
28
- assert_equal 1, aggregate["rails.request.time.db"][:count], 'should record db time'
29
- assert_equal 1, aggregate["rails.request.time.view"][:count], 'should record view time'
27
+ assert_equal 1, aggregate["rails.request.time"][:count],
28
+ 'should record total time'
29
+ assert_equal 1, aggregate["rails.request.time.db"][:count],
30
+ 'should record db time'
31
+ assert_equal 1, aggregate["rails.request.time.view"][:count],
32
+ 'should record view time'
30
33
 
31
34
  # status specific
32
35
  assert_equal 1, aggregate["rails.request.status.200.time"][:count]
@@ -7,22 +7,41 @@ class SQLTest < ActiveSupport::IntegrationCase
7
7
  test 'total queries and query types' do
8
8
  # note that modifying queries are wrapped in a transaction which
9
9
  # adds 2 to total queries per operation.
10
- user = User.create!(:email => 'foo@foo.com', :password => 'wow')
11
- assert_equal 3, counters["rails.sql.queries"]
12
- assert_equal 1, counters["rails.sql.inserts"]
13
-
14
- foo = User.find_by_email('foo@foo.com')
15
- assert_equal 4, counters["rails.sql.queries"]
16
- assert_equal 1, counters["rails.sql.selects"]
17
-
18
- foo.password = 'new password'
19
- foo.save
20
- assert_equal 7, counters["rails.sql.queries"]
21
- assert_equal 1, counters["rails.sql.updates"]
22
-
23
- foo.destroy
24
- assert_equal 10, counters["rails.sql.queries"]
25
- assert_equal 1, counters["rails.sql.deletes"]
10
+
11
+ # rails 4.1 adds extra queries which can be variable, hence the
12
+ # two possible counts for these operations
13
+
14
+ foo = nil
15
+
16
+ assert_increasing_queries do
17
+ user = User.create!(email: 'foo@foo.com', password: 'wow')
18
+ assert_equal 1, counters["rails.sql.inserts"]
19
+ end
20
+
21
+ assert_increasing_queries do
22
+ prev = counters["rails.sql.selects"].to_i
23
+ foo = User.find_by_email('foo@foo.com')
24
+ assert_equal prev+1, counters["rails.sql.selects"]
25
+ end
26
+
27
+ assert_increasing_queries do
28
+ foo.password = 'new password'
29
+ foo.save
30
+ assert_equal 1, counters["rails.sql.updates"]
31
+ end
32
+
33
+ assert_increasing_queries do
34
+ foo.destroy
35
+ assert_equal 1, counters["rails.sql.deletes"]
36
+ end
37
+ end
38
+
39
+ private
40
+
41
+ def assert_increasing_queries
42
+ previous = counters["rails.sql.queries"].to_i
43
+ yield
44
+ assert counters["rails.sql.queries"].to_i > previous
26
45
  end
27
46
 
28
47
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,138 +1,118 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: librato-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.3
5
- prerelease:
4
+ version: 0.11.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Matt Sanders
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain:
12
- - !binary |-
13
- LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tL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ZbKJAGUIrqHiSfdLzx2k2sGUYlKzf6a4xWi587ndC8Bvh5ldc85W1llHDeASS
20
+ R5Wjper4KU1NWG1FAVvQCXhSKdmki+wX7Jnd7CQ+oz7kkKYPM8G/ZTdb+qn7wRLV
21
+ KaR+zzGDmwTQ2WzMitSXmf/ku4MUmRzsyepDXXERLynSp8ITk67g2HMCyvOPsf8K
22
+ cYvl/wbb8By/r6HOjy7SM7Yo354uIfhniu8AKymIKxsb4Ig71S0cU7Hm3+WBTi28
23
+ AIg8TUaXAgMBAAGjOTA3MAkGA1UdEwQCMAAwHQYDVR0OBBYEFDbyQQqO4xJmaKBE
24
+ neQ4y+RWCvOXMAsGA1UdDwQEAwIEsDANBgkqhkiG9w0BAQUFAAOCAQEAKAzXbA47
25
+ 9U59SsEfqR+DLdv1VAcdmxawqC+ZmG4FpxZhuHhaoUui35AoQjzSiHEUNDTIu3u7
26
+ TcsYwXMPzuyzZJJKXvBKmSb9mWJ99DOH81oUmOzX7jClQXZHrnFtHdARcLQsPmga
27
+ 4Dh+fWXWxPJ6fkvg826vJ4pDml7Oo9sCXTpC2ki/5VekTXkpFrUsQRXjlXPkmT3/
28
+ xa858BGRjvU59WPE13QGiba7YIeHtREvNx42JIfoJMV74ofrKIuTw9CMto2gz9Xx
29
+ Kx1ncn07A+bJnKZ6henQAF1CH96ZcqcJH179S2tIiKDM8keeRIUOPC3WT0faok/2
30
+ gA2ozdr851c/nA==
31
+ -----END CERTIFICATE-----
32
+ date: 2014-07-03 00:00:00.000000000 Z
41
33
  dependencies:
42
34
  - !ruby/object:Gem::Dependency
43
35
  name: railties
44
36
  requirement: !ruby/object:Gem::Requirement
45
- none: false
46
37
  requirements:
47
- - - ! '>='
38
+ - - ">="
48
39
  - !ruby/object:Gem::Version
49
40
  version: '3.0'
50
41
  type: :runtime
51
42
  prerelease: false
52
43
  version_requirements: !ruby/object:Gem::Requirement
53
- none: false
54
44
  requirements:
55
- - - ! '>='
45
+ - - ">="
56
46
  - !ruby/object:Gem::Version
57
47
  version: '3.0'
58
48
  - !ruby/object:Gem::Dependency
59
49
  name: activesupport
60
50
  requirement: !ruby/object:Gem::Requirement
61
- none: false
62
51
  requirements:
63
- - - ! '>='
52
+ - - ">="
64
53
  - !ruby/object:Gem::Version
65
54
  version: '3.0'
66
55
  type: :runtime
67
56
  prerelease: false
68
57
  version_requirements: !ruby/object:Gem::Requirement
69
- none: false
70
58
  requirements:
71
- - - ! '>='
59
+ - - ">="
72
60
  - !ruby/object:Gem::Version
73
61
  version: '3.0'
74
62
  - !ruby/object:Gem::Dependency
75
63
  name: librato-rack
76
64
  requirement: !ruby/object:Gem::Requirement
77
- none: false
78
65
  requirements:
79
- - - ~>
66
+ - - "~>"
80
67
  - !ruby/object:Gem::Version
81
68
  version: 0.4.2
82
69
  type: :runtime
83
70
  prerelease: false
84
71
  version_requirements: !ruby/object:Gem::Requirement
85
- none: false
86
72
  requirements:
87
- - - ~>
73
+ - - "~>"
88
74
  - !ruby/object:Gem::Version
89
75
  version: 0.4.2
90
76
  - !ruby/object:Gem::Dependency
91
77
  name: sqlite3
92
78
  requirement: !ruby/object:Gem::Requirement
93
- none: false
94
79
  requirements:
95
- - - ! '>='
80
+ - - ">="
96
81
  - !ruby/object:Gem::Version
97
82
  version: '1.3'
98
83
  type: :development
99
84
  prerelease: false
100
85
  version_requirements: !ruby/object:Gem::Requirement
101
- none: false
102
86
  requirements:
103
- - - ! '>='
87
+ - - ">="
104
88
  - !ruby/object:Gem::Version
105
89
  version: '1.3'
106
90
  - !ruby/object:Gem::Dependency
107
91
  name: capybara
108
92
  requirement: !ruby/object:Gem::Requirement
109
- none: false
110
93
  requirements:
111
- - - ~>
94
+ - - "~>"
112
95
  - !ruby/object:Gem::Version
113
96
  version: 2.0.3
114
97
  type: :development
115
98
  prerelease: false
116
99
  version_requirements: !ruby/object:Gem::Requirement
117
- none: false
118
100
  requirements:
119
- - - ~>
101
+ - - "~>"
120
102
  - !ruby/object:Gem::Version
121
103
  version: 2.0.3
122
104
  - !ruby/object:Gem::Dependency
123
105
  name: rails
124
106
  requirement: !ruby/object:Gem::Requirement
125
- none: false
126
107
  requirements:
127
- - - ! '>='
108
+ - - ">="
128
109
  - !ruby/object:Gem::Version
129
110
  version: '3.0'
130
111
  type: :development
131
112
  prerelease: false
132
113
  version_requirements: !ruby/object:Gem::Requirement
133
- none: false
134
114
  requirements:
135
- - - ! '>='
115
+ - - ">="
136
116
  - !ruby/object:Gem::Version
137
117
  version: '3.0'
138
118
  description: Report key app statistics to the Librato Metrics service and easily track
@@ -143,23 +123,27 @@ executables: []
143
123
  extensions: []
144
124
  extra_rdoc_files: []
145
125
  files:
126
+ - CHANGELOG.md
127
+ - FAQ.md
128
+ - LICENSE
129
+ - README.md
130
+ - Rakefile
131
+ - lib/librato-rails.rb
132
+ - lib/librato/rails.rb
146
133
  - lib/librato/rails/configuration.rb
134
+ - lib/librato/rails/helpers.rb
135
+ - lib/librato/rails/helpers/controller.rb
147
136
  - lib/librato/rails/railtie.rb
137
+ - lib/librato/rails/subscribers.rb
148
138
  - lib/librato/rails/subscribers/cache.rb
149
139
  - lib/librato/rails/subscribers/controller.rb
150
140
  - lib/librato/rails/subscribers/mail.rb
151
141
  - lib/librato/rails/subscribers/render.rb
152
142
  - lib/librato/rails/subscribers/sql.rb
153
- - lib/librato/rails/subscribers.rb
154
143
  - lib/librato/rails/tracker.rb
155
144
  - lib/librato/rails/version.rb
156
- - lib/librato/rails.rb
157
- - lib/librato-rails.rb
158
- - LICENSE
159
- - Rakefile
160
- - README.md
161
- - CHANGELOG.md
162
- - FAQ.md
145
+ - test/dummy/README.rdoc
146
+ - test/dummy/Rakefile
163
147
  - test/dummy/app/assets/javascripts/application.js
164
148
  - test/dummy/app/assets/javascripts/home.js
165
149
  - test/dummy/app/assets/javascripts/status.js
@@ -169,6 +153,7 @@ files:
169
153
  - test/dummy/app/controllers/application_controller.rb
170
154
  - test/dummy/app/controllers/cache_controller.rb
171
155
  - test/dummy/app/controllers/home_controller.rb
156
+ - test/dummy/app/controllers/instrument_action_controller.rb
172
157
  - test/dummy/app/controllers/render_controller.rb
173
158
  - test/dummy/app/controllers/status_controller.rb
174
159
  - test/dummy/app/controllers/user_controller.rb
@@ -185,6 +170,7 @@ files:
185
170
  - test/dummy/app/views/render/template.html.erb
186
171
  - test/dummy/app/views/status/code.html.erb
187
172
  - test/dummy/app/views/user_mailer/welcome_email.text.erb
173
+ - test/dummy/config.ru
188
174
  - test/dummy/config/application.rb
189
175
  - test/dummy/config/boot.rb
190
176
  - test/dummy/config/database.yml
@@ -202,21 +188,19 @@ files:
202
188
  - test/dummy/config/locales/en.yml
203
189
  - test/dummy/config/routes.rb
204
190
  - test/dummy/config/unicorn.rb
205
- - test/dummy/config.ru
206
191
  - test/dummy/db/migrate/20120719231810_create_users.rb
207
192
  - test/dummy/db/schema.rb
208
193
  - test/dummy/public/404.html
209
194
  - test/dummy/public/422.html
210
195
  - test/dummy/public/500.html
211
196
  - test/dummy/public/favicon.ico
212
- - test/dummy/Rakefile
213
- - test/dummy/README.rdoc
214
197
  - test/dummy/script/rails
215
198
  - test/fixtures/config/empty.yml
216
199
  - test/fixtures/config/librato.yml
217
200
  - test/fixtures/config/simple.yml
218
201
  - test/integration/cache_test.rb
219
202
  - test/integration/custom_test.rb
203
+ - test/integration/instrument_action_test.rb
220
204
  - test/integration/mail_test.rb
221
205
  - test/integration/render_test.rb
222
206
  - test/integration/request_test.rb
@@ -228,33 +212,26 @@ files:
228
212
  homepage: https://github.com/librato/librato-rails
229
213
  licenses:
230
214
  - BSD 3-clause
215
+ metadata: {}
231
216
  post_install_message:
232
217
  rdoc_options: []
233
218
  require_paths:
234
219
  - lib
235
220
  required_ruby_version: !ruby/object:Gem::Requirement
236
- none: false
237
221
  requirements:
238
- - - ! '>='
222
+ - - ">="
239
223
  - !ruby/object:Gem::Version
240
224
  version: '0'
241
- segments:
242
- - 0
243
- hash: -2683350752108435560
244
225
  required_rubygems_version: !ruby/object:Gem::Requirement
245
- none: false
246
226
  requirements:
247
- - - ! '>='
227
+ - - ">="
248
228
  - !ruby/object:Gem::Version
249
229
  version: '0'
250
- segments:
251
- - 0
252
- hash: -2683350752108435560
253
230
  requirements: []
254
231
  rubyforge_project:
255
- rubygems_version: 1.8.23
232
+ rubygems_version: 2.2.2
256
233
  signing_key:
257
- specification_version: 3
234
+ specification_version: 4
258
235
  summary: Use Librato Metrics with your Rails 3 app
259
236
  test_files:
260
237
  - test/dummy/app/assets/javascripts/application.js
@@ -266,6 +243,7 @@ test_files:
266
243
  - test/dummy/app/controllers/application_controller.rb
267
244
  - test/dummy/app/controllers/cache_controller.rb
268
245
  - test/dummy/app/controllers/home_controller.rb
246
+ - test/dummy/app/controllers/instrument_action_controller.rb
269
247
  - test/dummy/app/controllers/render_controller.rb
270
248
  - test/dummy/app/controllers/status_controller.rb
271
249
  - test/dummy/app/controllers/user_controller.rb
@@ -314,6 +292,7 @@ test_files:
314
292
  - test/fixtures/config/simple.yml
315
293
  - test/integration/cache_test.rb
316
294
  - test/integration/custom_test.rb
295
+ - test/integration/instrument_action_test.rb
317
296
  - test/integration/mail_test.rb
318
297
  - test/integration/render_test.rb
319
298
  - test/integration/request_test.rb
metadata.gz.sig CHANGED
Binary file