licensee 9.15.3 → 9.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/bin/licensee +4 -0
  3. data/lib/licensee/content_helper.rb +6 -5
  4. data/lib/licensee/license.rb +10 -2
  5. data/lib/licensee/version.rb +1 -1
  6. data/licensee.gemspec +1 -1
  7. data/spec/fixture_spec.rb +1 -1
  8. data/spec/fixtures/agpl-3.0_markdown/LICENSE.md +651 -0
  9. data/spec/fixtures/apache-2.0_markdown/LICENSE.md +195 -0
  10. data/spec/fixtures/{markdown-artistic → artistic-2.0_markdown}/LICENSE.md +0 -0
  11. data/spec/fixtures/bsd-2-author/LICENSE +22 -0
  12. data/spec/fixtures/bsd-3-clause_markdown/LICENSE.md +28 -0
  13. data/spec/fixtures/cc-by-4.0_markdown/LICENSE.md +157 -0
  14. data/spec/fixtures/cc-by-sa-4.0_markdown/LICENSE.md +171 -0
  15. data/spec/fixtures/cc0-1.0_markdown/LICENSE.md +41 -0
  16. data/spec/fixtures/detect.json +1 -1
  17. data/spec/fixtures/epl-1.0_markdown/LICENSE.md +76 -0
  18. data/spec/fixtures/fixtures.yml +105 -41
  19. data/spec/fixtures/gfdl-1.3_markdown/LICENSE.md +450 -0
  20. data/spec/fixtures/gpl-2.0_markdown/LICENSE.md +336 -0
  21. data/spec/fixtures/{markdown-gpl → gpl-2.0_markdown_headings}/LICENSE.md +0 -0
  22. data/spec/fixtures/gpl-3.0_markdown/LICENSE.md +595 -0
  23. data/spec/fixtures/lgpl-2.1_markdown/LICENSE.md +494 -0
  24. data/spec/fixtures/lgpl-3.0_markdown/LICENSE.md +163 -0
  25. data/spec/fixtures/license-hashes.json +6 -6
  26. data/spec/fixtures/mit_markdown/LICENSE.md +26 -0
  27. data/spec/fixtures/mpl-2.0_markdown/LICENSE.md +357 -0
  28. data/spec/fixtures/unlicense_markdown/LICENSE.md +27 -0
  29. data/spec/integration_spec.rb +11 -2
  30. data/spec/licensee/commands/detect_spec.rb +16 -0
  31. data/spec/licensee/content_helper_spec.rb +16 -0
  32. data/spec/licensee/matchers/reference_matcher_spec.rb +17 -0
  33. data/vendor/choosealicense.com/_licenses/bsd-3-clause.txt +1 -0
  34. data/vendor/license-list-XML/src/Artistic-2.0.xml +5 -3
  35. data/vendor/license-list-XML/src/BSD-3-Clause-Clear.xml +3 -1
  36. metadata +22 -6
@@ -0,0 +1,450 @@
1
+ GNU Free Documentation License
2
+ ==============================
3
+
4
+ _Version 1.3, 3 November 2008_
5
+ _Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. &lt;<http://fsf.org/>&gt;_
6
+
7
+ Everyone is permitted to copy and distribute verbatim copies
8
+ of this license document, but changing it is not allowed.
9
+
10
+ ### 0. Preamble
11
+
12
+ The purpose of this License is to make a manual, textbook, or other
13
+ functional and useful document “free” in the sense of freedom: to
14
+ assure everyone the effective freedom to copy and redistribute it,
15
+ with or without modifying it, either commercially or noncommercially.
16
+ Secondarily, this License preserves for the author and publisher a way
17
+ to get credit for their work, while not being considered responsible
18
+ for modifications made by others.
19
+
20
+ This License is a kind of “copyleft”, which means that derivative
21
+ works of the document must themselves be free in the same sense. It
22
+ complements the GNU General Public License, which is a copyleft
23
+ license designed for free software.
24
+
25
+ We have designed this License in order to use it for manuals for free
26
+ software, because free software needs free documentation: a free
27
+ program should come with manuals providing the same freedoms that the
28
+ software does. But this License is not limited to software manuals;
29
+ it can be used for any textual work, regardless of subject matter or
30
+ whether it is published as a printed book. We recommend this License
31
+ principally for works whose purpose is instruction or reference.
32
+
33
+
34
+ ### 1. Applicability and Definitions
35
+
36
+ This License applies to any manual or other work, in any medium, that
37
+ contains a notice placed by the copyright holder saying it can be
38
+ distributed under the terms of this License. Such a notice grants a
39
+ world-wide, royalty-free license, unlimited in duration, to use that
40
+ work under the conditions stated herein. The “Document”, below,
41
+ refers to any such manual or work. Any member of the public is a
42
+ licensee, and is addressed as “you”. You accept the license if you
43
+ copy, modify or distribute the work in a way requiring permission
44
+ under copyright law.
45
+
46
+ A “Modified Version” of the Document means any work containing the
47
+ Document or a portion of it, either copied verbatim, or with
48
+ modifications and/or translated into another language.
49
+
50
+ A “Secondary Section” is a named appendix or a front-matter section of
51
+ the Document that deals exclusively with the relationship of the
52
+ publishers or authors of the Document to the Document's overall
53
+ subject (or to related matters) and contains nothing that could fall
54
+ directly within that overall subject. (Thus, if the Document is in
55
+ part a textbook of mathematics, a Secondary Section may not explain
56
+ any mathematics.) The relationship could be a matter of historical
57
+ connection with the subject or with related matters, or of legal,
58
+ commercial, philosophical, ethical or political position regarding
59
+ them.
60
+
61
+ The “Invariant Sections” are certain Secondary Sections whose titles
62
+ are designated, as being those of Invariant Sections, in the notice
63
+ that says that the Document is released under this License. If a
64
+ section does not fit the above definition of Secondary then it is not
65
+ allowed to be designated as Invariant. The Document may contain zero
66
+ Invariant Sections. If the Document does not identify any Invariant
67
+ Sections then there are none.
68
+
69
+ The “Cover Texts” are certain short passages of text that are listed,
70
+ as Front-Cover Texts or Back-Cover Texts, in the notice that says that
71
+ the Document is released under this License. A Front-Cover Text may
72
+ be at most 5 words, and a Back-Cover Text may be at most 25 words.
73
+
74
+ A “Transparent” copy of the Document means a machine-readable copy,
75
+ represented in a format whose specification is available to the
76
+ general public, that is suitable for revising the document
77
+ straightforwardly with generic text editors or (for images composed of
78
+ pixels) generic paint programs or (for drawings) some widely available
79
+ drawing editor, and that is suitable for input to text formatters or
80
+ for automatic translation to a variety of formats suitable for input
81
+ to text formatters. A copy made in an otherwise Transparent file
82
+ format whose markup, or absence of markup, has been arranged to thwart
83
+ or discourage subsequent modification by readers is not Transparent.
84
+ An image format is not Transparent if used for any substantial amount
85
+ of text. A copy that is not “Transparent” is called “Opaque”.
86
+
87
+ Examples of suitable formats for Transparent copies include plain
88
+ ASCII without markup, Texinfo input format, LaTeX input format, SGML
89
+ or XML using a publicly available DTD, and standard-conforming simple
90
+ HTML, PostScript or PDF designed for human modification. Examples of
91
+ transparent image formats include PNG, XCF and JPG. Opaque formats
92
+ include proprietary formats that can be read and edited only by
93
+ proprietary word processors, SGML or XML for which the DTD and/or
94
+ processing tools are not generally available, and the
95
+ machine-generated HTML, PostScript or PDF produced by some word
96
+ processors for output purposes only.
97
+
98
+ The “Title Page” means, for a printed book, the title page itself,
99
+ plus such following pages as are needed to hold, legibly, the material
100
+ this License requires to appear in the title page. For works in
101
+ formats which do not have any title page as such, “Title Page” means
102
+ the text near the most prominent appearance of the work's title,
103
+ preceding the beginning of the body of the text.
104
+
105
+ The “publisher” means any person or entity that distributes copies of
106
+ the Document to the public.
107
+
108
+ A section “Entitled XYZ” means a named subunit of the Document whose
109
+ title either is precisely XYZ or contains XYZ in parentheses following
110
+ text that translates XYZ in another language. (Here XYZ stands for a
111
+ specific section name mentioned below, such as “Acknowledgements”,
112
+ “Dedications”, “Endorsements”, or “History”.) To “Preserve the Title”
113
+ of such a section when you modify the Document means that it remains a
114
+ section “Entitled XYZ” according to this definition.
115
+
116
+ The Document may include Warranty Disclaimers next to the notice which
117
+ states that this License applies to the Document. These Warranty
118
+ Disclaimers are considered to be included by reference in this
119
+ License, but only as regards disclaiming warranties: any other
120
+ implication that these Warranty Disclaimers may have is void and has
121
+ no effect on the meaning of this License.
122
+
123
+ ### 2. Verbatim Copying
124
+
125
+ You may copy and distribute the Document in any medium, either
126
+ commercially or noncommercially, provided that this License, the
127
+ copyright notices, and the license notice saying this License applies
128
+ to the Document are reproduced in all copies, and that you add no
129
+ other conditions whatsoever to those of this License. You may not use
130
+ technical measures to obstruct or control the reading or further
131
+ copying of the copies you make or distribute. However, you may accept
132
+ compensation in exchange for copies. If you distribute a large enough
133
+ number of copies you must also follow the conditions in section 3.
134
+
135
+ You may also lend copies, under the same conditions stated above, and
136
+ you may publicly display copies.
137
+
138
+
139
+ ### 3. Copying in Quantity
140
+
141
+ If you publish printed copies (or copies in media that commonly have
142
+ printed covers) of the Document, numbering more than 100, and the
143
+ Document's license notice requires Cover Texts, you must enclose the
144
+ copies in covers that carry, clearly and legibly, all these Cover
145
+ Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
146
+ the back cover. Both covers must also clearly and legibly identify
147
+ you as the publisher of these copies. The front cover must present
148
+ the full title with all words of the title equally prominent and
149
+ visible. You may add other material on the covers in addition.
150
+ Copying with changes limited to the covers, as long as they preserve
151
+ the title of the Document and satisfy these conditions, can be treated
152
+ as verbatim copying in other respects.
153
+
154
+ If the required texts for either cover are too voluminous to fit
155
+ legibly, you should put the first ones listed (as many as fit
156
+ reasonably) on the actual cover, and continue the rest onto adjacent
157
+ pages.
158
+
159
+ If you publish or distribute Opaque copies of the Document numbering
160
+ more than 100, you must either include a machine-readable Transparent
161
+ copy along with each Opaque copy, or state in or with each Opaque copy
162
+ a computer-network location from which the general network-using
163
+ public has access to download using public-standard network protocols
164
+ a complete Transparent copy of the Document, free of added material.
165
+ If you use the latter option, you must take reasonably prudent steps,
166
+ when you begin distribution of Opaque copies in quantity, to ensure
167
+ that this Transparent copy will remain thus accessible at the stated
168
+ location until at least one year after the last time you distribute an
169
+ Opaque copy (directly or through your agents or retailers) of that
170
+ edition to the public.
171
+
172
+ It is requested, but not required, that you contact the authors of the
173
+ Document well before redistributing any large number of copies, to
174
+ give them a chance to provide you with an updated version of the
175
+ Document.
176
+
177
+
178
+ ### 4. Modifications
179
+
180
+ You may copy and distribute a Modified Version of the Document under
181
+ the conditions of sections 2 and 3 above, provided that you release
182
+ the Modified Version under precisely this License, with the Modified
183
+ Version filling the role of the Document, thus licensing distribution
184
+ and modification of the Modified Version to whoever possesses a copy
185
+ of it. In addition, you must do these things in the Modified Version:
186
+
187
+ * **A.** Use in the Title Page (and on the covers, if any) a title distinct
188
+ from that of the Document, and from those of previous versions
189
+ (which should, if there were any, be listed in the History section
190
+ of the Document). You may use the same title as a previous version
191
+ if the original publisher of that version gives permission.
192
+ * **B.** List on the Title Page, as authors, one or more persons or entities
193
+ responsible for authorship of the modifications in the Modified
194
+ Version, together with at least five of the principal authors of the
195
+ Document (all of its principal authors, if it has fewer than five),
196
+ unless they release you from this requirement.
197
+ * **C.** State on the Title page the name of the publisher of the
198
+ Modified Version, as the publisher.
199
+ * **D.** Preserve all the copyright notices of the Document.
200
+ * **E.** Add an appropriate copyright notice for your modifications
201
+ adjacent to the other copyright notices.
202
+ * **F.** Include, immediately after the copyright notices, a license notice
203
+ giving the public permission to use the Modified Version under the
204
+ terms of this License, in the form shown in the Addendum below.
205
+ * **G.** Preserve in that license notice the full lists of Invariant Sections
206
+ and required Cover Texts given in the Document's license notice.
207
+ * **H.** Include an unaltered copy of this License.
208
+ * **I.** Preserve the section Entitled “History”, Preserve its Title, and add
209
+ to it an item stating at least the title, year, new authors, and
210
+ publisher of the Modified Version as given on the Title Page. If
211
+ there is no section Entitled “History” in the Document, create one
212
+ stating the title, year, authors, and publisher of the Document as
213
+ given on its Title Page, then add an item describing the Modified
214
+ Version as stated in the previous sentence.
215
+ * **J.** Preserve the network location, if any, given in the Document for
216
+ public access to a Transparent copy of the Document, and likewise
217
+ the network locations given in the Document for previous versions
218
+ it was based on. These may be placed in the “History” section.
219
+ You may omit a network location for a work that was published at
220
+ least four years before the Document itself, or if the original
221
+ publisher of the version it refers to gives permission.
222
+ * **K.** For any section Entitled “Acknowledgements” or “Dedications”,
223
+ Preserve the Title of the section, and preserve in the section all
224
+ the substance and tone of each of the contributor acknowledgements
225
+ and/or dedications given therein.
226
+ * **L.** Preserve all the Invariant Sections of the Document,
227
+ unaltered in their text and in their titles. Section numbers
228
+ or the equivalent are not considered part of the section titles.
229
+ * **M.** Delete any section Entitled “Endorsements”. Such a section
230
+ may not be included in the Modified Version.
231
+ * **N.** Do not retitle any existing section to be Entitled “Endorsements”
232
+ or to conflict in title with any Invariant Section.
233
+ * **O.** Preserve any Warranty Disclaimers.
234
+
235
+ If the Modified Version includes new front-matter sections or
236
+ appendices that qualify as Secondary Sections and contain no material
237
+ copied from the Document, you may at your option designate some or all
238
+ of these sections as invariant. To do this, add their titles to the
239
+ list of Invariant Sections in the Modified Version's license notice.
240
+ These titles must be distinct from any other section titles.
241
+
242
+ You may add a section Entitled “Endorsements”, provided it contains
243
+ nothing but endorsements of your Modified Version by various
244
+ parties--for example, statements of peer review or that the text has
245
+ been approved by an organization as the authoritative definition of a
246
+ standard.
247
+
248
+ You may add a passage of up to five words as a Front-Cover Text, and a
249
+ passage of up to 25 words as a Back-Cover Text, to the end of the list
250
+ of Cover Texts in the Modified Version. Only one passage of
251
+ Front-Cover Text and one of Back-Cover Text may be added by (or
252
+ through arrangements made by) any one entity. If the Document already
253
+ includes a cover text for the same cover, previously added by you or
254
+ by arrangement made by the same entity you are acting on behalf of,
255
+ you may not add another; but you may replace the old one, on explicit
256
+ permission from the previous publisher that added the old one.
257
+
258
+ The author(s) and publisher(s) of the Document do not by this License
259
+ give permission to use their names for publicity for or to assert or
260
+ imply endorsement of any Modified Version.
261
+
262
+
263
+ ### 5. Combining Documents
264
+
265
+ You may combine the Document with other documents released under this
266
+ License, under the terms defined in section 4 above for modified
267
+ versions, provided that you include in the combination all of the
268
+ Invariant Sections of all of the original documents, unmodified, and
269
+ list them all as Invariant Sections of your combined work in its
270
+ license notice, and that you preserve all their Warranty Disclaimers.
271
+
272
+ The combined work need only contain one copy of this License, and
273
+ multiple identical Invariant Sections may be replaced with a single
274
+ copy. If there are multiple Invariant Sections with the same name but
275
+ different contents, make the title of each such section unique by
276
+ adding at the end of it, in parentheses, the name of the original
277
+ author or publisher of that section if known, or else a unique number.
278
+ Make the same adjustment to the section titles in the list of
279
+ Invariant Sections in the license notice of the combined work.
280
+
281
+ In the combination, you must combine any sections Entitled “History”
282
+ in the various original documents, forming one section Entitled
283
+ “History”; likewise combine any sections Entitled “Acknowledgements”,
284
+ and any sections Entitled “Dedications”. You must delete all sections
285
+ Entitled “Endorsements”.
286
+
287
+
288
+ ### 6. Collections of Documents
289
+
290
+ You may make a collection consisting of the Document and other
291
+ documents released under this License, and replace the individual
292
+ copies of this License in the various documents with a single copy
293
+ that is included in the collection, provided that you follow the rules
294
+ of this License for verbatim copying of each of the documents in all
295
+ other respects.
296
+
297
+ You may extract a single document from such a collection, and
298
+ distribute it individually under this License, provided you insert a
299
+ copy of this License into the extracted document, and follow this
300
+ License in all other respects regarding verbatim copying of that
301
+ document.
302
+
303
+
304
+ ### 7. Aggregation with Independent Works
305
+
306
+ A compilation of the Document or its derivatives with other separate
307
+ and independent documents or works, in or on a volume of a storage or
308
+ distribution medium, is called an “aggregate” if the copyright
309
+ resulting from the compilation is not used to limit the legal rights
310
+ of the compilation's users beyond what the individual works permit.
311
+ When the Document is included in an aggregate, this License does not
312
+ apply to the other works in the aggregate which are not themselves
313
+ derivative works of the Document.
314
+
315
+ If the Cover Text requirement of section 3 is applicable to these
316
+ copies of the Document, then if the Document is less than one half of
317
+ the entire aggregate, the Document's Cover Texts may be placed on
318
+ covers that bracket the Document within the aggregate, or the
319
+ electronic equivalent of covers if the Document is in electronic form.
320
+ Otherwise they must appear on printed covers that bracket the whole
321
+ aggregate.
322
+
323
+
324
+ ### 8. Translation
325
+
326
+ Translation is considered a kind of modification, so you may
327
+ distribute translations of the Document under the terms of section 4.
328
+ Replacing Invariant Sections with translations requires special
329
+ permission from their copyright holders, but you may include
330
+ translations of some or all Invariant Sections in addition to the
331
+ original versions of these Invariant Sections. You may include a
332
+ translation of this License, and all the license notices in the
333
+ Document, and any Warranty Disclaimers, provided that you also include
334
+ the original English version of this License and the original versions
335
+ of those notices and disclaimers. In case of a disagreement between
336
+ the translation and the original version of this License or a notice
337
+ or disclaimer, the original version will prevail.
338
+
339
+ If a section in the Document is Entitled “Acknowledgements”,
340
+ “Dedications”, or “History”, the requirement (section 4) to Preserve
341
+ its Title (section 1) will typically require changing the actual
342
+ title.
343
+
344
+
345
+ ### 9. Termination
346
+
347
+ You may not copy, modify, sublicense, or distribute the Document
348
+ except as expressly provided under this License. Any attempt
349
+ otherwise to copy, modify, sublicense, or distribute it is void, and
350
+ will automatically terminate your rights under this License.
351
+
352
+ However, if you cease all violation of this License, then your license
353
+ from a particular copyright holder is reinstated **(a)** provisionally,
354
+ unless and until the copyright holder explicitly and finally
355
+ terminates your license, and **(b)** permanently, if the copyright holder
356
+ fails to notify you of the violation by some reasonable means prior to
357
+ 60 days after the cessation.
358
+
359
+ Moreover, your license from a particular copyright holder is
360
+ reinstated permanently if the copyright holder notifies you of the
361
+ violation by some reasonable means, this is the first time you have
362
+ received notice of violation of this License (for any work) from that
363
+ copyright holder, and you cure the violation prior to 30 days after
364
+ your receipt of the notice.
365
+
366
+ Termination of your rights under this section does not terminate the
367
+ licenses of parties who have received copies or rights from you under
368
+ this License. If your rights have been terminated and not permanently
369
+ reinstated, receipt of a copy of some or all of the same material does
370
+ not give you any rights to use it.
371
+
372
+
373
+ ### 10. Future Revisions of this License
374
+
375
+ The Free Software Foundation may publish new, revised versions of the
376
+ GNU Free Documentation License from time to time. Such new versions
377
+ will be similar in spirit to the present version, but may differ in
378
+ detail to address new problems or concerns. See
379
+ &lt;<http://www.gnu.org/copyleft/>&gt;.
380
+
381
+ Each version of the License is given a distinguishing version number.
382
+ If the Document specifies that a particular numbered version of this
383
+ License “or any later version” applies to it, you have the option of
384
+ following the terms and conditions either of that specified version or
385
+ of any later version that has been published (not as a draft) by the
386
+ Free Software Foundation. If the Document does not specify a version
387
+ number of this License, you may choose any version ever published (not
388
+ as a draft) by the Free Software Foundation. If the Document
389
+ specifies that a proxy can decide which future versions of this
390
+ License can be used, that proxy's public statement of acceptance of a
391
+ version permanently authorizes you to choose that version for the
392
+ Document.
393
+
394
+ ### 11. Relicensing
395
+
396
+ “Massive Multiauthor Collaboration Site” (or “MMC Site”) means any
397
+ World Wide Web server that publishes copyrightable works and also
398
+ provides prominent facilities for anybody to edit those works. A
399
+ public wiki that anybody can edit is an example of such a server. A
400
+ “Massive Multiauthor Collaboration” (or “MMC”) contained in the site
401
+ means any set of copyrightable works thus published on the MMC site.
402
+
403
+ “CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0
404
+ license published by Creative Commons Corporation, a not-for-profit
405
+ corporation with a principal place of business in San Francisco,
406
+ California, as well as future copyleft versions of that license
407
+ published by that same organization.
408
+
409
+ “Incorporate” means to publish or republish a Document, in whole or in
410
+ part, as part of another Document.
411
+
412
+ An MMC is “eligible for relicensing” if it is licensed under this
413
+ License, and if all works that were first published under this License
414
+ somewhere other than this MMC, and subsequently incorporated in whole or
415
+ in part into the MMC, **(1)** had no cover texts or invariant sections, and
416
+ **(2)** were thus incorporated prior to November 1, 2008.
417
+
418
+ The operator of an MMC Site may republish an MMC contained in the site
419
+ under CC-BY-SA on the same site at any time before August 1, 2009,
420
+ provided the MMC is eligible for relicensing.
421
+
422
+
423
+ ## ADDENDUM: How to use this License for your documents
424
+
425
+ To use this License in a document you have written, include a copy of
426
+ the License in the document and put the following copyright and
427
+ license notices just after the title page:
428
+
429
+ Copyright (c) <YEAR> <YOUR NAME>.
430
+ Permission is granted to copy, distribute and/or modify this document
431
+ under the terms of the GNU Free Documentation License, Version 1.3
432
+ or any later version published by the Free Software Foundation;
433
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
434
+ A copy of the license is included in the section entitled “GNU
435
+ Free Documentation License”.
436
+
437
+ If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
438
+ replace the `with...Texts.` line with this:
439
+
440
+ with the Invariant Sections being <LIST THEIR TITLES>, with the
441
+ Front-Cover Texts being <LIST>, and with the Back-Cover Texts being <LIST>.
442
+
443
+ If you have Invariant Sections without Cover Texts, or some other
444
+ combination of the three, merge those two alternatives to suit the
445
+ situation.
446
+
447
+ If your document contains nontrivial examples of program code, we
448
+ recommend releasing these examples in parallel under your choice of
449
+ free software license, such as the GNU General Public License,
450
+ to permit their use in free software.