Ideally the FSF would be maintaining the API (or any API), but until
someone can talk them into that I think we can save work by
collaborating on the mock API. Using a JSON API also allows us to
drop the Nokogiri dependency.
The parens feel excessive, and I'm not familiar with Ruby, so they
might be. However, removing the parens from the libre check resulted
in:
$ ./script/check-approval ISC
./script/check-approval:8:in `require_relative': /.../choosealicense.com/spec/spec_helper.rb:108: syntax error, unexpected tSTRING_BEG, expecting keyword_then or ';' or '\n' (SyntaxError)
...gs') && meta['tags'].include? 'libre'
... ^
/.../choosealicense.com/spec/spec_helper.rb:116: syntax error, unexpected keyword_end, expecting end-of-input
from ./script/check-approval:8:in `<main>'
The previous case-insensitive matching was removed in e5f46faa (test
required spdx-ids against data from spdx, 2016-05-25, #418). That
commit was designed [1] to allow case-sensitive matching as discussed
in [2]. But while I'm in favor of case-sensitive keys in spdx_list,
the case-sensitive match breaks script/check-approval which downcases
its argument since it was added in 8e56bb83 (add
script/check-approval, 2016-01-18, #318).
There are more notes on SPDX's plans for case sensitivity in [3], so
we should see a clearer policy there soon. I'm arguing for
case-sensitive *display* with optional case-insensitive matching. I
am optimistic that the SPDX will at least agree not to register short
IDs that only differ by case, which is all we need to make this
case-insensitive match safe here.
[1]: https://github.com/github/choosealicense.com/pull/418#issuecomment-221404630
[2]: https://github.com/benbalter/licensee/issues/72
[3]: https://github.com/spdx/spdx-spec/issues/63
- Apache HTTPD URL giving timeouts in CI
- Android license file isn't a simple example to copy from
+ Kubernetes, Elasticsearch are very high profile, with simple verbatim license files