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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c475b080066b04c1f492d07ee74481b9b5ec3ebf2a1c43fec044a753c73f345c
4
- data.tar.gz: bfed494b5893026c61d7e18227b611eedf882a1c9a4724d77f05c5628cfee3e4
3
+ metadata.gz: 9e4f3d6068188c9a9ffbcf6aff72545334399ad6a4d652aca5d68c4bd157d9d3
4
+ data.tar.gz: 4adc39a8795c95ba2781504c67e45aca354365122eff29f220d44f673bc8fbd3
5
5
  SHA512:
6
- metadata.gz: c6442a654ba39c5ac30185fa6002485c533f6f97bc217c1279d75edf037a3528cf1719aa7109f835952b4c0c1c7c4678c9c3b244406cc70ba458952020370864
7
- data.tar.gz: 03bc8a2b3f5dfd23c1b047e639449dde0ed700e2536e6065cf9f00c29fb5b6dde40e5291669c55ff53e7b7f284f3701acf8f73bf0e9c9894e4a8ccd6066b3436
6
+ metadata.gz: a2ca9e64a637363cf504600af09ccbf2606c81025acd0687b7da8f05e1187456afa08cdaf39e2296d735c4f7c89251133d132347b0c856bd5735ceff2d5c9837
7
+ data.tar.gz: 52e23c42cf4d49ef195a274f46c0ff17959658a3f90fe32b64681b311163b1d4afce22ecc153f96c45cfa7819fba0b62aa6d57e841a0bcf9004dc9f0db10aba9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop-haml (0.1.0)
4
+ rubocop-haml (0.2.2)
5
5
  hamli (~> 0.5)
6
6
  rubocop (~> 1.45)
7
7
 
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
@@ -54,7 +54,7 @@ module RuboCop
54
54
  | while
55
55
  | for[ \t]+\w+[ \t]+in
56
56
  )
57
- [ \t]
57
+ \b[ \t]*
58
58
  /x.freeze
59
59
 
60
60
  class << self
@@ -96,6 +96,7 @@ module RuboCop
96
96
  [ \t]*
97
97
  (\|[^|]*\|)?
98
98
  [ \t]*
99
+ (\#.*)?
99
100
  \Z
100
101
  /x.freeze
101
102
 
@@ -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: ::RuboCop::ProcessedSource.new(
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
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Rubocop
3
+ module RuboCop
4
4
  module Haml
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.2'
6
6
  end
7
7
  end
data/rubocop-haml.gemspec CHANGED
@@ -4,7 +4,7 @@ require_relative 'lib/rubocop/haml/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'rubocop-haml'
7
- spec.version = Rubocop::Haml::VERSION
7
+ spec.version = RuboCop::Haml::VERSION
8
8
  spec.authors = ['Ryo Nakamura']
9
9
  spec.email = ['r7kamura@gmail.com']
10
10
 
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.0
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-08 00:00:00.000000000 Z
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.7
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: []