Skip to content

Reduce gem size by excluding test files - #965

Merged
y-yagi merged 1 commit into
drapergem:masterfrom
yuri-zubov:reduce-gem-size
May 29, 2026
Merged

Reduce gem size by excluding test files#965
y-yagi merged 1 commit into
drapergem:masterfrom
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
 36K	before.tar
 32K	after.tar
Metric Before After Saved
Size 36K 32K −4K (⏷ −11.1%)

whitch files was deleted?

data
 ├── lib
 │   ├── draper
 │   │   ├── compatibility
 │   │   │   ├── api_only.rb
 │   │   │   ├── broadcastable.rb
 │   │   │   └── global_id.rb
 │   │   ├── decoratable
 │   │   │   ├── collection_proxy.rb
 │   │   │   └── equality.rb
 │   │   ├── query_methods
 │   │   │   └── load_strategy.rb
 │   │   ├── tasks
 │   │   │   └── test.rake
 │   │   ├── test
 │   │   │   ├── devise_helper.rb
 │   │   │   ├── minitest_integration.rb
 │   │   │   └── rspec_integration.rb
 │   │   ├── view_context
 │   │   │   └── build_strategy.rb
 │   │   ├── automatic_delegation.rb
 │   │   ├── collection_decorator.rb
 │   │   ├── configuration.rb
 │   │   ├── decoratable.rb
 │   │   ├── decorated_association.rb
 │   │   ├── decorates_assigned.rb
 │   │   ├── decorator.rb
 │   │   ├── delegation.rb
 │   │   ├── factory.rb
 │   │   ├── finders.rb
 │   │   ├── helper_proxy.rb
 │   │   ├── helper_support.rb
 │   │   ├── lazy_helpers.rb
 │   │   ├── query_methods.rb
 │   │   ├── railtie.rb
 │   │   ├── test_case.rb
 │   │   ├── undecorate.rb
 │   │   ├── version.rb
 │   │   ├── view_context.rb
 │   │   └── view_helpers.rb
 │   ├── generators
 │   │   ├── draper
 │   │   │   ├── templates
 │   │   │   │   └── application_decorator.rb
 │   │   │   └── install_generator.rb
 │   │   ├── mini_test
 │   │   │   ├── templates
 │   │   │   │   ├── decorator_spec.rb
 │   │   │   │   └── decorator_test.rb
 │   │   │   └── decorator_generator.rb
 │   │   ├── rails
 │   │   │   ├── templates
 │   │   │   │   └── decorator.rb
 │   │   │   └── decorator_generator.rb
 │   │   ├── rspec
 │   │   │   ├── templates
 │   │   │   │   └── decorator_spec.rb
 │   │   │   └── decorator_generator.rb
 │   │   ├── test_unit
 │   │   │   ├── templates
 │   │   │   │   └── decorator_test.rb
 │   │   │   └── decorator_generator.rb
 │   │   └── controller_override.rb
 │   └── draper.rb
-├── .codeclimate.yml
-├── .rspec
-├── .rubocop.yml
-├── .yardopts
 ├── CHANGELOG.md
-├── CONTRIBUTING.md
-├── Guardfile
 ├── LICENSE
-├── Rakefile
 └── README.md

ps: you can see on rails repo

@Alexander-Senko
Alexander-Senko requested a review from y-yagi May 29, 2026 10:02

@y-yagi y-yagi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Test files are already exculde by #945. So the benefit of this PR is small.
But, considering the current situation, we may add AI related files to the repositroy. Considering it, limiting files for gemspec is better.

@y-yagi
y-yagi merged commit 7fc015f into drapergem:master May 29, 2026
18 checks passed
@y-yagi

y-yagi commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

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