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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7403a3fed85f817b3c0aa9ec3a579894cacb93e4
4
- data.tar.gz: 29cbca5e2e12484212f6944ab2d6fb5334d0d9a9
3
+ metadata.gz: fb7f7ba8ec9f8125a9dff0db78167b01def9b414
4
+ data.tar.gz: b6b2363c84a2e1290d3b21d4e91cb98096a8ae62
5
5
  SHA512:
6
- metadata.gz: 25d6e7e8d86cb86ff8dac0b661854469732046bc75f9caa0748b988768c03cae78c4761c69cdb16bb1869d9e0a75a95863f16615f4588e5ec4516af7cb02aeff
7
- data.tar.gz: 596cd28ca8bbeb690db2065aa51c7128069bdf8a559bce9b6c01028edd668aa26924b493cf4548d8b6b9bdff2a282a0afc1735f8ef5c247a22dae15ade9b2cb9
6
+ metadata.gz: ee6148f9ad939cbdd0c26d5dd93840b353f3a02fbf6c9975350a22c1960ed5843ddbd16ff1c5ef9e3a4bd2b45a8cf8730ed1a12afe65f5e67209c02ffc83480c
7
+ data.tar.gz: a127d081cac494ed42fcfa32ba72f9470ac3b6fc89c0f7b946b476131397f16a0c96a8bf71c68ab87b2520cec2b2e30145c75bbf0156516f78793d05e694f932
@@ -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
- @command = "scss-lint"
13
- end
11
+ def initialize(options = {})
12
+ @options = {
13
+ config_file: ".scss-lint.yml",
14
+ scss_lint: "scss-lint"
15
+ }
14
16
 
15
- def detect_scsslint
16
- command = [@command, "-v", ">/dev/null"]
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(@command)
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
@@ -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.0.0"
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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roger_scsslint
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hans Krutzer