rfmt 1.3.4-arm64-darwin → 1.4.1-arm64-darwin

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: 8777e1621fcc846ae89051bce61aba3e776ac96f6b1caa53d50a82ac174a0114
4
- data.tar.gz: 83561b71772fd889e3785c91492322d8b81283fd78c273153fe61c7231a7727d
3
+ metadata.gz: 0774b25da90bc10dc41acc2447a5955792c9f762b29c6e1df762b45c95845582
4
+ data.tar.gz: a360f9f9be15ed90f7faa4874ee3a4b61984dc5200acb45aff940e7bea2819fc
5
5
  SHA512:
6
- metadata.gz: 75c6966715907498d4310635d1456e71561a735d98feb71e48cc2d0031fa32a8998198d783e87404b77b0fff768fcfa8a4e37003033cc27e6628f7cb8f21505f
7
- data.tar.gz: 7ccf24628bf6871b45106d3c5a70962b895cb5f8f2033ec31141b58d5e5af5ce69f26d269d12a110cd21b7468db3a7f740b05e68bcd4f6ddf19af32f49b710ec
6
+ metadata.gz: aa1f6ed90cae75adc351274c025599d497b798d3a778ca535199d23c68fc3da81914d2891cce860f317cc798b1ce7c83d24188972df8f9984aff2a8a6b50b0bc
7
+ data.tar.gz: 9ac027d3044ae04802aa92866b79997034494584dddac8924bb01156cb51e686bb0caa23aab1444f48623b9f88dcf15304d1eb5d1fbc89a8819b3fdffed6a317
data/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.4.1] - 2026-01-17
4
+
5
+ ### Fixed
6
+ - Fixed comment positioning issue where standalone comments before `end` statements were incorrectly attached to previous code lines
7
+ - Improved comment semantic preservation to maintain developer's original placement intent
8
+ - Enhanced standalone comment detection logic to distinguish between inline and independent comments
9
+
10
+ ## [1.4.0] - 2026-01-17
11
+
12
+ ### Added
13
+ - New `rfmt_fast` executable for optimized performance
14
+ - Automatic parallel processing detection logic
15
+ - Enhanced logging and summary display functionality
16
+ - CLI option mapping for `-v/--version` commands
17
+
18
+ ### Fixed
19
+ - Fixed `-v` flag incorrectly triggering format instead of showing version
20
+ - Fixed `--diff` option dependency issues (added `diffy` and `diff-lcs` to gemspec)
21
+ - CLI option conflicts between verbose and version flags
22
+
23
+ ### Changed
24
+ - Updated performance benchmarks documentation
25
+ - Code formatting improvements with Rubocop compliance
26
+ - Dependencies alphabetically sorted in gemspec
27
+
3
28
  ## [1.3.4] - 2026-01-17
4
29
 
5
30
  ### Added
data/README.md CHANGED
@@ -46,33 +46,31 @@ Enforces code style rules:
46
46
  - Quote style standardization
47
47
  - Method definition formatting
48
48
 
49
- ## Performance Benchmarks
49
+ ## Performance
50
50
 
51
- Execution time comparison on a Rails project (111 files, 3,241 lines):
51
+ rfmt delivers consistent, fast formatting across projects of any size:
52
52
 
53
- | Test Type | Files | rfmt | RuboCop | Ratio |
54
- |-----------|-------|------|---------|-------|
55
- | Single File | 1 | 191ms | 1.38s | 7.2x |
56
- | Directory | 14 | 176ms | 1.68s | 9.6x |
57
- | Full Project (check) | 111 | 172ms | 4.36s | 25.4x |
53
+ | Project Size | Files | Execution Time | Throughput |
54
+ |-------------|-------|----------------|------------|
55
+ | Small | 9 files | ~105ms | 85 files/sec |
56
+ | Medium | 35 files | ~110ms | 315 files/sec |
57
+ | Large | 151 files | ~100ms | 1,560 files/sec |
58
58
 
59
- **About this comparison:**
60
- - RuboCop times include startup overhead and loading all cops (linting rules)
61
- - RuboCop was run with default configuration (all cops enabled)
62
- - rfmt is a formatting-only tool with minimal overhead
63
- - Both tools were measured in check mode (no file modifications)
64
- - Results are averages from 10 runs per test
59
+ **Key Performance Characteristics:**
65
60
 
66
- **Observations:**
67
- - rfmt execution time remains constant (172-191ms) regardless of file count
68
- - Low variance across runs (standard deviation: 8-23ms)
61
+ - **Constant Time**: Execution time stays around 100ms regardless of project size
62
+ - **Parallel Processing**: Automatic scaling with available CPU cores
63
+ - **High Throughput**: Up to 1,500+ files per second on large projects
64
+ - **Low Overhead**: Minimal startup time and memory usage
69
65
 
70
66
  **Test Environment:**
71
67
  - CPU: Apple Silicon (arm64)
72
- - Ruby: 3.4.5
73
- - rfmt: 0.3.0, RuboCop: 1.81.7
68
+ - Ruby: 3.4.8
69
+ - Average of 5 runs per test
74
70
 
75
- See [detailed benchmark report](docs/benchmark.md) for complete data.
71
+ *Built with Rust for optimal performance and memory efficiency.*
72
+
73
+ For detailed performance comparisons and benchmarks, see [Performance Benchmarks](docs/benchmark.md).
76
74
 
77
75
  ## Installation
78
76
 
Binary file
Binary file
Binary file
data/lib/rfmt/cli.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  require 'thor'
4
4
 
5
5
  # Check for verbose flag before loading rfmt to set debug mode early
6
- ENV['RFMT_DEBUG'] = '1' if ARGV.include?('-v') || ARGV.include?('--verbose')
6
+ ENV['RFMT_DEBUG'] = '1' if ARGV.include?('--verbose')
7
7
 
8
8
  require 'rfmt'
9
9
  require 'rfmt/configuration'
@@ -49,10 +49,14 @@ module Rfmt
49
49
  PROGRESS_INTERVAL = 10 # Update progress every N files
50
50
 
51
51
  class_option :config, type: :string, desc: 'Path to configuration file'
52
- class_option :verbose, type: :boolean, aliases: '-v', desc: 'Verbose output'
52
+ class_option :verbose, type: :boolean, desc: 'Verbose output'
53
53
 
54
54
  default_command :format
55
55
 
56
+ # Map -v and --version to version command
57
+ map '-v' => 'version'
58
+ map '--version' => 'version'
59
+
56
60
  desc 'format [FILES]', 'Format Ruby files (default command)'
57
61
  option :write, type: :boolean, default: true, desc: 'Write formatted output'
58
62
  option :check, type: :boolean, desc: "Check if files are formatted (don't write)"
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.3.4'
4
+ VERSION = '1.4.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rfmt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.4.1
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - fujitani sora
@@ -9,7 +9,49 @@ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
11
  date: 2026-01-17 00:00:00.000000000 Z
12
- dependencies: []
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: diff-lcs
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.5'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: diffy
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.4'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.4'
41
+ - !ruby/object:Gem::Dependency
42
+ name: thor
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.3'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.3'
13
55
  description: Write a longer description or delete this line.
14
56
  email:
15
57
  - fujitanisora0414@gmail.com