rfmt 1.3.4-x86_64-darwin → 1.4.0-x86_64-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: b8d59160d40150d18b86924028979b1b0d60cc23ddefa213a4ef46af0094b212
4
- data.tar.gz: f772cb63dc998fbb2decd2683f5977a4e69a3b8d12815b5624050a99a2adba48
3
+ metadata.gz: 84a9b3a985d9565b53aa3f1b58cbedc9e30a05e0cd88d2c477403b4c0eac20d4
4
+ data.tar.gz: 9b006a05cae16a64751b1e2a94de84f22d2baf11780861c8c225bb597504f02e
5
5
  SHA512:
6
- metadata.gz: 9fdb4fa858e8baefecd1113bd90d8fed1ffe4099515df6a764b459113f13f3d2debbaa44d7ad4d31cb0149d3f4209fd8eb41e74b0ef913930940a7fa408301ac
7
- data.tar.gz: c603aeaa4bac1fd0472686f5efe5f0188a761005a99568841bd6fd5eac5b0cafb1489b236be8cb155e31a8b708a94b5440548deb92422b67581cf1f4a57fbe66
6
+ metadata.gz: 60d83532c67fd87745933ce2076f422bbad917421ec058fff5fd8d407adfb41a5ea2cf8fdaf988c186affcd49734d470e36fb13eca8f4422210a4268ec0e5d5c
7
+ data.tar.gz: 148ced8b677143bdeebb15428dda84b2ad44dd1c44ded99d2413a26ed654f3c84cb104f523a06dc0a693cbbabd5758342b40bf2e2530359fef904f9789a6884c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.4.0] - 2026-01-17
4
+
5
+ ### Added
6
+ - New `rfmt_fast` executable for optimized performance
7
+ - Automatic parallel processing detection logic
8
+ - Enhanced logging and summary display functionality
9
+ - CLI option mapping for `-v/--version` commands
10
+
11
+ ### Fixed
12
+ - Fixed `-v` flag incorrectly triggering format instead of showing version
13
+ - Fixed `--diff` option dependency issues (added `diffy` and `diff-lcs` to gemspec)
14
+ - CLI option conflicts between verbose and version flags
15
+
16
+ ### Changed
17
+ - Updated performance benchmarks documentation
18
+ - Code formatting improvements with Rubocop compliance
19
+ - Dependencies alphabetically sorted in gemspec
20
+
3
21
  ## [1.3.4] - 2026-01-17
4
22
 
5
23
  ### 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.0'
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.0
5
5
  platform: x86_64-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