Merge branch 'license' of https://github.com/MLH-Fellowship/brew into license

This commit is contained in:
Lionell 2020-06-13 01:04:39 +08:00
commit 8a6fa73dc1
2 changed files with 13 additions and 0 deletions

View File

@ -211,6 +211,8 @@ module Homebrew
puts "From: #{Formatter.url(github_info(f))}"
puts "License: #{f.license}" if f.license
unless f.deps.empty?
ohai "Dependencies"
%w[build required recommended optional].map do |type|

View File

@ -351,6 +351,9 @@ class Formula
# @see .desc=
delegate desc: :"self.class"
# The SPDX ID of the software license.
delegate license: :"self.class"
# The homepage for the software.
# @method homepage
# @see .homepage=
@ -1678,6 +1681,7 @@ class Formula
"aliases" => aliases.sort,
"versioned_formulae" => versioned_formulae.map(&:name),
"desc" => desc,
"license" => license,
"homepage" => homepage,
"versions" => {
"stable" => stable&.version&.to_s,
@ -2199,6 +2203,13 @@ class Formula
# <pre>desc "Example formula"</pre>
attr_rw :desc
# @!attribute [w]
# The SPDX ID of the open-source license that the formula uses.
# Shows when running `brew info`.
#
# <pre>license " BSD-2-Clause"</pre>
attr_rw :license
# @!attribute [w] homepage
# The homepage for the software. Used by users to get more information
# about the software and Homebrew maintainers as a point of contact for