rubocop-slim 0.2.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +54 -41
- data/lib/rubocop/slim/version.rb +1 -1
- data/lib/rubocop/slim/when_decomposer.rb +9 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab04cbc6e4180405af2c468a50832c0ba3be2db459d581ce1d84d1d9131ff0fe
|
4
|
+
data.tar.gz: efa8261463d5609a1b363216a83fb28aa57234f0eaf8fab30f68acf89f16924b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c76de6b75c20a5ce1cbf8eda415c04312ece5f108c9849fd470e2a5850ac5d9af66760f862266cf21a3b4538d71aa91dbb47e308ce6a59bceca03f4312dc2c8
|
7
|
+
data.tar.gz: 70b4253f59266644dbf3bfaf93a40f00347f105a168d3d051364509a0b68dc2377e96ac37a89a8f6fe9f12dbe6900b0982eed60b18599ff0efa8700b92da60ce
|
data/Gemfile.lock
CHANGED
@@ -1,78 +1,91 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rubocop-slim (0.2.
|
4
|
+
rubocop-slim (0.2.4)
|
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.
|
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
|
-
|
18
|
-
|
19
|
-
|
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.
|
22
|
-
|
23
|
-
|
24
|
-
|
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.
|
28
|
-
regexp_parser (2.
|
29
|
-
rexml (3.2
|
30
|
-
|
31
|
-
|
32
|
-
rspec-
|
33
|
-
rspec-
|
34
|
-
|
35
|
-
|
36
|
-
|
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.
|
39
|
-
rspec-mocks (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.
|
42
|
-
rspec-support (3.
|
43
|
-
rubocop (1.
|
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.
|
61
|
+
parser (>= 3.3.0.2)
|
47
62
|
rainbow (>= 2.2.2, < 4.0)
|
48
|
-
regexp_parser (>=
|
63
|
+
regexp_parser (>= 2.4, < 3.0)
|
49
64
|
rexml (>= 3.2.5, < 4.0)
|
50
|
-
rubocop-ast (>= 1.
|
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.
|
54
|
-
parser (>= 3.
|
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 (
|
60
|
-
rubocop (~> 1.
|
61
|
-
|
62
|
-
|
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.
|
78
|
+
slimi (0.7.4)
|
67
79
|
temple
|
68
80
|
thor
|
69
81
|
tilt
|
70
|
-
|
71
|
-
|
72
|
-
|
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.
|
88
|
+
unicode-display_width (2.5.0)
|
76
89
|
|
77
90
|
PLATFORMS
|
78
91
|
x86_64-linux
|
data/lib/rubocop/slim/version.rb
CHANGED
@@ -30,10 +30,17 @@ module RuboCop
|
|
30
30
|
match_data = @ruby_clip.code.match(REGEXP)
|
31
31
|
if match_data
|
32
32
|
offset = match_data[0].length
|
33
|
-
|
33
|
+
condition = @ruby_clip.code[offset..].sub(/[ \t]then(?:[ \t].*)?/, '')
|
34
|
+
parse(
|
35
|
+
<<~RUBY
|
36
|
+
[
|
37
|
+
#{condition}
|
38
|
+
]
|
39
|
+
RUBY
|
40
|
+
).children.map do |child|
|
34
41
|
RubyClip.new(
|
35
42
|
code: child.location.expression.source,
|
36
|
-
offset: @ruby_clip.offset + offset + child.location.expression.begin_pos -
|
43
|
+
offset: @ruby_clip.offset + offset + child.location.expression.begin_pos - 4
|
37
44
|
)
|
38
45
|
end
|
39
46
|
else
|
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.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
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.
|
89
|
+
rubygems_version: 3.3.27
|
90
90
|
signing_key:
|
91
91
|
specification_version: 4
|
92
92
|
summary: RuboCop plugin for Slim template.
|