rubocop-erb 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/gemfiles/ruby_2.7.gemfile.lock +1 -1
- data/lib/rubocop/erb/version.rb +1 -1
- data/lib/rubocop/erb/when_decomposer.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49341b04ccc3098029bdd8f9b98b961825328a46623797e1a544e3264f16768b
|
4
|
+
data.tar.gz: eac652e2b1a040701290af19e4cded60a4cd53aa2849bc2aa5d1c9ddfefe7fee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3dd34349dc3eeea3925ad0b0d789e89efabc1ce0120f80ef64298e1b2b8b548936be1f7e4d10b7b2569a36685cc10170af706eeb3d982c08ac1d5638979e90c
|
7
|
+
data.tar.gz: 7705cb8f5537d18855c89e431fe40489f002a2c9a104b5662fa7bf20e967c23ae549507c42649819360180d1ee792b9980432b810ea1e17f4feb73d3b477f747
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rubocop-erb (0.5.
|
4
|
+
rubocop-erb (0.5.5)
|
5
5
|
better_html
|
6
6
|
rubocop (~> 1.45)
|
7
7
|
|
@@ -45,12 +45,12 @@ GEM
|
|
45
45
|
concurrent-ruby (~> 1.0)
|
46
46
|
json (2.7.2)
|
47
47
|
language_server-protocol (3.17.0.3)
|
48
|
-
loofah (2.
|
48
|
+
loofah (2.23.1)
|
49
49
|
crass (~> 1.0.2)
|
50
50
|
nokogiri (>= 1.12.0)
|
51
51
|
minitest (5.24.1)
|
52
52
|
mutex_m (0.2.0)
|
53
|
-
nokogiri (1.16.
|
53
|
+
nokogiri (1.16.8-x86_64-linux)
|
54
54
|
racc (~> 1.4)
|
55
55
|
parallel (1.25.1)
|
56
56
|
parser (3.3.4.0)
|
@@ -62,9 +62,9 @@ GEM
|
|
62
62
|
activesupport (>= 5.0.0)
|
63
63
|
minitest
|
64
64
|
nokogiri (>= 1.6)
|
65
|
-
rails-html-sanitizer (1.6.
|
65
|
+
rails-html-sanitizer (1.6.1)
|
66
66
|
loofah (~> 2.21)
|
67
|
-
nokogiri (
|
67
|
+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
68
68
|
rainbow (3.1.1)
|
69
69
|
rake (13.2.1)
|
70
70
|
regexp_parser (2.9.2)
|
data/lib/rubocop/erb/version.rb
CHANGED
@@ -37,13 +37,15 @@ module RuboCop
|
|
37
37
|
if match_data
|
38
38
|
offset = match_data[0].length
|
39
39
|
condition = @ruby_clip.code[offset..].sub(/[ \t]then(?:[ \t].*)?/, '')
|
40
|
-
parse(
|
40
|
+
nodes = parse(
|
41
41
|
<<~RUBY
|
42
42
|
[
|
43
43
|
#{condition}
|
44
44
|
]
|
45
45
|
RUBY
|
46
|
-
)
|
46
|
+
)&.children || []
|
47
|
+
|
48
|
+
nodes.map do |child|
|
47
49
|
RubyClip.new(
|
48
50
|
code: child.location.expression.source,
|
49
51
|
offset: @ruby_clip.offset + offset + child.location.expression.begin_pos - 4
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-erb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: better_html
|