1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 04:40:09 +01:00

Merge remote-tracking branch 'github/gh-pages' into osl-3.0

Conflicts:
	_config.yml
This commit is contained in:
Derek Jones 2015-08-06 10:22:19 -07:00
commit c30ff9e20a
50 changed files with 413 additions and 477 deletions

2
.gitignore vendored
View File

@ -8,3 +8,5 @@ assets/vendor/zeroclipboard/test
assets/vendor/selectivizr/tests
assets/vendor/qtip2/basic
/vendor
Gemfile.lock
/.sass-cache

View File

@ -14,3 +14,10 @@ branches:
notifications:
email: false
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
sudo: false
cache: bundler

View File

@ -24,12 +24,12 @@ The easiest way to make a change is to simply edit a file from your browser.
When you click the edit button, it will fork the repository under your account.
Note what issue/issues your patch fixes in the commit message.
For example, to [change this file](https://github.com/github/choosealicense.com/blob/master/CONTRIBUTING.md),
For example, to [change this file](/CONTRIBUTING.md),
find it in the GitHub repository. Then click the `Edit` button. Make your
changes, type in a commit message, and click the `Propose File Change` button.
Thats it!
For more advanced changes, check out [the bootstrap instructions](https://github.com/github/choosealicense.com#run-it-on-your-machine) in the [project's readme](https://github.com/github/choosealicense.com/blob/master/README.md).
For more advanced changes, check out [the bootstrap instructions](https://github.com/github/choosealicense.com#run-it-on-your-machine) in the [project's readme](/README.md).
## Testing

View File

@ -6,4 +6,5 @@ gem "github-pages"
group :test do
gem "html-proofer"
gem "rake"
gem "rspec"
end

View File

@ -1,110 +0,0 @@
GEM
remote: https://rubygems.org/
specs:
RedCloth (4.2.9)
activesupport (4.1.1)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
blankslate (2.1.2.4)
classifier (1.3.4)
fast-stemmer (>= 1.0.0)
colorator (0.1)
colored (1.2)
commander (4.1.6)
highline (~> 1.6.11)
ethon (0.7.0)
ffi (>= 1.3.0)
fast-stemmer (1.0.2)
ffi (1.9.3)
gemoji (1.5.0)
github-pages (18)
RedCloth (= 4.2.9)
jekyll (= 1.5.1)
jekyll-mentions (= 0.0.6)
jekyll-redirect-from (= 0.3.1)
jekyll-sitemap (= 0.2.0)
jemoji (= 0.1.0)
kramdown (= 1.3.1)
liquid (= 2.5.5)
maruku (= 0.7.0)
rdiscount (= 2.1.7)
redcarpet (= 2.3.0)
highline (1.6.21)
html-pipeline (1.5.0)
activesupport (>= 2)
nokogiri (~> 1.4)
html-proofer (0.6.7)
colored (~> 1.2)
mercenary (~> 0.3.2)
nokogiri (~> 1.6.0)
typhoeus (~> 0.6.7)
i18n (0.6.9)
jekyll (1.5.1)
classifier (~> 1.3)
colorator (~> 0.1)
commander (~> 4.1.3)
liquid (~> 2.5.5)
listen (~> 1.3)
maruku (= 0.7.0)
pygments.rb (~> 0.5.0)
redcarpet (~> 2.3.0)
safe_yaml (~> 1.0)
toml (~> 0.1.0)
jekyll-mentions (0.0.6)
html-pipeline (~> 1.5.0)
jekyll (~> 1.4)
jekyll-redirect-from (0.3.1)
jekyll (~> 1.4)
jekyll-sitemap (0.2.0)
jekyll (~> 1.4)
jemoji (0.1.0)
gemoji (~> 1.5.0)
html-pipeline (~> 1.5.0)
jekyll (~> 1.4)
json (1.8.1)
kramdown (1.3.1)
liquid (2.5.5)
listen (1.3.1)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
maruku (0.7.0)
mercenary (0.3.3)
mini_portile (0.5.3)
minitest (5.3.3)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
parslet (1.5.0)
blankslate (~> 2.0)
posix-spawn (0.3.8)
pygments.rb (0.5.4)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.1.0)
rake (10.3.1)
rb-fsevent (0.9.4)
rb-inotify (0.9.4)
ffi (>= 0.5.0)
rb-kqueue (0.2.2)
ffi (>= 0.5.0)
rdiscount (2.1.7)
redcarpet (2.3.0)
safe_yaml (1.0.3)
thread_safe (0.3.3)
toml (0.1.1)
parslet (~> 1.5.0)
typhoeus (0.6.8)
ethon (>= 0.7.0)
tzinfo (1.1.0)
thread_safe (~> 0.1)
yajl-ruby (1.1.0)
PLATFORMS
ruby
DEPENDENCIES
github-pages
html-proofer
rake

View File

@ -1,4 +1,4 @@
Copyright (c) 2014 GitHub, Inc.
Copyright (c) 2013 GitHub, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -8,12 +8,12 @@ A lot of repositories on GitHub.com don't have a license. GitHub provides
a license chooser, but if you don't know anything about licenses, how are you
supposed to make an informed decision?
ChooseALicense.com is designed to help people make an informed decision about
[ChooseALicense.com](http://www.choosealicense.com "Choose A Licence website") is designed to help people make an informed decision about
licenses.
# Immediate Goals
* Politics Free - Let's just not get into it.
* Non-partisan. Our goal is to help you find a license that meets *your* goals.
* Well designed, but that goes without saying.
* The homepage should have just enough to help 99% of folks make a decision.
* For the 1%, the site will contain a list of licenses common to specific
@ -65,11 +65,10 @@ notices. The available variables are:
# Rules
Rules (the license's properties) are stored as a bulleted list within the
licenses YAML front matter. A full list of rules can be found in the
repository's `_config.yml` file. Each rule has a name e.g.,
`include-copyright`, a human-readable label, e.g., `Copyright inclusion`,
and a description `Include the original copyright with the code`.
To add a new rule, simply add it to `config.yml` and reference it in the
licenses YAML front matter. A full list of rules can be found in `_data/rules.yml`.
Each rule has a name e.g., `include-copyright`, a human-readable label, e.g.,
`Copyright inclusion`, and a description `Include the original copyright with the code`.
To add a new rule, simply add it to `_data/rules.yml` and reference it in the
appropriate license.
# License

View File

@ -1,7 +1,14 @@
require "html/proofer"
require 'rspec/core/rake_task'
desc "Run specs"
RSpec::Core::RakeTask.new do |t|
t.pattern = 'spec/**/*_spec.rb'
t.rspec_opts = ["--order", "rand", "--color"]
end
task :test do
sh "bundle exec jekyll build --trace"
# ignore href="#" for the "Copy to clipboard" button
HTML::Proofer.new("./_site").run
HTML::Proofer.new("./_site", :check_html => true).run
Rake::Task["spec"].invoke
end

View File

@ -4,77 +4,41 @@ relative_permalinks: false
markdown: kramdown
url: "http://choosealicense.com"
rules:
collections:
licenses:
output: true
permalink: /licenses/:path/
required:
- description: Include a copy of the license and copyright notice with the code.
label: License and copyright notice
tag: include-copyright
- description: Indicate significant changes made to the code.
label: State Changes
tag: document-changes
- description: Source code must be made available when distributing the software. In the case of LGPL and OSL 3.0, the source for the library (and not the entire program) must be made available.
label: Disclose Source
tag: disclose-source
- description: The library may be used within a non-open-source application.
label: Library usage
tag: library-usage
- description: You must change the name of the software if you modify it.
label: Rename
tag: rename
permitted:
- description: This software and derivatives may be used for commercial purposes.
label: Commercial Use
tag: commercial-use
- description: This software may be modified.
label: Modification
tag: modifications
- description: You may distribute this software.
label: Distribution
tag: distribution
- description: You may grant a sublicense to modify and distribute this software to third parties not included in the license.
label: Sublicensing
tag: sublicense
- description: You may use and modify the software without distributing it.
label: Private Use
tag: private-use
- description: This license provides an express grant of patent rights from the contributor to the recipient.
label: Patent Grant
tag: patent-grant
forbidden:
- description: While this may be implicitly true of all licenses, this license explicitly states that you may NOT use the names, logos, or trademarks of contributors.
label: Use Trademark
tag: trademark-use
- description: Software is provided without warranty and the software author/license owner cannot be held liable for damages.
label: Hold Liable
tag: no-liability
- description: You may not grant a sublicense to modify and distribute this software to third parties not included in the license.
label: Sublicensing
tag: no-sublicense
- description: This software may not be modified.
label: Modification
tag: modifications
- description: You may not distribute this software.
label: Distribution
tag: distribution
- description: You may not grant a sublicense to modify and distribute this software to third parties not included in the license.
label: Sublicensing
tag: sublicense
defaults:
-
scope:
path: ""
type: "licenses"
values:
layout: license
featured: false
"hide-from-license-list": false
exclude:
- app.coffee
- CNAME
- CONTRIBUTING.md
- Gemfile
- Gemfile.lock
- LICENSE.md
- licenses.json
- Rakefile
- README.md
- script
- bundle
- app.coffee
- CNAME
- CONTRIBUTING.md
- Gemfile
- Gemfile.lock
- LICENSE.md
- Rakefile
- README.md
- script
- vendor/bundle
- test
- tests
- assets/vendor/selectivizr/tests
- assets/vendor/zeroclipboard/test
gems:
- jekyll-sitemap
- jekyll-sitemap
- jekyll-redirect-from
sass:
sass_dir: _sass
style: :compressed

59
_data/rules.yml Normal file
View File

@ -0,0 +1,59 @@
required:
- description: Include a copy of the license and copyright notice with the code.
label: License and copyright notice
tag: include-copyright
- description: Indicate significant changes made to the code.
label: State Changes
tag: document-changes
- description: Source code must be made available when distributing the software. In the case of LGPL and OSL 3.0, the source for the library (and not the entire program) must be made available.
label: Disclose Source
tag: disclose-source
- description: Users who interact with the software via network are given the right to receive a copy of the corresponding source code.
label: Network Use is Distribution
tag: network-use-disclose
- description: The library may be used within a non-open-source application.
label: Library usage
tag: library-usage
- description: You must change the name of the software if you modify it.
label: Rename
tag: rename
permitted:
- description: This software and derivatives may be used for commercial purposes.
label: Commercial Use
tag: commercial-use
- description: This software may be modified.
label: Modification
tag: modifications
- description: You may distribute this software.
label: Distribution
tag: distribution
- description: You may grant a sublicense to modify and distribute this software to third parties not included in the license.
label: Sublicensing
tag: sublicense
- description: You may use and modify the software without distributing it.
label: Private Use
tag: private-use
- description: This license provides an express grant of patent rights from the contributor to the recipient.
label: Patent Grant
tag: patent-grant
forbidden:
- description: While this may be implicitly true of all licenses, this license explicitly states that you may NOT use the names, logos, or trademarks of contributors.
label: Use Trademark
tag: trademark-use
- description: Software is provided without warranty and the software author/license owner cannot be held liable for damages.
label: Hold Liable
tag: no-liability
- description: You may not grant a sublicense to modify and distribute this software to third parties not included in the license.
label: Sublicensing
tag: no-sublicense
- description: This software may not be modified.
label: Modification
tag: modifications
- description: You may not distribute this software.
label: Distribution
tag: distribution
- description: You may not grant a sublicense to modify and distribute this software to third parties not included in the license.
label: Sublicensing
tag: sublicense

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
/*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}

View File

@ -15,18 +15,21 @@
</div> <!-- /container -->
{% if page.layout == "license" or page.class == "license-types" %}
{% if page.collection == "licenses" or page.class == "license-types" %}
<script src="/assets/vendor/jquery/jquery.min.js"></script>
<script src="/assets/vendor/qtip2/jquery.qtip.min.js"></script>
<script src="/assets/vendor/zeroclipboard/ZeroClipboard.min.js"></script>
<script src="/assets/js/javascript.js"></script>
<script>
window.annotations = {{ site.data.rules | jsonify }};
</script>
<script src="/assets/js/app.js"></script>
{% endif %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
!function(L,I,C,e,N,S,E){L.GoogleAnalyticsObject=N,L[N]=L[N]||function(){
(L[N].q=L[N].q||[]).push(arguments)},L[N].l=+new Date,S=I.createElement(C),
E=I.getElementsByTagName(C)[0],S.src=e,E.parentNode.insertBefore(S,E)
}(window,document,"script","//www.google-analytics.com/analytics.js","ga");
ga('create', 'UA-3769691-24', 'choosealicense.com');
ga('send', 'pageview');

View File

@ -6,9 +6,7 @@
<title>{% if page.title %}{{ page.title | markdownify | strip_html | strip_newlines }} - {% endif %}{{ site.title}}</title>
{% if page.description %}<meta name="description" content="{{ page.description | strip_html | strip_newlines }}">{% endif %}
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Chivo:900">
<link rel="stylesheet" href="/assets/vendor/normalize-css/normalize.css">
<link rel="stylesheet" href="/assets/vendor/qtip2/jquery.qtip.min.css">
<link rel="stylesheet" href="/assets/css/application.css">
<link rel="stylesheet" href="/assets/css/application.css?v={{ site.github.build_revision }}">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<!--[if lt IE 9]>
<script src="/assets/vendor/html5shiv/dist/html5shiv.js"></script>

View File

@ -1,9 +0,0 @@
var annotations = {
{% for type_hash in site.rules %}
"{{ type_hash[0] }}": {
{% for rule_hash in type_hash[1] %}
"{{ rule_hash.tag }}" : "{{ rule_hash.description }}"{% if forloop.rindex0 > 0 %},{% endif %}
{% endfor %}
}{% if forloop.rindex0 > 0 %},{% endif %}
{% endfor %}
};

View File

@ -1,132 +0,0 @@
// Generated by CoffeeScript 1.7.1
(function() {
var Choosealicense;
Choosealicense = (function() {
Choosealicense.prototype.flashAvailable = function() {
if (typeof ActiveXObject !== "undefined" && ActiveXObject !== null) {
return !!(new ActiveXObject("ShockwaveFlash.ShockwaveFlash"));
} else {
return !!navigator.mimeTypes["application/x-shockwave-flash"];
}
};
Choosealicense.prototype.selectText = function(element) {
var range, selection;
if (document.body.createTextRange) {
range = document.body.createTextRange();
range.moveToElementText(element);
return range.select();
} else if (window.getSelection) {
selection = window.getSelection();
range = document.createRange();
range.selectNodeContents(element);
selection.removeAllRanges();
return selection.addRange(range);
}
};
Choosealicense.prototype.qtip_position = {
my: "top center",
at: "bottom center"
};
Choosealicense.prototype.categories = {
required: "Required",
permitted: "Permitted",
forbidden: "Forbidden"
};
function Choosealicense() {
this.initTooltips();
this.initClipboard();
this.initLicenseVariationNav();
}
Choosealicense.prototype.initTooltips = function() {
var category, label, rules, text, _ref;
for (category in annotations) {
rules = annotations[category];
for (label in rules) {
text = rules[label];
$(".license-rules ul.license-" + category + " li." + label).attr("title", text);
}
}
_ref = this.categories;
for (category in _ref) {
label = _ref[category];
$(".license-" + category + " li").qtip({
content: {
text: false,
title: {
text: label
}
},
position: this.qtip_position,
style: {
classes: "qtip-shadow qtip-" + category
}
});
}
return false;
};
Choosealicense.prototype.initZeroClipboard = function() {
var clip;
$(".js-clipboard-button").data("clipboard-prompt", $(".js-clipboard-button").text());
clip = new ZeroClipboard($(".js-clipboard-button"), {
moviePath: "/assets/vendor/zeroclipboard/ZeroClipboard.swf"
});
clip.on("mouseout", this.clipboardMouseout);
clip.on("complete", this.clipboardComplete);
return clip;
};
Choosealicense.prototype.initAlternativeClipboard = function() {
return $(".js-clipboard-button").click((function(_this) {
return function(e) {
var target;
target = "#" + $(e.target).data("clipboard-target");
return _this.selectText($(target)[0]);
};
})(this));
};
Choosealicense.prototype.initClipboard = function() {
if ((typeof ZeroClipboard !== "undefined" && ZeroClipboard !== null) && this.flashAvailable()) {
return this.initZeroClipboard();
} else {
return this.initAlternativeClipboard();
}
};
Choosealicense.prototype.clipboardMouseout = function(client, args) {
return this.innerText = $(this).data("clipboard-prompt");
};
Choosealicense.prototype.clipboardComplete = function(client, args) {
return this.innerText = "Copied!";
};
Choosealicense.prototype.initLicenseVariationNav = function() {
return $(".js-nav-pills a").click(function(e) {
var nav, selectedTab;
selectedTab = $(this).data("selected-tab");
nav = $(this).closest(".js-nav-pills");
nav.find("li").removeClass("active");
nav.closest(".js-license-variations").siblings(".js-variation-tab").removeClass("active");
$(this).parent("li").addClass("active");
$("." + selectedTab).addClass("active");
return e.preventDefault();
});
};
return Choosealicense;
})();
$(function() {
return new Choosealicense();
});
}).call(this);

View File

@ -1,26 +1,36 @@
<div class="license-family clearfix">
<div class="license-family-heading">
<h3 class="license-family-name"><a href="{{ page.permalink }}">{% if page.category %}{{ page.category }}{% else %}{{ page.title }}{% endif %}</a></h3>
<h3 class="license-family-name">
<a href="{{ license.permalink }}">
{% if license.category %}{{ license.category }}{% else %}{{ license.title }}{% endif %}
</a>
</h3>
<p class="license-family-description">{{ page.description }}</p>
<p class="license-family-description">{{ license.description }}</p>
</div>
<div class="license-details">
<div class="license-variations js-license-variations">
<!-- always show this div, even w/o variations, for proper spacing -->
{% if page.tab-slug %}
{% if license.tab-slug %}
<ul class="nav-pills js-nav-pills">
{% for variation in site.pages %}
{% if variation.category and variation.category == page.category %}
<li{% if page.tab-slug == variation.tab-slug %} class="active"{% endif %}><a href="#{{ variation.tab-slug }}" data-selected-tab="variation-{{ variation.tab-slug }}">{{ variation.title }}</a></li>
{% for variation in site.licenses %}
{% if variation.category and variation.category == license.category %}
<li{% if license.tab-slug == variation.tab-slug %} class="active"{% endif %}><a href="#{{ variation.tab-slug }}" data-selected-tab="variation-{{ variation.tab-slug }}">
{% if variation.nickname != nil %}
{{ variation.nickname }}
{% else %}
{{ variation.title }}
{% endif %}
</a></li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</div>
{% for variation in site.pages %}
{% if variation.category and variation.category == page.category %}
<div {% if variation.tab-slug %}id="{{ variation.tab-slug }}" {% endif %}class="variation-tab {% if variation.tab-slug %}variation-{{ variation.tab-slug }}{% endif %} js-variation-tab{% if page.tab-slug == variation.tab-slug %} active{% endif %}">
{% for variation in site.licenses %}
{% if variation.category and variation.category == license.category %}
<div {% if variation.tab-slug %}id="{{ variation.tab-slug }}" {% endif %}class="variation-tab {% if variation.tab-slug %}variation-{{ variation.tab-slug }}{% endif %} js-variation-tab{% if license.tab-slug == variation.tab-slug %} active{% endif %}">
<table class="license-rules">
<tr>
{% assign types = "required|permitted|forbidden" | split: "|" %}
@ -32,7 +42,7 @@
{% for type in types %}
<td>
<ul class="license-{{ type }}">
{% assign rules = site.rules[type] | sort: "label" %}
{% assign rules = site.data.rules[type] | sort: "label" %}
{% for rule_obj in rules %}
{% assign req = rule_obj.tag %}
{% if variation[type] contains req %}

View File

@ -27,7 +27,7 @@
{% for type in types %}
<h3>{{ type | capitalize }}</h3>
<ul class="license-{{ type }}">
{% assign rules = site.rules[type] | sort: "label" %}
{% assign rules = site.data.rules[type] | sort: "label" %}
{% for rule_obj in rules %}
{% assign req = rule_obj.tag %}
{% if page[type] contains req %}

View File

@ -1,11 +1,15 @@
---
title: Affero GPL
title: GNU Affero General Public License v3.0
nickname: GNU Affero GPL v3.0
category: GPL
tab-slug: agpl
tab-slug: agpl-v3
hide-from-license-list: true
layout: license
permalink: /licenses/agpl/
permalink: /licenses/agpl-3.0/
source: http://www.gnu.org/licenses/agpl-3.0.txt
redirect_from: /licenses/agpl/
description: "The 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. The AGPL family of licenses is distinguished from GPLv2 and GPLv3 in that hosted services using the code are considered distribution and trigger the copyleft requirements."
note: The Free Software Foundation recommends taking the additional step of adding a boilerplate notice to the top of each file. The boilerplate can be found at the end of the license.
@ -15,11 +19,13 @@ required:
- include-copyright
- document-changes
- disclose-source
- network-use-disclose
permitted:
- commercial-use
- modifications
- distribution
- patent-grant
- private-use
forbidden:
@ -688,4 +694,4 @@ specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.
<http://www.gnu.org/licenses/>.

View File

@ -1,8 +1,9 @@
---
title: Apache v2 License
title: Apache License 2.0
category: Apache
layout: license
permalink: /licenses/apache/
permalink: /licenses/apache-2.0/
redirect_from: /licenses/apache/
featured: true
@ -17,7 +18,7 @@ source: http://www.apache.org/licenses/LICENSE-2.0.html
required:
- include-copyright
- document-changes
permitted:
- commercial-use
- modifications
@ -233,4 +234,4 @@ forbidden:
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.

View File

@ -2,8 +2,9 @@
layout: license
title: Artistic License 2.0
category: Artistic
permalink: /licenses/artistic/
redirect_from: /licenses/artistic/
source: http://www.perlfoundation.org/attachment/legal/artistic-2_0.txt
permalink: /licenses/artistic-2.0/
description: Heavily favored by the Perl community, the Artistic license requires that modified versions of the software do not prevent users from running the standard version.
@ -224,4 +225,4 @@ NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL
LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,10 +1,12 @@
---
layout: license
title: BSD 2-Clause license
title: BSD 2-clause "Simplified" License
nickname: Simplified BSD
category: BSD
tab-slug: bsd
hide-from-license-list: false
permalink: /licenses/bsd/
hide-from-license-list: true
redirect_from: /licenses/bsd/
permalink: /licenses/bsd-2-clause/
description: A permissive license that comes in two variants, the <a href="/licenses/bsd">BSD 2-Clause</a> and <a href="/licenses/bsd-3-clause">BSD 3-Clause</a>. Both have very minute differences to the MIT license.
@ -49,4 +51,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,12 +1,15 @@
---
layout: license
title: BSD (3-Clause) License
title: BSD 3-clause "New" or "Revised" License
nickname: New BSD
category: BSD
tab-slug: bsd-3
hide-from-license-list: true
permalink: /licenses/bsd-3-clause/
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. Replace {organization} with the organization, if any, that sponsors this work.
description: A permissive license that comes in two variants, the <a href="/licenses/bsd">BSD 2-Clause</a> and <a href="/licenses/bsd-3-clause">BSD 3-Clause</a>. Both have very minute differences to the MIT license. The three clause variant prohibits others from using the name of the project or its contributors to promote derivative works without written consent.
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. Replace [project] with the project organization, if any, that sponsors this work.
source: http://opensource.org/licenses/BSD-3-Clause
@ -39,7 +42,7 @@ modification, are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the {organization} nor the names of its
* Neither the name of [project] nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
@ -52,4 +55,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,6 +1,7 @@
---
layout: license
title: CC0 1.0 Universal
title: Creative Commons Zero v1.0 Universal
nickname: CC0 1.0 Universal
category: Public Domain Dedication
tab-slug: cc0
permalink: /licenses/cc0/
@ -25,6 +26,8 @@ permitted:
forbidden:
- no-liability
required: []
---
CC0 1.0 Universal
@ -141,4 +144,4 @@ Affirmer's express Statement of Purpose.
CC0 or use of the Work.
For more information, please see
<http://creativecommons.org/publicdomain/zero/1.0/>
<http://creativecommons.org/publicdomain/zero/1.0/>

View File

@ -1,8 +1,9 @@
---
layout: license
title: Eclipse Public License v1.0
title: Eclipse Public License 1.0
category: Eclipse
permalink: /licenses/eclipse/
redirect_from: /licenses/eclipse/
permalink: /licenses/epl-1.0/
description: This commercially-friendly copyleft license provides the ability to commercially license binaries; a modern royalty-free patent license grant; and the ability for linked works to use other licenses, including commercial ones.
@ -236,4 +237,4 @@ This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial in
any resulting litigation.
any resulting litigation.

View File

@ -1,10 +1,12 @@
---
title: GPL v2
title: GNU General Public License v2.0
nickname: GNU GPL v2.0
category: GPL
tab-slug: gpl-v2
hide-from-license-list: false
layout: license
permalink: /licenses/gpl-v2/
permalink: /licenses/gpl-2.0/
redirect_from: /licenses/gpl-v2/
source: http://www.gnu.org/licenses/gpl-2.0.txt
description: 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 GPL, each with different requirements.
@ -371,4 +373,4 @@ This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
Public License instead of this License.

View File

@ -1,12 +1,16 @@
---
title: GPL v3
title: GNU General Public License v3.0
nickname: GNU GPL v3.0
category: GPL
tab-slug: gpl-v3
hide-from-license-list: true
layout: license
permalink: /licenses/gpl-v3/
permalink: /licenses/gpl-3.0/
redirect_from: /licenses/gpl-v3/
source: http://www.gnu.org/licenses/gpl-3.0.txt
description: 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.
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.
note: The Free Software Foundation recommends taking the additional step of adding a boilerplate notice to the top of each file. The boilerplate can be found at the end of the license.
@ -701,4 +705,4 @@ into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

42
_licenses/isc.txt Normal file
View File

@ -0,0 +1,42 @@
---
layout: license
title: ISC License
permalink: /licenses/isc/
source: http://opensource.org/licenses/isc-license
category: BSD
tab-slug: isc
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">BSD 2-Clause</a> and <a href="/licenses/mit">MIT</a> licenses, removing some language that is no longer necessary.
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. [email] is optional but recommended.
filename: LICENSE
required:
- include-copyright
permitted:
- commercial-use
- distribution
- modifications
- private-use
- sublicense
forbidden:
- no-liability
---
Copyright (c) [year], [fullname] <[email]>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@ -1,9 +1,11 @@
---
layout: license
title: LGPL v2.1
title: GNU Lesser General Public License v2.1
nickname: GNU LGPL v2.1
category: LGPL
tab-slug: lgpl-v2_1
permalink: /licenses/lgpl-v2.1/
redirect_from: /licenses/lgpl-v2.1/
permalink: /licenses/lgpl-2.1/
source: http://www.gnu.org/licenses/lgpl-2.1.txt
description: Primarily used for software libraries, 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 LGPL.
@ -533,4 +535,4 @@ necessary. Here is a sample; alter the names:
{signature of Ty Coon}, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
That's all there is to it!

View File

@ -1,17 +1,19 @@
---
layout: license
title: LGPL v3
title: GNU Lesser General Public License v3.0
nickname: GNU LGPL v3.0
category: LGPL
tab-slug: lgpl-v3
hide-from-license-list: true
permalink: /licenses/lgpl-v3/
redirect_from: /licenses/lgpl-v3/
source: http://www.gnu.org/licenses/lgpl-3.0.txt
permalink: /licenses/lgpl-3.0/
description: Version 3 of the LGPL is an additional set of permissions to the <a href="/licenses/gpl-v3">GPL v3 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.
description: Version 3 of the LGPL is an additional set of permissions to the <a href="/licenses/GPL-3.0">GPL v3 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.
how: This license is an additional set of permissions to the <a href="/licenses/gpl-v3">GPL v3</a> license. Follow the instructions to apply the GPL v3 license. Then either paste this text to the bottom of that file OR add a separate file (typically named COPYING.lesser or LICENSE.lesser) in the root of your source code and copy the text.
how: This license is an additional set of permissions to the <a href="/licenses/gpl-3.0">GPL v3</a> license. Follow the instructions to apply the GPL v3. Then either paste this text to the bottom of the created file OR add a separate file (typically named COPYING.lesser or LICENSE.lesser) in the root of your source code and copy the text.
note: The Free Software Foundation recommends taking the additional step of adding a boilerplate notice to the top of each file. The boilerplate can be found at the end of the license.
note: The Free Software Foundation recommends taking the additional step of adding a boilerplate notice to the top of each file. The boilerplate can be found at the end of the <a href="/licenses/gpl-3.0">GPL v3 license</a>. Insert the word “Lesser” before “General” in all three places in the boilerplate notice to make sure that you refer to the LGPL v3 and not the GPL v3.
required:
- include-copyright
@ -194,4 +196,4 @@ General Public License ever published by the Free Software Foundation.
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
Library.

View File

@ -46,4 +46,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.

View File

@ -1,9 +1,10 @@
---
layout: license
title: Mozilla Public License Version 2.0
title: Mozilla Public License 2.0
category: Mozilla
permalink: /licenses/mozilla/
redirect_from: /licenses/mozilla/
source: http://www.mozilla.org/MPL/2.0/
permalink: /licenses/mpl-2.0/
description: The Mozilla Public License (MPL 2.0) is maintained by the Mozilla foundation. This license attempts to be a compromise between the permissive BSD license and the reciprocal GPL license.
@ -387,4 +388,4 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
This Source Code Form is "Incompatible
With Secondary Licenses", as defined by
the Mozilla Public License, v. 2.0.
the Mozilla Public License, v. 2.0.

View File

@ -16,14 +16,17 @@ how: Create a text file (typically named UNLICENSE or UNLICENSE.txt) in the root
required:
permitted:
- private-use
- commercial-use
- modifications
- distribution
- private-use
- sublicense
forbidden:
- no-liability
required: []
---
This is free and unencumbered software released into the public domain.
@ -48,4 +51,4 @@ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org>
For more information, please refer to <http://unlicense.org>

1
_sass/jquery.qtip.scss Symbolic link
View File

@ -0,0 +1 @@
../assets/vendor/qtip2/jquery.qtip.css

1
_sass/normalize.scss vendored Symbolic link
View File

@ -0,0 +1 @@
../assets/vendor/normalize-css/normalize.css

View File

@ -1,3 +1,9 @@
---
---
@import "normalize";
@import "jquery.qtip";
body {
background-image: url(../img/bg.jpg);
color: #5c5855;
@ -22,7 +28,7 @@ h1, h2, h3, h5 {
}
h1 {
font-size: 40px;
font-size: 35px;
margin-bottom: 25px;
}

View File

@ -1,3 +1,6 @@
---
---
class Choosealicense
# Checks if Flash is available in the client.
@ -42,9 +45,9 @@ class Choosealicense
initTooltips: ->
# Dynamically add annotations as title attribute to rule list items
for category, rules of annotations
for label, text of rules
$(".license-rules ul.license-#{category} li.#{label}").attr "title", text
for category, rules of window.annotations
for rule in rules
$(".license-rules ul.license-#{category} li.#{rule["tag"]}").attr "title", rule["description"]
# Init tooltips on all rule list items
for category, label of @categories
@ -87,11 +90,11 @@ class Choosealicense
# Callback to restore the clipboard button's original text
clipboardMouseout: (client, args) ->
@innerText = $(this).data("clipboard-prompt")
@textContent = $(this).data("clipboard-prompt")
# Post-copy user feedback callback
clipboardComplete: (client, args) ->
@innerText = "Copied!"
@textContent = "Copied!"
# Initializes pill navigation for license variations
initLicenseVariationNav: ->

View File

@ -1,6 +0,0 @@
---
layout: nil
---
{% include js/annotations.js %}
{% include js/app.js %}

View File

@ -2,7 +2,7 @@
layout: default
class: home
hide_breadcrumbs: true
title: Choosing an OSS license doesn't need to be scary
title: Choosing an OSS license doesnt need to be scary
description: A site to provide non-judgmental guidance on choosing a license for your open source project
permalink: /
---
@ -19,31 +19,31 @@ permalink: /
<h3>I want it simple and permissive.</h3>
</a>
<p>
The <a href="licenses/mit">MIT License</a> is a permissive license that is short and to the point. It lets people do anything they want with your code as long as they provide attribution back to you and don't hold you liable.
The <a href="licenses/mit">MIT License</a> is a permissive license that is short and to the point. It lets people do anything they want with your code as long as they provide attribution back to you and dont hold you liable.
</p>
<p>
<strong>jQuery</strong> and <strong>Rails</strong> use the MIT&nbsp;License.
</p>
</li>
<li class="patents">
<a href="licenses/apache">
<a href="licenses/apache-2.0/">
<span class="triptych-sprite lightbulb"></span>
<h3>I'm concerned about patents.</h3>
<h3>Im concerned about patents.</h3>
</a>
<p>
The <a href="licenses/apache/">Apache License</a> is a permissive license similar to the MIT License, but also provides an express grant of patent rights from contributors to users.
The <a href="licenses/apache-2.0/">Apache License</a> is a permissive license similar to the MIT License, but also provides an express grant of patent rights from contributors to users.
</p>
<p>
<strong>Apache</strong>, <strong>SVN</strong>, and <strong>NuGet</strong> use the Apache&nbsp;License.
</p>
</li>
<li class="copyleft">
<a href="licenses/gpl-v2">
<a href="licenses/gpl-2.0/">
<span class="triptych-sprite circular"></span>
<h3>I care about sharing improvements.</h3>
</a>
<p>
The GPL (<a href="licenses/gpl-v2">V2</a> or <a href="licenses/gpl-v3">V3</a>) is a copyleft license that requires anyone who distributes your code or a derivative work to make the source available under the same terms. V3 is similar to V2, but further restricts use in hardware that forbids software alterations.
The GPL (<a href="licenses/gpl-2.0/">V2</a> or <a href="licenses/gpl-3.0/">V3</a>) is a copyleft license that requires anyone who distributes your code or a derivative work to make the source available under the same terms. V3 is similar to V2, but further restricts use in hardware that forbids software alterations.
</p>
<p>
<strong>Linux</strong>, <strong>Git</strong>, and <strong>WordPress</strong> use the GPL.
@ -57,7 +57,7 @@ permalink: /
</h2>
<ul class="triptych see-more clearfix">
<li>
<h3>My content isn't code.</h3>
<h3>My content isnt code.</h3>
<p>
Check out <a href="http://creativecommons.org/choose/">Creative Commons</a>.
</p>
@ -69,9 +69,9 @@ permalink: /
</p>
</li>
<li>
<h3>I don't want to choose a license.</h3>
<h3>I dont want to choose a license.</h3>
<p>
<a href="no-license">You don't have to</a>.
<a href="no-license">You dont have to</a>.
</p>
</li>
</ul>

View File

@ -7,14 +7,9 @@ title: Licenses
<h2>Featured Licenses</h2>
{% assign sorted_pages = site.pages | sort: 'path' %}
{% for page in sorted_pages %}
{% if page.layout == "license" %}
{% if page.featured %}
{% include license-overview.html %}
{% endif %}
{% endif %}
{% assign featured_licenses = site.licenses | where:"featured",true %}
{% for license in featured_licenses | sort: 'path' %}
{% include license-overview.html %}
{% endfor %}
<h2>Other licenses</h2>
@ -22,11 +17,7 @@ title: Licenses
Some communities tend to have specific licenses preferred by the
community. For example, Perl developers often choose the Artistic License.
</p>
{% for page in sorted_pages %}
{% if page.layout == "license" %}
{% if page.featured != true and page.hide-from-license-list != true %}
{% include license-overview.html %}
{% endif %}
{% endif %}
{% assign licenses = site.licenses | where:"featured",false | where:"hide-from-license-list",false %}
{% for license in licenses %}
{% include license-overview.html %}
{% endfor %}

View File

@ -1,28 +1,4 @@
---
comment: \
because the for loop is being filtered by layout, the normal rindex0 check
for the trailing comma doesn't work. Count the number of licenses and manually
increment an index to see if we're on the true last iteration.
---
{% assign count = 0 %}{% for page in site.pages %}{% if page.layout == "license" %}{% assign count = count | plus: 1 %}{% endif %}{% endfor %}{% assign i = 0 %}
[
{% for page in site.pages %}{% if page.layout == "license" %}
{
"title": "{{ page.title }}",
"permalink": "{{ page.permalink }}",
"featured": {% if page.featured %}true{% else %}false{% endif %},
"description": "{{ page.description | replace: '"', '\"' }}",
"how": "{{ page.how | replace: '"', '\"' }}",
"rules": {
{% for category in site.rules %}
{% assign cat = category[0] %}
"{{ cat }}": [
{% for rule in page[cat] %}
"{{ rule }}"{% if forloop.rindex0 > 0 %},{% endif %}
{% endfor %}
]{% if forloop.rindex0 > 0 %},{% endif %}
{% endfor %}
}{% assign i = i | plus: 1 %}
}{% if i < count %},{% endif %}
{% endif %}{% endfor %}
]
{{ site.licenses | jsonify }}

View File

@ -6,8 +6,8 @@ title: No License
You're under no obligation to choose a license and it's your right not to include one with your code or project. But please note that opting out of open source licenses doesn't mean you're opting out of copyright law.
You'll have to check with your own legal counsel regarding your particular project, but generally speaking, the absence of a license means that default copyright laws apply. This means that you retain all rights to your source code and that nobody else may reproduce, distribute, or create derivative works from your work. This might not be what you intend.
You'll have to check with your own legal counsel regarding your particular project, but generally speaking, the absence of a license means that default copyright laws apply. This means that you retain all rights to your source code and that nobody else may reproduce, distribute, or create derivative works from your work.
Disallowing use of your code might not be what you intend by "no license." An [open-source license](/) allows reuse of your code while maintaining copyright. If your goal is to explicitly opt-out of copyright protections, try a public domain dedication like the [Unlicense](/licenses/unlicense/) or [CC0](/licenses/cc0). If you want to share your work with others, you must opt into it.
Even in the absence of a license file, you may grant some rights in cases where you publish your source code to a site that requires accepting terms of service. For example, if you publish your source code in a public repository on GitHub, you have accepted the [Terms of Service](https://help.github.com/articles/github-terms-of-service) which do allow other GitHub users some rights. Specifically, you allow others to view and fork your repository.
If you want to share your work with others, please consider choosing an open source license.

View File

@ -1,5 +1,4 @@
---
layout: nil
---
# www.robotstxt.org/

View File

@ -6,8 +6,5 @@ echo "bundling installin'"
gem install bundler
bundle install
echo "npm installin'"
npm install coffee-script
echo
echo "You're all set. Just run script/server and you can play license roulette!"
echo "You're all set. Just run script/server and you can play license roulette!"

View File

@ -2,8 +2,5 @@
set -e
echo "compiling javascript..."
./node_modules/.bin/coffee -c _includes/js/app.coffee
echo "building the site..."
bundle exec rake test

7
script/downcase Executable file
View File

@ -0,0 +1,7 @@
#! /usr/bin/env ruby
# downcases all licenses in a git-friendly way
Dir["_licenses/*"].each do |file|
system "git mv #{file} #{file.downcase}2"
system "git mv #{file.downcase}2 #{file.downcase}"
end

View File

@ -2,11 +2,8 @@
set -e
echo "compiling javascript..."
./node_modules/.bin/coffee -c _includes/js/app.coffee
echo "spinning up the server..."
bundle exec jekyll serve -w
echo "cleaning up..."
rm -Rf _site
rm -Rf _site

51
spec/license_spec.rb Normal file
View File

@ -0,0 +1,51 @@
require 'spec_helper'
licenses.each do |license|
describe "The #{license["title"]} license" do
it "should have a title" do
expect(license["title"]).to_not be_nil
end
it "should have a description" do
expect(license["description"]).to_not be_nil
end
describe "SPDX compliance" do
# "No license" isn't really a license, so no need to test
unless license["id"] == "no-license"
it "#{license["id"]} should be a valid SPDX ID" do
expect(find_spdx(license["id"])).to_not be_nil
end
it "should be the proper SPDX name" do
spdx = find_spdx(license["id"])
expect(spdx[1]["name"].gsub(/ only$/,"")).to eql(license["title"])
end
# CC0 and Unlicense are not OSI approved, but that's okay
unless license["id"] == "unlicense" || license["id"] == "cc0-1.0"
it "should be OSI approved" do
spdx = find_spdx(license["id"])
expect(spdx[1]["osiApproved"]).to eql(true)
end
end
end
end
["permitted", "required", "forbidden"].each do |group|
describe "#{group} properties" do
it "should list the properties" do
expect(license[group]).to_not be_nil
end
license[group].to_a.each do |tag|
describe "#{tag} tag" do
it "should be a valid tag" do
expect(rule?(tag,group)).to be(true)
end
end
end
end
end
end
end

47
spec/spec_helper.rb Normal file
View File

@ -0,0 +1,47 @@
require 'jekyll'
require 'open-uri'
require 'json'
def config_file
File.expand_path "./_config.yml", source
end
def source
File.expand_path("../", File.dirname(__FILE__))
end
def config
config = Jekyll::Configuration.new.read_config_file config_file
config = Jekyll::Utils.deep_merge_hashes(config, {:source => source})
Jekyll::Utils.deep_merge_hashes(Jekyll::Configuration::DEFAULTS, config)
end
def licenses
site.collections["licenses"].docs.map { |l| l.data.merge("id" => l.basename(".txt")) }
end
def site
$site ||= begin
site = Jekyll::Site.new(config)
site.reset
site.read
site
end
end
def rules
site.data["rules"]
end
def rule?(tag, group)
rules[group].any? { |r| r["tag"] == tag }
end
def spdx_list
url = "https://raw.githubusercontent.com/sindresorhus/spdx-license-list/master/spdx.json"
$spdx ||= JSON.parse(open(url).read)
end
def find_spdx(license)
spdx_list.find { |name, properties| name.downcase == license }
end