rubocop-slim 0.2.3 → 0.2.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: 67f8c2766d006c2a0bfeb0545447f9341835f513586607013223ee8a230cb758
4
- data.tar.gz: 5179018956184557d263b8da88636f49c48cfda214a79c46176eb3a03d77e9c5
3
+ metadata.gz: acd8c1d290c8711b0b4877edb6ec304359d7ad7c6fcfdc191001441d0a3125f6
4
+ data.tar.gz: 748d147c34bc080f1f2b944dfe61421d62395a0585103a1b665e75f05dcc5fa2
5
5
  SHA512:
6
- metadata.gz: 63f33eb8d47b284ff60dac4965b57e5b514e6f5570a26a3b2c3f9e79dfe793ac63ff8d40b4749894a5d9324c06ad686805ddcd40bd1c7e190da590df345b8588
7
- data.tar.gz: 41d5cd785d46525a1027db215a4840e627f8b03ec64f64c61cc21c2b298fed8357c10ff507d23b9748f691124e72d6eaa5b34702e3d7bbbbc493b921fa227b94
6
+ metadata.gz: f2fa7a6c42f0a089c8f2917c0dff4fc9087d7daebd855b277faeb59c345cdbb32f5805c74247f5d40065a88859757b57dbd0c3f5eb77747597ff19743aa2ba1a
7
+ data.tar.gz: add4a21478c6e0340436bfa84264f3e1b645a4da1ba1e0db5d60a7064340e34c328ec3d6e9d46ed0dd8e2f65d1c89c7949bbb3fba50e2374f06f1c17361e0899
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop-slim (0.2.3)
4
+ rubocop-slim (0.2.5)
5
5
  rubocop (~> 1.45)
6
6
  slimi (~> 0.7)
7
7
 
@@ -91,6 +91,7 @@ module RuboCop
91
91
  [ \t]*
92
92
  (\|[^|]*\|)?
93
93
  [ \t]*
94
+ (\#.*)?
94
95
  \Z
95
96
  /x.freeze
96
97
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Slim
5
- VERSION = '0.2.3'
5
+ VERSION = '0.2.5'
6
6
  end
7
7
  end
@@ -31,10 +31,16 @@ module RuboCop
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("[#{condition}]").children.map do |child|
34
+ parse(
35
+ <<~RUBY
36
+ [
37
+ #{condition}
38
+ ]
39
+ RUBY
40
+ ).children.map do |child|
35
41
  RubyClip.new(
36
42
  code: child.location.expression.source,
37
- offset: @ruby_clip.offset + offset + child.location.expression.begin_pos - 1
43
+ offset: @ruby_clip.offset + offset + child.location.expression.begin_pos - 4
38
44
  )
39
45
  end
40
46
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-slim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura