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

Use manifest file to specify set of files to include in gem #725

Merged
merged 4 commits into from
Aug 21, 2020
Merged

Conversation

mvz
Copy link
Contributor

@mvz mvz commented Aug 19, 2020

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

How Has This Been Tested?

  • Ran rake build
  • Travis

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

This avoids unexpected RuboCop failures.
Copy link
Contributor

@olleolleolle olleolleolle left a 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
Copy link
Contributor

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.

Copy link
Contributor Author

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!

@mvz mvz changed the title Use manifest Use manifest file to specify set of files to include in gem Aug 20, 2020
@mvz mvz marked this pull request as ready for review August 20, 2020 17:22
Travis adds --client to JRUBY_OPTS which causes a warning.
@mvz mvz merged commit 215f7e0 into master Aug 21, 2020
@mvz mvz deleted the use-manifest branch August 21, 2020 07:18
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.

2 participants