discover-unused-partials 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/discover-unused-partials/version.rb +1 -1
- data/lib/discover-unused-partials.rb +5 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9789365d8122e6b469c31b972c562ff91e73bb554ea1fe68671801b4dcc378c
|
4
|
+
data.tar.gz: eaa7f7863790b490233f983dfb275761fdf6a0765c61de657331cf53a16a6b0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a3fc90fc17383173a7c4b8e339f0282470b796a7fc79847116968caa6218debeac9d03948db14e553be62e3cbe04938e73133a713424c2e2a27dbb90cd91506
|
7
|
+
data.tar.gz: 6eb5597170f3a399daa331715328ee8d6b5e30263082597ac5c9b55855f6c85b7014813e4f9c4334c6a875fa0c894e436769aa02b4fc4c586451afb754666f5f
|
@@ -85,7 +85,10 @@ module DiscoverUnusedPartials
|
|
85
85
|
files.each do |file|
|
86
86
|
File.open(file) do |f|
|
87
87
|
f.each do |line|
|
88
|
-
line.
|
88
|
+
line = line.
|
89
|
+
encode("UTF-8", "binary", invalid: :replace, undef: :replace, replace: "").
|
90
|
+
strip
|
91
|
+
|
89
92
|
if line =~ %r[(?:#@@partial|#@@render)(['"])/?(#@@filename)#@@extension*\1]
|
90
93
|
match = $2
|
91
94
|
if match.index("/")
|
@@ -119,7 +122,7 @@ module DiscoverUnusedPartials
|
|
119
122
|
|
120
123
|
EXT = %w(.html.erb .text.erb .pdf.erb .erb .html.haml .text.haml .haml .rhtml .html.slim slim)
|
121
124
|
def check_extension_path(file)
|
122
|
-
"#{file}#{EXT.find{ |e| File.
|
125
|
+
"#{file}#{EXT.find{ |e| File.exist? file + e }}"
|
123
126
|
end
|
124
127
|
|
125
128
|
def each_file(root, &block)
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: discover-unused-partials
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Willian Molinari (a.k.a PotHix)
|
8
8
|
- Vinicius Baggio
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-03-11 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A script to help you finding out unused partials. Good for big projects
|
15
15
|
or projects under heavy refactoring
|
@@ -37,7 +37,7 @@ files:
|
|
37
37
|
homepage: https://github.com/vinibaggio/discover-unused-partials
|
38
38
|
licenses: []
|
39
39
|
metadata: {}
|
40
|
-
post_install_message:
|
40
|
+
post_install_message:
|
41
41
|
rdoc_options: []
|
42
42
|
require_paths:
|
43
43
|
- lib
|
@@ -52,8 +52,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '0'
|
54
54
|
requirements: []
|
55
|
-
rubygems_version: 3.
|
56
|
-
signing_key:
|
55
|
+
rubygems_version: 3.2.3
|
56
|
+
signing_key:
|
57
57
|
specification_version: 4
|
58
58
|
summary: A script to help you finding out unused partials. Good for big projects or
|
59
59
|
projects under heavy refactoring
|