From 790109f0991d78fb230183cb07b8ad67bb017e25 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Tue, 5 Jan 2016 14:48:06 -0500 Subject: [PATCH 01/10] add criteria for proposing new licenses --- CONTRIBUTING.md | 19 +++++++++++-------- README.md | 4 ++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a4434c9..221b4d6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,17 +6,20 @@ We love Pull Requests! Your contributions help make ChooseALicense.com great. So you want to contribute to ChooseALicense. Great! We welcome any help we can get. But first, please make sure you understand what -[this site is all about](http://choosealicense.com/about). +[this site is all about](http://choosealicense.com/about). It’s not a comprehensive list of all possible licenses. -It’s not a comprehensive list of all possible licenses. +## Adding new licenses -If you understand the goals of this site and still want to suggest a change, -please: +Choosealicense.com is intended to demystifying license choices, not present all of them. As such, there are seveal requirements for a license to be listed on the site: -* Make sure you have a [GitHub account](https://github.com/signup/free) -* Submit a ticket for your issue, assuming one does not already exist. - * Clearly describe the issue including steps to reproduce when it is a bug. - * Make sure you fill in the earliest version that you know has the issue. +1. The license must have [an SPDX identifier](https://spdx.org/licenses/). If you're license isn't register with SPDX, please [request that it be added](https://spdx.org/spdx-license-list/request-new-license-or-exception). +2. The license must be listed on one of the following approved lists of licenses: + * [List of OSI approved licenses](https://opensource.org/licenses/alphabetical) + * [GNU's list of free licenses](https://www.gnu.org/licenses/license-list.en.html) (*note: the license must be listed in one of thre three "free" categories*) + * [Open Definition's list of conformant licenses](http://opendefinition.org/licenses/) (non-code) +3. A [GitHub code search](https://github.com/search?q=MIT+filename%3ALICENSE&type=Code) must reveal at least *1,000* public repositories using the license + +If your proposed license meets the above criteria, please follow [these instructions for adding a new license](https://github.com/github/choosealicense.com#adding-a-license). Almost without exception, new licenses should be added as hidden (`hidden: true` in the YAML front matter), such that they are directly linkable and detectable, but not otherwise listed. ## Making Changes diff --git a/README.md b/README.md index 655f049..78d65dc 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,11 @@ Like a Choose Your Own Adventure site, but only much less interesting. 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](http://www.choosealicense.com "Choose A Licence website") is designed to help people make an informed decision about licenses. +[ChooseALicense.com](http://www.choosealicense.com "Choose A Licence website") is designed to help people make an informed decision about licenses by demystifying license choices through non-judgmental guidance. ## Immediate Goals -* Non-partisan. Our goal is to help you find a license that meets *your* goals. +* Non-judgemental. 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 communities and situations. From b0e7fd5a608981d3ac93b724efe4ffdf2bdea4bc Mon Sep 17 00:00:00 2001 From: Mike Linksvayer Date: Tue, 5 Jan 2016 12:22:07 -0800 Subject: [PATCH 02/10] typos --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 221b4d6..cd35742 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,9 +10,9 @@ get. But first, please make sure you understand what ## Adding new licenses -Choosealicense.com is intended to demystifying license choices, not present all of them. As such, there are seveal requirements for a license to be listed on the site: +Choosealicense.com is intended to demystify license choices, not present all of them. As such, there are several requirements for a license to be listed on the site: -1. The license must have [an SPDX identifier](https://spdx.org/licenses/). If you're license isn't register with SPDX, please [request that it be added](https://spdx.org/spdx-license-list/request-new-license-or-exception). +1. The license must have [an SPDX identifier](https://spdx.org/licenses/). If your license isn't registered with SPDX, please [request that it be added](https://spdx.org/spdx-license-list/request-new-license-or-exception). 2. The license must be listed on one of the following approved lists of licenses: * [List of OSI approved licenses](https://opensource.org/licenses/alphabetical) * [GNU's list of free licenses](https://www.gnu.org/licenses/license-list.en.html) (*note: the license must be listed in one of thre three "free" categories*) From 853f4c97b2c2bf4fa6689cf402587a2e2346affc Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Fri, 15 Jan 2016 17:40:32 -0500 Subject: [PATCH 03/10] check for license compliance --- .gitignore | 1 + Gemfile | 1 + spec/license_spec.rb | 49 +++++++++++++++++++------------------------ spec/spec_helper.rb | 50 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 27 deletions(-) diff --git a/.gitignore b/.gitignore index ffefd5b..58d4d12 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ assets/vendor/qtip2/basic Gemfile.lock /.sass-cache .ruby-version +/tmp diff --git a/Gemfile b/Gemfile index bf1cd2b..5df1765 100644 --- a/Gemfile +++ b/Gemfile @@ -7,4 +7,5 @@ group :test do gem "html-proofer" gem "rake" gem "rspec" + gem "nokogiri" end diff --git a/spec/license_spec.rb b/spec/license_spec.rb index fe4b73b..f09ad3d 100644 --- a/spec/license_spec.rb +++ b/spec/license_spec.rb @@ -1,36 +1,31 @@ require 'spec_helper' -# List of licenses that need not be OSI approved -LICENSE_WHITELIST = %w[ - unlicense - cc0-1.0 - wtfpl - bsd-3-clause-clear -] - licenses.each do |license| + + # "No license" isn't really a license, so no need to test + next if license["id"] == "no-license" + describe "The #{license["title"]} license" do - 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 + let(:id) { license["id"] } - # CC0 and Unlicense are not OSI approved, but that's okay - unless LICENSE_WHITELIST.include? license["id"] - it "should be OSI approved" do - spdx = find_spdx(license["id"]) - approved = spdx[1]["osiApproved"] - expect(approved).to eql(true) - end - end - end + it "has an SPDX ID" do + expect(spdx_ids).to include(id) + end + + it "uses its SPDX name" do + spdx = find_spdx(id) + expect(spdx[1]["name"].gsub(/ only$/,"")).to eql(license["title"]) + end + + it "should be approved by OSI or FSF or OD" do + osi = osi_approved?(id) + fsf = fsf_approved?(id) + od = od_approved?(id) + + approved = osi || fsf || od + msg = "The license must be approved by OSI, FSF, or OD. See https://git.io/vzCTV." + expect(approved).to eql(true), msg end end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 49dd589..ceefde9 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,6 +1,8 @@ require 'jekyll' require 'open-uri' require 'json' +require 'open-uri' +require 'nokogiri' def config_file File.expand_path "./_config.yml", source @@ -54,6 +56,54 @@ def spdx_list $spdx ||= JSON.parse(open(url).read) end +def spdx_ids + spdx_list.map { |name, properties| name.downcase } +end + def find_spdx(license) spdx_list.find { |name, properties| name.downcase == license } end + +def osi_approved?(id) + spdx = find_spdx(id) + return false unless spdx + spdx[1]["osiApproved"] +end + +def fsf_approved_licenses + $fsf_approved_licenses ||= begin + url = "https://www.gnu.org/licenses/license-list.en.html" + doc = Nokogiri::HTML(open(url).read) + list = doc.css(".green dt") + licenses = {} + list.each do |license| + a = license.css("a").find { |link| !link.text.nil? && !link.text.empty? && link.attr("id") } + next if a.nil? + id = a.attr("id").downcase + name = a.text.strip + licenses[id] = name + end + licenses + end +end + +def fsf_approved?(id) + fsf_approved_licenses.keys.include?(id) +end + +def od_approved_licenses + $od_approved_licenses ||= begin + url = "http://licenses.opendefinition.org/licenses/groups/od.json" + data = open(url).read + data = JSON.parse(data) + licenses = {} + data.each do |id, meta| + licenses[id.downcase] = meta["title"] + end + licenses + end +end + +def od_approved?(id) + od_approved_licenses.keys.include?(id) +end From 415ac8a17425dd6730c2fcc49d8dd1da086b5d97 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Fri, 15 Jan 2016 18:01:07 -0500 Subject: [PATCH 04/10] fix spec --- Rakefile | 13 +++++++++++++ spec/license_spec.rb | 18 ++++++++++-------- spec/spec_helper.rb | 21 +++++++++++---------- 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/Rakefile b/Rakefile index fea4552..1ba4e3f 100644 --- a/Rakefile +++ b/Rakefile @@ -12,3 +12,16 @@ task :test do HTML::Proofer.new("./_site", :check_html => true).run Rake::Task["spec"].invoke end + +task :approved_licenses do + require './spec/spec_helper' + approved = approved_licenses + approved.select! { |l| spdx_ids.include?(l) } + puts "#{approved.count} approved licenses:" + puts approved.join(", ") + puts "\n" + + potential = approved - licenses.map { |l| l["id"] } + puts "#{potential.count} potential additions:" + puts potential.join(", ") +end diff --git a/spec/license_spec.rb b/spec/license_spec.rb index f09ad3d..2d4a402 100644 --- a/spec/license_spec.rb +++ b/spec/license_spec.rb @@ -7,7 +7,7 @@ licenses.each do |license| describe "The #{license["title"]} license" do - let(:id) { license["id"] } + let(:id) { license["id"] } it "has an SPDX ID" do expect(spdx_ids).to include(id) @@ -18,14 +18,16 @@ licenses.each do |license| expect(spdx[1]["name"].gsub(/ only$/,"")).to eql(license["title"]) end - it "should be approved by OSI or FSF or OD" do - osi = osi_approved?(id) - fsf = fsf_approved?(id) - od = od_approved?(id) + context "industry approval" do - approved = osi || fsf || od - msg = "The license must be approved by OSI, FSF, or OD. See https://git.io/vzCTV." - expect(approved).to eql(true), msg + # FSF approved the clear BSD, but doesn't use it's SPDX ID or Name + if license["id"] == "bsd-3-clause-clear" + let(:id) { "clearbsd" } + end + + it "should be approved by OSI or FSF or OD" do + expect(approved_licenses).to include(id), "See https://git.io/vzCTV." + end end end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ceefde9..e7865ed 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -64,10 +64,15 @@ def find_spdx(license) spdx_list.find { |name, properties| name.downcase == license } end -def osi_approved?(id) - spdx = find_spdx(id) - return false unless spdx - spdx[1]["osiApproved"] +def osi_approved_licenses + $osi_approved_licenses ||= begin + licenses = {} + list = spdx_list.select { |id, meta| meta["osiApproved"] } + list.each do |id, meta| + licenses[id.downcase] = meta["name"] + end + licenses + end end def fsf_approved_licenses @@ -87,10 +92,6 @@ def fsf_approved_licenses end end -def fsf_approved?(id) - fsf_approved_licenses.keys.include?(id) -end - def od_approved_licenses $od_approved_licenses ||= begin url = "http://licenses.opendefinition.org/licenses/groups/od.json" @@ -104,6 +105,6 @@ def od_approved_licenses end end -def od_approved?(id) - od_approved_licenses.keys.include?(id) +def approved_licenses + (osi_approved_licenses.keys + fsf_approved_licenses.keys + od_approved_licenses.keys).flatten.uniq.sort end From 698d603cc9db6e52bd8a6adc4309349776dfe01f Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Fri, 15 Jan 2016 18:04:07 -0500 Subject: [PATCH 05/10] run spec before proofer --- Rakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 1ba4e3f..1ff9aa0 100644 --- a/Rakefile +++ b/Rakefile @@ -9,8 +9,8 @@ end task :test do sh "bundle exec jekyll build --trace" - HTML::Proofer.new("./_site", :check_html => true).run Rake::Task["spec"].invoke + HTML::Proofer.new("./_site", :check_html => true).run end task :approved_licenses do @@ -20,7 +20,7 @@ task :approved_licenses do puts "#{approved.count} approved licenses:" puts approved.join(", ") puts "\n" - + potential = approved - licenses.map { |l| l["id"] } puts "#{potential.count} potential additions:" puts potential.join(", ") From 976acac003c38dbc28a4042dd0f6d2cdc7562246 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Fri, 15 Jan 2016 18:04:44 -0500 Subject: [PATCH 06/10] downgrade html proofer --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 5df1765..03c970a 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ gem "github-pages" gem "jekyll-seo-tag" group :test do - gem "html-proofer" + gem 'html-proofer', '2.5.2' gem "rake" gem "rspec" gem "nokogiri" From f7d68094e439ea41dfb1948cd3694d0a000b0f91 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Fri, 15 Jan 2016 18:08:04 -0500 Subject: [PATCH 07/10] add gemfile to get tests to work --- .gitignore | 1 - Gemfile.lock | 177 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 Gemfile.lock diff --git a/.gitignore b/.gitignore index 58d4d12..8bf1c4e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,6 @@ assets/vendor/clipboard/test assets/vendor/selectivizr/tests assets/vendor/qtip2/basic /vendor -Gemfile.lock /.sass-cache .ruby-version /tmp diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..c0b5f8a --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,177 @@ +GEM + remote: https://rubygems.org/ + specs: + RedCloth (4.2.9) + activesupport (4.2.5) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + addressable (2.3.8) + blankslate (2.1.2.4) + classifier-reborn (2.0.4) + fast-stemmer (~> 1.0) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.10.0) + colorator (0.1) + colored (1.2) + diff-lcs (1.2.5) + ethon (0.8.1) + ffi (>= 1.3.0) + execjs (2.6.0) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + fast-stemmer (1.0.2) + ffi (1.9.10) + gemoji (2.1.0) + github-pages (43) + RedCloth (= 4.2.9) + github-pages-health-check (= 0.6.0) + jekyll (= 2.4.0) + jekyll-coffeescript (= 1.0.1) + jekyll-feed (= 0.3.1) + jekyll-gist (= 1.4.0) + jekyll-mentions (= 0.2.1) + jekyll-paginate (= 1.1.0) + jekyll-redirect-from (= 0.9.1) + jekyll-sass-converter (= 1.3.0) + jekyll-seo-tag (= 0.1.4) + jekyll-sitemap (= 0.9.0) + jemoji (= 0.5.0) + kramdown (= 1.9.0) + liquid (= 2.6.2) + maruku (= 0.7.0) + mercenary (~> 0.3) + pygments.rb (= 0.6.3) + rdiscount (= 2.1.8) + redcarpet (= 3.3.3) + terminal-table (~> 1.4) + github-pages-health-check (0.6.0) + addressable (~> 2.3) + net-dns (~> 0.8) + public_suffix (~> 1.4) + typhoeus (~> 0.7) + html-pipeline (1.9.0) + activesupport (>= 2) + nokogiri (~> 1.4) + html-proofer (2.5.2) + addressable (~> 2.3) + colored (~> 1.2) + mercenary (~> 0.3.2) + nokogiri (~> 1.5) + parallel (~> 1.3) + typhoeus (~> 0.7) + yell (~> 2.0) + i18n (0.7.0) + jekyll (2.4.0) + classifier-reborn (~> 2.0) + colorator (~> 0.1) + jekyll-coffeescript (~> 1.0) + jekyll-gist (~> 1.0) + jekyll-paginate (~> 1.0) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 1.1) + kramdown (~> 1.3) + liquid (~> 2.6.1) + mercenary (~> 0.3.3) + pygments.rb (~> 0.6.0) + redcarpet (~> 3.1) + safe_yaml (~> 1.0) + toml (~> 0.1.0) + jekyll-coffeescript (1.0.1) + coffee-script (~> 2.2) + jekyll-feed (0.3.1) + jekyll-gist (1.4.0) + octokit (~> 4.2) + jekyll-mentions (0.2.1) + html-pipeline (~> 1.9.0) + jekyll (~> 2.0) + jekyll-paginate (1.1.0) + jekyll-redirect-from (0.9.1) + jekyll (>= 2.0) + jekyll-sass-converter (1.3.0) + sass (~> 3.2) + jekyll-seo-tag (0.1.4) + jekyll (>= 2.0) + jekyll-sitemap (0.9.0) + jekyll-watch (1.3.0) + listen (~> 3.0) + jemoji (0.5.0) + gemoji (~> 2.0) + html-pipeline (~> 1.9) + jekyll (>= 2.0) + json (1.8.3) + kramdown (1.9.0) + liquid (2.6.2) + listen (3.0.5) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + maruku (0.7.0) + mercenary (0.3.5) + mini_portile2 (2.0.0) + minitest (5.8.3) + multipart-post (2.0.0) + net-dns (0.8.0) + nokogiri (1.6.7.1) + mini_portile2 (~> 2.0.0.rc2) + octokit (4.2.0) + sawyer (~> 0.6.0, >= 0.5.3) + parallel (1.6.1) + parslet (1.5.0) + blankslate (~> 2.0) + posix-spawn (0.3.11) + public_suffix (1.5.3) + pygments.rb (0.6.3) + posix-spawn (~> 0.3.6) + yajl-ruby (~> 1.2.0) + rake (10.5.0) + rb-fsevent (0.9.7) + rb-inotify (0.9.5) + ffi (>= 0.5.0) + rdiscount (2.1.8) + redcarpet (3.3.3) + rspec (3.4.0) + rspec-core (~> 3.4.0) + rspec-expectations (~> 3.4.0) + rspec-mocks (~> 3.4.0) + rspec-core (3.4.1) + rspec-support (~> 3.4.0) + rspec-expectations (3.4.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.4.0) + rspec-mocks (3.4.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.4.0) + rspec-support (3.4.1) + safe_yaml (1.0.4) + sass (3.4.21) + sawyer (0.6.0) + addressable (~> 2.3.5) + faraday (~> 0.8, < 0.10) + terminal-table (1.5.2) + thread_safe (0.3.5) + toml (0.1.2) + parslet (~> 1.5.0) + typhoeus (0.8.0) + ethon (>= 0.8.0) + tzinfo (1.2.2) + thread_safe (~> 0.1) + yajl-ruby (1.2.1) + yell (2.0.5) + +PLATFORMS + ruby + +DEPENDENCIES + github-pages + html-proofer (= 2.5.2) + jekyll-seo-tag + nokogiri + rake + rspec + +BUNDLED WITH + 1.11.2 From 5e897e30b3b35dfd7ff0ef4ee1b13a93efdd1175 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Mon, 18 Jan 2016 15:19:53 -0500 Subject: [PATCH 08/10] fix comment typo --- spec/license_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/license_spec.rb b/spec/license_spec.rb index 2d4a402..881a74e 100644 --- a/spec/license_spec.rb +++ b/spec/license_spec.rb @@ -20,7 +20,7 @@ licenses.each do |license| context "industry approval" do - # FSF approved the clear BSD, but doesn't use it's SPDX ID or Name + # FSF approved the Clear BSD, but doesn't use its SPDX ID or Name if license["id"] == "bsd-3-clause-clear" let(:id) { "clearbsd" } end From 42e559a9620d39539396062c5ac7bc252bf6d605 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Mon, 18 Jan 2016 15:28:22 -0500 Subject: [PATCH 09/10] bullet point contributing instructions --- CONTRIBUTING.md | 10 ++++++++-- README.md | 8 +++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cd35742..a40de79 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ So you want to contribute to ChooseALicense. Great! We welcome any help we can get. But first, please make sure you understand what [this site is all about](http://choosealicense.com/about). It’s not a comprehensive list of all possible licenses. -## Adding new licenses +## Adding a license Choosealicense.com is intended to demystify license choices, not present all of them. As such, there are several requirements for a license to be listed on the site: @@ -19,7 +19,13 @@ Choosealicense.com is intended to demystify license choices, not present all of * [Open Definition's list of conformant licenses](http://opendefinition.org/licenses/) (non-code) 3. A [GitHub code search](https://github.com/search?q=MIT+filename%3ALICENSE&type=Code) must reveal at least *1,000* public repositories using the license -If your proposed license meets the above criteria, please follow [these instructions for adding a new license](https://github.com/github/choosealicense.com#adding-a-license). Almost without exception, new licenses should be added as hidden (`hidden: true` in the YAML front matter), such that they are directly linkable and detectable, but not otherwise listed. +If your proposed license meets the above criteria, here's a few other things to keep in mind as you propose the license's addition: + +* Licenses live in the `/_licenses` folder. +* Each license has both [required and optional metadata](https://github.com/github/choosealicense.com#license-metadata) that should be included. +* The text of the license should be wrapped to a 78 character width. +* The body of the file should be the text of the license in plain text. +* Almost without exception, new licenses should be added as hidden (`hidden: true` in the YAML front matter), such that they are directly linkable and detectable, but not otherwise listed. ## Making Changes diff --git a/README.md b/README.md index 78d65dc..2989483 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ A lot of repositories on GitHub.com don't have a license. GitHub provides a lice ## Immediate Goals -* Non-judgemental. Our goal is to help you find a license that meets *your* goals. +* Non-judgmental. 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 communities and situations. @@ -28,11 +28,9 @@ script/server ``` Open `http://localhost:4000` in your favorite browser. -## Adding a license +## License metadata -Licenses sit in the `/_licenses` folder. The text of the license should be wrapped to a 78 character width. Each license has YAML front matter describing the license's properties. The body of the file should be the text of the license in plain text. The available metadata fields are: - -### YAML front matter +Licenses sit in the `/_licenses` folder. Each license has YAML front matter describing the license's properties. The body of the file contains the text of the license in plain text. The available metadata fields are: #### Required fields From c8012557a4b5e9efd560e6d58fcbef50f29a1d46 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Mon, 18 Jan 2016 15:32:17 -0500 Subject: [PATCH 10/10] move FSF fix to the fsf_approved_licenses helper --- spec/license_spec.rb | 6 ------ spec/spec_helper.rb | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/license_spec.rb b/spec/license_spec.rb index 881a74e..6bf43b0 100644 --- a/spec/license_spec.rb +++ b/spec/license_spec.rb @@ -19,12 +19,6 @@ licenses.each do |license| end context "industry approval" do - - # FSF approved the Clear BSD, but doesn't use its SPDX ID or Name - if license["id"] == "bsd-3-clause-clear" - let(:id) { "clearbsd" } - end - it "should be approved by OSI or FSF or OD" do expect(approved_licenses).to include(id), "See https://git.io/vzCTV." end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e7865ed..4834964 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -88,6 +88,12 @@ def fsf_approved_licenses name = a.text.strip licenses[id] = name end + + # FSF approved the Clear BSD, but doesn't use its SPDX ID or Name + if licenses.keys.include? "clearbsd" + licenses["bsd-3-clause-clear"] = licenses["clearbsd"] + end + licenses end end