roger_scsslint 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/roger_scsslint/lint.rb +16 -9
- data/roger_scsslint.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb7f7ba8ec9f8125a9dff0db78167b01def9b414
|
4
|
+
data.tar.gz: b6b2363c84a2e1290d3b21d4e91cb98096a8ae62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee6148f9ad939cbdd0c26d5dd93840b353f3a02fbf6c9975350a22c1960ed5843ddbd16ff1c5ef9e3a4bd2b45a8cf8730ed1a12afe65f5e67209c02ffc83480c
|
7
|
+
data.tar.gz: a127d081cac494ed42fcfa32ba72f9470ac3b6fc89c0f7b946b476131397f16a0c96a8bf71c68ab87b2520cec2b2e30145c75bbf0156516f78793d05e694f932
|
data/lib/roger_scsslint/lint.rb
CHANGED
@@ -8,20 +8,27 @@ module RogerScsslint
|
|
8
8
|
class Lint
|
9
9
|
# Configurability is the root of all evil
|
10
10
|
# http://fishshell.com/docs/current/design.html#conf
|
11
|
-
def initialize(
|
12
|
-
@
|
13
|
-
|
11
|
+
def initialize(options = {})
|
12
|
+
@options = {
|
13
|
+
config_file: ".scss-lint.yml",
|
14
|
+
scss_lint: "scss-lint"
|
15
|
+
}
|
14
16
|
|
15
|
-
|
16
|
-
|
17
|
-
detect = system(Shellwords.join(command))
|
18
|
-
fail "Could not find linter. Linter should be in Gemfile. " unless detect
|
17
|
+
detect_scsslint
|
18
|
+
@options.update(options) if options
|
19
19
|
end
|
20
20
|
|
21
21
|
def call(test, _options)
|
22
|
-
detect_scsslint
|
23
22
|
test.log(self, "SCSS linting files")
|
24
|
-
system(@
|
23
|
+
system(Shellwords.join([@options[:scss_lint], "--config=#{@options[:config_file]}"]))
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def detect_scsslint
|
29
|
+
command = [@options[:scss_lint], "-v", ">/dev/null"]
|
30
|
+
detect = system(Shellwords.join(command))
|
31
|
+
fail "Could not find linter. Linter should be in Gemfile." unless detect
|
25
32
|
end
|
26
33
|
end
|
27
34
|
end
|
data/roger_scsslint.gemspec
CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
|
|
4
4
|
s.authors = ["Hans Krutzer", "Flurin Egger"]
|
5
5
|
s.email = ["info@digitpaint.nl", "hans@digitpaint.nl", "flurin@digitpaint.nl"]
|
6
6
|
s.name = "roger_scsslint"
|
7
|
-
s.version = "1.
|
7
|
+
s.version = "1.1.0"
|
8
8
|
s.homepage = "https://github.com/hkrutzer/roger_scsslint"
|
9
9
|
|
10
10
|
s.summary = "Lint SCSS files within Roger"
|