discover-unused-partials 0.3.4 → 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: f93ca7222ed3d8e5478c08d3f0b55c2cbcaaf336fc7bd3079d1da0cb9796f377
4
- data.tar.gz: ce34b07518a80b3fb8a455a77eb565e681cd022135e3aec151f08fb90fdaeaef
3
+ metadata.gz: f9789365d8122e6b469c31b972c562ff91e73bb554ea1fe68671801b4dcc378c
4
+ data.tar.gz: eaa7f7863790b490233f983dfb275761fdf6a0765c61de657331cf53a16a6b0d
5
5
  SHA512:
6
- metadata.gz: 854a432fd6fb1b8bcad29045532749a0071af5c948f121895a70c5c6fff0712c678e6fc56f04eaf6a7964869b81798f1cba047b0692012b4fc78eb0332d7b756
7
- data.tar.gz: 30492de53bfc95e56c6f6cbb7f9806c70d4632b50dd83a5e3e6e4114a3a6ba2de1a9fb97f19ac654d7ff6d50771d34d50289ee3e15da6b3852cab7a915a2b232
6
+ metadata.gz: 0a3fc90fc17383173a7c4b8e339f0282470b796a7fc79847116968caa6218debeac9d03948db14e553be62e3cbe04938e73133a713424c2e2a27dbb90cd91506
7
+ data.tar.gz: 6eb5597170f3a399daa331715328ee8d6b5e30263082597ac5c9b55855f6c85b7014813e4f9c4334c6a875fa0c894e436769aa02b4fc4c586451afb754666f5f
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 0.3.5
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DiscoverUnusedPartials
4
- VERSION = "0.3.4"
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.4
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: 2019-08-29 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.0.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