time_bandits 0.7.2 → 0.7.3

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: 2e78610739a238c4fdd8996c6d04233f55da3b2d
4
- data.tar.gz: 4759fe23caee371f1a33ec748f2955f9377740f1
3
+ metadata.gz: 49d969750b99d03c0d11b1268c50daab039a5416
4
+ data.tar.gz: f69f222e09dea2bf1a95e79bdb164b00433aabbd
5
5
  SHA512:
6
- metadata.gz: 9e29f720c97c525431418c57d1551c6064b247afa12de33225c85564baa0c48ac506239b703c026cc65ccd849c61579a4b25bc92862546ef12eaaa0279cf26bf
7
- data.tar.gz: db03cdbae7ad22d4c36fd637b75705c3ddcb32447a4de60ac2d90117268198fcd394b4bd8529d8c3cba733d3d04083f67c08a79adc953e58859c31650e94b3dd
6
+ metadata.gz: b083343d3b81f94cabb2b07711aa68de48f61ab7bd61f705e05d8939354f6011a3269d114184dba8a1d4014adb89c92d38a054782c67cbe344186a3775f6a118
7
+ data.tar.gz: 61638788e719ce91c16c09410b5a6a44cd4d4373ab02749a0b666da158f2a7c176dec66296e7878d0b87352dfaf8d99bb8b3f6087cc8b79ab500b783a2ee36b8
@@ -1,8 +1,7 @@
1
- require 'action_controller/metal/instrumentation'
2
- require 'action_controller/log_subscriber'
3
-
4
1
  module ActionController #:nodoc:
5
2
 
3
+ require 'action_controller/metal/instrumentation'
4
+
6
5
  module Instrumentation
7
6
 
8
7
  # patch to ensure that the completed line is always written to the log.
@@ -74,7 +73,7 @@ module ActionController #:nodoc:
74
73
  :path => (request.fullpath rescue "unknown")
75
74
  }
76
75
  end
77
- elsif Rails::VERSION::STRING !~ /\A4\.[01]/
76
+ elsif Rails::VERSION::STRING !~ /\A4\.[012]/
78
77
  raise "time_bandits ActionController monkey patch is not compatible with your Rails version"
79
78
  end
80
79
 
@@ -88,6 +87,8 @@ module ActionController #:nodoc:
88
87
  end
89
88
  end
90
89
 
90
+ require 'action_controller/log_subscriber'
91
+
91
92
  class LogSubscriber
92
93
  # the original method logs the completed line.
93
94
  # but we do it in the middleware, unless we're in test mode. don't ask.
@@ -4,7 +4,7 @@
4
4
  # it needs to be adapted to each new rails version
5
5
 
6
6
  raise "time_bandits ActiveRecord monkey patch is not compatible with your rails version" unless
7
- Rails::VERSION::STRING =~ /^(3\.[012]|4\.[01])/
7
+ Rails::VERSION::STRING =~ /^(3\.[012]|4\.[012])/
8
8
 
9
9
  require "active_record/log_subscriber"
10
10
 
@@ -8,7 +8,7 @@ module TimeBandits::TimeConsumers
8
8
  fields :time, :calls, :misses, :reads, :writes
9
9
  format "Dalli: %.3f(%dr,%dm,%dw,%dc)", :time, :reads, :misses, :writes, :calls
10
10
 
11
- if Rails::VERSION::STRING >= "4.0" && Rails.cache.class.respond_to?(:instrument=)
11
+ if Rails::VERSION::STRING >= "4.0" && Rails::VERSION::STRING < "4.2" && Rails.cache.class.respond_to?(:instrument=)
12
12
  # Rails 4 mem_cache_store (which uses dalli internally), unlike dalli_store, is not instrumented by default
13
13
  def reset
14
14
  Rails.cache.class.instrument = true
@@ -1,3 +1,3 @@
1
1
  module TimeBandits
2
- VERSION = "0.7.2"
2
+ VERSION = "0.7.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time_bandits
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Kaes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-29 00:00:00.000000000 Z
11
+ date: 2014-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thread_variables