1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 21:00:10 +01:00

33 Commits

Author SHA1 Message Date
Mike Linksvayer
d4f8e2afe1 license-list-XML as submodule and further monkeypatch licensee to use it 2021-02-26 13:47:53 -08:00
Mike Linksvayer
3074bf679a Suppress warning about pending cops, changes suggested by enabled cops 2020-07-30 11:53:51 -07:00
Mike Linksvayer
2d9e5be8c2 slightly reduce branches apparent to rubocop to satisfy rubocop 2020-07-23 12:28:53 -07:00
Mike Linksvayer
3909e2190a bow to new rubocop rule 2018-09-24 15:39:55 -07:00
Mike Linksvayer
9f263936b2 http->https for misc links outside of license texts
artistic-2.0 source changed because perlfoundation website timing out
2018-05-22 13:39:44 -07:00
W. Trevor King
24fbf6685d spec_helper: Adjust to new 'licenses' key in the FSF API
The old root object has been moved under 'licenses' with
wking/fsf-api@8398a357 (pull: Add JSON-LD markup, 2018-01-04,
wking/fsf-api#12) for better forward/backward compatibility.
Unfortunately, this results in another one-time incompatible change,
which this commit accommodates.

The protection from future changes (which should be rare) isn't great,
because we're still parsing the document as JSON.  There is at least
one JSON-LD parser for Ruby [1], but I've stuck with vanilla JSON to
avoid pullling in an external dependency just for this rather
peripheral functionality.

[1]: https://github.com/ruby-rdf/json-ld/
2018-04-07 16:22:44 -07:00
Mike Linksvayer
adb35c0c82 Rubocop 0.53 doesn't like kernel#open use more specific OpenURI.open_uri instead
841569b305/manual/cops_security.md (securityopen)

Not sure this is really a problem for tests, but easiest to just change.
2018-03-14 18:45:10 -07:00
W. Trevor King
84a7bbbf96 spec_helper: Extract FSF approval from wking.github.io/fsf-api
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>'
2018-01-03 11:53:36 -08:00
W. Trevor King
af78adb4fe spec_helper: Restore case-insensitive matching in find_spdx
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
2018-01-03 11:13:08 -08:00
Mike Linksvayer
2459e4ff99 add test that this project's license detected as MIT 2017-12-30 15:38:31 -08:00
Mike Linksvayer
102887fbeb use SPDX license list 3.0 2017-12-29 14:30:08 -08:00
Mike Linksvayer
7649067151 Test examples provided in 'using:' would be detected by licensee 2017-11-25 16:16:11 -08:00
Mike Linksvayer
75c05d717c mindlessly satisfy rubocop 0.48 2017-03-26 17:19:44 -07:00
Mike Linksvayer
f08ace3feb make rubocop ruby version match pages ruby version 2017-01-18 13:31:19 -08:00
Mike Linksvayer
cf79b35e06 re-add optional hidden field, default to true
licenses on /licenses have `hidden: false` set

fixes #434
2016-06-14 10:35:44 -07:00
Mike Linksvayer
b99e7ab017 replace 'id' variables with 'spdx_lcase' to minimize confusion 2016-06-01 08:36:56 -07:00
Mike Linksvayer
49fca01280 make tests not overwrite non-mutable document 'id' 2016-05-31 15:44:12 -07:00
Mike Linksvayer
e5f46faa30 test required spdx-ids against data from spdx 2016-05-25 08:53:23 -05:00
Mike Linksvayer
b4cf070a82 rm no longer pertinent fields and tests 2016-04-07 18:48:15 -07:00
Ben Balter
2fb71d284a Merge branch 'gh-pages' into jekyll-3-0-3 2016-02-09 12:26:24 -05:00
Ben Balter
8d24208088 Revert "upgrade to jekyll 3 due to"
This reverts commit 48c6e3e88785106d0a9357df8385f11891e85565.
2016-02-09 12:21:11 -05:00
Ben Balter
91b6c8728e add rubocop 2016-02-08 15:37:19 -05:00
Mike Linksvayer
48c6e3e887 upgrade to jekyll 3 due to
https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0
2016-02-02 16:02:01 -08:00
Ben Balter
41a9f1a9d7 use regex to check for BOM 2016-01-29 12:44:28 -05:00
Ben Balter
ed908356e7 make licenses hidden by default 2016-01-20 10:37:44 -05:00
Ben Balter
e505eb8fb9 check if license is aleady a license 2016-01-18 17:05:02 -05:00
Ben Balter
c8012557a4 move FSF fix to the fsf_approved_licenses helper 2016-01-18 15:32:17 -05:00
Ben Balter
415ac8a174 fix spec 2016-01-15 18:01:07 -05:00
Ben Balter
853f4c97b2 check for license compliance 2016-01-15 17:40:32 -05:00
Waldir Pimenta
ba91c766d6 rename category --> family (fix #288) 2015-09-09 00:04:34 +01:00
Ben Balter
915c08b821 move meta and fields to yaml 2015-08-22 15:25:16 -04:00
Ben Balter
530e15d771 validate SPDX compliance 2015-03-07 13:38:52 -05:00
Ben Balter
dc1cc773a1 add tests 2015-03-07 12:47:24 -05:00