From ade0beec177e52dcf0fb6accd8dc2332cc40e868 Mon Sep 17 00:00:00 2001 From: Mike Linksvayer Date: Mon, 8 Feb 2016 10:25:06 -0800 Subject: [PATCH] Test that only open licenses are included per https://github.com/github/choosealicense.com/blob/gh-pages/CONTRIBUTING.md#adding-a-license - check that all licenses have minimum permissions - remove non-open (and unused) forbiddens - closes #1 with confidence --- _data/rules.yml | 6 ------ spec/license_spec.rb | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/_data/rules.yml b/_data/rules.yml index d119911..2970878 100644 --- a/_data/rules.yml +++ b/_data/rules.yml @@ -42,9 +42,3 @@ forbidden: - 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: This software may not be modified. - label: Modification - tag: modifications -- description: You may not distribute this software. - label: Distribution - tag: distribution diff --git a/spec/license_spec.rb b/spec/license_spec.rb index 87ef083..4c55d6e 100644 --- a/spec/license_spec.rb +++ b/spec/license_spec.rb @@ -27,6 +27,22 @@ describe "licenses" do expect(approved_licenses).to include(id), "See https://git.io/vzCTV." end end + + context "minimum permissions" do + permissions = license["permitted"] + it "should allow commercial use" do + expect(permissions).to include("commercial-use") + end + it "should allow modification" do + expect(permissions).to include("modifications") + end + it "should allow distribution" do + expect(permissions).to include("distribution") + end + it "should allow private use" do + expect(permissions).to include("private-use") + end + end end end end