rack-mini-profiler 1.1.1 → 1.1.2

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.
@@ -54,7 +54,7 @@
54
54
  {{?}}
55
55
  {{~ it.custom_timing_names :value}}
56
56
  <td colspan="2" class="profiler-number profiler-percentage-in-sql" title="{{= it.custom_timing_stats[value].count }} {{= value.toLowerCase() }} invocations spent {{= MiniProfiler.formatDuration(it.custom_timing_stats[value].duration) }} ms of total request time">
57
- {{= MiniProfiler.formatDuration(it.custom_timing_stats[value].duration / duration_milliseconds * 100) }}
57
+ {{= MiniProfiler.formatDuration(it.custom_timing_stats[value].duration / it.duration_milliseconds * 100) }}
58
58
  <span class="profiler-unit">% in {{= value.toLowerCase() }}</span>
59
59
  </td>
60
60
  {{~}}
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Rack
3
3
  class MiniProfiler
4
- ASSET_VERSION = '78c6284a16ddee0a374b89ee28505049'
4
+ ASSET_VERSION = '1b7787a08352388b35f032cdefc0860d'
5
5
  end
6
6
  end
@@ -112,11 +112,11 @@ module Rack
112
112
  end
113
113
 
114
114
  def profile_singleton_method(klass, method, type = :profile, &blk)
115
- profile_method(singleton_class(klass), method, type, &blk)
115
+ profile_method(klass.singleton_class, method, type, &blk)
116
116
  end
117
117
 
118
118
  def unprofile_singleton_method(klass, method)
119
- unprofile_method(singleton_class(klass), method)
119
+ unprofile_method(klass.singleton_class, method)
120
120
  end
121
121
 
122
122
  # Add a custom timing. These are displayed similar to SQL/query time in
@@ -144,10 +144,6 @@ module Rack
144
144
 
145
145
  private
146
146
 
147
- def singleton_class(klass)
148
- class << klass; self; end
149
- end
150
-
151
147
  def clean_method_name(method)
152
148
  method.to_s.gsub(/[\?\!]/, "")
153
149
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rack
4
4
  class MiniProfiler
5
- VERSION = '1.1.1'
5
+ VERSION = '1.1.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-mini-profiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-10-22 00:00:00.000000000 Z
13
+ date: 2019-10-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack