-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Use manifest file to specify set of files to include in gem #725
Conversation
This avoids unexpected RuboCop failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a premature hello-there inline comment.
aruba.gemspec
Outdated
spec.add_development_dependency 'simplecov', '~> 0.18.0' | ||
spec.add_development_dependency 'yard-junk', '~> 0.0.7' | ||
|
||
spec.rubygems_version = '>= 1.6.1' | ||
spec.required_ruby_version = '>= 2.4' | ||
|
||
spec.files = Rake::FileList['{docs,fixtures,lib}/**/*', 'CHANGELOG.md', \ | ||
'LICENSE', 'README.md'].exclude(*File.read('.gitignore').split) | ||
spec.files = File.read('Manifest.txt').split |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious: can this use https://rubyapi.org/2.7/o/io#method-c-readlines ? With chomp: true I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! I didn't know about chomp: true
; much nicer!
Travis adds --client to JRUBY_OPTS which causes a warning.
Summary
Stop dynamically collecting files to include in the gem and instead specify (most of) them in a manifest file
Details
Use rake-manifest gem to generate and check a
Manifest.txt
file, and read that file in the gemspec to set the list of files to include in the gem. Also, run manifest checking task before gem building task.Motivation and Context
git ls-files
in gemspec #721)git ls-files
in gemspec #721 does not accurately exclude filesgit ls-files
in gemspec #721 needs parts of rake that may not be installed when e.g. Bundler is run to install dependencies, so just runningbundle install
to fetch dependencies from a fresh checkout doesn't work, leading to build failures on TravisCIHow Has This Been Tested?
Types of changes