From 38a3be48986ad7ad8dae94748294e3c563d2bfd8 Mon Sep 17 00:00:00 2001 From: Mike Linksvayer Date: Tue, 24 Oct 2017 14:48:49 -0700 Subject: [PATCH 1/4] restore square brackets from canonical versions --- _licenses/apache-2.0.txt | 4 ++-- _licenses/ecl-2.0.txt | 4 ++-- _licenses/lgpl-2.1.txt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/_licenses/apache-2.0.txt b/_licenses/apache-2.0.txt index 0c594de..f652198 100644 --- a/_licenses/apache-2.0.txt +++ b/_licenses/apache-2.0.txt @@ -215,7 +215,7 @@ limitations: APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" + boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -223,7 +223,7 @@ limitations: same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright {yyyy} {name of copyright owner} + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/_licenses/ecl-2.0.txt b/_licenses/ecl-2.0.txt index 90f7403..ccc9267 100644 --- a/_licenses/ecl-2.0.txt +++ b/_licenses/ecl-2.0.txt @@ -216,14 +216,14 @@ END OF TERMS AND CONDITIONS APPENDIX: How to apply the Educational Community License to your work To apply the Educational Community License to your work, attach the following -boilerplate notice, with the fields enclosed by brackets "{}" replaced with +boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright {yyyy} {name of copyright owner} Licensed under the Educational +Copyright [yyyy] [name of copyright owner] Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/_licenses/lgpl-2.1.txt b/_licenses/lgpl-2.1.txt index deecf4e..88fb2d3 100644 --- a/_licenses/lgpl-2.1.txt +++ b/_licenses/lgpl-2.1.txt @@ -40,9 +40,9 @@ limitations: Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -(This is the first released version of the Lesser GPL. It also counts +[This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.) + the version number 2.1.] Preamble From d5c6d8d7467682963a31ee3395d4a4a7db7963d2 Mon Sep 17 00:00:00 2001 From: Mike Linksvayer Date: Tue, 24 Oct 2017 14:51:39 -0700 Subject: [PATCH 2/4] only look for unknown [] fields in first 1000 charcters that's where they're likely to be, outside of examples at the end of long licenses still want to check as if there are unknown [] fields in first 1000 characters, might be a field that should be filled in, but wouldn't for lack of correct name --- spec/license_fields_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/license_fields_spec.rb b/spec/license_fields_spec.rb index 4215f37..f8b88bd 100644 --- a/spec/license_fields_spec.rb +++ b/spec/license_fields_spec.rb @@ -6,7 +6,7 @@ describe 'license fillable fields' do licenses.each do |license| context "The #{license['title']} license" do it 'should only contain supported fillable fields' do - matches = license['content'].scan(/\[([a-z]+)\]/) + matches = license['content'][0,1000].scan(/\[([a-z]+)\]/) extra_fields = matches.flatten - (fields.map { |f| f['name'] }) expect(extra_fields).to be_empty end From 71aace0808219610c42e358114cdc3399749aa75 Mon Sep 17 00:00:00 2001 From: Mike Linksvayer Date: Tue, 24 Oct 2017 16:24:38 -0700 Subject: [PATCH 3/4] rubocop --- spec/license_fields_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/license_fields_spec.rb b/spec/license_fields_spec.rb index f8b88bd..af0a177 100644 --- a/spec/license_fields_spec.rb +++ b/spec/license_fields_spec.rb @@ -6,7 +6,7 @@ describe 'license fillable fields' do licenses.each do |license| context "The #{license['title']} license" do it 'should only contain supported fillable fields' do - matches = license['content'][0,1000].scan(/\[([a-z]+)\]/) + matches = license['content'][0, 1000].scan(/\[([a-z]+)\]/) extra_fields = matches.flatten - (fields.map { |f| f['name'] }) expect(extra_fields).to be_empty end From 5e7b07f998e9264092b8e1274f99605ead412138 Mon Sep 17 00:00:00 2001 From: Mike Linksvayer Date: Wed, 25 Oct 2017 09:34:49 -0700 Subject: [PATCH 4/4] rm no longer relevant test --- spec/license_fields_spec.rb | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 spec/license_fields_spec.rb diff --git a/spec/license_fields_spec.rb b/spec/license_fields_spec.rb deleted file mode 100644 index af0a177..0000000 --- a/spec/license_fields_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -describe 'license fillable fields' do - licenses.each do |license| - context "The #{license['title']} license" do - it 'should only contain supported fillable fields' do - matches = license['content'][0, 1000].scan(/\[([a-z]+)\]/) - extra_fields = matches.flatten - (fields.map { |f| f['name'] }) - expect(extra_fields).to be_empty - end - end - end -end