rubocop-rbs_inline 1.5.1 → 1.5.2

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: '00947d7a01908093d8cd62383b06d9b944b5b5f33de6f900c0e1d7397a780156'
4
- data.tar.gz: 884446ced80f488bcd8397d5b9c9461e8c111564400a0b5fe89024b6d36c41eb
3
+ metadata.gz: 493b7e1647144c43522e4942ef4bcfbf5c79212f9fbe8640faf31e4431f9c8bd
4
+ data.tar.gz: be48b787c6ca85eab710bd9dbb32cba5a8d0854668d87ea0f86142b330585f27
5
5
  SHA512:
6
- metadata.gz: ef3cfff6c721505beb2de6f0f57cdafe776f0bec6dbeb8c175562738879a986e09b08ae0a9d4a11038d9e70beda1a453d426efb8b9566d9a0ffc65e097ac0847
7
- data.tar.gz: 669626ab0e4a5a08630508ff99bef9c2d7f606a79edcfafd46746b173a2e44e67ac2e51b1a0857ceddb55005dfe66a9acd8741a1ac1737cb101c8a562a88c8ee
6
+ metadata.gz: 35ac9302a3b6d02143db3168c5439732461816077b675ad150a6957933284d6124b30065c112f9fdf75364cc6203afef3a3dba68948c9d5edba05571ec3c3a3c
7
+ data.tar.gz: 6ce6535243b8f0ef9f17aff0d41ca646ebc07b3fbb6271c1a46715b6c63226e1662795cce9dc864cfbbf3c3f2b5023c8d3729581e495f68f519c0978d4283c9c
@@ -1,28 +1,15 @@
1
1
  #!/bin/bash
2
+ set -euo pipefail
2
3
 
3
- # Initialize rbenv for Claude Code on the Web
4
- eval "$(rbenv init -)"
5
-
6
- # Install dependencies
7
- # Note: Bundler 4.0.3 has a bug with Ruby 3.3.x causing CGI class variable errors.
8
- # Install and use Bundler 2.x to avoid this issue.
9
- gem install bundler -v 2.7.2 --no-document
10
- bundle _2.7.2_ install
11
-
12
- # Install dependencies for each gem directory (directories with .gemspec files)
13
- for gemspec in "$CLAUDE_PROJECT_DIR"/*/*.gemspec; do
14
- if [[ -f "$gemspec" ]]; then
15
- gem_dir=$(dirname "$gemspec")
16
- if [[ -f "$gem_dir/Gemfile" ]]; then
17
- echo "Installing dependencies for $(basename "$gem_dir")..."
18
- (cd "$gem_dir" && bundle _2.7.2_ install)
19
- fi
20
- fi
21
- done
22
-
23
- # Persist environment for subsequent commands
24
- if [ -n "$CLAUDE_ENV_FILE" ]; then
25
- echo 'eval "$(rbenv init -)"' >> "$CLAUDE_ENV_FILE"
4
+ # Only run in Claude Code on the web (remote environment)
5
+ if [ "${CLAUDE_CODE_REMOTE:-}" != "true" ]; then
6
+ exit 0
26
7
  fi
27
8
 
28
- exit 0
9
+ # Bundler 4.0 + Ruby 3.3 compatibility workaround:
10
+ # Bundler 4.0's vendored net-http-persistent uses CGI.unescape which
11
+ # references @@accept_charset before it's initialized in Ruby 3.3.
12
+ # Pre-loading the CGI library via RUBYOPT resolves this.
13
+ echo 'export RUBYOPT="-rcgi"' >> "$CLAUDE_ENV_FILE"
14
+
15
+ RUBYOPT="-rcgi" bundle install
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.5.2 (2026-02-26)
4
+
5
+ ### Bug Fixes
6
+
7
+ - **Style/RbsInline/EmbeddedRbsSpacing**: No longer reports an offense when a `@rbs!` comment appears at the end of a class or module body (i.e. immediately before `end`). Adding a blank line before `end` is not recommended in Ruby style guides.
8
+
3
9
  ## 1.5.1 (2026-02-24)
4
10
 
5
11
  ### Bug Fixes
@@ -54,11 +54,17 @@ module RuboCop
54
54
  next_line_number = last_comment.location.start_line + 1
55
55
 
56
56
  return if blank_line?(next_line_number)
57
+ return if block_end_line?(next_line_number)
57
58
 
58
59
  add_offense(line_range(next_line_number)) do |corrector|
59
60
  corrector.insert_before(line_range(next_line_number), "\n")
60
61
  end
61
62
  end
63
+
64
+ # @rbs line_number: Integer
65
+ def block_end_line?(line_number) #: bool
66
+ source_code_at(line_number).strip.match?(/\Aend\b/)
67
+ end
62
68
  end
63
69
  end
64
70
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module RbsInline
5
- VERSION = '1.5.1'
5
+ VERSION = '1.5.2'
6
6
  end
7
7
  end
@@ -38,6 +38,9 @@ module RuboCop
38
38
 
39
39
  # @rbs annotation: RBS::Inline::AST::Annotations::Embedded
40
40
  def check_embedded_annotation: (RBS::Inline::AST::Annotations::Embedded annotation) -> void
41
+
42
+ # @rbs line_number: Integer
43
+ def block_end_line?: (Integer line_number) -> bool
41
44
  end
42
45
  end
43
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-rbs_inline
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takeshi KOMIYA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-02-23 00:00:00.000000000 Z
11
+ date: 2026-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lint_roller