rubocop-slim 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c45227572489dcaf1115c4f96c218f75b7df3b493cc73fe9d35e8695e86e2b1
4
- data.tar.gz: 07ac242bc16d7b6b0edbdd58af4cc47cb34eb4a8274faffcb39829eeb1a8208d
3
+ metadata.gz: 67f8c2766d006c2a0bfeb0545447f9341835f513586607013223ee8a230cb758
4
+ data.tar.gz: 5179018956184557d263b8da88636f49c48cfda214a79c46176eb3a03d77e9c5
5
5
  SHA512:
6
- metadata.gz: 4504afb95f22cb097a22281038f758106ea29d08a81f1d26d6bd9089ef74b40f208b7f48ff798d5b6f3da411c8204bd23e5ea47bc932c5c1b76bad9be9a989bf
7
- data.tar.gz: e55105528126f91087a9707678ad744e3ceffee372381749198a7e2d3709de3a24ebd1bfa1307584c9a433e736d81a631a9e4f66d8e7cf08bb2fab1568a34e86
6
+ metadata.gz: 63f33eb8d47b284ff60dac4965b57e5b514e6f5570a26a3b2c3f9e79dfe793ac63ff8d40b4749894a5d9324c06ad686805ddcd40bd1c7e190da590df345b8588
7
+ data.tar.gz: 41d5cd785d46525a1027db215a4840e627f8b03ec64f64c61cc21c2b298fed8357c10ff507d23b9748f691124e72d6eaa5b34702e3d7bbbbc493b921fa227b94
data/Gemfile.lock CHANGED
@@ -1,78 +1,91 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop-slim (0.2.1)
4
+ rubocop-slim (0.2.3)
5
5
  rubocop (~> 1.45)
6
6
  slimi (~> 0.7)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (7.0.4.2)
11
+ activesupport (7.1.3.4)
12
+ base64
13
+ bigdecimal
12
14
  concurrent-ruby (~> 1.0, >= 1.0.2)
15
+ connection_pool (>= 2.2.5)
16
+ drb
13
17
  i18n (>= 1.6, < 2)
14
18
  minitest (>= 5.1)
19
+ mutex_m
15
20
  tzinfo (~> 2.0)
16
21
  ast (2.4.2)
17
- concurrent-ruby (1.2.0)
18
- diff-lcs (1.5.0)
19
- i18n (1.12.0)
22
+ base64 (0.2.0)
23
+ bigdecimal (3.1.8)
24
+ concurrent-ruby (1.3.3)
25
+ connection_pool (2.4.1)
26
+ diff-lcs (1.5.1)
27
+ drb (2.2.1)
28
+ i18n (1.14.5)
20
29
  concurrent-ruby (~> 1.0)
21
- json (2.6.3)
22
- minitest (5.17.0)
23
- parallel (1.22.1)
24
- parser (3.2.0.0)
30
+ json (2.7.2)
31
+ language_server-protocol (3.17.0.3)
32
+ minitest (5.24.1)
33
+ mutex_m (0.2.0)
34
+ parallel (1.25.1)
35
+ parser (3.3.4.0)
25
36
  ast (~> 2.4.1)
37
+ racc
38
+ racc (1.8.0)
26
39
  rainbow (3.1.1)
27
- rake (13.0.6)
28
- regexp_parser (2.6.2)
29
- rexml (3.2.5)
30
- rspec (3.12.0)
31
- rspec-core (~> 3.12.0)
32
- rspec-expectations (~> 3.12.0)
33
- rspec-mocks (~> 3.12.0)
34
- rspec-core (3.12.1)
35
- rspec-support (~> 3.12.0)
36
- rspec-expectations (3.12.2)
40
+ rake (13.2.1)
41
+ regexp_parser (2.9.2)
42
+ rexml (3.3.2)
43
+ strscan
44
+ rspec (3.13.0)
45
+ rspec-core (~> 3.13.0)
46
+ rspec-expectations (~> 3.13.0)
47
+ rspec-mocks (~> 3.13.0)
48
+ rspec-core (3.13.0)
49
+ rspec-support (~> 3.13.0)
50
+ rspec-expectations (3.13.1)
37
51
  diff-lcs (>= 1.2.0, < 2.0)
38
- rspec-support (~> 3.12.0)
39
- rspec-mocks (3.12.3)
52
+ rspec-support (~> 3.13.0)
53
+ rspec-mocks (3.13.1)
40
54
  diff-lcs (>= 1.2.0, < 2.0)
41
- rspec-support (~> 3.12.0)
42
- rspec-support (3.12.0)
43
- rubocop (1.45.0)
55
+ rspec-support (~> 3.13.0)
56
+ rspec-support (3.13.1)
57
+ rubocop (1.65.0)
44
58
  json (~> 2.3)
59
+ language_server-protocol (>= 3.17.0)
45
60
  parallel (~> 1.10)
46
- parser (>= 3.2.0.0)
61
+ parser (>= 3.3.0.2)
47
62
  rainbow (>= 2.2.2, < 4.0)
48
- regexp_parser (>= 1.8, < 3.0)
63
+ regexp_parser (>= 2.4, < 3.0)
49
64
  rexml (>= 3.2.5, < 4.0)
50
- rubocop-ast (>= 1.24.1, < 2.0)
65
+ rubocop-ast (>= 1.31.1, < 2.0)
51
66
  ruby-progressbar (~> 1.7)
52
67
  unicode-display_width (>= 2.4.0, < 3.0)
53
- rubocop-ast (1.24.1)
54
- parser (>= 3.1.1.0)
55
- rubocop-capybara (2.17.0)
56
- rubocop (~> 1.41)
68
+ rubocop-ast (1.31.3)
69
+ parser (>= 3.3.1.0)
57
70
  rubocop-rake (0.6.0)
58
71
  rubocop (~> 1.0)
59
- rubocop-rspec (2.18.1)
60
- rubocop (~> 1.33)
61
- rubocop-capybara (~> 2.17)
62
- ruby-progressbar (1.11.0)
63
- sevencop (0.33.0)
72
+ rubocop-rspec (3.0.3)
73
+ rubocop (~> 1.61)
74
+ ruby-progressbar (1.13.0)
75
+ sevencop (0.43.1)
64
76
  activesupport
65
77
  rubocop
66
- slimi (0.7.2)
78
+ slimi (0.7.4)
67
79
  temple
68
80
  thor
69
81
  tilt
70
- temple (0.10.0)
71
- thor (1.2.1)
72
- tilt (2.0.11)
82
+ strscan (3.1.0)
83
+ temple (0.10.3)
84
+ thor (1.3.1)
85
+ tilt (2.4.0)
73
86
  tzinfo (2.0.6)
74
87
  concurrent-ruby (~> 1.0)
75
- unicode-display_width (2.4.2)
88
+ unicode-display_width (2.5.0)
76
89
 
77
90
  PLATFORMS
78
91
  x86_64-linux
@@ -49,7 +49,7 @@ module RuboCop
49
49
  | while
50
50
  | for[ \t]+\w+[ \t]+in
51
51
  )
52
- [ \t]
52
+ \b[ \t]*
53
53
  /x.freeze
54
54
 
55
55
  class << self
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Slim
5
- VERSION = '0.2.1'
5
+ VERSION = '0.2.3'
6
6
  end
7
7
  end
@@ -30,7 +30,8 @@ module RuboCop
30
30
  match_data = @ruby_clip.code.match(REGEXP)
31
31
  if match_data
32
32
  offset = match_data[0].length
33
- parse("[#{@ruby_clip.code[offset..]}]").children.map do |child|
33
+ condition = @ruby_clip.code[offset..].sub(/[ \t]then(?:[ \t].*)?/, '')
34
+ parse("[#{condition}]").children.map do |child|
34
35
  RubyClip.new(
35
36
  code: child.location.expression.source,
36
37
  offset: @ruby_clip.offset + offset + child.location.expression.begin_pos - 1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-slim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-10 00:00:00.000000000 Z
11
+ date: 2024-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  requirements: []
89
- rubygems_version: 3.3.26
89
+ rubygems_version: 3.3.27
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: RuboCop plugin for Slim template.