0.0
No release in over 3 years
Low commit activity in last 3 years
Analyzes gems and shows a table of junk by percentage.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 5.0
~> 10.0

Runtime

~> 1.1.0
 Project Readme

show-gem-junk

This tool helps you show junk contained in your gems.

Installation

Install manually:

$ gem install show-gem-junk

Usage

First and most important step!

# Set your GEM_HOME if you don't have one already.
export GEM_HOME=/home/tom/.gem/ruby/2.6.0

Display a compact table of gems by junk size:

$ show-gem-junk

Gem Name                Version       Size       Junk     % Junk
crass                     1.0.4     636 KB     556 KB      87.45
tzinfo                    1.2.5     891 KB     613 KB      68.74

Display each gem separately, with a table of junk files by size:

$ show-gem-junk -v

Gem Name: crass
Version:  1.0.4
Path:     /home/tom/.gem/ruby/2.6.0/gems/crass-1.0.4
Size:     636 KB
Junk:     556 KB
% Junk:   87.45

Junk File                                                          Size
crass-1.0.4/test/css-parsing-tests/color3_hsl.json               199 KB
crass-1.0.4/test/support/serialization/bootstrap.css             117 KB
crass-1.0.4/test/support/serialization/animate.css              71.2 KB
crass-1.0.4/test/support/serialization/pure.css                 34.8 KB
crass-1.0.4/test/css-parsing-tests/color3_keywords.json         22.8 KB
crass-1.0.4/test/shared/parse_rules.rb                          17.1 KB
crass-1.0.4/test/support/serialization/bootstrap-theme.css      16.4 KB
crass-1.0.4/test/css-parsing-tests/component_value_list.json      14 KB
crass-1.0.4/test/test_parse_properties.rb                       12.1 KB
crass-1.0.4/test/css-parsing-tests/README.rst                   9.15 KB
crass-1.0.4/test/css-parsing-tests/make_color3_keywords.py      6.73 KB

What is a junk file?

This tool considers the following gem contents to be "junk":

Files

  • .gemspec
  • .gitignore
  • .travis.yml
  • .appveyor.yml

Directories

  • test
  • spec
  • features
  • concourse

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bin/rake install. To release a new version, update the version number in version.rb, and then run bin/rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/t-richards/show-gem-junk.

License

The gem is available as open source under the terms of the MIT License.