benchmark_methods 0.2 → 0.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: e2986ccc798bdf71bdb6466182fcddaf912ec6ed
4
- data.tar.gz: c23b5a9324a56a6e9f6a2bd736d5ec937863905d
3
+ metadata.gz: 7e960d0ae445df9d78d7d69ed765bef6ddd461a3
4
+ data.tar.gz: 0b66d4b9e885cf6a2c53793264eadf62000c7201
5
5
  SHA512:
6
- metadata.gz: 3cb8906f44472f6a3aa7ef3cf48849404cf5889ad9e9364afafc84d75313508dd2e48dad51380c2b49c0626abb7781da3ed69752b34438413932da187cfafe7e
7
- data.tar.gz: 9381036141f9f40799ffb992a58bbee933ec80f5dd469848eb8297daf3beda45df544480815df6e91875f806f06d4536c9b8b82bb7a43de3a1d1e07aa8b7b8e6
6
+ metadata.gz: ae991f3112b574e06d5e8abc82dfca3fd0d1ccaf8654649c0aa6d89faae7d6b96cca3f2c4dd7179c826b70b19034c4f58951d6747525998ca214f4ebd42f72b9
7
+ data.tar.gz: db519116419caf1aca2bb73c9737d3d34e347521bf3e67f17bd0041fc2e376d6598dae5e82c2eff3f847e6bd64750d22ca44ed2f756106fa8805d7d51528cedc
@@ -6,15 +6,16 @@ module BenchmarkMethods
6
6
 
7
7
  def self.included(base_klass)
8
8
  base_klass.extend(ClassMethods)
9
- interceptor = const_set("#{base_klass.name.demodulize}Interceptor", Module.new)
10
- base_klass.send(:prepend, interceptor)
9
+ unless Object.const_defined?("#{base_klass.name.demodulize}Interceptor")
10
+ interceptor = const_set("#{base_klass.name.demodulize}Interceptor", Module.new)
11
+ base_klass.send(:prepend, interceptor)
12
+ end
11
13
  end
12
14
 
13
15
  def self.log(report)
14
16
  if Object.const_defined?("Rails")
15
17
  Rails.logger.debug(" --> #{report.label}")
16
- Rails.logger.debug(Benchmark::CAPTION)
17
- Rails.logger.debug(report.to_s)
18
+ Rails.logger.debug("#{Benchmark::CAPTION}#{report.to_s}")
18
19
  else
19
20
  puts(" --> #{report.label}")
20
21
  puts(Benchmark::CAPTION)
@@ -1,3 +1,3 @@
1
1
  module BenchmarkMethods
2
- VERSION = "0.2"
2
+ VERSION = "0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: benchmark_methods
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Kasyanchuk