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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 877390d14fe06387c7cfd3bd589030e34f2b8734467e9ee291c0733d1f5a2eef
4
- data.tar.gz: 3a5aec17cb87b8f386dac6aa954bee5065e2f3dad0b90aad10e0b9288892c7ac
3
+ metadata.gz: 49341b04ccc3098029bdd8f9b98b961825328a46623797e1a544e3264f16768b
4
+ data.tar.gz: eac652e2b1a040701290af19e4cded60a4cd53aa2849bc2aa5d1c9ddfefe7fee
5
5
  SHA512:
6
- metadata.gz: b3f345e09bbb26bbb949e179aec06a5fdcf3a34e6bc1a60c33258d8f81ae3bbd08b014324dc082d40bdeb4c915ce25707c57a6d4a9215d17ab73a307c4442443
7
- data.tar.gz: 355f7e581f3f9045dfd1f1dfe7f143836870ff1b9b14f22f9bb3e05e6af63693458ebc8023089763ea726ecd2c0b4dee9f5c91783e9af1e6830d1256a231334a
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)
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.22.0)
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.7-x86_64-linux)
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.0)
65
+ rails-html-sanitizer (1.6.1)
66
66
  loofah (~> 2.21)
67
- nokogiri (~> 1.14)
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)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- rubocop-erb (0.5.4)
4
+ rubocop-erb (0.5.5)
5
5
  better_html
6
6
  rubocop (~> 1.45)
7
7
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Erb
5
- VERSION = '0.5.4'
5
+ VERSION = '0.5.5'
6
6
  end
7
7
  end
@@ -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
- ).children.map do |child|
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
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-10-01 00:00:00.000000000 Z
11
+ date: 2024-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: better_html