Skip to content

Reduce gem size by excluding test files#61

Open
yuri-zubov wants to merge 2 commits intoredis-store:masterfrom
yuri-zubov:reduce-gem-size
Open

Reduce gem size by excluding test files#61
yuri-zubov wants to merge 2 commits intoredis-store:masterfrom
yuri-zubov:reduce-gem-size

Conversation

@yuri-zubov
Copy link
Copy Markdown

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.gz after.tar
16K	before.tar
 12K	after.tar
Metric Before After Saved
Size 16K 12K −4K (⏷ −25%)

whitch files was deleted?

data
-├── gemfiles
-│   ├── rails_5.0.gemfile
-│   ├── rails_5.1.gemfile
-│   ├── rails_5.2.gemfile
-│   ├── rails_6.0.gemfile
-│   ├── rails_6.1.gemfile
-│   ├── rails_7.0.gemfile
-│   ├── rails_7.1.gemfile
-│   ├── rails_7.2.gemfile
-│   └── rails_8.0.gemfile
 ├── lib
 │   ├── action_dispatch
 │   │   └── middleware
 │   │       └── session
 │   │           └── redis_store.rb
 │   ├── redis
 │   │   └── actionpack
 │   │       └── version.rb
 │   └── redis-actionpack.rb
-├── test
-│   ├── dummy
-│   │   ├── app
-│   │   │   ├── controllers
-│   │   │   │   └── test_controller.rb
-│   │   │   └── views
-│   │   │       └── test
-│   │   │           ├── get_session_id.html.erb
-│   │   │           └── get_session_value.html.erb
-│   │   ├── config
-│   │   │   ├── application.rb
-│   │   │   ├── boot.rb
-│   │   │   ├── environment.rb
-│   │   │   └── routes.rb
-│   │   ├── config.ru
-│   │   └── Rakefile
-│   ├── fixtures
-│   │   └── session_autoload_test
-│   │       └── session_autoload_test
-│   │           └── foo.rb
-│   ├── integration
-│   │   ├── default
-│   │   │   └── redis_store_integration_test.rb
-│   │   └── rails7.2
-│   │       └── redis_store_integration_test.rb
-│   └── test_helper.rb
-├── Appraisals
-├── CODEOWNERS
-├── Gemfile
 ├── CHANGELOG.md
 ├── MIT-LICENSE
-├── Rakefile
 ├── README.md
-└── redis-actionpack.gemspec

ps: you can see on rails repo

@yuri-zubov yuri-zubov requested a review from tubbo as a code owner March 7, 2026 04:33
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.

1 participant