active_record_stats 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTU1Y2M4Y2Y2MDhmNWVhMWQ4YzYzMzE5ODQ2MDE4ZDA4OWE1YzZkZg==
4
+ NGMxOTQ5OWY1NDIxMzlhYWYzZTg5YmJmZWY1ZjQzZWFlODU2YTAyZA==
5
5
  data.tar.gz: !binary |-
6
- NzgwZDJlZGE5ODJiYjY3OGQzNjgzYmE4NzQ0Y2FiOWI5NGI5ZDJjYw==
6
+ ZTZhNDBiNDUyYzk5ZGZjM2MxNDllNjdiNjRhMTk5ZGQ3Mjg0YzQ0NA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YzcwYWZjNDg4YWQyOTY1OTg5MGRiOGFhMzIyZWFhYzVmNzlmNjU3Yzc1NmNi
10
- Y2Y0MTRhZGU3YTBjMDNhMmNhM2E5Yzc3OTg2NzNhYWRhMDE3Yjg5YWQ2MTY5
11
- MzRmNzRiYjkwNjZhMGVhYTJjMTlkM2NmNDMzNDU0YmRlMzE3Nzk=
9
+ OWQzOTMwM2E0NjM1MGNhZjEwNTY4OWRjZDU4MjRiYWIzNmE1Y2VhMDRlMWE3
10
+ Y2FlZDYzMTQ5OGQ0ZGUzODY5MmZhNjUzZmUwMjJhNmU5YzMyM2QyZTgxZTI4
11
+ MWJjMDU4OGIyNmNiNmY1M2Y0OThjYTYyYjdiMDQ3MzBiNGM5MzI=
12
12
  data.tar.gz: !binary |-
13
- ODkyMTY0Y2UwZmZmMmVhZjVhZWQzNTBlZTM1ZTMzMzc4NThkZGM0NmUwNTg2
14
- ZDEyNmRlNzUwYzkwZDhmY2Y3OTIxZDIxMmM3MGExN2U3YzEwYjEwM2JkYzNj
15
- ODAxOTA5ZTRhYTI0ZDg1MDg4ODQ0OTYzYzIwYTdmMGMyMGEzZTQ=
13
+ NjdmODA1YzZmYTIwNDdiYzdhNDQzMWYzOTNiZDFiNGY3OWE1NTNjZDdkNjE4
14
+ NmQyMDQxOWViY2M3OGIxYWM3ZjdjMDE1MGEzMzhiNTk5NTQ1YTdiMjkwYzFl
15
+ ZDU2YzFhYmIzMDUzNDI0MDQxODc2YjUwYWVlZGIwMGM2NDk0MWU=
data/.travis.yml CHANGED
@@ -13,7 +13,7 @@ before_script:
13
13
  deploy:
14
14
  provider: rubygems
15
15
  api_key:
16
- secure: hP/f6DldhG0RrlDxnPNHeOsg2JaIdR2sw8D1TVQeSReGgaoHM55k2BJnCzMglqdGd9TtyBpN+O0B10oSZ0HylBhm6+nYlkxkLvFlCoKz9VjGJPZeW32qRcTnfKw+yl24M1BTt/quZH+e0mjpAcj3rXxuA0aR74bHrBUabhqcvi5YRosKNKRmqOb4gmj+pLSNs9p8ftK5onIwx3vmKhuuK96Ba+xpF1KPAet9BejzaOeqoMb0p7o6fw029r95TshiXex8J/yLegn61w28PG3dC8HDDV9te4xf7151T3a6PQKnXgR9o3oz2SGoK3OH3qzyR5JB/0Fszd1P89wVing5eEOq6sM+++pX7+sslS2vKSTQfbRGIe2o47L0HBlYC8/m3GTwTDWQ9BRd8vItDUC4GNI5fEj74CoOLQ0+QBsVdotGJq3kl/EN96L6ODNhMEKeAr6AVngwP74XK30qW3XH+Cni3Dnz1CUi3Tpso7xjQC1AEJd7YP+yVdqduwJpiIu5BqFGizBdvyp5+gGFBftxRaWbW0lMEs5YJ5yZWNejO5q0jZCGgkEXH7UPo7G0bpMIinJ7o9SEbICBT/1Gm6nmV04krP+su+qAveIyMcZcmyyjn1OXQ5Hehkf6FuHmFJGcv3Jd+a0hjgjLgSBVlBzIrYADBDGX4W/FZWJBNv75OtE=
16
+ secure: "PjJHSumQrG07it7nXgxh4YR9y+jOXQeBsCvq3cEkyg7XpLFCtWoJjEJY8Tyxv4yFXd6PEs1Y/0m6XBdm05wlogiSTYTra9s1agc/Xpq2kxghr41978S2cOEjuJaid0n41BsXuZsOK2fnwyrgwgWIeiwSlW89DvnjvjIqzS7lEqock0ArVkDkZR3lFfGDKjGfrfQas3NwVQV1GTmO6HSaHx9F/lSrcLb2zBqUdHmpWGTjq8Pnkwyy1FG0qWPgh6J+qapaNqk1J5a8/Wcs05K9H6O5IbJHL5wa1vH0MJLfbo8Ti1iLNBjBKVCv3mhkZMJ9uKJtsAp4uZpyqEaDPtUNGPxan31ByiLd+QH5eTp721DCWyt+KfAkI2O27zjN8GZohLmxL5xFPaYi1N3gf1E2e4rAy74+5ZneMA7to3DRAMgH6OgLri33wOTLUqbLvlHKDV/r/Nak7lYoIv8A33sNxBADmIXoqt6PkyCQ/a8ZBSutsSyXVCrAzjpl4vhOiLjpPV3DekGfIW9JfXLWHMtJw//F88k5F/gWtB+sCWKjOSiM10zPVDYIgC8FaYZneCZpV1OAVzOIXWKxr5wDbkHHUg1NB5lnLXC4U+svcC4yuZIz0RdRZQm9MxXS8ZiIu7Zx3l8aI+I9p5RmIpeOpwWT78w9dWCZH/9ekjqLpqGHfHQ="
17
17
  gem: active_record_stats
18
18
  on:
19
19
  tags: true
data/README.md CHANGED
@@ -1,4 +1,8 @@
1
- # ActiveRecordStats [![Build Status](https://travis-ci.org/enova/active_record_stats.svg?branch=master)](https://travis-ci.org/enova/active_record_stats) [![Coverage Status](https://coveralls.io/repos/github/enova/active_record_stats/badge.svg?branch=master)](https://coveralls.io/github/enova/active_record_stats?branch=master)
1
+ # ActiveRecordStats
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/active_record_stats.svg)](https://rubygems.org/gems/active_record_stats)
4
+ [![Build Status](https://travis-ci.org/enova/active_record_stats.svg?branch=master)](https://travis-ci.org/enova/active_record_stats)
5
+ [![Coverage Status](https://coveralls.io/repos/github/enova/active_record_stats/badge.svg?branch=master)](https://coveralls.io/github/enova/active_record_stats?branch=master)
2
6
 
3
7
  Provides Rails, Resque, and Sidekiq integrations for emitting metrics
4
8
  about ActiveRecord usage to StatsD using Shopify's [statsd-instrument][].
@@ -36,16 +36,16 @@ module ActiveRecordStats
36
36
  @app.call(env)
37
37
 
38
38
  ensure
39
+ subs.each do |sub|
40
+ ActiveSupport::Notifications.unsubscribe(sub)
41
+ end
42
+
39
43
  request_params = env[ENV_KEY]
40
44
  if request_params && controller = request_params['controller']
41
45
  controller = controller.gsub('/', '__')
42
46
  action = request_params['action']
43
47
  emit(controller, action, db_time, totals)
44
48
  end
45
-
46
- subs.each do |sub|
47
- ActiveSupport::Notifications.unsubscribe(sub)
48
- end
49
49
  end
50
50
 
51
51
  private
@@ -16,8 +16,8 @@ module ActiveRecordStats
16
16
  yield
17
17
 
18
18
  ensure
19
- emit_active_record_stats(name, totals)
20
19
  ActiveSupport::Notifications.unsubscribe(sub)
20
+ emit_active_record_stats(name, totals)
21
21
  end
22
22
 
23
23
  private
@@ -16,8 +16,8 @@ module ActiveRecordStats
16
16
  yield
17
17
 
18
18
  ensure
19
- emit(worker.class.to_s, totals)
20
19
  ActiveSupport::Notifications.unsubscribe(sub)
20
+ emit(worker.class.to_s, totals)
21
21
  end
22
22
 
23
23
  private
@@ -1,3 +1,3 @@
1
1
  module ActiveRecordStats
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Hargraves
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-10 00:00:00.000000000 Z
11
+ date: 2016-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord