super-slim 3.6.0 → 3.6.1

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: 80dad2f87ffeca714cec78be16f94bea2271a13f0c095a9d4b6809f1fd256b85
4
- data.tar.gz: 7b7da5b1350e4ddb1e27519d2bf6d80136ce27b9ce55b492ec06b6e8fb67deaa
3
+ metadata.gz: d1568a882b755a5b9ca670180181b338cae76cac844ba48f4dc8261fe7e34b9a
4
+ data.tar.gz: 82880eb76f27282dfe0a0ce6bdf0537f499542fd7a34b930cc7edf5053a83a85
5
5
  SHA512:
6
- metadata.gz: f5836cf9c4c31086aee7e4de49fce6179796ff8858e5f3f78851a091b0489fdc31e39b66dfcf32ae0513cb622af8299d4bc125aaec1b8a5af3c113adfeb6698f
7
- data.tar.gz: 396e25566bd11a16442861680472c09b5deffccac68b0c47ed5fbc49917422802e3d04646853a78e08b67ca74f47b6f13f2e7a87ca5e406df2102c39c4f6f121
6
+ metadata.gz: f8f4f4de4d758739431959ad1957e258cf4771bb25f366a88b5588aed634d04c34982538d340e1a7e26530e2b0ed1279d1710eae37440a5bdc661806caf652f7
7
+ data.tar.gz: 1bf1391bd1ba59fc6879ab4159b236f2a393caee9983db47d3b07b9ff949b38d356cd85ebfa86bbae71f2a791088b15b4f7c803f29ca3e57517ae510e8d86b18
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [3.6.1] — 2026-11-11
6
+
7
+ One fix: `InstanceVariables` no longer reports an `@` that no name follows.
8
+
9
+ **Fixed**
10
+ - `InstanceVariables` no longer reports ``Pass `@` to the partial as a local`` on an `@` that no name follows, as in
11
+ the `_form.html.slim` scaffold template simple_form installs, `= simple_form_for(@<%= singular_table_name %>)`. 3.6.0
12
+ did, 3.5.0 did not.
13
+
5
14
  ## [3.6.0] — 2026-11-11
6
15
 
7
16
  The linter reads all the Ruby of a template and `.super-slim.yml` is checked when it is read: `super-slim lint` may
@@ -299,7 +308,8 @@ renders what Slim 5 renders with `format: :html, sort_attrs: false`, byte for by
299
308
  - Ruby 3.3 or later, every Ruby still maintained, Rails 8.0 or 8.1 for the railtie, and strscan 3.1.1 or later,
300
309
  newer than the one Ruby 3.3 ships.
301
310
 
302
- [Unreleased]: https://github.com/levups/super-slim/compare/v3.6.0...HEAD
311
+ [Unreleased]: https://github.com/levups/super-slim/compare/v3.6.1...HEAD
312
+ [3.6.1]: https://github.com/levups/super-slim/compare/v3.6.0...v3.6.1
303
313
  [3.6.0]: https://github.com/levups/super-slim/compare/v3.5.0...v3.6.0
304
314
  [3.5.0]: https://github.com/levups/super-slim/compare/v3.4.1...v3.5.0
305
315
  [3.4.1]: https://github.com/levups/super-slim/compare/v3.4.0...v3.4.1
@@ -319,7 +319,10 @@ module SuperSlim
319
319
  return variable_by_line unless code.include?("@")
320
320
 
321
321
  Prism.lex(code).value.each do |token,|
322
- variable_by_line[token.location.start_line] ||= token.value if token.type == :INSTANCE_VARIABLE
322
+ # An `@` that no name follows is lexed as one too: `@<%= name %>` in a generator's template.
323
+ next unless token.type == :INSTANCE_VARIABLE && token.value != "@"
324
+
325
+ variable_by_line[token.location.start_line] ||= token.value
323
326
  end
324
327
  variable_by_line
325
328
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SuperSlim
4
- VERSION = "3.6.0"
4
+ VERSION = "3.6.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: super-slim
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Level UP Solutions