benchmark_methods 0.3 → 0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e960d0ae445df9d78d7d69ed765bef6ddd461a3
4
- data.tar.gz: 0b66d4b9e885cf6a2c53793264eadf62000c7201
3
+ metadata.gz: 6e1a6220ccd23af9146e6550a80454ead459912b
4
+ data.tar.gz: ddc641ef6c81e9e8e459dd6f7681f9fc829e7b84
5
5
  SHA512:
6
- metadata.gz: ae991f3112b574e06d5e8abc82dfca3fd0d1ccaf8654649c0aa6d89faae7d6b96cca3f2c4dd7179c826b70b19034c4f58951d6747525998ca214f4ebd42f72b9
7
- data.tar.gz: db519116419caf1aca2bb73c9737d3d34e347521bf3e67f17bd0041fc2e376d6598dae5e82c2eff3f847e6bd64750d22ca44ed2f756106fa8805d7d51528cedc
6
+ metadata.gz: 5e6c9763209bc637633b9de7f7c8ad5f571e681b395ce92ac7d5532d7c61c2ecafd53ab1ef862f19dc2cf567578dfeed9216d16a044608741707cc22dfa2f3cd
7
+ data.tar.gz: 9b5b5f81d42a80c061bc15c5779f6f977d5d35e0b46e95178dcaa40f1cac56e0b9e01eef001268313a5b4ce081ca9de6a314c47b2cd5129f9601b649a22136d8
data/.gitignore CHANGED
@@ -7,4 +7,5 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
- coverage
10
+ coverage
11
+ *.gem
data/README.md CHANGED
@@ -3,6 +3,7 @@
3
3
  Measure and benchmark execution time of your ruby methods. Forgot about `Time.now - t` solution. Use `benchmark` to see how much time it takes to execute your method.
4
4
 
5
5
  [![Build Status](https://travis-ci.org/igorkasyanchuk/benchmark_methods.svg?branch=master)](https://travis-ci.org/igorkasyanchuk/benchmark_methods)
6
+ [![Gem Version](https://badge.fury.io/rb/benchmark_methods.svg)](https://badge.fury.io/rb/benchmark_methods)
6
7
 
7
8
  Sample or usage:
8
9
 
@@ -5,15 +5,15 @@ require 'benchmark_methods/version'
5
5
  module BenchmarkMethods
6
6
 
7
7
  def self.included(base_klass)
8
- base_klass.extend(ClassMethods)
9
- unless Object.const_defined?("#{base_klass.name.demodulize}Interceptor")
8
+ unless const_defined?("#{base_klass.name.demodulize}Interceptor")
9
+ base_klass.extend(ClassMethods)
10
10
  interceptor = const_set("#{base_klass.name.demodulize}Interceptor", Module.new)
11
11
  base_klass.send(:prepend, interceptor)
12
12
  end
13
13
  end
14
14
 
15
15
  def self.log(report)
16
- if Object.const_defined?("Rails")
16
+ if const_defined?("Rails")
17
17
  Rails.logger.debug(" --> #{report.label}")
18
18
  Rails.logger.debug("#{Benchmark::CAPTION}#{report.to_s}")
19
19
  else
@@ -1,3 +1,3 @@
1
1
  module BenchmarkMethods
2
- VERSION = "0.3"
2
+ VERSION = "0.4"
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.3'
4
+ version: '0.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Kasyanchuk