Skip to content

Instantly share code, notes, and snippets.

@mulder
Created January 7, 2013 13:53
Show Gist options
  • Save mulder/4475151 to your computer and use it in GitHub Desktop.
Save mulder/4475151 to your computer and use it in GitHub Desktop.
Grab ruby gem licences from your bundle
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