Skip to content

Instantly share code, notes, and snippets.

@l8nite
Created November 20, 2014 08:18
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save l8nite/18e1aa073d4c758bf440 to your computer and use it in GitHub Desktop.
Save l8nite/18e1aa073d4c758bf440 to your computer and use it in GitHub Desktop.
Quick and dirty way to exclude files from a gemspec
git_tracked_files = `git ls-files -z`.split("\x0")
gem_ignored_files = `git ls-files -i -X .gemignore -z`.split("\x0")
spec.files = git_tracked_files - gem_ignored_files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment