Created
January 7, 2013 13:53
-
-
Save mulder/4475151 to your computer and use it in GitHub Desktop.
Grab ruby gem licences from your bundle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File.open("licences", "w+") do |file| | |
Bundler.environment.specs.each do |spec| | |
Dir["#{spec.full_gem_path}/LICENSE*"].each do |f| | |
file.write("======================= #{spec.name} - #{spec.version} =======================\n") | |
file.write(File.read(f)) | |
file.write("------------------------------------------------------------------------------\n #{f}\n------------------------------------------------------------------------------\n\n") | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment