1
0
mirror of https://github.com/github/choosealicense.com synced 2024-07-08 03:09:36 +02:00

Merge branch 'gh-pages' into home-reform

This commit is contained in:
Mike Linksvayer 2016-07-02 11:54:51 -07:00
commit 856110468e
15 changed files with 90 additions and 4 deletions

View File

@ -51,9 +51,10 @@ Licenses sit in the `/_licenses` folder. Each license has YAML front matter desc
#### Optional fields
* `featured` - Whether the license should be featured on the main page (defaults to false)
* `hidden` - Whether the license is hidden from the license list (defaults to true)
* `nickname` - Customary short name if applicable (e.g, GPLv3)
* `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 up to 3 notable projects using the license with straightforward LICENSE files which serve as examples newcomers can follow and that can be detected by [licensee](https://github.com/benbalter/licensee) in the form of `project_name: license_file_url`
* `redirect_from` - Relative path(s) to redirect to the license from, to prevent breaking old URLs
### Auto-populated fields

View File

@ -16,6 +16,7 @@ defaults:
path: ""
type: "licenses"
values:
hidden: true
layout: license
exclude:

View File

@ -39,6 +39,10 @@
description: Whether the license should be featured on the main page (defaults to false)
required: false
- name: hidden
description: Whether the license is hidden from the license list (defaults to true)
required: false
- name: nickname
description: Customary short name if applicable (e.g, GPLv3)
required: false
@ -48,7 +52,7 @@
required: false
- name: using
description: 'A list of notable projects using the license in the form of `project_name: "url"`'
description: 'A list of up to 3 notable projects using the license with straightforward LICENSE files which serve as examples newcomers can follow and that can be detected by [licensee](https://github.com/benbalter/licensee) in the form of `project_name: license_file_url`'
required: false
- name: redirect_from

View File

@ -8,7 +8,7 @@
Creative Commons Attribution 3.0 Unported License</a>.
</p>
<div class="with-love">
Curated with &lt;3 by <a href="https://github.com">GitHub, Inc.</a>
Curated with &lt;3 by <a href="https://github.com">GitHub, Inc.</a> and <a href="https://github.com/github/choosealicense.com">You!</a>
</div>
</footer>

View File

@ -4,6 +4,7 @@ spdx-id: AGPL-3.0
nickname: GNU AGPLv3
redirect_from: /licenses/agpl/
source: http://www.gnu.org/licenses/agpl-3.0.txt
hidden: false
description: Permissions of this strongest copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. When a modified version is used to provide a service over a network, the complete source code of the modified version must be made available.

View File

@ -3,6 +3,7 @@ title: Apache License 2.0
spdx-id: Apache-2.0
redirect_from: /licenses/apache/
source: http://www.apache.org/licenses/LICENSE-2.0.html
hidden: false
description: A permissive license whose main conditions require preservation of copyright and license notices. Contributors provide an express grant of patent rights. Licensed works, modifications, and larger works may be distributed under different terms and without source code.

View File

@ -5,6 +5,7 @@ nickname: GNU GPLv3
redirect_from: /licenses/gpl-v3/
source: http://www.gnu.org/licenses/gpl-3.0.txt
featured: true
hidden: false
description: Permissions of this strong copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights.

View File

@ -4,6 +4,7 @@ spdx-id: LGPL-3.0
nickname: GNU LGPLv3
redirect_from: /licenses/lgpl-v3/
source: http://www.gnu.org/licenses/lgpl-3.0.txt
hidden: false
description: Permissions of this copyleft license are conditioned on making available complete source code of licensed works and modifications under the same license or the GNU GPLv3. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. However, a larger work using the licensed work through interfaces provided by the licensed work may be distributed under different terms and without source code for the larger work.

View File

@ -3,6 +3,7 @@ title: MIT License
spdx-id: MIT
source: https://opensource.org/licenses/MIT
featured: true
hidden: false
description: A short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.

View File

@ -3,6 +3,7 @@ title: Mozilla Public License 2.0
spdx-id: MPL-2.0
redirect_from: /licenses/mozilla/
source: https://www.mozilla.org/media/MPL/2.0/index.txt
hidden: false
description: Permissions of this weak copyleft license are conditioned on making available source code of licensed files and modifications of those files under the same license (or in certain cases, one of the GNU licenses). Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. However, a larger work using the licensed work may be distributed under different terms and without source code for files added in the larger work.

View File

@ -2,6 +2,7 @@
title: The Unlicense
spdx-id: Unlicense
source: http://unlicense.org/UNLICENSE
hidden: false
description: A license with no conditions whatsoever which dedicates works to the public domain. Unlicensed works, modifications, and larger works may be distributed under different terms and without source code.

View File

@ -3,7 +3,7 @@ title: "Do What The F*ck You Want To Public License"
spdx-id: WTFPL
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 license out there. It gives the user permissions to do whatever they want with your code.
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file.

42
_licenses/zlib.txt Normal file
View File

@ -0,0 +1,42 @@
---
title: zlib License
spdx-id: Zlib
source: https://opensource.org/licenses/Zlib
description: A short permissive license, compatible with GPL. Requires altered source versions to be documented as such.
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders.
conditions:
- include-copyright
- document-changes
permissions:
- commercial-use
- modifications
- distribution
- private-use
limitations:
- no-liability
---
zlib License
(C) [year] [fullname]
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

View File

@ -0,0 +1,27 @@
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
gpl-3.0
lgpl-3.0
mit
mpl-2.0
unlicense
).freeze
it 'has the expected number of shown licenses' do
expect(shown_licenses.count).to eql(7)
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['spdx-lcase'])
end
end
end
end

View File

@ -40,6 +40,10 @@ def licenses
end
end
def shown_licenses
licenses.select { |l| !l['hidden'] }
end
def site
SpecHelper.site ||= begin
site = Jekyll::Site.new(config)