pronto-scss 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pronto/scss.rb +9 -5
- data/lib/pronto/scss/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 519ba862568be95cc76cb7122cd7ce315c63ddc3
|
4
|
+
data.tar.gz: 7ab89268f3f435af6b9455ca2c9f49e44aa3d839
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 290b0965972321ff04fd0c14c0327bdc5e7a80dbdc365c2aa683ededeaaee23d074892e55ee0a79e55fa7ecca1ae4b08e6f742431f69c11a1f26ac7b89decf52
|
7
|
+
data.tar.gz: 51fe744a35d08c7bd11338bcd68872fd660024f8197cc7dd605687ee4af20938f3633e0b562cd6c54ebc0cf632105d1c4d024fd1e297d3094345fa438e5a501b
|
data/lib/pronto/scss.rb
CHANGED
@@ -5,8 +5,11 @@ module Pronto
|
|
5
5
|
class Scss < Runner
|
6
6
|
def initialize
|
7
7
|
file_name = SCSSLint::Config::FILE_NAME
|
8
|
-
config = File.
|
9
|
-
|
8
|
+
config = if File.exist?(file_name)
|
9
|
+
SCSSLint::Config.load(file_name)
|
10
|
+
else
|
11
|
+
SCSSLint::Config.default
|
12
|
+
end
|
10
13
|
@runner = SCSSLint::Runner.new(config)
|
11
14
|
end
|
12
15
|
|
@@ -14,9 +17,9 @@ module Pronto
|
|
14
17
|
return [] unless patches
|
15
18
|
|
16
19
|
scss_patches = patches.select { |patch| patch.additions > 0 }
|
17
|
-
|
20
|
+
.select { |patch| scss_file?(patch.new_file_full_path) }
|
18
21
|
|
19
|
-
files = scss_patches.map
|
22
|
+
files = scss_patches.map(&:new_file_full_path)
|
20
23
|
|
21
24
|
if files.any?
|
22
25
|
@runner.run(files)
|
@@ -45,7 +48,8 @@ module Pronto
|
|
45
48
|
end
|
46
49
|
|
47
50
|
def new_message(line, lint)
|
48
|
-
Message.new(line.patch.delta.new_file[:path], line,
|
51
|
+
Message.new(line.patch.delta.new_file[:path], line,
|
52
|
+
lint.severity, lint.description)
|
49
53
|
end
|
50
54
|
|
51
55
|
def scss_file?(path)
|
data/lib/pronto/scss/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pronto-scss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mindaugas Mozūras
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: scss_lint
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.39.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.39.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pronto
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|