rack-mini-profiler 2.3.4 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'cgi'
4
+ require 'json'
5
+ require 'erb'
6
+
7
+ require 'mini_profiler/timer_struct'
8
+ require 'mini_profiler/storage'
9
+ require 'mini_profiler/config'
10
+ require 'mini_profiler/profiling_methods'
11
+ require 'mini_profiler/context'
12
+ require 'mini_profiler/client_settings'
13
+ require 'mini_profiler/gc_profiler'
14
+ require 'mini_profiler/snapshots_transporter'
4
15
 
5
16
  module Rack
6
17
  class MiniProfiler
@@ -27,11 +38,11 @@ module Rack
27
38
  end
28
39
 
29
40
  def resources_root
30
- @resources_root ||= ::File.expand_path("../../html", __FILE__)
41
+ @resources_root ||= ::File.expand_path("../html", __FILE__)
31
42
  end
32
43
 
33
44
  def share_template
34
- @share_template ||= ERB.new(::File.read(::File.expand_path("../html/share.html", ::File.dirname(__FILE__))))
45
+ @share_template ||= ERB.new(::File.read(::File.expand_path("html/share.html", ::File.dirname(__FILE__))))
35
46
  end
36
47
 
37
48
  def current
@@ -130,10 +141,10 @@ module Rack
130
141
  def serve_results(env)
131
142
  request = Rack::Request.new(env)
132
143
  id = request.params['id']
133
- is_snapshot = request.params['snapshot']
134
- is_snapshot = [true, "true"].include?(is_snapshot)
144
+ group_name = request.params['group']
145
+ is_snapshot = group_name && group_name.size > 0
135
146
  if is_snapshot
136
- page_struct = @storage.load_snapshot(id)
147
+ page_struct = @storage.load_snapshot(id, group_name)
137
148
  else
138
149
  page_struct = @storage.load(id)
139
150
  end
@@ -223,7 +234,7 @@ module Rack
223
234
  # Someone (e.g. Rails engine) could change the SCRIPT_NAME so we save it
224
235
  env['RACK_MINI_PROFILER_ORIGINAL_SCRIPT_NAME'] = ENV['PASSENGER_BASE_URI'] || env['SCRIPT_NAME']
225
236
 
226
- skip_it = /pp=skip/.match?(query_string) || (
237
+ skip_it = /#{@config.profile_parameter}=skip/.match?(query_string) || (
227
238
  @config.skip_paths &&
228
239
  @config.skip_paths.any? do |p|
229
240
  if p.instance_of?(String)
@@ -255,11 +266,11 @@ module Rack
255
266
 
256
267
  has_disable_cookie = client_settings.disable_profiling?
257
268
  # manual session disable / enable
258
- if query_string =~ /pp=disable/ || has_disable_cookie
269
+ if query_string =~ /#{@config.profile_parameter}=disable/ || has_disable_cookie
259
270
  skip_it = true
260
271
  end
261
272
 
262
- if query_string =~ /pp=enable/
273
+ if query_string =~ /#{@config.profile_parameter}=enable/
263
274
  skip_it = false
264
275
  config.enabled = true
265
276
  end
@@ -273,22 +284,24 @@ module Rack
273
284
  end
274
285
 
275
286
  # profile gc
276
- if query_string =~ /pp=profile-gc/
287
+ if query_string =~ /#{@config.profile_parameter}=profile-gc/
277
288
  return tool_disabled_message(client_settings) if !advanced_debugging_enabled?
278
289
  current.measure = false if current
279
290
  return client_settings.handle_cookie(Rack::MiniProfiler::GCProfiler.new.profile_gc(@app, env))
280
291
  end
281
292
 
282
293
  # profile memory
283
- if query_string =~ /pp=profile-memory/
294
+ if query_string =~ /#{@config.profile_parameter}=profile-memory/
284
295
  return tool_disabled_message(client_settings) if !advanced_debugging_enabled?
285
296
 
286
297
  unless defined?(MemoryProfiler) && MemoryProfiler.respond_to?(:report)
287
298
  message = "Please install the memory_profiler gem and require it: add gem 'memory_profiler' to your Gemfile"
288
- _, _, body = @app.call(env)
299
+ status, headers, body = @app.call(env)
289
300
  body.close if body.respond_to? :close
290
301
 
291
- return client_settings.handle_cookie(text_result(message))
302
+ return client_settings.handle_cookie(
303
+ text_result(message, status: 500, headers: headers)
304
+ )
292
305
  end
293
306
 
294
307
  query_params = Rack::Utils.parse_nested_query(query_string)
@@ -308,12 +321,12 @@ module Rack
308
321
 
309
322
  MiniProfiler.create_current(env, @config)
310
323
 
311
- if query_string =~ /pp=normal-backtrace/
324
+ if query_string =~ /#{@config.profile_parameter}=normal-backtrace/
312
325
  client_settings.backtrace_level = ClientSettings::BACKTRACE_DEFAULT
313
- elsif query_string =~ /pp=no-backtrace/
326
+ elsif query_string =~ /#{@config.profile_parameter}=no-backtrace/
314
327
  current.skip_backtrace = true
315
328
  client_settings.backtrace_level = ClientSettings::BACKTRACE_NONE
316
- elsif query_string =~ /pp=full-backtrace/ || client_settings.backtrace_full?
329
+ elsif query_string =~ /#{@config.profile_parameter}=full-backtrace/ || client_settings.backtrace_full?
317
330
  current.full_backtrace = true
318
331
  client_settings.backtrace_level = ClientSettings::BACKTRACE_FULL
319
332
  elsif client_settings.backtrace_none?
@@ -322,7 +335,7 @@ module Rack
322
335
 
323
336
  flamegraph = nil
324
337
 
325
- trace_exceptions = query_string =~ /pp=trace-exceptions/ && defined? TracePoint
338
+ trace_exceptions = query_string =~ /#{@config.profile_parameter}=trace-exceptions/ && defined? TracePoint
326
339
  status, headers, body, exceptions, trace = nil
327
340
 
328
341
  if trace_exceptions
@@ -347,12 +360,7 @@ module Rack
347
360
  env['HTTP_ACCEPT_ENCODING'] = 'identity' if config.suppress_encoding
348
361
 
349
362
  if query_string =~ /pp=(async-)?flamegraph/ || env['HTTP_REFERER'] =~ /pp=async-flamegraph/
350
- unless defined?(StackProf) && StackProf.respond_to?(:run)
351
- headers = { 'Content-Type' => 'text/html' }
352
- message = "Please install the stackprof gem and require it: add gem 'stackprof' to your Gemfile"
353
- body.close if body.respond_to? :close
354
- return client_settings.handle_cookie([500, headers, message])
355
- else
363
+ if defined?(StackProf) && StackProf.respond_to?(:run)
356
364
  # do not sully our profile with mini profiler timings
357
365
  current.measure = false
358
366
  match_data = query_string.match(/flamegraph_sample_rate=([\d\.]+)/)
@@ -379,12 +387,24 @@ module Rack
379
387
  ) do
380
388
  status, headers, body = @app.call(env)
381
389
  end
390
+ else
391
+ message = "Please install the stackprof gem and require it: add gem 'stackprof' to your Gemfile"
392
+ status, headers, body = @app.call(env)
393
+ body.close if body.respond_to? :close
394
+
395
+ return client_settings.handle_cookie(
396
+ text_result(message, status: status, headers: headers)
397
+ )
382
398
  end
383
399
  elsif path == '/rack-mini-profiler/requests'
384
400
  blank_page_html = <<~HTML
401
+ <!DOCTYPE html>
385
402
  <html>
386
- <head></head>
387
- <body></body>
403
+ <head>
404
+ <title>Rack::MiniProfiler Requests</title>
405
+ </head>
406
+ <body>
407
+ </body>
388
408
  </html>
389
409
  HTML
390
410
 
@@ -419,19 +439,19 @@ module Rack
419
439
  return client_settings.handle_cookie(dump_exceptions exceptions)
420
440
  end
421
441
 
422
- if query_string =~ /pp=env/
442
+ if query_string =~ /#{@config.profile_parameter}=env/
423
443
  return tool_disabled_message(client_settings) if !advanced_debugging_enabled?
424
444
  body.close if body.respond_to? :close
425
445
  return client_settings.handle_cookie(dump_env env)
426
446
  end
427
447
 
428
- if query_string =~ /pp=analyze-memory/
448
+ if query_string =~ /#{@config.profile_parameter}=analyze-memory/
429
449
  return tool_disabled_message(client_settings) if !advanced_debugging_enabled?
430
450
  body.close if body.respond_to? :close
431
451
  return client_settings.handle_cookie(analyze_memory)
432
452
  end
433
453
 
434
- if query_string =~ /pp=help/
454
+ if query_string =~ /#{@config.profile_parameter}=help/
435
455
  body.close if body.respond_to? :close
436
456
  return client_settings.handle_cookie(help(client_settings, env))
437
457
  end
@@ -440,7 +460,7 @@ module Rack
440
460
  page_struct[:user] = user(env)
441
461
  page_struct[:root].record_time((Process.clock_gettime(Process::CLOCK_MONOTONIC) - start) * 1000)
442
462
 
443
- if flamegraph && query_string =~ /pp=flamegraph/
463
+ if flamegraph && query_string =~ /#{@config.profile_parameter}=flamegraph/
444
464
  body.close if body.respond_to? :close
445
465
  return client_settings.handle_cookie(self.flamegraph(flamegraph, path))
446
466
  elsif flamegraph # async-flamegraph
@@ -538,7 +558,7 @@ module Rack
538
558
 
539
559
  body << "\nBacktraces\n"
540
560
  exceptions.each_with_index do |e, i|
541
- body << "##{i + 1}: #{e.class} - \"#{e.message}\"\n #{e.backtrace.join("\n ")}\n\n"
561
+ body << "##{i + 1}: #{e.class} - \"#{e.message.lines.first.chomp}\"\n #{e.backtrace.join("\n ")}\n\n"
542
562
  end
543
563
  end
544
564
  text_result(body)
@@ -638,45 +658,51 @@ module Rack
638
658
  text_result(body)
639
659
  end
640
660
 
641
- def text_result(body)
642
- headers = { 'Content-Type' => 'text/plain; charset=utf-8' }
643
- [200, headers, [body]]
661
+ def text_result(body, status: 200, headers: nil)
662
+ headers = (headers || {}).merge('Content-Type' => 'text/plain; charset=utf-8')
663
+ [status, headers, [body]]
644
664
  end
645
665
 
646
666
  def make_link(postfix, env)
647
- link = env["PATH_INFO"] + "?" + env["QUERY_STRING"].sub("pp=help", "pp=#{postfix}")
648
- "pp=<a href='#{ERB::Util.html_escape(link)}'>#{postfix}</a>"
667
+ link = env["PATH_INFO"] + "?" + env["QUERY_STRING"].sub("#{@config.profile_parameter}=help", "#{@config.profile_parameter}=#{postfix}")
668
+ "#{@config.profile_parameter}=<a href='#{ERB::Util.html_escape(link)}'>#{postfix}</a>"
649
669
  end
650
670
 
651
671
  def help(client_settings, env)
652
672
  headers = { 'Content-Type' => 'text/html' }
653
- body = "<html><body>
654
- <pre style='line-height: 30px; font-size: 16px;'>
655
- This is the help menu of the <a href='#{Rack::MiniProfiler::SOURCE_CODE_URI}'>rack-mini-profiler</a> gem, append the following to your query string for more options:
656
-
657
- #{make_link "help", env} : display this screen
658
- #{make_link "env", env} : display the rack environment
659
- #{make_link "skip", env} : skip mini profiler for this request
660
- #{make_link "no-backtrace", env} #{"(*) " if client_settings.backtrace_none?}: don't collect stack traces from all the SQL executed (sticky, use pp=normal-backtrace to enable)
661
- #{make_link "normal-backtrace", env} #{"(*) " if client_settings.backtrace_default?}: collect stack traces from all the SQL executed and filter normally
662
- #{make_link "full-backtrace", env} #{"(*) " if client_settings.backtrace_full?}: enable full backtraces for SQL executed (use pp=normal-backtrace to disable)
663
- #{make_link "disable", env} : disable profiling for this session
664
- #{make_link "enable", env} : enable profiling for this session (if previously disabled)
665
- #{make_link "profile-gc", env} : perform gc profiling on this request, analyzes ObjectSpace generated by request
666
- #{make_link "profile-memory", env} : requires the memory_profiler gem, new location based report
667
- #{make_link "flamegraph", env} : a graph representing sampled activity (requires the stackprof gem).
668
- #{make_link "async-flamegraph", env} : store flamegraph data for this page and all its AJAX requests. Flamegraph links will be available in the mini-profiler UI (requires the stackprof gem).
669
- #{make_link "flamegraph&flamegraph_sample_rate=1", env}: creates a flamegraph with the specified sample rate (in ms). Overrides value set in config
670
- #{make_link "flamegraph&flamegraph_mode=cpu", env}: creates a flamegraph with the specified mode (one of cpu, wall, object, or custom). Overrides value set in config
671
- #{make_link "flamegraph_embed", env} : a graph representing sampled activity (requires the stackprof gem), embedded resources for use on an intranet.
672
- #{make_link "trace-exceptions", env} : will return all the spots where your application raises exceptions
673
- #{make_link "analyze-memory", env} : will perform basic memory analysis of heap
674
- </pre>
675
- </body>
676
- </html>
677
- "
678
-
679
- [200, headers, [body]]
673
+ html = <<~HTML
674
+ <!DOCTYPE html>
675
+ <html>
676
+ <head>
677
+ <title>Rack::MiniProfiler Help</title>
678
+ </head>
679
+ <body>
680
+ <pre style='line-height: 30px; font-size: 16px'>
681
+ This is the help menu of the <a href='#{Rack::MiniProfiler::SOURCE_CODE_URI}'>rack-mini-profiler</a> gem, append the following to your query string for more options:
682
+
683
+ #{make_link "help", env} : display this screen
684
+ #{make_link "env", env} : display the rack environment
685
+ #{make_link "skip", env} : skip mini profiler for this request
686
+ #{make_link "no-backtrace", env} #{"(*) " if client_settings.backtrace_none?}: don't collect stack traces from all the SQL executed (sticky, use #{@config.profile_parameter}=normal-backtrace to enable)
687
+ #{make_link "normal-backtrace", env} #{"(*) " if client_settings.backtrace_default?}: collect stack traces from all the SQL executed and filter normally
688
+ #{make_link "full-backtrace", env} #{"(*) " if client_settings.backtrace_full?}: enable full backtraces for SQL executed (use #{@config.profile_parameter}=normal-backtrace to disable)
689
+ #{make_link "disable", env} : disable profiling for this session
690
+ #{make_link "enable", env} : enable profiling for this session (if previously disabled)
691
+ #{make_link "profile-gc", env} : perform gc profiling on this request, analyzes ObjectSpace generated by request
692
+ #{make_link "profile-memory", env} : requires the memory_profiler gem, new location based report
693
+ #{make_link "flamegraph", env} : a graph representing sampled activity (requires the stackprof gem).
694
+ #{make_link "async-flamegraph", env} : store flamegraph data for this page and all its AJAX requests. Flamegraph links will be available in the mini-profiler UI (requires the stackprof gem).
695
+ #{make_link "flamegraph&flamegraph_sample_rate=1", env}: creates a flamegraph with the specified sample rate (in ms). Overrides value set in config
696
+ #{make_link "flamegraph&flamegraph_mode=cpu", env}: creates a flamegraph with the specified mode (one of cpu, wall, object, or custom). Overrides value set in config
697
+ #{make_link "flamegraph_embed", env} : a graph representing sampled activity (requires the stackprof gem), embedded resources for use on an intranet.
698
+ #{make_link "trace-exceptions", env} : will return all the spots where your application raises exceptions
699
+ #{make_link "analyze-memory", env} : will perform basic memory analysis of heap
700
+ </pre>
701
+ </body>
702
+ </html>
703
+ HTML
704
+
705
+ [200, headers, [html]]
680
706
  end
681
707
 
682
708
  def flamegraph(graph, path)
@@ -685,6 +711,7 @@ This is the help menu of the <a href='#{Rack::MiniProfiler::SOURCE_CODE_URI}'>ra
685
711
  <!DOCTYPE html>
686
712
  <html>
687
713
  <head>
714
+ <title>Rack::MiniProfiler Flamegraph</title>
688
715
  <style>
689
716
  body { margin: 0; height: 100vh; }
690
717
  #speedscope-iframe { width: 100%; height: 100%; border: none; }
@@ -773,7 +800,7 @@ This is the help menu of the <a href='#{Rack::MiniProfiler::SOURCE_CODE_URI}'>ra
773
800
  end
774
801
 
775
802
  # TODO : cache this snippet
776
- script = ::File.read(::File.expand_path('../html/profile_handler.js', ::File.dirname(__FILE__)))
803
+ script = ::File.read(::File.expand_path('html/profile_handler.js', ::File.dirname(__FILE__)))
777
804
  # replace the variables
778
805
  settings.each do |k, v|
779
806
  regex = Regexp.new("\\{#{k.to_s}\\}")
@@ -802,16 +829,16 @@ This is the help menu of the <a href='#{Rack::MiniProfiler::SOURCE_CODE_URI}'>ra
802
829
  headers = { 'Content-Type' => 'text/html' }
803
830
  qp = Rack::Utils.parse_nested_query(env['QUERY_STRING'])
804
831
  if group_name = qp["group_name"]
805
- list = @storage.find_snapshots_group(group_name)
832
+ list = @storage.snapshots_group(group_name)
806
833
  list.each do |snapshot|
807
- snapshot[:url] = url_for_snapshot(snapshot[:id])
834
+ snapshot[:url] = url_for_snapshot(snapshot[:id], group_name)
808
835
  end
809
836
  data = {
810
837
  group_name: group_name,
811
838
  list: list
812
839
  }
813
840
  else
814
- list = @storage.snapshot_groups_overview
841
+ list = @storage.snapshots_overview
815
842
  list.each do |group|
816
843
  group[:url] = url_for_snapshots_group(group[:name])
817
844
  end
@@ -828,8 +855,11 @@ This is the help menu of the <a href='#{Rack::MiniProfiler::SOURCE_CODE_URI}'>ra
828
855
  response = Rack::Response.new([], status, headers)
829
856
 
830
857
  response.write <<~HTML
858
+ <!DOCTYPE html>
831
859
  <html>
832
- <head></head>
860
+ <head>
861
+ <title>Rack::MiniProfiler Snapshots</title>
862
+ </head>
833
863
  <body class="mp-snapshots">
834
864
  HTML
835
865
  response.write(data_html)
@@ -864,7 +894,7 @@ This is the help menu of the <a href='#{Rack::MiniProfiler::SOURCE_CODE_URI}'>ra
864
894
  if defined?(Rails) && defined?(ActionController::RoutingError)
865
895
  hash = Rails.application.routes.recognize_path(path, method: method)
866
896
  if hash && hash[:controller] && hash[:action]
867
- "#{method} #{hash[:controller]}##{hash[:action]}"
897
+ "#{hash[:controller]}##{hash[:action]}"
868
898
  end
869
899
  end
870
900
  rescue ActionController::RoutingError
@@ -876,8 +906,8 @@ This is the help menu of the <a href='#{Rack::MiniProfiler::SOURCE_CODE_URI}'>ra
876
906
  "/#{@config.base_url_path.gsub('/', '')}/snapshots?#{qs}"
877
907
  end
878
908
 
879
- def url_for_snapshot(id)
880
- qs = Rack::Utils.build_query({ id: id, snapshot: true })
909
+ def url_for_snapshot(id, group_name)
910
+ qs = Rack::Utils.build_query({ id: id, group: group_name })
881
911
  "/#{@config.base_url_path.gsub('/', '')}/results?#{qs}"
882
912
  end
883
913
 
@@ -902,8 +932,12 @@ This is the help menu of the <a href='#{Rack::MiniProfiler::SOURCE_CODE_URI}'>ra
902
932
  if Rack::MiniProfiler.snapshots_transporter?
903
933
  Rack::MiniProfiler::SnapshotsTransporter.transport(page_struct)
904
934
  else
935
+ group_name = rails_route_from_path(page_struct[:request_path], page_struct[:request_method])
936
+ group_name ||= page_struct[:request_path]
937
+ group_name = "#{page_struct[:request_method]} #{group_name}"
905
938
  @storage.push_snapshot(
906
939
  page_struct,
940
+ group_name,
907
941
  @config
908
942
  )
909
943
  end
@@ -1,26 +1,27 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- if (defined?(Net) && defined?(Net::HTTP))
4
-
5
- if defined?(Rack::MINI_PROFILER_PREPEND_NET_HTTP_PATCH)
6
- module NetHTTPWithMiniProfiler
7
- def request(request, *args, &block)
8
- Rack::MiniProfiler.step("Net::HTTP #{request.method} #{request.path}") do
9
- super
3
+ if ENV['RACK_MINI_PROFILER_PATCH_NET_HTTP'] != 'false'
4
+ if (defined?(Net) && defined?(Net::HTTP))
5
+ if defined?(Rack::MINI_PROFILER_PREPEND_NET_HTTP_PATCH)
6
+ module NetHTTPWithMiniProfiler
7
+ def request(request, *args, &block)
8
+ Rack::MiniProfiler.step("Net::HTTP #{request.method} #{request.path}") do
9
+ super
10
+ end
10
11
  end
11
12
  end
12
- end
13
- Net::HTTP.prepend(NetHTTPWithMiniProfiler)
14
- else
15
- Net::HTTP.class_eval do
16
- def request_with_mini_profiler(*args, &block)
17
- request = args[0]
18
- Rack::MiniProfiler.step("Net::HTTP #{request.method} #{request.path}") do
19
- request_without_mini_profiler(*args, &block)
13
+ Net::HTTP.prepend(NetHTTPWithMiniProfiler)
14
+ else
15
+ Net::HTTP.class_eval do
16
+ def request_with_mini_profiler(*args, &block)
17
+ request = args[0]
18
+ Rack::MiniProfiler.step("Net::HTTP #{request.method} #{request.path}") do
19
+ request_without_mini_profiler(*args, &block)
20
+ end
20
21
  end
22
+ alias request_without_mini_profiler request
23
+ alias request request_with_mini_profiler
21
24
  end
22
- alias request_without_mini_profiler request
23
- alias request request_with_mini_profiler
24
25
  end
25
26
  end
26
27
  end
@@ -1,33 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'json'
4
- require 'timeout'
5
- require 'thread'
6
- require 'securerandom'
7
-
8
3
  require 'mini_profiler/version'
9
4
  require 'mini_profiler/asset_version'
10
5
 
11
- require 'mini_profiler/timer_struct/base'
12
- require 'mini_profiler/timer_struct/page'
13
- require 'mini_profiler/timer_struct/sql'
14
- require 'mini_profiler/timer_struct/custom'
15
- require 'mini_profiler/timer_struct/client'
16
- require 'mini_profiler/timer_struct/request'
17
-
18
- require 'mini_profiler/storage/abstract_store'
19
- require 'mini_profiler/storage/memcache_store'
20
- require 'mini_profiler/storage/memory_store'
21
- require 'mini_profiler/storage/redis_store'
22
- require 'mini_profiler/storage/file_store'
6
+ require 'mini_profiler'
23
7
 
24
- require 'mini_profiler/config'
25
- require 'mini_profiler/profiling_methods'
26
- require 'mini_profiler/context'
27
- require 'mini_profiler/client_settings'
28
- require 'mini_profiler/gc_profiler'
29
- require 'mini_profiler/snapshots_transporter'
30
- require 'mini_profiler/profiler'
31
8
  require 'patches/sql_patches'
32
9
  require 'patches/net_patches'
33
10
 
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  "CHANGELOG.md"
22
22
  ]
23
23
  s.add_runtime_dependency 'rack', '>= 1.2.0'
24
- s.required_ruby_version = '>= 2.4.0'
24
+ s.required_ruby_version = '>= 2.6.0'
25
25
 
26
26
  s.metadata = {
27
27
  'source_code_uri' => Rack::MiniProfiler::SOURCE_CODE_URI,
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
31
31
  s.add_development_dependency 'rake'
32
32
  s.add_development_dependency 'rack-test'
33
33
  s.add_development_dependency 'dalli'
34
- s.add_development_dependency 'rspec', '~> 3.6.0'
34
+ s.add_development_dependency 'rspec', '~> 3.12.0'
35
35
  s.add_development_dependency 'redis'
36
36
  s.add_development_dependency 'sassc'
37
37
  s.add_development_dependency 'stackprof'
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: 2.3.4
4
+ version: 3.1.0
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: 2022-02-22 00:00:00.000000000 Z
13
+ date: 2023-04-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack
@@ -74,14 +74,14 @@ dependencies:
74
74
  requirements:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
- version: 3.6.0
77
+ version: 3.12.0
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - "~>"
83
83
  - !ruby/object:Gem::Version
84
- version: 3.6.0
84
+ version: 3.12.0
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: redis
87
87
  requirement: !ruby/object:Gem::Requirement
@@ -262,9 +262,11 @@ files:
262
262
  - CHANGELOG.md
263
263
  - README.md
264
264
  - lib/enable_rails_patches.rb
265
+ - lib/generators/rack_mini_profiler/USAGE
266
+ - lib/generators/rack_mini_profiler/install_generator.rb
267
+ - lib/generators/rack_mini_profiler/templates/rack_mini_profiler.rb
265
268
  - lib/generators/rack_profiler/USAGE
266
269
  - lib/generators/rack_profiler/install_generator.rb
267
- - lib/generators/rack_profiler/templates/rack_profiler.rb
268
270
  - lib/html/dot.1.1.2.min.js
269
271
  - lib/html/includes.css
270
272
  - lib/html/includes.js
@@ -291,19 +293,21 @@ files:
291
293
  - lib/html/speedscope/source-map.438fa06b.js
292
294
  - lib/html/speedscope/speedscope.44364064.js
293
295
  - lib/html/vendor.js
296
+ - lib/mini_profiler.rb
294
297
  - lib/mini_profiler/asset_version.rb
295
298
  - lib/mini_profiler/client_settings.rb
296
299
  - lib/mini_profiler/config.rb
297
300
  - lib/mini_profiler/context.rb
298
301
  - lib/mini_profiler/gc_profiler.rb
299
- - lib/mini_profiler/profiler.rb
300
302
  - lib/mini_profiler/profiling_methods.rb
301
303
  - lib/mini_profiler/snapshots_transporter.rb
304
+ - lib/mini_profiler/storage.rb
302
305
  - lib/mini_profiler/storage/abstract_store.rb
303
306
  - lib/mini_profiler/storage/file_store.rb
304
307
  - lib/mini_profiler/storage/memcache_store.rb
305
308
  - lib/mini_profiler/storage/memory_store.rb
306
309
  - lib/mini_profiler/storage/redis_store.rb
310
+ - lib/mini_profiler/timer_struct.rb
307
311
  - lib/mini_profiler/timer_struct/base.rb
308
312
  - lib/mini_profiler/timer_struct/client.rb
309
313
  - lib/mini_profiler/timer_struct/custom.rb
@@ -347,14 +351,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
347
351
  requirements:
348
352
  - - ">="
349
353
  - !ruby/object:Gem::Version
350
- version: 2.4.0
354
+ version: 2.6.0
351
355
  required_rubygems_version: !ruby/object:Gem::Requirement
352
356
  requirements:
353
357
  - - ">="
354
358
  - !ruby/object:Gem::Version
355
359
  version: '0'
356
360
  requirements: []
357
- rubygems_version: 3.1.6
361
+ rubygems_version: 3.4.6
358
362
  signing_key:
359
363
  specification_version: 4
360
364
  summary: Profiles loading speed for rack applications.