rm no longer pertinent fields and tests

This commit is contained in:
Mike Linksvayer 2016-04-07 18:48:15 -07:00
Родитель baddd740af
Коммит b4cf070a82
25 изменённых файлов: 1 добавлений и 157 удалений

Просмотреть файл

@ -53,10 +53,7 @@ Licenses sit in the `/_licenses` folder. Each license has YAML front matter desc
* `using` - A list of notable projects using the license in the form of `project_name: "url"`
* `hidden` - Whether the license is hidden from the license list (defaults to true)
* `redirect_from` - Relative path(s) to redirect to the license from, to prevent breaking old URLs
* `featured` - Whether the license should be featured on the main page (defaults to false)
* `nickname` - A shorter, human-readable license name where the SPDX license name (`title` above) is long
* `variant` - Whether the license is a variant of a family of licenses (defaults to false)
* `family` - If part of a license family, the name of the license family (e.g., `GPL`)
### Auto-populated fields

Просмотреть файл

@ -39,26 +39,10 @@
description: 'A list of notable projects using the license in the form of `project_name: "url"`'
required: false
- name: hidden
description: Whether the license is hidden from the license list (defaults to true)
required: false
- name: redirect_from
description: Relative path(s) to redirect to the license from, to prevent breaking old URLs
required: false
- name: featured
description: Whether the license should be featured on the main page (defaults to false)
required: false
- name: nickname
description: A shorter, human-readable license name where the SPDX license name (`title` above) is long
required: false
- name: variant
description: Whether the license is a variant of a family of licenses (defaults to false)
required: false
- name: family
description: If part of a license family, the name of the license family (e.g., `GPL`)
required: false

Просмотреть файл

@ -1,7 +1,7 @@
{% assign id = "/licenses/" | append: include.license-id %}
{% assign licenses = site.licenses | where:"id", id %}
{% for license in licenses %}
<div class="license-family clearfix">
<div class="license-family clearfix" id="{{ include.license-id | slugify }}">
<div class="license-family-heading">
<h3 class="license-family-name">
<a href="{{ license.url }}">

Просмотреть файл

@ -2,8 +2,6 @@
title: GNU Affero General Public License v3.0
nickname: GNU AGPLv3
redirect_from: /licenses/agpl/
family: GNU GPL
variant: true
source: http://www.gnu.org/licenses/agpl-3.0.txt
description: The GNU GPL family of licenses is the most widely used free software license and has a strong copyleft requirement. When distributing derived works, the source code of the work must be made available under the same license. GNU AGPLv3 is distinguished from GNU GPLv3 in that hosted services using the code are considered distribution and trigger the copyleft requirements.
@ -28,8 +26,6 @@ permissions:
limitations:
- no-liability
hidden: false
---
GNU AFFERO GENERAL PUBLIC LICENSE

Просмотреть файл

@ -1,7 +1,6 @@
---
title: Apache License 2.0
redirect_from: /licenses/apache/
featured: true
source: http://www.apache.org/licenses/LICENSE-2.0.html
description: A permissive license that also provides an express grant of patent rights from contributors to users.
@ -29,8 +28,6 @@ permissions:
limitations:
- trademark-use
- no-liability
hidden: false
---
Apache License

Просмотреть файл

@ -21,8 +21,6 @@ permissions:
limitations:
- no-liability
- trademark-use
hidden: false
---
The Artistic License 2.0

Просмотреть файл

@ -2,8 +2,6 @@
title: BSD 2-clause "Simplified" License
nickname: BSD 2-Clause
redirect_from: /licenses/bsd/
family: BSD
variant: true
source: http://opensource.org/licenses/BSD-2-Clause
description: A permissive license that comes in two variants, the <a href="/licenses/bsd-2-clause/">BSD 2-Clause</a> and <a href="/licenses/bsd-3-clause/">BSD 3-Clause</a>. Both have very minute differences to the MIT license.
@ -21,8 +19,6 @@ permissions:
limitations:
- no-liability
hidden: false
---
BSD 2-Clause License

Просмотреть файл

@ -1,7 +1,5 @@
---
title: BSD 3-clause Clear License
family: BSD
variant: true
description: A variant of the <a href="/licenses/bsd-3-clause/">BSD 3-Clause License</a> that explicitly does not grant any patent rights.
@ -21,7 +19,6 @@ permissions:
limitations:
- no-liability
- patent-use
---
The Clear BSD License

Просмотреть файл

@ -1,8 +1,6 @@
---
title: BSD 3-clause "New" or "Revised" License
nickname: BSD 3-Clause
family: BSD
variant: true
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.
@ -20,8 +18,6 @@ permissions:
limitations:
- no-liability
hidden: false
---
BSD 3-Clause License

Просмотреть файл

@ -2,8 +2,6 @@
title: Creative Commons Zero v1.0 Universal
nickname: CC0 1.0 Universal
redirect_from: /licenses/cc0/
family: Public Domain
variant: true
source: http://creativecommons.org/publicdomain/zero/1.0/
description: The <a href="http://creativecommons.org/publicdomain/zero/1.0/">Creative Commons CC0 Public Domain Dedication</a> waives copyright interest in any a work you've created and dedicates it to the world-wide public domain. Use CC0 to opt out of copyright entirely and ensure your work has the widest reach. As with the Unlicense and typical software licenses, CC0 disclaims warranties. CC0 is very similar to the Unlicense.
@ -24,8 +22,6 @@ limitations:
- no-liability
- trademark-use
- patent-use
hidden: false
---
CC0 1.0 Universal

Просмотреть файл

@ -26,8 +26,6 @@ permissions:
limitations:
- no-liability
hidden: false
---
Eclipse Public License - v 1.0

Просмотреть файл

@ -2,8 +2,6 @@
title: European Union Public License 1.1
nickname: EUPL-1.1
redirect_from: /licenses/eupl-v1.1/
family: EUPL
featured: false
source: https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11
description: The “European Union Public Licence” (EUPL) is a copyleft free/open source software license created on the initiative of and approved by the European Commission in 22 official languages of the European Union.
@ -29,7 +27,6 @@ permissions:
limitations:
- no-liability
- trademark-use
---
European Union Public Licence

Просмотреть файл

@ -2,8 +2,6 @@
title: GNU General Public License v2.0
nickname: GNU GPLv2
redirect_from: /licenses/gpl-v2/
family: GNU GPL
variant: true
source: http://www.gnu.org/licenses/gpl-2.0.txt
description: The GNU GPL is the most widely used free software license and has a strong copyleft requirement. When distributing derived works, the source code of the work must be made available under the same license. There are multiple variants of the GNU GPL, each with different requirements.
@ -31,8 +29,6 @@ permissions:
limitations:
- no-liability
hidden: false
---
GNU GENERAL PUBLIC LICENSE

Просмотреть файл

@ -2,8 +2,6 @@
title: GNU General Public License v3.0
nickname: GNU GPLv3
redirect_from: /licenses/gpl-v3/
family: GNU GPL
featured: true
source: http://www.gnu.org/licenses/gpl-3.0.txt
description: The GNU GPL is the most widely used free software license and has a strong copyleft requirement. When distributing derived works, the source code of the work must be made available under the same license.
@ -32,8 +30,6 @@ permissions:
limitations:
- no-liability
hidden: false
---
GNU GENERAL PUBLIC LICENSE

Просмотреть файл

@ -1,6 +1,5 @@
---
title: ISC License
family: BSD
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.
@ -23,8 +22,6 @@ permissions:
limitations:
- no-liability
hidden: false
---
ISC License

Просмотреть файл

@ -2,8 +2,6 @@
title: GNU Lesser General Public License v2.1
nickname: GNU LGPLv2.1
redirect_from: /licenses/lgpl-v2.1/
family: GNU LGPL
variant: true
source: http://www.gnu.org/licenses/lgpl-2.1.txt
description: Primarily used for software libraries, the GNU LGPL requires that derived works be licensed under the same license, but works that only link to it do not fall under this restriction. There are two commonly used versions of the GNU LGPL.
@ -26,8 +24,6 @@ permissions:
limitations:
- no-liability
hidden: false
---
GNU LESSER GENERAL PUBLIC LICENSE

Просмотреть файл

@ -2,7 +2,6 @@
title: GNU Lesser General Public License v3.0
nickname: GNU LGPLv3
redirect_from: /licenses/lgpl-v3/
family: GNU LGPL
source: http://www.gnu.org/licenses/lgpl-3.0.txt
description: Version 3 of the GNU LGPL is an additional set of permissions to the <a href="/licenses/gpl-3.0/">GNU GPLv3 license</a> that requires that derived works be licensed under the same license, but works that only link to it do not fall under this restriction.
@ -26,8 +25,6 @@ permissions:
limitations:
- no-liability
hidden: false
---
GNU LESSER GENERAL PUBLIC LICENSE

Просмотреть файл

@ -1,8 +1,6 @@
---
title: LaTeX Project Public License v1.3c
hidden: true
nickname: LPPL-1.3c
family: LPPL
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.
@ -24,7 +22,6 @@ permissions:
limitations:
- no-liability
---
The LaTeX Project Public License

Просмотреть файл

@ -1,6 +1,5 @@
---
title: MIT License
featured: true
source: https://opensource.org/licenses/MIT
description: A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty.
@ -23,8 +22,6 @@ permissions:
limitations:
- no-liability
hidden: false
---
MIT License

Просмотреть файл

@ -22,8 +22,6 @@ permissions:
limitations:
- no-liability
- trademark-use
hidden: false
---
Mozilla Public License Version 2.0

Просмотреть файл

@ -1,6 +1,5 @@
---
title: The Unlicense
family: Public Domain
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.
@ -17,8 +16,6 @@ conditions: []
limitations:
- no-liability
hidden: false
---
This is free and unencumbered software released into the public domain.

Просмотреть файл

@ -1,20 +0,0 @@
require 'spec_helper'
describe 'license categories' do
families.each do |family|
context "the #{family} family" do
family_licenses = licenses.select { |l| l['family'] == family }
primary = family_licenses.select { |l| l['variant'] == false }
variants = family_licenses.select { |l| l['variant'] == true }
it 'should only have one primary license' do
expect(primary.count).to eql(1)
end
it 'all other licenses should be variants' do
expected = family_licenses.count - 1
expect(variants.count).to eql(expected)
end
end
end
end

Просмотреть файл

@ -16,18 +16,6 @@ describe 'license meta' do
missing = required - raw_fields.keys
expect(missing).to be_empty
end
if license['family']
it 'should contain the required license variant fields' do
missing = %w(family) - license.keys
expect(missing).to be_empty
end
else
it 'should not contain license family specific fields' do
extra = %w(variant family).select { |f| raw_fields.keys.include?(f) }
expect(extra).to be_empty
end
end
end
end
end

Просмотреть файл

@ -1,35 +0,0 @@
require 'spec_helper'
describe 'shown licenses' do
# Whitelist of popular licenses that are shown (non-hidden)
# Note: most new licenses that are added should be hidden by default
SHOWN_LICENSES = %w(
agpl-3.0
apache-2.0
artistic-2.0
bsd-2-clause
bsd-3-clause
cc0-1.0
epl-1.0
gpl-2.0
gpl-3.0
isc
lgpl-2.1
lgpl-3.0
mit
mpl-2.0
unlicense
).freeze
it 'has the expected number of shown licenses' do
expect(shown_licenses.count).to eql(15)
end
shown_licenses.each do |license|
context "the #{license['title']} license" do
it 'is whitelisted to be shown' do
expect(SHOWN_LICENSES).to include(license['id'])
end
end
end
end

Просмотреть файл

@ -40,22 +40,10 @@ def licenses
end
end
def hidden_licenses
licenses.select { |l| l['hidden'] }
end
def shown_licenses
licenses.select { |l| !l['hidden'] }
end
def license_ids
licenses.map { |l| l['id'] }
end
def families
licenses.map { |l| l['family'] }.compact.uniq
end
def site
SpecHelper.site ||= begin
site = Jekyll::Site.new(config)