Skip to content

Reduce gem size by excluding test files#52

Merged
heyvaleria merged 1 commit intothoughtbot:mainfrom
yuri-zubov:reduce-gem-size
Mar 31, 2026
Merged

Reduce gem size by excluding test files#52
heyvaleria merged 1 commit intothoughtbot:mainfrom
yuri-zubov:reduce-gem-size

Conversation

@yuri-zubov
Copy link
Copy Markdown
Contributor

This pull request updates the *.gemspec file to optimize the gem package size and structure

$ gem build -o before.tar

$ git switch reduce-gem-size

$ gem build -o after.tar

$ du -sh before.tar after.tar
 20K	before.tar
 12K	after.tar
Metric Before After Saved
Size 20K 12K −8K (⏷ −40%)

whitch files was deleted?

data
-├── .github
-│   └── workflows
-│       ├── ci.yml
-│       ├── dynamic-readme.yml
-│       └── dynamic-security.yml
-├── .gitignore
-├── CODEOWNERS
-├── Gemfile
-├── GOALS
 ├── lib
 │   ├── terrapin
 │   │   ├── command_line
 │   │   │   ├── multi_pipe.rb
 │   │   │   ├── output.rb
 │   │   │   ├── runners
 │   │   │   │   ├── backticks_runner.rb
 │   │   │   │   ├── fake_runner.rb
 │   │   │   │   ├── popen_runner.rb
 │   │   │   │   └── process_runner.rb
 │   │   │   └── runners.rb
 │   │   ├── command_line.rb
 │   │   ├── exceptions.rb
 │   │   ├── os_detector.rb
 │   │   └── version.rb
 │   └── terrapin.rb
 ├── LICENSE
 ├── NEWS.md
-├── Rakefile
 ├── README.md
-├── SECURITY.md
-├── spec
-│   ├── spec_helper.rb
-│   ├── support
-│   │   ├── fake_logger.rb
-│   │   ├── have_output.rb
-│   │   ├── nonblocking_examples.rb
-│   │   ├── stub_os.rb
-│   │   └── with_exitstatus.rb
-│   └── terrapin
-│       ├── command_line
-│       │   ├── output_spec.rb
-│       │   └── runners
-│       │       ├── backticks_runner_spec.rb
-│       │       ├── fake_runner_spec.rb
-│       │       ├── popen_runner_spec.rb
-│       │       └── process_runner_spec.rb
-│       ├── command_line_spec.rb
-│       ├── errors_spec.rb
-│       ├── os_detector_spec.rb
-│       └── runners_spec.rb
-└── terrapin.gemspec

ps: you can see on rails repo

@yuri-zubov yuri-zubov requested a review from cpytel as a code owner February 7, 2026 11:42
Copy link
Copy Markdown

@heyvaleria heyvaleria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@heyvaleria heyvaleria merged commit 1b8583d into thoughtbot:main Mar 31, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants