is_this_used 0.1.9 → 0.1.12
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b45e5ae45262a6793a2d31dbc938dc1ca7dce14c41badab9f098281010c0fd7
|
4
|
+
data.tar.gz: 83027360fc9f6ea7eb6f5209bf76e26f812acc1a6f017d25ae8c102e8dc384d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a563b281bf91261a8796ee3cf96ca7b93856f40e97db803aff7139bf554cfbf9fb9965bee06afa7e8b27f1571d14067aa6f9fbce087cb070dabeaad7c143e37
|
7
|
+
data.tar.gz: 0116de239d46752d0240b6b76aadc56c7962f3e64b7e19f39080e7fa1a11eee73d9f7bd8a61287eb53b71d24604706f303529e0b6bd1d3a0941cc2719221ab78
|
@@ -87,6 +87,8 @@ module IsThisUsed
|
|
87
87
|
method_type: method_type
|
88
88
|
)
|
89
89
|
|
90
|
+
potential_cruft.update(deleted_at: nil) if potential_cruft.deleted_at.present?
|
91
|
+
|
90
92
|
IsThisUsed::Registry.instance << potential_cruft
|
91
93
|
|
92
94
|
target_method.owner.define_method target_method.name do |*args|
|
@@ -109,7 +111,11 @@ module IsThisUsed
|
|
109
111
|
raise unless e.cause.present? && e.cause.instance_of?(Mysql2::Error)
|
110
112
|
|
111
113
|
Rails.logger.warn(
|
112
|
-
'There was an error recording potential cruft. Does the potential_crufts table exist?'
|
114
|
+
'There was an error recording potential cruft. Does the potential_crufts table exist? Have migrations been run?'
|
115
|
+
)
|
116
|
+
rescue NoMethodError
|
117
|
+
Rails.logger.warn(
|
118
|
+
'There was an error recording potential cruft. Have migrations been run?'
|
113
119
|
)
|
114
120
|
rescue Mysql2::Error::ConnectionError, ActiveRecord::ConnectionNotEstablished
|
115
121
|
Rails.logger.warn(
|
data/lib/is_this_used/railtie.rb
CHANGED
@@ -5,7 +5,9 @@ module IsThisUsed
|
|
5
5
|
initializer "is_this_used_railtie.configure_post_initialize_cleanup" do
|
6
6
|
|
7
7
|
config.after_initialize do
|
8
|
-
|
8
|
+
if Rails.application.config.eager_load
|
9
|
+
IsThisUsed::CruftCleaner.clean🧹
|
10
|
+
end
|
9
11
|
end
|
10
12
|
|
11
13
|
rescue StandardError
|
data/lib/is_this_used/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: is_this_used
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Doug Hughes
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|