rubocop-haml 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +6 -0
- data/lib/rubocop/haml/ruby_clipper.rb +2 -1
- data/lib/rubocop/haml/ruby_extractor.rb +10 -5
- data/lib/rubocop/haml/version.rb +2 -2
- data/rubocop-haml.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e4f3d6068188c9a9ffbcf6aff72545334399ad6a4d652aca5d68c4bd157d9d3
|
4
|
+
data.tar.gz: 4adc39a8795c95ba2781504c67e45aca354365122eff29f220d44f673bc8fbd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2ca9e64a637363cf504600af09ccbf2606c81025acd0687b7da8f05e1187456afa08cdaf39e2296d735c4f7c89251133d132347b0c856bd5735ceff2d5c9837
|
7
|
+
data.tar.gz: 52e23c42cf4d49ef195a274f46c0ff17959658a3f90fe32b64681b311163b1d4afce22ecc153f96c45cfa7819fba0b62aa6d57e841a0bcf9004dc9f0db10aba9
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -47,3 +47,9 @@ spec/fixtures/dummy.haml:2:13: C: [Correctable] Style/StringLiterals: Prefer sin
|
|
47
47
|
|
48
48
|
1 file inspected, 3 offenses detected, 3 offenses autocorrectable
|
49
49
|
```
|
50
|
+
|
51
|
+
## Related projects
|
52
|
+
|
53
|
+
- https://github.com/r7kamura/rubocop-erb
|
54
|
+
- https://github.com/r7kamura/rubocop-haml
|
55
|
+
- https://github.com/r7kamura/rubocop-markdown
|
@@ -26,13 +26,18 @@ module RuboCop
|
|
26
26
|
|
27
27
|
ruby_ranges.map do |(begin_, end_)|
|
28
28
|
clip = RubyClipper.new(template_source[begin_...end_]).call
|
29
|
+
|
30
|
+
processed_source = ::RuboCop::ProcessedSource.new(
|
31
|
+
clip[:code],
|
32
|
+
@processed_source.ruby_version,
|
33
|
+
file_path
|
34
|
+
)
|
35
|
+
processed_source.config = @processed_source.config
|
36
|
+
processed_source.registry = @processed_source.registry
|
37
|
+
|
29
38
|
{
|
30
39
|
offset: begin_ + clip[:offset],
|
31
|
-
processed_source:
|
32
|
-
clip[:code],
|
33
|
-
@processed_source.ruby_version,
|
34
|
-
file_path
|
35
|
-
)
|
40
|
+
processed_source: processed_source
|
36
41
|
}
|
37
42
|
end
|
38
43
|
end
|
data/lib/rubocop/haml/version.rb
CHANGED
data/rubocop-haml.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-haml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02
|
11
|
+
date: 2023-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hamli
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.45'
|
41
|
-
description:
|
41
|
+
description:
|
42
42
|
email:
|
43
43
|
- r7kamura@gmail.com
|
44
44
|
executables: []
|
@@ -70,7 +70,7 @@ metadata:
|
|
70
70
|
homepage_uri: https://github.com/r7kamura/rubocop-haml
|
71
71
|
source_code_uri: https://github.com/r7kamura/rubocop-haml
|
72
72
|
changelog_uri: https://github.com/r7kamura/rubocop-haml/releases
|
73
|
-
post_install_message:
|
73
|
+
post_install_message:
|
74
74
|
rdoc_options: []
|
75
75
|
require_paths:
|
76
76
|
- lib
|
@@ -85,8 +85,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: '0'
|
87
87
|
requirements: []
|
88
|
-
rubygems_version: 3.3.
|
89
|
-
signing_key:
|
88
|
+
rubygems_version: 3.3.26
|
89
|
+
signing_key:
|
90
90
|
specification_version: 4
|
91
91
|
summary: RuboCop plugin for Haml template.
|
92
92
|
test_files: []
|