From 4b536ab4174a542dbfac7ee180d17349bf84d25d Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Wed, 19 Aug 2015 17:30:11 -0400 Subject: [PATCH 1/3] remove OSI appoval requirement --- spec/license_spec.rb | 8 -------- 1 file changed, 8 deletions(-) diff --git a/spec/license_spec.rb b/spec/license_spec.rb index 25efd5e..3dd2e37 100644 --- a/spec/license_spec.rb +++ b/spec/license_spec.rb @@ -21,14 +21,6 @@ licenses.each do |license| 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 From 2029405007656c38bb5641e8e1d7d55d42753cba Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Sat, 22 Aug 2015 12:36:56 -0400 Subject: [PATCH 2/3] Revert "remove OSI appoval requirement" This reverts commit 4b536ab4174a542dbfac7ee180d17349bf84d25d. --- spec/license_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/license_spec.rb b/spec/license_spec.rb index 3dd2e37..25efd5e 100644 --- a/spec/license_spec.rb +++ b/spec/license_spec.rb @@ -21,6 +21,14 @@ licenses.each do |license| 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 From 8c63910daa5f8f7b2ec37cd97536c278904318cb Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Sat, 22 Aug 2015 12:41:30 -0400 Subject: [PATCH 3/3] formalize whitelist --- spec/license_spec.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/spec/license_spec.rb b/spec/license_spec.rb index 25efd5e..02c5469 100644 --- a/spec/license_spec.rb +++ b/spec/license_spec.rb @@ -1,5 +1,13 @@ require 'spec_helper' +# List of licenses that need not be OSI approved +LICENSE_WHITELIST = %w[ + unlicense + cc0-1.0 + wtfpl +] + + licenses.each do |license| describe "The #{license["title"]} license" do it "should have a title" do @@ -23,10 +31,11 @@ licenses.each do |license| end # CC0 and Unlicense are not OSI approved, but that's okay - unless license["id"] == "unlicense" || license["id"] == "cc0-1.0" + unless LICENSE_WHITELIST.include? license["id"] it "should be OSI approved" do spdx = find_spdx(license["id"]) - expect(spdx[1]["osiApproved"]).to eql(true) + approved = spdx[1]["osiApproved"] + expect(approved).to eql(true) end end end