Skip to content

Reduce gem size by excluding test files#893

Open
yuri-zubov wants to merge 1 commit intozdennis:masterfrom
yuri-zubov:reduce-gem-size
Open

Reduce gem size by excluding test files#893
yuri-zubov wants to merge 1 commit intozdennis: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.gz

$ git switch reduce-gem-size

$ gem build -o after.tar.gz

$ du -sh before.tar.gz after.tar.gz
76K   before.tar.gz
40K   after.tar.gz
Metric Before After Saved
Size 76K 40K −36K (⏷ −47.4%)

whitch files was deleted?

 data
-├── .github
-│   └── workflows
-│       └── test.yaml
-├── .gitignore
-├── .rubocop_todo.yml
-├── .rubocop.yml
-├── activerecord-import.gemspec
-├── benchmarks
-│   ├── benchmark.rb
-│   ├── lib
-│   │   ├── base.rb
-│   │   ├── cli_parser.rb
-│   │   ├── float.rb
-│   │   ├── mysql2_benchmark.rb
-│   │   ├── output_to_csv.rb
-│   │   └── output_to_html.rb
-│   ├── models
-│   │   ├── test_innodb.rb
-│   │   ├── test_memory.rb
-│   │   └── test_myisam.rb
-│   ├── README
-│   └── schema
-│       └── mysql2_schema.rb
-├── Brewfile
 ├── CHANGELOG.md
-├── docker-compose.yml
-├── Dockerfile
-├── Gemfile
-├── gemfiles
-│   ├── 5.2.gemfile
-│   ├── 6.0.gemfile
-│   ├── 6.1.gemfile
-│   ├── 7.0.gemfile
-│   ├── 7.1.gemfile
-│   ├── 7.2.gemfile
-│   ├── 8.0.gemfile
-│   └── 8.1.gemfile
 ├── lib
 │   ├── activerecord-import
 │   │   ├── active_record
 │   │   │   └── adapters
 │   │   │       ├── abstract_adapter.rb
 │   │   │       ├── jdbcmysql_adapter.rb
 │   │   │       ├── jdbcpostgresql_adapter.rb
 │   │   │       ├── jdbcsqlite3_adapter.rb
 │   │   │       ├── mysql2_adapter.rb
 │   │   │       ├── mysql2_proxy_adapter.rb
 │   │   │       ├── postgresql_adapter.rb
 │   │   │       ├── postgresql_proxy_adapter.rb
 │   │   │       ├── seamless_database_pool_adapter.rb
 │   │   │       ├── sqlite3_adapter.rb
 │   │   │       ├── sqlite3_proxy_adapter.rb
 │   │   │       ├── trilogy_adapter.rb
 │   │   │       └── trilogy_proxy_adapter.rb
 │   │   ├── adapters
 │   │   │   ├── abstract_adapter.rb
 │   │   │   ├── active_record_proxy_adapter.rb
 │   │   │   ├── em_mysql2_adapter.rb
 │   │   │   ├── mysql_adapter.rb
 │   │   │   ├── mysql2_adapter.rb
 │   │   │   ├── mysql2_proxy_adapter.rb
 │   │   │   ├── postgresql_adapter.rb
 │   │   │   ├── postgresql_proxy_adapter.rb
 │   │   │   ├── sqlite3_adapter.rb
 │   │   │   ├── sqlite3_proxy_adapter.rb
 │   │   │   ├── trilogy_adapter.rb
 │   │   │   └── trilogy_proxy_adapter.rb
 │   │   ├── base.rb
 │   │   ├── import.rb
 │   │   ├── synchronize.rb
 │   │   ├── value_sets_parser.rb
 │   │   └── version.rb
 │   └── activerecord-import.rb
 ├── LICENSE
-├── Rakefile
 ├── README.markdown
-└── test
-    ├── adapters
-    │   ├── janus_mysql2.rb
-    │   ├── janus_trilogy.rb
-    │   ├── jdbcmysql.rb
-    │   ├── jdbcpostgresql.rb
-    │   ├── jdbcsqlite3.rb
-    │   ├── makara_postgis.rb
-    │   ├── mysql2_makara.rb
-    │   ├── mysql2_proxy.rb
-    │   ├── mysql2.rb
-    │   ├── mysql2spatial.rb
-    │   ├── postgis.rb
-    │   ├── postgresql_makara.rb
-    │   ├── postgresql_proxy.rb
-    │   ├── postgresql.rb
-    │   ├── seamless_database_pool.rb
-    │   ├── spatialite.rb
-    │   ├── sqlite3_proxy.rb
-    │   ├── sqlite3.rb
-    │   ├── trilogy_proxy.rb
-    │   └── trilogy.rb
-    ├── database.yml.sample
-    ├── github
-    │   └── database.yml
-    ├── import_test.rb
-    ├── janus_mysql2
-    │   └── import_test.rb
-    ├── janus_trilogy
-    │   └── import_test.rb
-    ├── jdbcmysql
-    │   └── import_test.rb
-    ├── jdbcpostgresql
-    │   └── import_test.rb
-    ├── jdbcsqlite3
-    │   └── import_test.rb
-    ├── makara_postgis
-    │   └── import_test.rb
-    ├── models
-    │   ├── account.rb
-    │   ├── alarm.rb
-    │   ├── animal.rb
-    │   ├── author.rb
-    │   ├── bike_maker.rb
-    │   ├── book.rb
-    │   ├── car.rb
-    │   ├── card.rb
-    │   ├── chapter.rb
-    │   ├── composite_book.rb
-    │   ├── composite_chapter.rb
-    │   ├── customer.rb
-    │   ├── deck.rb
-    │   ├── dictionary.rb
-    │   ├── discount.rb
-    │   ├── end_note.rb
-    │   ├── group.rb
-    │   ├── order.rb
-    │   ├── playing_card.rb
-    │   ├── promotion.rb
-    │   ├── question.rb
-    │   ├── rule.rb
-    │   ├── tag_alias.rb
-    │   ├── tag.rb
-    │   ├── topic.rb
-    │   ├── user_token.rb
-    │   ├── user.rb
-    │   ├── vendor.rb
-    │   └── widget.rb
-    ├── mysql2
-    │   └── import_test.rb
-    ├── mysql2_makara
-    │   └── import_test.rb
-    ├── mysql2_proxy
-    │   └── import_test.rb
-    ├── mysqlspatial2
-    │   └── import_test.rb
-    ├── postgis
-    │   └── import_test.rb
-    ├── postgresql
-    │   └── import_test.rb
-    ├── postgresql_proxy
-    │   └── import_test.rb
-    ├── schema
-    │   ├── generic_schema.rb
-    │   ├── jdbcpostgresql_schema.rb
-    │   ├── mysql2_schema.rb
-    │   ├── postgis_schema.rb
-    │   ├── postgresql_schema.rb
-    │   ├── sqlite3_schema.rb
-    │   └── version.rb
-    ├── sqlite3
-    │   └── import_test.rb
-    ├── sqlite3_proxy
-    │   └── import_test.rb
-    ├── support
-    │   ├── active_support
-    │   │   └── test_case_extensions.rb
-    │   ├── assertions.rb
-    │   ├── factories.rb
-    │   ├── generate.rb
-    │   ├── mysql
-    │   │   └── import_examples.rb
-    │   ├── postgresql
-    │   │   └── import_examples.rb
-    │   ├── shared_examples
-    │   │   ├── affected_rows.rb
-    │   │   ├── on_duplicate_key_ignore.rb
-    │   │   ├── on_duplicate_key_update.rb
-    │   │   └── recursive_import.rb
-    │   └── sqlite3
-    │       └── import_examples.rb
-    ├── synchronize_test.rb
-    ├── test_helper.rb
-    ├── trilogy
-    │   └── import_test.rb
-    ├── trilogy_proxy
-    │   └── import_test.rb
-    ├── value_sets_bytes_parser_test.rb
-    └── value_sets_records_parser_test.rb

ps: you can see on rails repo

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