- {% if license.category %}
+ {% if license.family %}
- {% if license.category %}
- {% assign variations = site.licenses | where:"hidden",false | where:"category",license.category %}
+ {% if license.family %}
+ {% assign variations = site.licenses | where:"hidden",false | where:"family",license.family %}
{% else %}
{% assign variations = site.licenses | where:"title",license.title %}
{% endif %}
diff --git a/_licenses/agpl-3.0.txt b/_licenses/agpl-3.0.txt
index a3004e7..fafca4a 100644
--- a/_licenses/agpl-3.0.txt
+++ b/_licenses/agpl-3.0.txt
@@ -3,7 +3,7 @@ title: GNU Affero General Public License v3.0
nickname: GNU Affero GPL v3.0
tab-slug: agpl-v3
redirect_from: /licenses/agpl/
-category: GPL
+family: GPL
variant: true
source: http://www.gnu.org/licenses/agpl-3.0.txt
diff --git a/_licenses/bsd-2-clause.txt b/_licenses/bsd-2-clause.txt
index 1b89446..184b146 100644
--- a/_licenses/bsd-2-clause.txt
+++ b/_licenses/bsd-2-clause.txt
@@ -3,7 +3,7 @@ title: BSD 2-clause "Simplified" License
nickname: Simplified BSD
tab-slug: bsd
redirect_from: /licenses/bsd/
-category: BSD
+family: BSD
variant: true
source: http://opensource.org/licenses/BSD-2-Clause
diff --git a/_licenses/bsd-3-clause-clear.txt b/_licenses/bsd-3-clause-clear.txt
index e80ee91..c60faed 100644
--- a/_licenses/bsd-3-clause-clear.txt
+++ b/_licenses/bsd-3-clause-clear.txt
@@ -3,7 +3,7 @@ title: BSD 3-clause Clear License
nickname: Clear BSD
hidden: true
-category: BSD
+family: BSD
tab-slug: bsd-3-clear
variant: true
diff --git a/_licenses/bsd-3-clause.txt b/_licenses/bsd-3-clause.txt
index 66a6a15..575852e 100644
--- a/_licenses/bsd-3-clause.txt
+++ b/_licenses/bsd-3-clause.txt
@@ -2,7 +2,7 @@
title: BSD 3-clause "New" or "Revised" License
nickname: New BSD
tab-slug: bsd-3
-category: BSD
+family: BSD
variant: true
source: http://opensource.org/licenses/BSD-3-Clause
diff --git a/_licenses/cc0-1.0.txt b/_licenses/cc0-1.0.txt
index 61d35d1..31a0010 100644
--- a/_licenses/cc0-1.0.txt
+++ b/_licenses/cc0-1.0.txt
@@ -3,7 +3,7 @@ title: Creative Commons Zero v1.0 Universal
nickname: CC0 1.0 Universal
tab-slug: cc0
redirect_from: /licenses/cc0/
-category: Public Domain Dedication
+family: Public Domain Dedication
variant: true
source: http://creativecommons.org/publicdomain/zero/1.0/
diff --git a/_licenses/gpl-2.0.txt b/_licenses/gpl-2.0.txt
index dd3feed..5e3f5b6 100644
--- a/_licenses/gpl-2.0.txt
+++ b/_licenses/gpl-2.0.txt
@@ -3,7 +3,7 @@ title: GNU General Public License v2.0
nickname: GNU GPL v2.0
tab-slug: gpl-v2
redirect_from: /licenses/gpl-v2/
-category: GPL
+family: GPL
featured: true
source: http://www.gnu.org/licenses/gpl-2.0.txt
diff --git a/_licenses/gpl-3.0.txt b/_licenses/gpl-3.0.txt
index efbbfb2..b1d947d 100644
--- a/_licenses/gpl-3.0.txt
+++ b/_licenses/gpl-3.0.txt
@@ -3,7 +3,7 @@ title: GNU General Public License v3.0
nickname: GNU GPL v3.0
tab-slug: gpl-v3
redirect_from: /licenses/gpl-v3/
-category: GPL
+family: GPL
variant: true
source: http://www.gnu.org/licenses/gpl-3.0.txt
diff --git a/_licenses/isc.txt b/_licenses/isc.txt
index 48ac399..ad1d497 100644
--- a/_licenses/isc.txt
+++ b/_licenses/isc.txt
@@ -1,7 +1,7 @@
---
title: ISC License
tab-slug: isc
-category: BSD
+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
BSD 2-Clause and
MIT licenses, removing some language that is no longer necessary.
diff --git a/_licenses/lgpl-2.1.txt b/_licenses/lgpl-2.1.txt
index f4392e4..304d600 100644
--- a/_licenses/lgpl-2.1.txt
+++ b/_licenses/lgpl-2.1.txt
@@ -3,7 +3,7 @@ title: GNU Lesser General Public License v2.1
nickname: GNU LGPL v2.1
tab-slug: lgpl-v2_1
redirect_from: /licenses/lgpl-v2.1/
-category: LGPL
+family: LGPL
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.
diff --git a/_licenses/lgpl-3.0.txt b/_licenses/lgpl-3.0.txt
index ae88790..f9af64c 100644
--- a/_licenses/lgpl-3.0.txt
+++ b/_licenses/lgpl-3.0.txt
@@ -3,7 +3,7 @@ title: GNU Lesser General Public License v3.0
nickname: GNU LGPL v3.0
tab-slug: lgpl-v3
redirect_from: /licenses/lgpl-v3/
-category: LGPL
+family: LGPL
variant: true
source: http://www.gnu.org/licenses/lgpl-3.0.txt
diff --git a/_licenses/unlicense.txt b/_licenses/unlicense.txt
index 6f7a128..633ae68 100644
--- a/_licenses/unlicense.txt
+++ b/_licenses/unlicense.txt
@@ -1,7 +1,7 @@
---
title: The Unlicense
tab-slug: unlicense
-category: Public Domain Dedication
+family: Public Domain Dedication
source: http://unlicense.org/UNLICENSE
description: Because copyright is automatic in most countries,
the Unlicense 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.
diff --git a/assets/js/app.coffee b/assets/js/app.coffee
index b486c36..55d4ab0 100644
--- a/assets/js/app.coffee
+++ b/assets/js/app.coffee
@@ -21,8 +21,8 @@ class Choosealicense
my: "top center"
at: "bottom center"
- # Annotation categories as defined in `_config.yml`
- categories:
+ # Annotation rule types as defined in `_config.yml`
+ ruletypes:
required: "Required"
permitted: "Permitted"
forbidden: "Forbidden"
@@ -37,20 +37,20 @@ class Choosealicense
initTooltips: ->
# Dynamically add annotations as title attribute to rule list items
- for category, rules of window.annotations
+ for ruletype, rules of window.annotations
for rule in rules
- $(".license-rules ul.license-#{category} li.#{rule["tag"]}").attr "title", rule["description"]
+ $(".license-rules ul.license-#{ruletype} li.#{rule["tag"]}").attr "title", rule["description"]
# Init tooltips on all rule list items
- for category, label of @categories
- $(".license-#{category} li").qtip
+ for ruletype, label of @ruletypes
+ $(".license-#{ruletype} li").qtip
content:
text: false
title:
text: label
position: @qtip_position
style:
- classes: "qtip-shadow qtip-#{category}"
+ classes: "qtip-shadow qtip-#{ruletype}"
false
diff --git a/spec/license_category_spec.rb b/spec/license_category_spec.rb
index 2e5e9f8..423bb14 100644
--- a/spec/license_category_spec.rb
+++ b/spec/license_category_spec.rb
@@ -1,24 +1,24 @@
require 'spec_helper'
-categories.each do |category|
- describe "the #{category} category" do
- category_licenses = licenses.select { |l| l["category"] == category }
- primary = category_licenses.select { |l| l["variant"] == false }
- variants = category_licenses.select { |l| l["variant"] == true }
+families.each do |family|
+ describe "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 = category_licenses.count - 1
+ expected = family_licenses.count - 1
expect(variants.count).to eql(expected)
end
- category_licenses.each do |license|
+ family_licenses.each do |license|
describe "the #{license["title"]} license" do
it "should have a unique slug" do
- dupes = category_licenses.select { |l| l["tab-slug"] == license["tab-slug"] }.count
+ dupes = family_licenses.select { |l| l["tab-slug"] == license["tab-slug"] }.count
expect(dupes).to eql(1)
end
diff --git a/spec/license_meta_spec.rb b/spec/license_meta_spec.rb
index 796b7eb..3649cc8 100644
--- a/spec/license_meta_spec.rb
+++ b/spec/license_meta_spec.rb
@@ -17,14 +17,14 @@ licenses.each do |license|
expect(missing).to be_empty
end
- if license["category"]
+ if license["family"]
it "should contain the required license variant fields" do
- missing = ["category", "tab-slug"] - license.keys
+ missing = ["family", "tab-slug"] - license.keys
expect(missing).to be_empty
end
else
it "should not contain license family specific fields" do
- extra = ["variant", "category", "tab-slug"].select{ |f| raw_fields.keys.include?(f) }
+ extra = ["variant", "family", "tab-slug"].select{ |f| raw_fields.keys.include?(f) }
expect(extra).to be_empty
end
end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index ddf381e..49dd589 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -20,8 +20,8 @@ def licenses
site.collections["licenses"].docs.map { |l| l.to_liquid.merge("id" => l.basename(".txt")) }
end
-def categories
- licenses.map { |l| l["category"] }.compact.uniq
+def families
+ licenses.map { |l| l["family"] }.compact.uniq
end
def site