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

Include source and documdnts files only in the gem file. #1391

Merged
merged 1 commit into from Aug 16, 2017

Conversation

junaruga
Copy link
Contributor

@junaruga junaruga commented Aug 9, 2017

Version 3.9.1 gem

About latest stable version 3.9.1 gem, test, example directories was not included in the gem file.

$ gem fetch puma

$ gem unpack puma-3.9.1.gem

$ ls puma-3.9.1
bin/           docs/  Gemfile    .github/    lib/     Manifest.txt  Rakefile   Release.md
DEPLOYMENT.md  ext/   gemfiles/  History.md  LICENSE  puma.gemspec  README.md  tools/

Latest master branch

But about latest master branch, seeing puma.gemspec, all the file is included in gem files including test and example directory.

$ gem build puma.gemspec
  Successfully built RubyGem
  Name: puma
  Version: 3.9.1
  File: puma-3.9.1.gem

$ gem unpack puma-3.9.1.gem

$ ls puma-3.9.1/
appveyor.yml   examples/  .github/    lib/          Rakefile           .rubocop.yml
bin/           ext/       .gitignore  LICENSE       README.md          test/
DEPLOYMENT.md  Gemfile    History.md  Manifest.txt  Release.md         tools/
docs/          gemfiles/  .hoeignore  puma.gemspec  .rubocop_todo.yml  .travis.yml

I think maybe we do not want to ship development files such as Gemfile, .github directory, and etc.

After modification

So, I modified gemspec file to only include source and document files in the gem file.
The result is like this.

$ gem build puma.gemspec
  Successfully built RubyGem
  Name: puma
  Version: 3.9.1
  File: puma-3.9.1.gem

$ gem unpack puma-3.9.1.gem

$ ls puma-3.9.1/
bin/  docs/  ext/  History.md  lib/  LICENSE  README.md  tools/

Rails, RSpec are using this pattern as a reference.
https://github.com/rails/rails/blob/master/activesupport/activesupport.gemspec#L20
https://github.com/rspec/rspec-core/blob/master/rspec-core.gemspec#L16-L17

How do you think?

My concern is hoe in Rakefile.
Actually are you using hoe to generate gemspec file or release? If not, I think it might be better to remove the logic in Rakefile.
https://github.com/puma/puma/blob/master/Rakefile#L15

@nateberkopec
Copy link
Member

Thanks! No, we're not using the Hoe stuff anymore. There is an open issue for it's removal #1328.

@nateberkopec nateberkopec merged commit e60bd54 into puma:master Aug 16, 2017
@junaruga
Copy link
Contributor Author

Thanks! No, we're not using the Hoe stuff anymore. There is an open issue for it's removal #1328.

Welcome! OK. So, I sent another PR to fix the issue right now.
#1395

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.

None yet

2 participants