rails_performance 1.0.0.beta5 → 1.0.2

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: 9afc6193bf2676b9f41dc9954309b7333c3457df425347cb76b38a32cfd6d086
4
- data.tar.gz: 633ddf2ed224f0e11d6dc437209a668dbf1ab4be573033e1527d1dd5adc67e22
3
+ metadata.gz: 6d7ef7cc9ce348212f4857dd78032c84766dec51b7fa78fd0ab3206f08bb0b8c
4
+ data.tar.gz: 380ae54a89db6e34827459e768333a39cfe5de6e3cffb8104b70ef8af8fc11cf
5
5
  SHA512:
6
- metadata.gz: dc2411c391204f60a8b978dea522990f1ea184d1d7139f1cdcf63887db8e590fa31a5681df681ab5b1204918055b8e8e4a8278cb678f57384c921c654cb6d753
7
- data.tar.gz: 8f00bbae1da6d8813d6d682f85ff9a7c349b7786c700d99b5244bce87018dd5b1b76aa96e56fd78df9b5380cba2e871d45e161652684e86cd392c2c5e7149531
6
+ metadata.gz: 3265a68a5f3c9a29d6ff0db5e65094f036b9f58fb082a03d177ac4d105bdd532824fb7e757919f512edf103dfc75156f920c70b65ef134005bc3f0447e2c46a6
7
+ data.tar.gz: 544fec0f5be1aa315e8185dd3abac2e2055f069c6290a0b68ed95e09b387d59bd3f82a5965c6175bc9e0c611e80890ae0d88e4acedffeae09324d34a6262935e
data/README.md CHANGED
@@ -68,6 +68,9 @@ RailsPerformance.setup do |config|
68
68
  config.verify_access_proc = proc { |controller| true }
69
69
  # for example when you have `current_user`
70
70
  # config.verify_access_proc = proc { |controller| controller.current_user && controller.current_user.admin? }
71
+
72
+ # config home button link
73
+ config.home_link = '/'
71
74
  end if defined?(RailsPerformance)
72
75
  ```
73
76
 
@@ -119,7 +122,13 @@ Rails.application.routes.draw do
119
122
  end
120
123
  ```
121
124
 
125
+ ### Custom events
122
126
 
127
+ ```ruby
128
+ RailsPerformance.measure("some label", "some namespace") do
129
+ # your code
130
+ end
131
+ ```
123
132
 
124
133
  ## How it works
125
134
 
@@ -198,6 +207,7 @@ If "schema" how records are stored i Redis is changed, and this is a breacking c
198
207
  - https://github.com/jules2689
199
208
  - https://github.com/PedroAugustoRamalhoDuarte
200
209
  - https://github.com/haffla
210
+ - https://github.com/D1ceWard
201
211
 
202
212
  ## License
203
213
 
@@ -12,3 +12,4 @@
12
12
  <%= insert_js_file 'app.js' %>
13
13
  <%= insert_js_file 'panel.js' %>
14
14
  <%= insert_js_file 'table.js' %>
15
+ <%= insert_js_file 'navbar.js' %>
@@ -0,0 +1,8 @@
1
+ $(document).ready(function() {
2
+ // Check for click events on the navbar burger icon
3
+ $(".navbar-burger").click(function() {
4
+ // Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
5
+ $(".navbar-burger").toggleClass("is-active");
6
+ $(".navbar-menu").toggleClass("is-active");
7
+ });
8
+ });
@@ -35,11 +35,11 @@
35
35
  <div class="navbar-item">
36
36
  <div class="buttons">
37
37
  <%#= link_to 'Export to CSV', '#', target: '_blank', class: "button is-primary" %>
38
- <%= link_to '/', target: '_blank', class: "button is-light home_icon" do %>
38
+ <%= link_to RailsPerformance.home_link, target: '_blank', class: "button is-light home_icon" do %>
39
39
  <%= icon('home') %>
40
40
  <% end %>
41
41
  </div>
42
42
  </div>
43
43
  </div>
44
44
  </div>
45
- </nav>
45
+ </nav>
@@ -17,7 +17,10 @@ RailsPerformance.setup do |config|
17
17
  config.verify_access_proc = proc { |controller| true }
18
18
  # for example when you have `current_user`
19
19
  # config.verify_access_proc = proc { |controller| controller.current_user && controller.current_user.admin? }
20
-
20
+
21
21
  # You can ignore endpoints with Rails standard notation controller#action
22
22
  # config.ignored_endpoints = ['HomeController#contact']
23
+
24
+ # config home button link
25
+ config.home_link = '/'
23
26
  end if defined?(RailsPerformance)
@@ -56,11 +56,11 @@ module RailsPerformance
56
56
 
57
57
  ActionView::LogSubscriber.send :prepend, RailsPerformance::Extensions::View
58
58
  ActiveRecord::LogSubscriber.send :prepend, RailsPerformance::Extensions::Db
59
- end
60
59
 
61
- if defined?(::Rake::Task)
62
- require_relative './gems/rake_ext.rb'
63
- RailsPerformance::Gems::RakeExt.init
60
+ if defined?(::Rake::Task)
61
+ require_relative './gems/rake_ext.rb'
62
+ RailsPerformance::Gems::RakeExt.init
63
+ end
64
64
  end
65
65
  end
66
66
  end
@@ -1,4 +1,4 @@
1
1
  module RailsPerformance
2
- VERSION = '1.0.0.beta5'
2
+ VERSION = '1.0.2'
3
3
  SCHEMA = '1.0.1'
4
4
  end
@@ -69,6 +69,10 @@ module RailsPerformance
69
69
  mattr_accessor :skip
70
70
  @@skip = false
71
71
 
72
+ # config home button link
73
+ mattr_accessor :home_link
74
+ @@home_link = '/'
75
+
72
76
  def RailsPerformance.setup
73
77
  yield(self)
74
78
  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: 1.0.0.beta5
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Kasyanchuk
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-23 00:00:00.000000000 Z
11
+ date: 2022-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -192,6 +192,7 @@ files:
192
192
  - app/views/rails_performance/javascripts/_javascripts.html.erb
193
193
  - app/views/rails_performance/javascripts/app.js
194
194
  - app/views/rails_performance/javascripts/jquery-3.4.1.min.js
195
+ - app/views/rails_performance/javascripts/navbar.js
195
196
  - app/views/rails_performance/javascripts/panel.js
196
197
  - app/views/rails_performance/javascripts/rails.js
197
198
  - app/views/rails_performance/javascripts/stupidtable.min.js
@@ -255,7 +256,7 @@ homepage: https://github.com/igorkasyanchuk/rails_performance
255
256
  licenses:
256
257
  - MIT
257
258
  metadata: {}
258
- post_install_message:
259
+ post_install_message:
259
260
  rdoc_options: []
260
261
  require_paths:
261
262
  - lib
@@ -266,12 +267,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
266
267
  version: '0'
267
268
  required_rubygems_version: !ruby/object:Gem::Requirement
268
269
  requirements:
269
- - - ">"
270
+ - - ">="
270
271
  - !ruby/object:Gem::Version
271
- version: 1.3.1
272
+ version: '0'
272
273
  requirements: []
273
- rubygems_version: 3.0.3
274
- signing_key:
274
+ rubygems_version: 3.2.3
275
+ signing_key:
275
276
  specification_version: 4
276
277
  summary: Simple Rails Performance tracker. Alternative to the NewRelic, Datadog or
277
278
  other services.