How to find licenses for all installed ruby ​​stones?

For legal needs, I need to document all installed gems and their licenses in our copies. The team gem listlists all the gems. Is there a software way to also list licenses?

+4
source share
3 answers

In the Rails console:

For some Gems that have their licensing information included in its specification, you can display them by running them from the rails console:

Gem.loaded_specs.each do |name, spec|
  puts "#{name}: #{spec.license}"
end

or From your linux bash terminal:

for i in `gem list | cut -d" " -f1`; do echo "$i :" ; gem spec $i license; done
+10
source

rubygems.org ( gemspec), .

!

+2

I know this is a little late, but I googled, and this stone appears and even supports CSV, so if you do this business people, it will be great, because then you can just send the table upstream in your org.

Source: https://rubygems.org/gems/license-list/versions/1.0.1

+1
source

Source: https://habr.com/ru/post/1676531/


All Articles