slim_lint 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/slim_lint/file_finder.rb +11 -1
- data/lib/slim_lint/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d86da209f2562c02d7253cc14507c80a0dd60c6d
|
4
|
+
data.tar.gz: f58d40f174c24e38e5e2d9d302f9a47c8db4b27a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f927bfb9459f35098a870fd794c596fcd2d12afb42ee30689ef3acf20d0356a60805e746968a7d546d0e36a5da949f48046a079395b1636ddbe58f260008805f
|
7
|
+
data.tar.gz: 174c88e5772cec3338a1f4abddfb5dbdfe57e361904eca042ed922534ee6be4a257ea62698d6ff8205a683d75f1dea7548fde43cc3e5191fc2175eb8895102d6
|
@@ -22,6 +22,8 @@ module SlimLint
|
|
22
22
|
# @raise [SlimLint::Exceptions::InvalidFilePath]
|
23
23
|
# @return [Array<String>] list of actual files
|
24
24
|
def find(patterns, excluded_patterns)
|
25
|
+
excluded_patterns = excluded_patterns.map { |pattern| normalize_path(pattern) }
|
26
|
+
|
25
27
|
extract_files_from(patterns).reject do |file|
|
26
28
|
excluded_patterns.any? do |exclusion_glob|
|
27
29
|
SlimLint::Utils.any_glob_matches?(exclusion_glob, file)
|
@@ -62,7 +64,15 @@ module SlimLint
|
|
62
64
|
end
|
63
65
|
end
|
64
66
|
|
65
|
-
files.uniq.sort
|
67
|
+
files.uniq.sort.map { |file| normalize_path(file) }
|
68
|
+
end
|
69
|
+
|
70
|
+
# Trim "./" from the front of relative paths.
|
71
|
+
#
|
72
|
+
# @param path [String]
|
73
|
+
# @return [String]
|
74
|
+
def normalize_path(path)
|
75
|
+
path.start_with?(".#{File::SEPARATOR}") ? path[2..-1] : path
|
66
76
|
end
|
67
77
|
|
68
78
|
# Whether the given file should be treated as a Slim file.
|
data/lib/slim_lint/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slim_lint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane da Silva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slim
|