rails_performance 0.9.5 → 0.9.6

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
  SHA256:
3
- metadata.gz: 91dc41ef53b796c8c0755afd109fc7b7684ea9a5567828ab0e7f9e6c80cf9e79
4
- data.tar.gz: 434e5e19a7abb0fc86b094d591623d626ab4b8a8e2ad28b70d2dfe70583e510b
3
+ metadata.gz: b7057afb1ba78e88e9c7cd43609f5b42592be9a63aea28038389634afe8c6563
4
+ data.tar.gz: 469e0a13402fbaff70387902b28d4d0a7441d42403df6f3bd4f89aa8a3124bf3
5
5
  SHA512:
6
- metadata.gz: dffbb9eab0930f214009a8717c97a9fe82b7ea5fea22cd7a18d9a34426811d8467a19600e38e5fbdc1eb4c1aee1308b7819a8b79ff77d721907a644b9f2facea
7
- data.tar.gz: 69e08649d416bf680f203ee801534c1c5dbedd5ee956e85cca5439db3eaa8062ca830800454eb37335059732239946f6a39ad0a1d756b7efa40864fc5ebb9dc9
6
+ metadata.gz: b1f93f46640ef509be5ea38f624f916689fe5f61bb3413428673c1ca14d41f30bdfc22111e97f0e5b0629e4421e68400cb75437d65dc3616c9fef55af7f521fb
7
+ data.tar.gz: 539bb052282c277077f68b37230ae121b84d4eb7a5a87cb679a38ce03d7bc4df7fc8b38cd1f72f8f235819c53edacb24b256ca18be2e2e51bd9b282e5895faaf
data/README.md CHANGED
@@ -17,7 +17,7 @@ It allows you to track:
17
17
  - SQL queries, rendering logs in "Recent Requests" section
18
18
  - simple 500-crashes reports
19
19
  - track Sidekiq jobs performance
20
- - works with Rails 4.2+ (and probably 4.1, 4.0 too)
20
+ - works with Rails 4.2+ (and probably 4.1, 4.0 too) and Ruby 2.2+
21
21
 
22
22
  All data are stored in `local` Redis and not sent to any 3rd party servers.
23
23
 
@@ -49,6 +49,9 @@ RailsPerformance.setup do |config|
49
49
  config.debug = false # currently not used>
50
50
  config.enabled = true
51
51
 
52
+ # default path where to mount gem
53
+ config.mount_at = '/rails/performance'
54
+
52
55
  # protect your Performance Dashboard with HTTP BASIC password
53
56
  config.http_basic_authentication_enabled = false
54
57
  config.http_basic_authentication_user_name = 'rails_performance'
@@ -67,7 +70,7 @@ Add this line to your application's Gemfile:
67
70
  ```ruby
68
71
  gem 'rails_performance'
69
72
 
70
- # or
73
+ # or
71
74
 
72
75
  group :development, :production do
73
76
  gem 'rails_performance'
@@ -149,6 +152,8 @@ You are welcome to contribute. I've a big list of TODO.
149
152
  ## Big thanks to contributors
150
153
 
151
154
  - https://github.com/synth
155
+ - https://github.com/alagos
156
+ - https://github.com/klondaiker
152
157
 
153
158
  ## License
154
159
 
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <title>Rails Performance</title>
7
7
  <%= csrf_meta_tags %>
8
- <%= csp_meta_tag if ::Rails::VERSION::MAJOR.to_i >= 5 %>
8
+ <%= csp_meta_tag if ::Rails::VERSION::STRING.to_f >= 5.2 %>
9
9
  <%= render '/rails_performance/stylesheets/stylesheets' %>
10
10
  <link rel="shortcut icon" href="/favicon.ico">
11
11
  </head>
@@ -29,4 +29,4 @@
29
29
  <%= yield :on_load %>
30
30
 
31
31
  </body>
32
- </html>
32
+ </html>
@@ -26,7 +26,7 @@
26
26
  <% c, a = groups[0].split("#") %>
27
27
  <tr>
28
28
  <td><%= link_to groups[0], rails_performance.rails_performance_summary_path({controller_eq: c, action_eq: a}), remote: true %></td>
29
- <td><%= link_to groups[1]&.upcase, rails_performance.rails_performance_summary_path({controller_eq: c, action_eq: a, format_eq: groups[1]}), remote: true %></td>
29
+ <td><%= link_to groups[1].try(:upcase), rails_performance.rails_performance_summary_path({controller_eq: c, action_eq: a, format_eq: groups[1]}), remote: true %></td>
30
30
  <td><%= e[:count] %></td>
31
31
  <td class="nowrap"><%= ms e[:duration_average] %></td>
32
32
  <td class="nowrap"><%= ms e[:view_runtime_average] %></td>
@@ -13,9 +13,9 @@ end
13
13
 
14
14
  Rails.application.routes.draw do
15
15
  begin
16
- mount RailsPerformance::Engine => '/rails/performance', as: 'rails_performance'
16
+ mount RailsPerformance::Engine => RailsPerformance.mount_at, as: 'rails_performance'
17
17
  rescue ArgumentError
18
18
  # already added
19
- # this cod exist here because engine not includes routing automatically
19
+ # this code exist here because engine not includes routing automatically
20
20
  end
21
21
  end
@@ -34,6 +34,10 @@ module RailsPerformance
34
34
  mattr_accessor :enabled
35
35
  @@enabled = true
36
36
 
37
+ # default path where to mount gem
38
+ mattr_accessor :mount_at
39
+ @@mount_at = "/rails/performance"
40
+
37
41
  # Enable http basic authentication
38
42
  mattr_accessor :http_basic_authentication_enabled
39
43
  @@http_basic_authentication_enabled = false
@@ -1,3 +1,3 @@
1
1
  module RailsPerformance
2
- VERSION = '0.9.5'
2
+ VERSION = '0.9.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_performance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Kasyanchuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-27 00:00:00.000000000 Z
11
+ date: 2020-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails