gem-compiler
gem-compiler copied to clipboard
add support for explicitly specifying some artifacts to add
The 'rice' gem has bunch of files in ruby/lib that is not part of the gem proper - it is to be used by the libraries. It's obviously a misuse of the Rubygems system, but a useful one so far.
This adds the --artifact PATH argument that allows to:
- add a file explicitly
- add a complete directory tree
Hello @doudou, thank you for your PR and providing the background of this request.
I haven't looked into the code yet but planning this weekend. Will also try to correct the CI issues so is no longer showing incorrect errors.
Thanks for your patience.
Cheers.
Hi Luis.
Heads up that I'm already preparing a v2 version of this PR ... I never realized how powerful Dir.glob is, and am thinking of directly allowing passing globs instead of files.
Updated ...
Hello @doudou, thanks for your patience.
Been looking at this change over the holidays and this might clash or could be refactor so --include-shared-dir can reuse this pattern globing option.
Will work on this over the holidays and submit an alternate version.
Cheers.
Hello @doudou, thanks for your patience.
I was working on a different approach on this and wanted to check with you the exclude pattern functionality.
From this PR, you're removing files from artifacts, which is by default the platform specific files that were collected, but not necessarily impacting the files that are included in the gem package.
Should include and exclude patterns be applied to the final list of files and not just the collected artifacts? I'm seeing an scenario for this like the following:
$ gem compile mygem.gem --exclude 'ext' --exclude 'spec'
Let me know your thoughts.
Cheers.
Should include and exclude patterns be applied to the final list of files and not just the collected artifacts? I'm seeing an scenario for this like the following:
I don't see a problem with that.
Excellent @doudou, wanted to confirm since your current PR applies this to collected artifacts and not all the files in the gemspec.
Will submit an alternative version in the upcoming days to address this.
Thank you for your patience and responses.
Cheers.