1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-23 05:10:11 +01:00

Merge pull request #418 from github/nicknames-for-all

Make nickname a required meta field
This commit is contained in:
Mike Linksvayer 2016-05-25 17:43:28 -05:00
commit 027890a5a8
30 changed files with 47 additions and 18 deletions

View File

@ -39,7 +39,8 @@ Licenses sit in the `/_licenses` folder. Each license has YAML front matter desc
#### Required fields #### Required fields
* `title` - The SPDX-compliant, human-readable license name * `title` - The license full name specified by http://spdx.org/licenses/
* `spdx-id` - Short identifier specified by http://spdx.org/licenses/
* `source` - The URL to the license source text * `source` - The URL to the license source text
* `description` - A human-readable description of the license * `description` - A human-readable description of the license
* `how` - Instructions on how to implement the license * `how` - Instructions on how to implement the license
@ -50,10 +51,10 @@ Licenses sit in the `/_licenses` folder. Each license has YAML front matter desc
#### Optional fields #### Optional fields
* `featured` - Whether the license should be featured on the main page (defaults to false) * `featured` - Whether the license should be featured on the main page (defaults to false)
* `nickname` - Customary short name if applicable (e.g, GPLv3)
* `note` - Additional information about the licenses * `note` - Additional information about the licenses
* `using` - A list of notable projects using the license in the form of `project_name: "url"` * `using` - A list of notable projects using the license in the form of `project_name: "url"`
* `redirect_from` - Relative path(s) to redirect to the license from, to prevent breaking old URLs * `redirect_from` - Relative path(s) to redirect to the license from, to prevent breaking old URLs
* `nickname` - A shorter, human-readable license name where the SPDX license name (`title` above) is long
### Auto-populated fields ### Auto-populated fields

View File

@ -2,9 +2,13 @@
# The available fields are: # The available fields are:
- name: title - name: title
description: The SPDX-compliant, human-readable license name description: The license full name specified by http://spdx.org/licenses/
required: true required: true
- name: spdx-id
description: Short identifier specified by http://spdx.org/licenses/
required: required
- name: source - name: source
description: The URL to the license source text description: The URL to the license source text
required: true required: true
@ -35,6 +39,10 @@
description: Whether the license should be featured on the main page (defaults to false) description: Whether the license should be featured on the main page (defaults to false)
required: false required: false
- name: nickname
description: Customary short name if applicable (e.g, GPLv3)
required: false
- name: note - name: note
description: Additional information about the licenses description: Additional information about the licenses
required: false required: false
@ -46,7 +54,3 @@
- name: redirect_from - name: redirect_from
description: Relative path(s) to redirect to the license from, to prevent breaking old URLs description: Relative path(s) to redirect to the license from, to prevent breaking old URLs
required: false required: false
- name: nickname
description: A shorter, human-readable license name where the SPDX license name (`title` above) is long
required: false

View File

@ -1,5 +1,6 @@
--- ---
title: Academic Free License v3.0 title: Academic Free License v3.0
spdx-id: AFL-3.0
source: http://opensource.org/licenses/afl-3.0 source: http://opensource.org/licenses/afl-3.0
description: The Academic Free License is a variant of the Open Software License that does not require that the source code of derivative works be disclosed. It contains explicit copyright and patent grants and reserves trademark rights in the author. description: The Academic Free License is a variant of the Open Software License that does not require that the source code of derivative works be disclosed. It contains explicit copyright and patent grants and reserves trademark rights in the author.

View File

@ -1,5 +1,6 @@
--- ---
title: GNU Affero General Public License v3.0 title: GNU Affero General Public License v3.0
spdx-id: AGPL-3.0
nickname: GNU AGPLv3 nickname: GNU AGPLv3
redirect_from: /licenses/agpl/ redirect_from: /licenses/agpl/
source: http://www.gnu.org/licenses/agpl-3.0.txt source: http://www.gnu.org/licenses/agpl-3.0.txt

View File

@ -1,5 +1,6 @@
--- ---
title: Apache License 2.0 title: Apache License 2.0
spdx-id: Apache-2.0
redirect_from: /licenses/apache/ redirect_from: /licenses/apache/
source: http://www.apache.org/licenses/LICENSE-2.0.html source: http://www.apache.org/licenses/LICENSE-2.0.html
featured: true featured: true

View File

@ -1,5 +1,6 @@
--- ---
title: Artistic License 2.0 title: Artistic License 2.0
spdx-id: Artistic-2.0
redirect_from: /licenses/artistic/ redirect_from: /licenses/artistic/
source: http://www.perlfoundation.org/attachment/legal/artistic-2_0.txt source: http://www.perlfoundation.org/attachment/legal/artistic-2_0.txt

View File

@ -1,6 +1,6 @@
--- ---
title: BSD 2-clause "Simplified" License title: BSD 2-clause "Simplified" License
nickname: BSD 2-Clause spdx-id: BSD-2-Clause
redirect_from: /licenses/bsd/ redirect_from: /licenses/bsd/
source: http://opensource.org/licenses/BSD-2-Clause source: http://opensource.org/licenses/BSD-2-Clause

View File

@ -1,5 +1,6 @@
--- ---
title: BSD 3-clause Clear License title: BSD 3-clause Clear License
spdx-id: BSD-3-Clause-Clear
description: A variant of the <a href="/licenses/bsd-3-clause/">BSD 3-Clause License</a> that explicitly does not grant any patent rights. description: A variant of the <a href="/licenses/bsd-3-clause/">BSD 3-Clause License</a> that explicitly does not grant any patent rights.

View File

@ -1,6 +1,6 @@
--- ---
title: BSD 3-clause "New" or "Revised" License title: BSD 3-clause "New" or "Revised" License
nickname: BSD 3-Clause spdx-id: BSD-3-Clause
source: http://opensource.org/licenses/BSD-3-Clause source: http://opensource.org/licenses/BSD-3-Clause
description: A permissive license similar to the <a href="/licenses/bsd-2-clause/">BSD 2-Clause License</a>, but with a 3rd clause that prohibits others from using the name of the project or its contributors to promote derived products without written consent. description: A permissive license similar to the <a href="/licenses/bsd-2-clause/">BSD 2-Clause License</a>, but with a 3rd clause that prohibits others from using the name of the project or its contributors to promote derived products without written consent.

View File

@ -1,6 +1,6 @@
--- ---
title: Creative Commons Attribution 4.0 title: Creative Commons Attribution 4.0
nickname: CC-BY-4.0 spdx-id: CC-BY-4.0
source: https://creativecommons.org/licenses/by/4.0/legalcode.txt source: https://creativecommons.org/licenses/by/4.0/legalcode.txt
description: Permits almost any use subject to providing credit and license notice. Frequently used for media assets and educational materials. The most common license for Open Access scientific publications. Not recommended for software. description: Permits almost any use subject to providing credit and license notice. Frequently used for media assets and educational materials. The most common license for Open Access scientific publications. Not recommended for software.

View File

@ -1,6 +1,6 @@
--- ---
title: Creative Commons Attribution Share Alike 4.0 title: Creative Commons Attribution Share Alike 4.0
nickname: CC-BY-SA-4.0 spdx-id: CC-BY-SA-4.0
source: https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt source: https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt
description: Similar to <a href='/licenses/cc-by-4.0/'>CC-BY-4.0</a> but requires derivatives be distributed under the same or a similar, <a href="https://creativecommons.org/compatiblelicenses/">compatible</a> license. Frequently used for media assets and educational materials. A previous version is the default license for Wikipedia and other Wikimedia projects. Not recommended for software. description: Similar to <a href='/licenses/cc-by-4.0/'>CC-BY-4.0</a> but requires derivatives be distributed under the same or a similar, <a href="https://creativecommons.org/compatiblelicenses/">compatible</a> license. Frequently used for media assets and educational materials. A previous version is the default license for Wikipedia and other Wikimedia projects. Not recommended for software.

View File

@ -1,6 +1,6 @@
--- ---
title: Creative Commons Zero v1.0 Universal title: Creative Commons Zero v1.0 Universal
nickname: CC0 1.0 Universal spdx-id: CC0-1.0
redirect_from: /licenses/cc0/ redirect_from: /licenses/cc0/
source: http://creativecommons.org/publicdomain/zero/1.0/ source: http://creativecommons.org/publicdomain/zero/1.0/

View File

@ -1,5 +1,6 @@
--- ---
title: Eclipse Public License 1.0 title: Eclipse Public License 1.0
spdx-id: EPL-1.0
redirect_from: /licenses/eclipse/ redirect_from: /licenses/eclipse/
source: https://www.eclipse.org/legal/epl-v10.html source: https://www.eclipse.org/legal/epl-v10.html

View File

@ -1,6 +1,6 @@
--- ---
title: European Union Public License 1.1 title: European Union Public License 1.1
nickname: EUPL-1.1 spdx-id: EUPL-1.1
redirect_from: /licenses/eupl-v1.1/ redirect_from: /licenses/eupl-v1.1/
source: https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11 source: https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11

View File

@ -1,5 +1,6 @@
--- ---
title: GNU General Public License v2.0 title: GNU General Public License v2.0
spdx-id: GPL-2.0
nickname: GNU GPLv2 nickname: GNU GPLv2
redirect_from: /licenses/gpl-v2/ redirect_from: /licenses/gpl-v2/
source: http://www.gnu.org/licenses/gpl-2.0.txt source: http://www.gnu.org/licenses/gpl-2.0.txt

View File

@ -1,5 +1,6 @@
--- ---
title: GNU General Public License v3.0 title: GNU General Public License v3.0
spdx-id: GPL-3.0
nickname: GNU GPLv3 nickname: GNU GPLv3
redirect_from: /licenses/gpl-v3/ redirect_from: /licenses/gpl-v3/
source: http://www.gnu.org/licenses/gpl-3.0.txt source: http://www.gnu.org/licenses/gpl-3.0.txt

View File

@ -1,5 +1,6 @@
--- ---
title: ISC License title: ISC License
spdx-id: ISC
source: http://opensource.org/licenses/isc-license source: http://opensource.org/licenses/isc-license
description: A permissive license lets people do anything with your code with proper attribution and without warranty. The ISC license is functionally equivalent to the <a href="/licenses/bsd-2-clause/">BSD 2-Clause</a> and <a href="/licenses/mit/">MIT</a> licenses, removing some language that is no longer necessary. description: A permissive license lets people do anything with your code with proper attribution and without warranty. The ISC license is functionally equivalent to the <a href="/licenses/bsd-2-clause/">BSD 2-Clause</a> and <a href="/licenses/mit/">MIT</a> licenses, removing some language that is no longer necessary.

View File

@ -1,5 +1,6 @@
--- ---
title: GNU Lesser General Public License v2.1 title: GNU Lesser General Public License v2.1
spdx-id: LGPL-2.1
nickname: GNU LGPLv2.1 nickname: GNU LGPLv2.1
redirect_from: /licenses/lgpl-v2.1/ redirect_from: /licenses/lgpl-v2.1/
source: http://www.gnu.org/licenses/lgpl-2.1.txt source: http://www.gnu.org/licenses/lgpl-2.1.txt

View File

@ -1,5 +1,6 @@
--- ---
title: GNU Lesser General Public License v3.0 title: GNU Lesser General Public License v3.0
spdx-id: LGPL-3.0
nickname: GNU LGPLv3 nickname: GNU LGPLv3
redirect_from: /licenses/lgpl-v3/ redirect_from: /licenses/lgpl-v3/
source: http://www.gnu.org/licenses/lgpl-3.0.txt source: http://www.gnu.org/licenses/lgpl-3.0.txt

View File

@ -1,6 +1,6 @@
--- ---
title: LaTeX Project Public License v1.3c title: LaTeX Project Public License v1.3c
nickname: LPPL-1.3c spdx-id: LPPL-1.3c
source: https://latex-project.org/lppl/lppl-1-3c.html source: https://latex-project.org/lppl/lppl-1-3c.html
description: The LaTeX Project Public License (LPPL) is the primary license under which the LaTeX kernel and the base LaTeX packages are distributed. description: The LaTeX Project Public License (LPPL) is the primary license under which the LaTeX kernel and the base LaTeX packages are distributed.

View File

@ -1,5 +1,6 @@
--- ---
title: MIT License title: MIT License
spdx-id: MIT
source: https://opensource.org/licenses/MIT source: https://opensource.org/licenses/MIT
featured: true featured: true

View File

@ -1,5 +1,6 @@
--- ---
title: Mozilla Public License 2.0 title: Mozilla Public License 2.0
spdx-id: MPL-2.0
redirect_from: /licenses/mozilla/ redirect_from: /licenses/mozilla/
source: https://www.mozilla.org/media/MPL/2.0/index.txt source: https://www.mozilla.org/media/MPL/2.0/index.txt

View File

@ -1,5 +1,6 @@
--- ---
title: Microsoft Public License title: Microsoft Public License
spdx-id: MS-PL
source: http://opensource.org/licenses/ms-pl source: http://opensource.org/licenses/ms-pl

View File

@ -1,5 +1,6 @@
--- ---
title: Microsoft Reciprocal License title: Microsoft Reciprocal License
spdx-id: MS-RL
source: http://opensource.org/licenses/ms-pl source: http://opensource.org/licenses/ms-pl

View File

@ -1,5 +1,6 @@
--- ---
title: SIL Open Font License 1.1 title: SIL Open Font License 1.1
spdx-id: OFL-1.1
redirect_from: /licenses/ofl/ redirect_from: /licenses/ofl/
source: http://scripts.sil.org/OFL_web source: http://scripts.sil.org/OFL_web

View File

@ -1,5 +1,6 @@
--- ---
title: Open Software License 3.0 title: Open Software License 3.0
spdx-id: OSL-3.0
source: http://opensource.org/licenses/OSL-3.0 source: http://opensource.org/licenses/OSL-3.0
description: OSL 3.0 is a copyleft license that does not require reciprocal licensing on linked works. It also provides an express grant of patent rights from contributors to users, with a termination clause triggered if a user files a patent infringement lawsuit. description: OSL 3.0 is a copyleft license that does not require reciprocal licensing on linked works. It also provides an express grant of patent rights from contributors to users, with a termination clause triggered if a user files a patent infringement lawsuit.

View File

@ -1,5 +1,6 @@
--- ---
title: The Unlicense title: The Unlicense
spdx-id: Unlicense
source: http://unlicense.org/UNLICENSE source: http://unlicense.org/UNLICENSE
description: Because copyright is automatic in most countries, <a href="http://unlicense.org">the Unlicense</a> is a template to waive copyright interest in software you've written and dedicate it to the public domain. Use the Unlicense to opt out of copyright entirely. It also includes the no-warranty statement from the MIT/X11 license. description: Because copyright is automatic in most countries, <a href="http://unlicense.org">the Unlicense</a> is a template to waive copyright interest in software you've written and dedicate it to the public domain. Use the Unlicense to opt out of copyright entirely. It also includes the no-warranty statement from the MIT/X11 license.

View File

@ -1,5 +1,6 @@
--- ---
title: "Do What The F*ck You Want To Public License" title: "Do What The F*ck You Want To Public License"
spdx-id: WTFPL
source: http://www.wtfpl.net/ source: http://www.wtfpl.net/
description: The easiest licence out there. It gives the user permissions to do whatever they want with your code. description: The easiest licence out there. It gives the user permissions to do whatever they want with your code.

View File

@ -8,13 +8,18 @@ describe 'licenses' do
licenses.each do |license| licenses.each do |license|
context "The #{license['title']} license" do context "The #{license['title']} license" do
let(:id) { license['id'] } let(:id) { license['id'] }
let(:spdx_id) { license['spdx-id'] }
it 'has an SPDX ID' do it 'has an SPDX ID' do
expect(spdx_ids).to include(id) expect(spdx_ids).to include(spdx_id)
end
it 'has an ID that is downcased SPDX ID' do
expect(spdx_id.casecmp(id).zero?)
end end
it 'uses its SPDX name' do it 'uses its SPDX name' do
spdx = find_spdx(id) spdx = find_spdx(spdx_id)
expect(spdx).to_not be_nil expect(spdx).to_not be_nil
expect(spdx[1]['name'].gsub(/ only$/, '')).to eql(license['title']) expect(spdx[1]['name'].gsub(/ only$/, '')).to eql(license['title'])
end end

View File

@ -75,11 +75,11 @@ def spdx_list
end end
def spdx_ids def spdx_ids
spdx_list.map { |name, _properties| name.downcase } spdx_list.map { |name, _properties| name }
end end
def find_spdx(license) def find_spdx(license)
spdx_list.find { |name, _properties| name.casecmp(license).zero? } spdx_list.find { |name, _properties| name == license }
end end
def osi_approved_licenses def osi_approved_licenses