pronto-haml 0.7.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/CODEOWNERS +3 -0
- data/.github/workflows/checks.yml +25 -0
- data/LICENSE +1 -1
- data/README.md +4 -4
- data/lib/pronto/haml.rb +12 -8
- data/lib/pronto/haml/version.rb +1 -1
- data/pronto-haml.gemspec +6 -5
- metadata +26 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6e791aae20460796b9cf51d1d927610126e3d5ac43a98d20c2c03e7b9a951a20
|
4
|
+
data.tar.gz: c02996940ebc8c813b42f93966ddd9d6ef19f79179631aa5a92b18e62e5c3a53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59c7cb796590623e7265d5922cd1d2c47dda48dce8cb32eb62241bb908b1fa028e73cb9cc9e2e0617c5c505827fcb7ac248caa807a1235686b2b487ee3088a47
|
7
|
+
data.tar.gz: ebda79a69f9b2f2fd4aaabb32068afb6e9e1ce26a44d2900ee300aa182f42a293f5d96a9ffd1d0ccfd2e6e6c329a919b906ef75cf88c70b52258591df11d550b
|
data/.github/CODEOWNERS
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
name: Checks
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
ruby:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0']
|
15
|
+
exclude:
|
16
|
+
- ruby: '2.3' # there's an additional RuboCop warning Layout/TrailingEmptyLines for some reason
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v2
|
19
|
+
- uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: ${{ matrix.ruby }}
|
22
|
+
bundler-cache: true
|
23
|
+
- name: rake spec
|
24
|
+
run: bundle exec rake spec
|
25
|
+
continue-on-error: ${{ matrix.ruby == '2.3' }}
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# Pronto runner for HAML-Lint
|
2
2
|
|
3
|
-
[![Code Climate](https://codeclimate.com/github/
|
4
|
-
[![Build Status](https://travis-ci.org/
|
3
|
+
[![Code Climate](https://codeclimate.com/github/prontolabs/pronto-haml.png)](https://codeclimate.com/github/prontolabs/pronto-haml)
|
4
|
+
[![Build Status](https://travis-ci.org/prontolabs/pronto-haml.png)](https://travis-ci.org/prontolabs/pronto-haml)
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/pronto-haml.png)](http://badge.fury.io/rb/pronto-haml)
|
6
|
-
[![Dependency Status](https://gemnasium.com/
|
6
|
+
[![Dependency Status](https://gemnasium.com/prontolabs/pronto-haml.png)](https://gemnasium.com/prontolabs/pronto-haml)
|
7
7
|
|
8
|
-
Pronto runner for [HAML-Lint](https://github.com/brigade/haml-lint), tool for writing clean and consistent HAML. [What is Pronto?](https://github.com/
|
8
|
+
Pronto runner for [HAML-Lint](https://github.com/brigade/haml-lint), tool for writing clean and consistent HAML. [What is Pronto?](https://github.com/prontolabs/pronto)
|
9
9
|
|
10
10
|
## Configuration
|
11
11
|
|
data/lib/pronto/haml.rb
CHANGED
@@ -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 =
|
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
|
data/lib/pronto/haml/version.rb
CHANGED
data/pronto-haml.gemspec
CHANGED
@@ -10,13 +10,13 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.platform = Gem::Platform::RUBY
|
11
11
|
s.author = 'Mindaugas Mozūras'
|
12
12
|
s.email = 'mindaugas.mozuras@gmail.com'
|
13
|
-
s.homepage = 'http://github.
|
13
|
+
s.homepage = 'http://github.com/mmozuras/pronto-haml'
|
14
14
|
s.summary = <<-EOF
|
15
15
|
Pronto runner for HAML-Lint, tool for writing clean and consistent HAML
|
16
16
|
EOF
|
17
17
|
|
18
18
|
s.licenses = ['MIT']
|
19
|
-
s.required_ruby_version = '>=
|
19
|
+
s.required_ruby_version = '>= 2.3.0'
|
20
20
|
s.rubygems_version = '1.8.23'
|
21
21
|
|
22
22
|
s.files = `git ls-files`.split($RS).reject do |file|
|
@@ -34,9 +34,10 @@ 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('pronto', '~> 0.
|
38
|
-
s.add_runtime_dependency('haml_lint', '~> 0.
|
39
|
-
s.
|
37
|
+
s.add_runtime_dependency('pronto', '~> 0.11.0')
|
38
|
+
s.add_runtime_dependency('haml_lint', '~> 0.23')
|
39
|
+
s.add_runtime_dependency('rubocop', '< 1.0') # not compatible with RuboCop 1.0 yet
|
40
|
+
s.add_development_dependency('rake', '~> 12.0')
|
40
41
|
s.add_development_dependency('rspec', '~> 3.4')
|
41
42
|
s.add_development_dependency('rspec-its', '~> 1.2')
|
42
43
|
end
|
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.
|
4
|
+
version: 0.11.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:
|
11
|
+
date: 2021-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pronto
|
@@ -16,48 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.11.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.11.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: haml_lint
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
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.
|
44
|
-
|
40
|
+
version: '0.23'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubocop
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "<"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "<"
|
45
53
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
54
|
+
version: '1.0'
|
47
55
|
- !ruby/object:Gem::Dependency
|
48
56
|
name: rake
|
49
57
|
requirement: !ruby/object:Gem::Requirement
|
50
58
|
requirements:
|
51
59
|
- - "~>"
|
52
60
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
61
|
+
version: '12.0'
|
54
62
|
type: :development
|
55
63
|
prerelease: false
|
56
64
|
version_requirements: !ruby/object:Gem::Requirement
|
57
65
|
requirements:
|
58
66
|
- - "~>"
|
59
67
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
68
|
+
version: '12.0'
|
61
69
|
- !ruby/object:Gem::Dependency
|
62
70
|
name: rspec
|
63
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,12 +102,14 @@ extra_rdoc_files:
|
|
94
102
|
- LICENSE
|
95
103
|
- README.md
|
96
104
|
files:
|
105
|
+
- ".github/CODEOWNERS"
|
106
|
+
- ".github/workflows/checks.yml"
|
97
107
|
- LICENSE
|
98
108
|
- README.md
|
99
109
|
- lib/pronto/haml.rb
|
100
110
|
- lib/pronto/haml/version.rb
|
101
111
|
- pronto-haml.gemspec
|
102
|
-
homepage: http://github.
|
112
|
+
homepage: http://github.com/mmozuras/pronto-haml
|
103
113
|
licenses:
|
104
114
|
- MIT
|
105
115
|
metadata: {}
|
@@ -111,15 +121,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
121
|
requirements:
|
112
122
|
- - ">="
|
113
123
|
- !ruby/object:Gem::Version
|
114
|
-
version:
|
124
|
+
version: 2.3.0
|
115
125
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
126
|
requirements:
|
117
127
|
- - ">="
|
118
128
|
- !ruby/object:Gem::Version
|
119
129
|
version: '0'
|
120
130
|
requirements: []
|
121
|
-
|
122
|
-
rubygems_version: 2.4.5
|
131
|
+
rubygems_version: 3.0.3
|
123
132
|
signing_key:
|
124
133
|
specification_version: 4
|
125
134
|
summary: Pronto runner for HAML-Lint, tool for writing clean and consistent HAML
|