pronto-haml 0.8.0 → 0.8.1

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: dc5a76e0fd1e9c668366eef7ab0bf9b26ff0220e
4
- data.tar.gz: 8632d7fb6381064a5f2c88491ac6382bca50e8ec
3
+ metadata.gz: 169f38c7650285da533bb525a7203cd582f20e2f
4
+ data.tar.gz: 1c7d92aaf360bbf4722fcd0f696a4f4819a40c0e
5
5
  SHA512:
6
- metadata.gz: b0c1d5140b57dcb189a5020cb3e553e2c137b835b457e5cc6d19ccabe3d5269275a7b794caeb037850f2bee84e267190935278364c448b1ccdd8a9e0abc42706
7
- data.tar.gz: c58caf4f334860fca790d64846a1fc47b1ff02dd598058f6fbe7f4040e40390e2e715d34ce2b1a3cbfe903d10e155225bc8a3d13bd06bbd4bca5f7462cc8c691
6
+ metadata.gz: 80052c8e08e307ba0fb3abac7dbd6813da772122b9a135f886ceeb5d621c6aad775bf2af6c1eae56c53d55fb406638085a20297b174d24ebbb31c2bc729d3b87
7
+ data.tar.gz: 4d78f9d6b90d3fba0de522d6777e1a52a37c432665701dbbeb24dea578b8320ba673b33645c2f2e8c4d2af2d219128ffccb2087abc530996d2cd955cd5be2d36
@@ -3,12 +3,6 @@ require 'haml_lint'
3
3
 
4
4
  module Pronto
5
5
  class Haml < Runner
6
- def initialize(_, _ = nil)
7
- super
8
-
9
- @runner = ::HamlLint::Runner.new
10
- end
11
-
12
6
  def run
13
7
  return [] unless @patches
14
8
 
@@ -19,7 +13,7 @@ module Pronto
19
13
  end
20
14
 
21
15
  def inspect(patch)
22
- lints = @runner.run(files: [patch.new_file_full_path.to_s]).lints
16
+ lints = runner.run(files: [patch.new_file_full_path.to_s], reporter: reporter).lints
23
17
  lints.map do |lint|
24
18
  patch.added_lines.select { |line| line.new_lineno == lint.line }
25
19
  .map { |line| new_message(lint, line) }
@@ -28,7 +22,7 @@ module Pronto
28
22
 
29
23
  def new_message(lint, line)
30
24
  path = line.patch.delta.new_file[:path]
31
- Message.new(path, line, lint.severity, lint.message, nil, self.class)
25
+ Message.new(path, line, lint.severity.name, lint.message, nil, self.class)
32
26
  end
33
27
 
34
28
  private
@@ -36,5 +30,15 @@ module Pronto
36
30
  def haml_file?(path)
37
31
  File.extname(path) == '.haml'
38
32
  end
33
+
34
+ def reporter
35
+ @reporter ||= ::HamlLint::Reporter::DefaultReporter.new(
36
+ ::HamlLint::Logger.new(StringIO.new)
37
+ )
38
+ end
39
+
40
+ def runner
41
+ @runner ||= ::HamlLint::Runner.new
42
+ end
39
43
  end
40
44
  end
@@ -1,5 +1,5 @@
1
1
  module Pronto
2
2
  module HamlLintVersion
3
- VERSION = '0.8.0'.freeze
3
+ VERSION = '0.8.1'.freeze
4
4
  end
5
5
  end
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  EOF
17
17
 
18
18
  s.licenses = ['MIT']
19
- s.required_ruby_version = '>= 2.0.0'
19
+ s.required_ruby_version = '>= 2.1.0'
20
20
  s.rubygems_version = '1.8.23'
21
21
 
22
22
  s.files = `git ls-files`.split($RS).reject do |file|
@@ -35,7 +35,7 @@ Gem::Specification.new do |s|
35
35
  s.require_paths = ['lib']
36
36
 
37
37
  s.add_runtime_dependency('pronto', '~> 0.8.0')
38
- s.add_runtime_dependency('haml_lint', '~> 0.16', '>= 0.15.0')
38
+ s.add_runtime_dependency('haml_lint', '~> 0.23')
39
39
  s.add_development_dependency('rake', '~> 11.0')
40
40
  s.add_development_dependency('rspec', '~> 3.4')
41
41
  s.add_development_dependency('rspec-its', '~> 1.2')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pronto-haml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
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: 2017-02-12 00:00:00.000000000 Z
11
+ date: 2017-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pronto
@@ -30,20 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.16'
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: 0.15.0
33
+ version: '0.23'
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
38
  - - "~>"
42
39
  - !ruby/object:Gem::Version
43
- version: '0.16'
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: 0.15.0
40
+ version: '0.23'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: rake
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -111,7 +105,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
111
105
  requirements:
112
106
  - - ">="
113
107
  - !ruby/object:Gem::Version
114
- version: 2.0.0
108
+ version: 2.1.0
115
109
  required_rubygems_version: !ruby/object:Gem::Requirement
116
110
  requirements:
117
111
  - - ">="