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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c2a57fa0d9dc24917ca85379e01546e917ec092
4
- data.tar.gz: 13144b73104ca05aa05e0d23bef2ed71b9130529
3
+ metadata.gz: d86da209f2562c02d7253cc14507c80a0dd60c6d
4
+ data.tar.gz: f58d40f174c24e38e5e2d9d302f9a47c8db4b27a
5
5
  SHA512:
6
- metadata.gz: fe1ff6f1c59b1b97cff345874117a89851ccda90bd71fbace6d4f6663d4a71b316780d34a59e3ef5fb564e59d249edb4ebaad26c14808c9a15ffcfb31a9ac55f
7
- data.tar.gz: 1827561fb1b2107d2006ec8105f969d740e5486a7cfdc1366182fb02595d98329d5fb54046636e0cb5eb25d16308a155f7d24593166e1cab37c9c446fc9eb273
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.
@@ -1,4 +1,4 @@
1
1
  # Defines the gem version.
2
2
  module SlimLint
3
- VERSION = '0.6.0'
3
+ VERSION = '0.6.1'
4
4
  end
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.0
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-06-30 00:00:00.000000000 Z
11
+ date: 2015-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slim