rfmt 1.4.1-x86_64-linux → 1.5.0-x86_64-linux

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: 26c58dcd3bb39dd502cf8e9b6e78d19f3174b7f6c5e47a66bb6895847269404f
4
- data.tar.gz: 6306da0c7f60fe221b880463140a61db6b546ecd391d83ddbf0a21dd06c0d54b
3
+ metadata.gz: 4053802615829cdc5486152d505d85c507525e2fa1a9988114439239434bcdba
4
+ data.tar.gz: 1e3cffc87f7e060e578cfb1691e1bf3b1a0e36a7f11ce5f3e1163c16c43962d0
5
5
  SHA512:
6
- metadata.gz: bc69c44d7d91c779b2b8a0bccddbbd2a0c9130ea750e35ff50a99df024cfe7065538fde2d790d4b74545c9e99cdaa7f8a7f10a70fb5b66d23106a29fc7f4140e
7
- data.tar.gz: 05172e13612bfb09f58c4acbd7b59255511ea0653dbdeee075ecd36babb6795ac3a09e341863c2e5eca7df9316250dd4486061dfc7b9d74a3c8c99d88adb7d1b
6
+ metadata.gz: 90bfc6e61e4e92ef0e409fae6f96813830b8e54c295fb1c8e651fa9c558fbe6cacf032c37429020ac342ea7f37c75edd2fd7f8112bb7d95e5742e0c3e435045f
7
+ data.tar.gz: cca2ccfeba96a13a0101055b4b7e878695f6b7e615e5c7b091e9c96a33a984776cfae83e02f994efa1837dda272285308468cbfe0b96446bda6dbbf68a1482f4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.5.0] - 2026-01-25
4
+
5
+ ### Added
6
+ - Docker Compose test environment setup (#84)
7
+ - Support for `then` expression emission (#80)
8
+ - CI support for Ruby 3.4 and Ruby 4 (#82)
9
+
10
+ ### Changed
11
+ - Upgrade Magnus (Rust-Ruby FFI library) (#83)
12
+ - Optimize Docker build with multi-stage and caching (#84)
13
+ - Upgrade unicode-emoji dependency
14
+
15
+ ### Fixed
16
+ - Preserve heredoc content and closing identifier (#81)
17
+ - Fix `rescue`/`ensure` clauses being deleted inside `do...end` blocks (#78)
18
+ - Fix inline comment node handling (#77)
19
+ - Fix BTreeMap range error (Issue #71)
20
+
3
21
  ## [1.4.1] - 2026-01-17
4
22
 
5
23
  ### Fixed
data/lib/rfmt/3.3/rfmt.so CHANGED
Binary file
Binary file
@@ -108,13 +108,42 @@ module Rfmt
108
108
  # Extract location information from node
109
109
  def self.extract_location(node)
110
110
  loc = node.location
111
+
112
+ # For heredoc nodes, the location only covers the opening tag (<<~CSV)
113
+ # We need to find the maximum end_offset including closing_loc
114
+ end_offset = loc.end_offset
115
+ end_line = loc.end_line
116
+ end_column = loc.end_column
117
+
118
+ # Check this node's closing_loc
119
+ if node.respond_to?(:closing_loc) && node.closing_loc
120
+ closing = node.closing_loc
121
+ if closing.end_offset > end_offset
122
+ end_offset = closing.end_offset
123
+ end_line = closing.end_line
124
+ end_column = closing.end_column
125
+ end
126
+ end
127
+
128
+ # Check child nodes for heredoc (e.g., LocalVariableWriteNode containing StringNode)
129
+ node.child_nodes.compact.each do |child|
130
+ next unless child.respond_to?(:closing_loc) && child.closing_loc
131
+
132
+ closing = child.closing_loc
133
+ next unless closing.end_offset > end_offset
134
+
135
+ end_offset = closing.end_offset
136
+ end_line = closing.end_line
137
+ end_column = closing.end_column
138
+ end
139
+
111
140
  {
112
141
  start_line: loc.start_line,
113
142
  start_column: loc.start_column,
114
- end_line: loc.end_line,
115
- end_column: loc.end_column,
143
+ end_line: end_line,
144
+ end_column: end_column,
116
145
  start_offset: loc.start_offset,
117
- end_offset: loc.end_offset
146
+ end_offset: end_offset
118
147
  }
119
148
  end
120
149
 
@@ -176,6 +205,7 @@ module Rfmt
176
205
  [
177
206
  node.statements,
178
207
  node.rescue_clause,
208
+ node.else_clause,
179
209
  node.ensure_clause
180
210
  ].compact
181
211
  when Prism::EnsureNode
data/lib/rfmt/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rfmt
4
- VERSION = '1.4.1'
4
+ VERSION = '1.5.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rfmt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.5.0
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - fujitani sora
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-01-17 00:00:00.000000000 Z
11
+ date: 2026-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diff-lcs
@@ -65,9 +65,8 @@ files:
65
65
  - README.md
66
66
  - exe/rfmt
67
67
  - lib/rfmt.rb
68
- - lib/rfmt/3.1/rfmt.so
69
- - lib/rfmt/3.2/rfmt.so
70
68
  - lib/rfmt/3.3/rfmt.so
69
+ - lib/rfmt/3.4/rfmt.so
71
70
  - lib/rfmt/cache.rb
72
71
  - lib/rfmt/cli.rb
73
72
  - lib/rfmt/configuration.rb
@@ -94,10 +93,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
94
93
  requirements:
95
94
  - - ">="
96
95
  - !ruby/object:Gem::Version
97
- version: '3.1'
96
+ version: '3.3'
98
97
  - - "<"
99
98
  - !ruby/object:Gem::Version
100
- version: 3.4.dev
99
+ version: 3.5.dev
101
100
  required_rubygems_version: !ruby/object:Gem::Requirement
102
101
  requirements:
103
102
  - - ">="
data/lib/rfmt/3.1/rfmt.so DELETED
Binary file
data/lib/rfmt/3.2/rfmt.so DELETED
Binary file