guard-scss_lint 0.1.5 → 0.1.6
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/.gitignore +1 -0
- data/.travis.yml +2 -6
- data/lib/guard/scss_lint.rb +12 -6
- data/lib/guard/scss_lint/version.rb +1 -1
- data/spec/guard/scss_lint_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17ffac50daaa0992ee3ef7379e238d815d6e7734
|
4
|
+
data.tar.gz: 87102ec0186cdf7986cbfd11b06d07bc205105e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 155b115613ebb73e4746b5d5b6ba9a95a3ca6f5ca811b5b0c5c38ba21769a61671def87952a50a85524a75515072734414b542966af25bb81f00a56f3cb4ecdd
|
7
|
+
data.tar.gz: f6f13700bfa50ed4b667f88a6ae8ef9584becd4f87c1fb66b923bf02e297623217396ca9842e22c4df0edc6237b41304e63e47dd12ba14e3e98d74884103b9ca
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/lib/guard/scss_lint.rb
CHANGED
@@ -16,12 +16,7 @@ module Guard
|
|
16
16
|
|
17
17
|
@options = { all_on_start: true }.merge(options)
|
18
18
|
|
19
|
-
|
20
|
-
@config = if File.exist?(config_file)
|
21
|
-
SCSSLint::Config.load config_file
|
22
|
-
else
|
23
|
-
SCSSLint::Config.default
|
24
|
-
end
|
19
|
+
load_config
|
25
20
|
|
26
21
|
@scss_lint_runner = SCSSLint::Runner.new @config
|
27
22
|
@failed_paths = []
|
@@ -48,7 +43,18 @@ module Guard
|
|
48
43
|
|
49
44
|
private
|
50
45
|
|
46
|
+
def load_config
|
47
|
+
config_file = @options[:config] || '.scss-lint.yml'
|
48
|
+
@config = if File.exist?(config_file)
|
49
|
+
SCSSLint::Config.load config_file
|
50
|
+
else
|
51
|
+
SCSSLint::Config.default
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
51
55
|
def run(paths = [])
|
56
|
+
load_config
|
57
|
+
|
52
58
|
@scss_lint_runner = SCSSLint::Runner.new @config
|
53
59
|
paths = paths.reject { |p| @config.excluded_file?(p) }.map { |path| { path: path } }
|
54
60
|
|
@@ -38,7 +38,7 @@ describe Guard::ScssLint, exclude_stubs: [Guard::Plugin] do
|
|
38
38
|
describe '[:config]' do
|
39
39
|
subject { super()[:config] }
|
40
40
|
it 'uses default config from SCSS Lint' do
|
41
|
-
expect(guard.config).to eq(SCSSLint::Config.default)
|
41
|
+
expect(guard.config.file).to eq(SCSSLint::Config.default.file)
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-scss_lint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Rohr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard-compat
|
@@ -212,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
212
212
|
version: '0'
|
213
213
|
requirements: []
|
214
214
|
rubyforge_project:
|
215
|
-
rubygems_version: 2.5.1
|
215
|
+
rubygems_version: 2.4.5.1
|
216
216
|
signing_key:
|
217
217
|
specification_version: 4
|
218
218
|
summary: Guard plugin for scss_lint
|