cruft_tracker 0.2.1 → 0.2.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: c9a8291697321237133216a66cb9d58b1e526fe537dddd05644c1fafeaaafb36
4
- data.tar.gz: 4ff9fe36c9efd852b03dfc45b7511a74f08f6d92687582ca1316dd8a992031e2
3
+ metadata.gz: e11661e18988d5a678417bb2295abf479c7eecd17644ab9e3fa3386188e6a25a
4
+ data.tar.gz: 104b7dc62a4590837655618f9eb82786f609e7a0b5733b629afc85628088ea9b
5
5
  SHA512:
6
- metadata.gz: 7151e6f098431af83070f860877bf3a7e7446b3b13ba0116c56cf5b6b77bf023282c602bf78e1cca181e5cef25ac3e27fac6b2a95ca45d9c1e69b01652efea5b
7
- data.tar.gz: bebf3b0e9acbaaf3f4b60753903f48cd548b9e935061c6a28333e8b53eaff8f2099e0d5ff34234864c257c7110b8ce6a7ad75d3e0cae84bd23e264118ee652d8
6
+ metadata.gz: 635d585bc91bc042b6713f40e2da1c782d4e42664c5a69e3b6377089f38cf5bb91744a6f202ff9ef61020d2ce6170b507644d5ec45908ee88b682f685f8a7fa0
7
+ data.tar.gz: ec22b4e3e545e2adec8094f4a5e6b46156d9d2cf35d0ef3f20f61c347f50e7c2160b98767fd8a1943ba366df13d0459de8391bbfa34f78e2dfa0f79e99d04904
data/README.md CHANGED
@@ -47,6 +47,16 @@ CruftTracker.init do
47
47
  end
48
48
  ```
49
49
 
50
+ Note: you may need to wrap the `CruftTracker.init` call in `Rails.application.reloader.to_prepare` to prevent deprecation warnings related to autoloading constants during initialization. For example:
51
+
52
+ ```ruby
53
+ Rails.application.reloader.to_prepare do
54
+ CruftTracker.init do
55
+ # your configuration.... (more on this below)
56
+ end
57
+ end
58
+ ```
59
+
50
60
  ### Tracking method invocations
51
61
 
52
62
  CruftTracker is pretty simple. Let's say you have a class (or module) like this...
@@ -355,7 +365,7 @@ Let's say you have this view and you're just not sure it's being used anymore:
355
365
  <!-- app/views/something/some_view.html.erb -->
356
366
 
357
367
  <div>
358
- <%- if @data.present? %>
368
+ <%- if @data.present? %>
359
369
  <strong>Woo hoo!</strong>
360
370
  <% end %>
361
371
  </div>
@@ -3,16 +3,13 @@ module CruftTracker
3
3
  isolate_namespace CruftTracker
4
4
 
5
5
  config.after_initialize do
6
+ ActionController::Base.helper CruftTracker::ApplicationHelper
6
7
  CruftTracker::CleanupUntrackedMethods.run!
7
8
  CruftTracker::CleanupUntrackedViews.run!
8
9
  rescue StandardError
9
10
  # Swallow all errors to prevent initialization failures.
10
11
  end
11
12
 
12
- initializer 'local_helper.action_controller' do
13
- ActiveSupport.on_load :action_controller do
14
- helper CruftTracker::ApplicationHelper
15
- end
16
- end
13
+
17
14
  end
18
15
  end
@@ -1,3 +1,3 @@
1
1
  module CruftTracker
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cruft_tracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adwerx Inc.
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-07-07 00:00:00.000000000 Z
12
+ date: 2022-07-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: active_interaction