Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

published gem should not include test files #235

Closed
twelvelabs opened this issue Jul 30, 2015 · 1 comment
Closed

published gem should not include test files #235

twelvelabs opened this issue Jul 30, 2015 · 1 comment

Comments

@twelvelabs
Copy link

I'm trying to reduce the file footprint of one of my Ruby apps and one of the offenders is the github_api gem:

$ du -h ./github_api-0.12.3/

 16K    ./github_api-0.12.3//features/activity
780K    ./github_api-0.12.3//features/cassettes/activity/events
4.0K    ./github_api-0.12.3//features/cassettes/activity/notifications
244K    ./github_api-0.12.3//features/cassettes/activity/starring
260K    ./github_api-0.12.3//features/cassettes/activity/watching
1.3M    ./github_api-0.12.3//features/cassettes/activity
4.0K    ./github_api-0.12.3//features/cassettes/arguments/orgs
 16K    ./github_api-0.12.3//features/cassettes/arguments/pulls
 12K    ./github_api-0.12.3//features/cassettes/arguments/repo_commits
 32K    ./github_api-0.12.3//features/cassettes/arguments
1.8M    ./github_api-0.12.3//features/cassettes/auto_pagination/repos
1.8M    ./github_api-0.12.3//features/cassettes/auto_pagination
108K    ./github_api-0.12.3//features/cassettes/emojis
4.0K    ./github_api-0.12.3//features/cassettes/errors/repos
4.0K    ./github_api-0.12.3//features/cassettes/errors
 52K    ./github_api-0.12.3//features/cassettes/gists/comments
104K    ./github_api-0.12.3//features/cassettes/gists/gists
184K    ./github_api-0.12.3//features/cassettes/gists
4.0K    ./github_api-0.12.3//features/cassettes/git_data/commits
 16K    ./github_api-0.12.3//features/cassettes/git_data/references
 20K    ./github_api-0.12.3//features/cassettes/git_data
 12K    ./github_api-0.12.3//features/cassettes/gitignore
 12K    ./github_api-0.12.3//features/cassettes/issues/assignees
108K    ./github_api-0.12.3//features/cassettes/issues/comments
184K    ./github_api-0.12.3//features/cassettes/issues/events
 44K    ./github_api-0.12.3//features/cassettes/issues/labels
120K    ./github_api-0.12.3//features/cassettes/issues/list
 20K    ./github_api-0.12.3//features/cassettes/issues/milestones
512K    ./github_api-0.12.3//features/cassettes/issues
8.0K    ./github_api-0.12.3//features/cassettes/markdown
 40K    ./github_api-0.12.3//features/cassettes/media
4.0K    ./github_api-0.12.3//features/cassettes/meta
 16K    ./github_api-0.12.3//features/cassettes/orgs/list
 92K    ./github_api-0.12.3//features/cassettes/orgs/members
112K    ./github_api-0.12.3//features/cassettes/orgs
748K    ./github_api-0.12.3//features/cassettes/pagination/issues/list
748K    ./github_api-0.12.3//features/cassettes/pagination/issues
132K    ./github_api-0.12.3//features/cassettes/pagination/repos/commits/sha
644K    ./github_api-0.12.3//features/cassettes/pagination/repos/commits
188K    ./github_api-0.12.3//features/cassettes/pagination/repos/diff
280K    ./github_api-0.12.3//features/cassettes/pagination/repos/list
944K    ./github_api-0.12.3//features/cassettes/pagination/repos/per_page
2.5M    ./github_api-0.12.3//features/cassettes/pagination/repos
3.2M    ./github_api-0.12.3//features/cassettes/pagination
 20K    ./github_api-0.12.3//features/cassettes/pull_requests/comments
616K    ./github_api-0.12.3//features/cassettes/pull_requests
 12K    ./github_api-0.12.3//features/cassettes/ratelimit
 24K    ./github_api-0.12.3//features/cassettes/repos/assets
4.0K    ./github_api-0.12.3//features/cassettes/repos/comments
180K    ./github_api-0.12.3//features/cassettes/repos/commits
108K    ./github_api-0.12.3//features/cassettes/repos/contents
 16K    ./github_api-0.12.3//features/cassettes/repos/deployments
376K    ./github_api-0.12.3//features/cassettes/repos/forks
8.0K    ./github_api-0.12.3//features/cassettes/repos/pages
 44K    ./github_api-0.12.3//features/cassettes/repos/releases
 36K    ./github_api-0.12.3//features/cassettes/repos/stats
 20K    ./github_api-0.12.3//features/cassettes/repos/statuses
1.9M    ./github_api-0.12.3//features/cassettes/repos
8.0K    ./github_api-0.12.3//features/cassettes/say
108K    ./github_api-0.12.3//features/cassettes/search/legacy
820K    ./github_api-0.12.3//features/cassettes/search
 12K    ./github_api-0.12.3//features/cassettes/users/emails
 96K    ./github_api-0.12.3//features/cassettes/users/followers
 16K    ./github_api-0.12.3//features/cassettes/users/get
 24K    ./github_api-0.12.3//features/cassettes/users/keys
272K    ./github_api-0.12.3//features/cassettes/users
 11M    ./github_api-0.12.3//features/cassettes
4.0K    ./github_api-0.12.3//features/gists
8.0K    ./github_api-0.12.3//features/git_data
 24K    ./github_api-0.12.3//features/issues
4.0K    ./github_api-0.12.3//features/orgs
4.0K    ./github_api-0.12.3//features/pull_requests
 40K    ./github_api-0.12.3//features/repos
4.0K    ./github_api-0.12.3//features/search
8.0K    ./github_api-0.12.3//features/step_definitions
 16K    ./github_api-0.12.3//features/support
 12K    ./github_api-0.12.3//features/users
 11M    ./github_api-0.12.3//features
8.0K    ./github_api-0.12.3//lib/github_api/api/config
 28K    ./github_api-0.12.3//lib/github_api/api
 28K    ./github_api-0.12.3//lib/github_api/client/activity
4.0K    ./github_api-0.12.3//lib/github_api/client/authorizations
4.0K    ./github_api-0.12.3//lib/github_api/client/gists
 24K    ./github_api-0.12.3//lib/github_api/client/git_data
 32K    ./github_api-0.12.3//lib/github_api/client/issues
 16K    ./github_api-0.12.3//lib/github_api/client/orgs
8.0K    ./github_api-0.12.3//lib/github_api/client/pull_requests
4.0K    ./github_api-0.12.3//lib/github_api/client/repos/releases
 88K    ./github_api-0.12.3//lib/github_api/client/repos
4.0K    ./github_api-0.12.3//lib/github_api/client/search
 12K    ./github_api-0.12.3//lib/github_api/client/users
312K    ./github_api-0.12.3//lib/github_api/client
 12K    ./github_api-0.12.3//lib/github_api/core_ext
 60K    ./github_api-0.12.3//lib/github_api/error
4.0K    ./github_api-0.12.3//lib/github_api/ext
 16K    ./github_api-0.12.3//lib/github_api/request
 20K    ./github_api-0.12.3//lib/github_api/response
132K    ./github_api-0.12.3//lib/github_api/ssl_certs
4.0K    ./github_api-0.12.3//lib/github_api/utils
 16K    ./github_api-0.12.3//lib/github_api/validations
720K    ./github_api-0.12.3//lib/github_api
724K    ./github_api-0.12.3//lib
 12K    ./github_api-0.12.3//spec/fixtures/activity
 12K    ./github_api-0.12.3//spec/fixtures/auths
4.0K    ./github_api-0.12.3//spec/fixtures/events
 16K    ./github_api-0.12.3//spec/fixtures/gists
 28K    ./github_api-0.12.3//spec/fixtures/git_data
 12K    ./github_api-0.12.3//spec/fixtures/gitignore
 40K    ./github_api-0.12.3//spec/fixtures/issues
 24K    ./github_api-0.12.3//spec/fixtures/orgs
 32K    ./github_api-0.12.3//spec/fixtures/pull_requests
204K    ./github_api-0.12.3//spec/fixtures/repos
 36K    ./github_api-0.12.3//spec/fixtures/search
 24K    ./github_api-0.12.3//spec/fixtures/users
444K    ./github_api-0.12.3//spec/fixtures
8.0K    ./github_api-0.12.3//spec/github/api/arguments
 32K    ./github_api-0.12.3//spec/github/api
 32K    ./github_api-0.12.3//spec/github/client/activity/events
 24K    ./github_api-0.12.3//spec/github/client/activity/notifications
 20K    ./github_api-0.12.3//spec/github/client/activity/starring
 20K    ./github_api-0.12.3//spec/github/client/activity/watching
 96K    ./github_api-0.12.3//spec/github/client/activity
 12K    ./github_api-0.12.3//spec/github/client/authorizations/app
 36K    ./github_api-0.12.3//spec/github/client/authorizations
 20K    ./github_api-0.12.3//spec/github/client/gists/comments
 64K    ./github_api-0.12.3//spec/github/client/gists
8.0K    ./github_api-0.12.3//spec/github/client/git_data/blobs
8.0K    ./github_api-0.12.3//spec/github/client/git_data/commits
 20K    ./github_api-0.12.3//spec/github/client/git_data/references
8.0K    ./github_api-0.12.3//spec/github/client/git_data/tags
8.0K    ./github_api-0.12.3//spec/github/client/git_data/trees
 72K    ./github_api-0.12.3//spec/github/client/git_data
8.0K    ./github_api-0.12.3//spec/github/client/gitignore
8.0K    ./github_api-0.12.3//spec/github/client/issues/assignees
 20K    ./github_api-0.12.3//spec/github/client/issues/comments
8.0K    ./github_api-0.12.3//spec/github/client/issues/events
 32K    ./github_api-0.12.3//spec/github/client/issues/labels
 20K    ./github_api-0.12.3//spec/github/client/issues/milestones
124K    ./github_api-0.12.3//spec/github/client/issues
 20K    ./github_api-0.12.3//spec/github/client/orgs/members
 52K    ./github_api-0.12.3//spec/github/client/orgs/teams
 92K    ./github_api-0.12.3//spec/github/client/orgs
 20K    ./github_api-0.12.3//spec/github/client/pull_requests/comments
 56K    ./github_api-0.12.3//spec/github/client/pull_requests
 20K    ./github_api-0.12.3//spec/github/client/repos/assets
 16K    ./github_api-0.12.3//spec/github/client/repos/collaborators
 20K    ./github_api-0.12.3//spec/github/client/repos/comments
 12K    ./github_api-0.12.3//spec/github/client/repos/commits
 20K    ./github_api-0.12.3//spec/github/client/repos/contents
 16K    ./github_api-0.12.3//spec/github/client/repos/deployments
 12K    ./github_api-0.12.3//spec/github/client/repos/downloads
8.0K    ./github_api-0.12.3//spec/github/client/repos/forks
 28K    ./github_api-0.12.3//spec/github/client/repos/hooks
 16K    ./github_api-0.12.3//spec/github/client/repos/keys
4.0K    ./github_api-0.12.3//spec/github/client/repos/merging
 16K    ./github_api-0.12.3//spec/github/client/repos/pub_sub_hubbub
 20K    ./github_api-0.12.3//spec/github/client/repos/releases
 20K    ./github_api-0.12.3//spec/github/client/repos/statistics
8.0K    ./github_api-0.12.3//spec/github/client/repos/statuses
300K    ./github_api-0.12.3//spec/github/client/repos
4.0K    ./github_api-0.12.3//spec/github/client/scopes
 16K    ./github_api-0.12.3//spec/github/client/search/legacy
 32K    ./github_api-0.12.3//spec/github/client/search
 12K    ./github_api-0.12.3//spec/github/client/users/emails
 20K    ./github_api-0.12.3//spec/github/client/users/followers
 20K    ./github_api-0.12.3//spec/github/client/users/keys
 64K    ./github_api-0.12.3//spec/github/client/users
948K    ./github_api-0.12.3//spec/github/client
8.0K    ./github_api-0.12.3//spec/github/core_ext
8.0K    ./github_api-0.12.3//spec/github/error/service_error
 36K    ./github_api-0.12.3//spec/github/error
8.0K    ./github_api-0.12.3//spec/github/pagination/iterator
8.0K    ./github_api-0.12.3//spec/github/pagination
 16K    ./github_api-0.12.3//spec/github/request
 12K    ./github_api-0.12.3//spec/github/response_wrapper
4.0K    ./github_api-0.12.3//spec/github/utils
 16K    ./github_api-0.12.3//spec/github/validations
1.1M    ./github_api-0.12.3//spec/github
 52K    ./github_api-0.12.3//spec/integration
 12K    ./github_api-0.12.3//spec/shared
 12K    ./github_api-0.12.3//spec/support
1.6M    ./github_api-0.12.3//spec
 13M    ./github_api-0.12.3/

The spec and features directories make up the bulk of the overall file size. Omitting them from the published gem would save a lot of space. I know it's not a lot on it's own, but when you have a 100+ gems it starts to add up.

@piotrmurach
Copy link
Owner

Thanks for using the library and reporting this issue. I have released version 0.12.4 that reduces the footprint to 132KB!

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

No branches or pull requests

2 participants