1
0
mirror of https://github.com/github/choosealicense.com synced 2024-11-13 06:58:53 +01:00
Commit Graph

87 Commits

Author SHA1 Message Date
Mike Linksvayer
dee309c3b5
Merge branch 'gh-pages' into cc0-source-text 2019-11-23 14:28:11 -08:00
Mike Linksvayer
379bf41d44 fix yaml, test 2019-11-20 08:11:57 -08:00
Mike Linksvayer
7a93042df8
Merge branch 'gh-pages' into bin-no-by 2019-11-19 15:48:46 -08:00
Waldir Pimenta
3aec270042 Add examples for Creative Commons licenses and OFL
Also adjust instructions in README.md to match CONTRIBUTING.md
2019-11-19 23:13:41 +00:00
Mike Linksvayer
08ec1de724 Add BSL-1.0 and Zlib examples 2019-11-18 10:32:39 -08:00
Mike Linksvayer
4b67edf0db relax github.com regex to allow for more branch names 2019-06-17 18:35:00 -07:00
Mike Linksvayer
3909e2190a bow to new rubocop rule 2018-09-24 15:39:55 -07:00
Mike Linksvayer
719b9bd02e BSD-2/3-Clause numbered list, uses
SPDX and OSI have numbered lists for these licenses
2018-08-18 16:17:46 -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
Mike Linksvayer
278bae2316 test handle repo name with . in it 2018-04-24 16:43:47 -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
316bd0b828 match _ fields, require preceding space (ex CECILL-2.1) 2018-01-02 14:35:04 -08:00
Mike Linksvayer
d7bf3ac98a Revert "rm no longer relevant test"
This reverts commit 5e7b07f998.
2018-01-02 14:25:04 -08:00
Mike Linksvayer
a093c99d3c rubocop 2017-12-30 15:48:07 -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
7b6067ed2c
Merge branch 'gh-pages' into epl-2.0 2017-12-29 14:58:54 -08:00
Mike Linksvayer
102887fbeb use SPDX license list 3.0 2017-12-29 14:30:08 -08:00
Mike Linksvayer
5c75a337d5
Merge branch 'gh-pages' into epl-2.0 2017-11-27 13:20:23 -08:00
Mike Linksvayer
8630a017f8 @benbalter review suggestions 2017-11-27 12:56:25 -08:00
Mike Linksvayer
2c9fa4907e don't attempt heavily templated NCSA and PostgreSQL for now 2017-11-25 20:57:24 -08:00
Mike Linksvayer
1a841848b3 ECL-2.0 examples 2017-11-25 20:32:19 -08:00
Mike Linksvayer
5130f12df1 Update GPLv3 examples 2017-11-25 20:27:20 -08:00
Mike Linksvayer
642783cf4b GPLv2 examples that can be detected 2017-11-25 20:15:01 -08:00
Mike Linksvayer
0e2a2653bd path item can include - 2017-11-25 19:56:20 -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
3532d9cbed Add EPL-2.0 2017-11-24 14:15:52 -08:00
Mike Linksvayer
f4b5e20cba @benbalter review comments 2017-11-20 12:56:03 -08:00
Mike Linksvayer
48b00a5a6b update license texts from #489, avoid EPL-1.0 skip 2017-11-20 12:02:53 -08:00
Mike Linksvayer
dc00fc0ae5 rubocop 2017-11-19 12:33:01 -08:00
Mike Linksvayer
dc4c7215ca don't count newline 2017-11-19 12:23:28 -08:00
Mike Linksvayer
fc3370e024 basic test for line length <= 78 2017-11-19 12:11:14 -08:00
Mike Linksvayer
bb49e4c1f7 whoops, test looking at wrong file extension 2017-11-19 11:13:21 -08:00
Mike Linksvayer
5e7b07f998 rm no longer relevant test 2017-10-25 09:34:49 -07:00
Mike Linksvayer
71aace0808 rubocop 2017-10-24 16:24:38 -07:00
Mike Linksvayer
d5c6d8d746 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
2017-10-24 14:51:39 -07:00
Mike Linksvayer
1726b836bb make using required for new licenses 2017-05-30 14:17:13 -07:00
Mike Linksvayer
aa33c8071b satisfy rubocop 0.48.1 2017-04-08 22:40:27 -07: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
fad13d2de4 document fixing error in test output
https://github.com/github/choosealicense.com/pull/473#issuecomment-270185138
2017-01-04 08:53:18 -08:00
Mike Linksvayer
7de7b2c8ef affirmative wording
https://github.com/github/choosealicense.com/pull/473#discussion_r94403400
2017-01-03 10:18:27 -08:00
Mike Linksvayer
7b4890ddf6 check .travis.yml ruby verison matches pages
https://github.com/github/choosealicense.com/pull/472#issuecomment-270048688

very rough, naive, probably bad implementation
2017-01-02 21:28:12 -08:00
Mike Linksvayer
570f69e4ec hidden: false for 'popular' licenses
- document criteria for whether a license is hidden
  - needed for license spectrum on /licenses OR
  - on 'popular' list at https://opensource.org/licenses (some other list could be used in the future)
- adjust license properties and tests accordingly

This gets non-hidden list back close to what it was before #386 and (pending licensee vendoring this change, licensee release, and github.com licensee dependency version bump) some commonly requested licenses (eg #413 #449) will reappear in the github.com license drop-down.
2016-09-26 11:20:44 -07: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