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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce4e895a6dd8da80e6ed7a07cd733f10fac39ef8be0b9bb7966b48e9a943d0ab
4
- data.tar.gz: 903b078f9e4d70a12e079b6cb05918d21ae978ceb3b41e7f830e47da06ea29c7
3
+ metadata.gz: f9789365d8122e6b469c31b972c562ff91e73bb554ea1fe68671801b4dcc378c
4
+ data.tar.gz: eaa7f7863790b490233f983dfb275761fdf6a0765c61de657331cf53a16a6b0d
5
5
  SHA512:
6
- metadata.gz: 30bd8d5d1459292dd5a9bea4312eeaa7b2b4aa8977f8e54f6773f82c21ab8e68e3b2ab96a3d485a7db5bba22bc560f99be40ae5db73d6302b0001cff4e2dec24
7
- data.tar.gz: 38291f0716773f2167e330df814017b291f622083dfc3707ff37d9980abcc1b49dbcf076afacf3283449e87a15eab16c5b97ce54d416db23f17359f412463542
6
+ metadata.gz: 0a3fc90fc17383173a7c4b8e339f0282470b796a7fc79847116968caa6218debeac9d03948db14e553be62e3cbe04938e73133a713424c2e2a27dbb90cd91506
7
+ data.tar.gz: 6eb5597170f3a399daa331715328ee8d6b5e30263082597ac5c9b55855f6c85b7014813e4f9c4334c6a875fa0c894e436769aa02b4fc4c586451afb754666f5f
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DiscoverUnusedPartials
4
- VERSION = "0.3.5"
4
+ VERSION = "0.3.6"
5
5
  end
@@ -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.strip!
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.exists? file + e }}"
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.5
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: 2020-07-06 00:00:00.000000000 Z
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.1.2
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