pronto-scss 0.5.3 → 0.6.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: 4703d81993d87a02065117cec1691a3c8d08cd0c
4
- data.tar.gz: 3e058984c87538da7499aa164acc7a92257f3956
3
+ metadata.gz: ae283b8e61bd63b45efb1349dbf8025bf3f8a532
4
+ data.tar.gz: e0c4bc39b256f7cde5e1866ac85ea624f2e3e79c
5
5
  SHA512:
6
- metadata.gz: dee246568e02767bb6db079ea45866fca10b87e9b4c32c80c7ea8510777439c2c36d3f3fca79a865370983addec9c8d4684279856f79ed32bba2da36915fc09a
7
- data.tar.gz: 82013ea710a93889700ebb5e9e4689a137c6a561dd778a96341bc1995c81169498e7e99578d1b4eb2d4fc7eef851e1dbcd7fe63108bf9cbf87d40f85d4498db4
6
+ metadata.gz: c497c6c745f6187268ee47a13f8436b3af6b8edb6f88710c32dbb048c7d18f81c6814780e6e3dfde83aa52cf3b5ce887d52aef99e58c85073587a53eba7653ee
7
+ data.tar.gz: a3862d9678886599cbfb567bd4e0f6875c7e7452515092cb730f42aca8f73ee9156471fc90241ba1cec4307e454103c3c7d88eeebaa2f37ed7045fdd2ad197b8
data/lib/pronto/scss.rb CHANGED
@@ -3,12 +3,7 @@ require 'scss_lint'
3
3
 
4
4
  module Pronto
5
5
  class Scss < Runner
6
- def run(patches, _)
7
- return [] unless patches
8
-
9
- scss_patches = patches.select { |patch| patch.additions > 0 }
10
- .select { |patch| scss_file?(patch.new_file_full_path) }
11
-
6
+ def run
12
7
  files = scss_patches.map(&:new_file_full_path)
13
8
 
14
9
  if files.any?
@@ -17,7 +12,7 @@ module Pronto
17
12
  { path: path }
18
13
  end
19
14
  runner.run(files_hash)
20
- messages_for(scss_patches)
15
+ messages
21
16
  else
22
17
  []
23
18
  end
@@ -38,9 +33,9 @@ module Pronto
38
33
  end
39
34
  end
40
35
 
41
- def messages_for(scss_patches)
36
+ def messages
42
37
  runner.lints.map do |lint|
43
- patch = patch_for_lint(scss_patches, lint)
38
+ patch = patch_for_lint(lint)
44
39
 
45
40
  line = patch.added_lines.find do |added_line|
46
41
  added_line.new_lineno == lint.location.line
@@ -50,15 +45,22 @@ module Pronto
50
45
  end.flatten.compact
51
46
  end
52
47
 
53
- def patch_for_lint(scss_patches, lint)
48
+ def patch_for_lint(lint)
54
49
  scss_patches.find do |patch|
55
50
  patch.new_file_full_path.to_s == lint.filename.to_s
56
51
  end
57
52
  end
58
53
 
54
+ def scss_patches
55
+ return [] unless @patches
56
+
57
+ @scss_patches ||= @patches.select { |patch| patch.additions > 0 }
58
+ .select { |patch| scss_file?(patch.new_file_full_path) }
59
+ end
60
+
59
61
  def new_message(line, lint)
60
62
  Message.new(line.patch.delta.new_file[:path], line,
61
- lint.severity, lint.description)
63
+ lint.severity, lint.description, nil, self.class)
62
64
  end
63
65
 
64
66
  def scss_file?(path)
@@ -1,5 +1,5 @@
1
1
  module Pronto
2
2
  module ScssVersion
3
- VERSION = '0.5.3'
3
+ VERSION = '0.6.0'.freeze
4
4
  end
5
5
  end
data/pronto-scss.gemspec CHANGED
@@ -34,9 +34,9 @@ Gem::Specification.new do |s|
34
34
  s.extra_rdoc_files = ['LICENSE', 'README.md']
35
35
  s.require_paths = ['lib']
36
36
 
37
- s.add_runtime_dependency('scss_lint', '~> 0.45.0')
38
- s.add_runtime_dependency('pronto', '~> 0.5.0')
39
- s.add_development_dependency('rake', '~> 10.4')
40
- s.add_development_dependency('rspec', '~> 3.3')
37
+ s.add_runtime_dependency('scss_lint', '~> 0.43', '>= 0.43.0')
38
+ s.add_runtime_dependency('pronto', '~> 0.6.0')
39
+ s.add_development_dependency('rake', '~> 10.5')
40
+ s.add_development_dependency('rspec', '~> 3.4')
41
41
  s.add_development_dependency('rspec-its', '~> 1.2')
42
42
  end
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.5.3
4
+ version: 0.6.0
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: 2016-02-17 00:00:00.000000000 Z
11
+ date: 2016-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: scss_lint
@@ -16,56 +16,62 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.45.0
19
+ version: '0.43'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.43.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
- version: 0.45.0
29
+ version: '0.43'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.43.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: pronto
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: 0.5.0
39
+ version: 0.6.0
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
44
  - - "~>"
39
45
  - !ruby/object:Gem::Version
40
- version: 0.5.0
46
+ version: 0.6.0
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: rake
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: '10.4'
53
+ version: '10.5'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: '10.4'
60
+ version: '10.5'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: rspec
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
65
  - - "~>"
60
66
  - !ruby/object:Gem::Version
61
- version: '3.3'
67
+ version: '3.4'
62
68
  type: :development
63
69
  prerelease: false
64
70
  version_requirements: !ruby/object:Gem::Requirement
65
71
  requirements:
66
72
  - - "~>"
67
73
  - !ruby/object:Gem::Version
68
- version: '3.3'
74
+ version: '3.4'
69
75
  - !ruby/object:Gem::Dependency
70
76
  name: rspec-its
71
77
  requirement: !ruby/object:Gem::Requirement