grape_logging 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d214c8c6a482c7b66608429000a8b160e52d896b
4
- data.tar.gz: 5c2fa4b0588255709302386f2e5f6070f6b5ad45
3
+ metadata.gz: 953bc3996abee00a768fce8e8bb9e7b49bf0cf0e
4
+ data.tar.gz: 5b764486efdbf64f85abf50e46fe1f52b953f633
5
5
  SHA512:
6
- metadata.gz: d692b98646ecf1ae6a5008625ab711737c8ceaa10b91064ac855df009c724350f757d83672a83d43eb826c8b232c2a64882e124e66071950b9f8f3ed359a8fe9
7
- data.tar.gz: 0ac0c4faf27ca3318494f97a8535e7d8a0d174fa053bb6003542ccd702108e59553a5a59932858779f4f6fc044ec3a3c47f92c019ed507af9077d2f0aa64dcdc
6
+ metadata.gz: da6f99aa5f53276170bf35d4ef6e4a7b43a445a668dbb8cf181980dbf5add07142c1ff7399157ab6465cdb45f57b0da11fa34013d77dbb99fc134f0670777eeb
7
+ data.tar.gz: 4071821e5f37e917eb4172481f73f4c9e3af133b05f04c931c898cdf380d277e56bbf073232cadbd0d88d8842ce63ebdfe55111362526bc42d8164d4edc236a2
@@ -7,7 +7,7 @@ module GrapeLogging
7
7
  start_time
8
8
 
9
9
  @db_duration = 0
10
- ActiveSupport::Notifications.subscribe('sql.active_record') do |*args|
10
+ @subscription = ActiveSupport::Notifications.subscribe('sql.active_record') do |*args|
11
11
  event = ActiveSupport::Notifications::Event.new(*args)
12
12
  @db_duration += event.duration
13
13
  end if defined?(ActiveRecord)
@@ -15,12 +15,13 @@ module GrapeLogging
15
15
 
16
16
  def after
17
17
  stop_time
18
- logger.info parameters(request, response)
18
+ logger.info parameters
19
+ ActiveSupport::Notifications.unsubscribe(@subscription) if @subscription
19
20
  nil
20
21
  end
21
22
 
22
23
  protected
23
- def parameters(request, response)
24
+ def parameters
24
25
  {
25
26
  path: request.path,
26
27
  params: request.params.to_hash,
@@ -1,3 +1,3 @@
1
1
  module GrapeLogging
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape_logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - aserafin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-05-20 00:00:00.000000000 Z
11
+ date: 2015-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grape