licensee 6.1.1 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +2 -2
  3. data/bin/licensee +7 -4
  4. data/lib/licensee.rb +25 -22
  5. data/lib/licensee/content_helper.rb +5 -4
  6. data/lib/licensee/license.rb +56 -45
  7. data/lib/licensee/matchers/copyright_matcher.rb +2 -2
  8. data/lib/licensee/matchers/dice_matcher.rb +7 -4
  9. data/lib/licensee/matchers/exact_matcher.rb +2 -2
  10. data/lib/licensee/matchers/gemspec_matcher.rb +5 -2
  11. data/lib/licensee/matchers/npm_bower_matcher.rb +5 -2
  12. data/lib/licensee/matchers/package_matcher.rb +2 -2
  13. data/lib/licensee/project.rb +21 -96
  14. data/lib/licensee/project_file.rb +6 -7
  15. data/lib/licensee/project_files/license_file.rb +3 -3
  16. data/lib/licensee/project_files/package_info.rb +7 -7
  17. data/lib/licensee/project_files/readme.rb +24 -0
  18. data/lib/licensee/projects/fs_project.rb +32 -0
  19. data/lib/licensee/projects/git_project.rb +55 -0
  20. data/lib/licensee/version.rb +2 -2
  21. data/test/fixtures/bower-with-readme/README.md +1 -0
  22. data/test/fixtures/bower-with-readme/bower.json +3 -0
  23. data/test/functions.rb +23 -12
  24. data/test/helper.rb +5 -0
  25. data/test/test_licensee.rb +9 -8
  26. data/test/test_licensee_bin.rb +11 -5
  27. data/test/test_licensee_copyright_matcher.rb +23 -23
  28. data/test/test_licensee_dice_matcher.rb +5 -5
  29. data/test/test_licensee_exact_matcher.rb +4 -4
  30. data/test/test_licensee_gemspec_matcher.rb +4 -4
  31. data/test/test_licensee_license.rb +82 -70
  32. data/test/test_licensee_license_file.rb +30 -28
  33. data/test/test_licensee_npm_bower_matcher.rb +11 -11
  34. data/test/test_licensee_package_info.rb +8 -7
  35. data/test/test_licensee_project.rb +45 -37
  36. data/test/test_licensee_project_file.rb +9 -9
  37. data/test/test_licensee_readme.rb +47 -0
  38. data/test/test_licensee_vendor.rb +10 -7
  39. data/vendor/choosealicense.com/_licenses/afl-3.0.txt +0 -3
  40. data/vendor/choosealicense.com/_licenses/agpl-3.0.txt +5 -5
  41. data/vendor/choosealicense.com/_licenses/apache-2.0.txt +1 -2
  42. data/vendor/choosealicense.com/_licenses/artistic-2.0.txt +14 -13
  43. data/vendor/choosealicense.com/_licenses/bsd-2-clause.txt +2 -3
  44. data/vendor/choosealicense.com/_licenses/bsd-3-clause-clear.txt +0 -6
  45. data/vendor/choosealicense.com/_licenses/bsd-3-clause.txt +2 -4
  46. data/vendor/choosealicense.com/_licenses/cc0-1.0.txt +2 -1
  47. data/vendor/choosealicense.com/_licenses/epl-1.0.txt +2 -1
  48. data/vendor/choosealicense.com/_licenses/eupl-1.1.txt +345 -0
  49. data/vendor/choosealicense.com/_licenses/gpl-2.0.txt +5 -5
  50. data/vendor/choosealicense.com/_licenses/gpl-3.0.txt +5 -4
  51. data/vendor/choosealicense.com/_licenses/isc.txt +1 -2
  52. data/vendor/choosealicense.com/_licenses/lgpl-2.1.txt +5 -6
  53. data/vendor/choosealicense.com/_licenses/lgpl-3.0.txt +8 -8
  54. data/vendor/choosealicense.com/_licenses/lppl-1.3c.txt +445 -0
  55. data/vendor/choosealicense.com/_licenses/mit.txt +1 -1
  56. data/vendor/choosealicense.com/_licenses/mpl-2.0.txt +2 -1
  57. data/vendor/choosealicense.com/_licenses/ms-pl.txt +0 -1
  58. data/vendor/choosealicense.com/_licenses/ms-rl.txt +1 -1
  59. data/vendor/choosealicense.com/_licenses/ofl-1.1.txt +1 -2
  60. data/vendor/choosealicense.com/_licenses/osl-3.0.txt +1 -3
  61. data/vendor/choosealicense.com/_licenses/unlicense.txt +1 -2
  62. data/vendor/choosealicense.com/_licenses/wtfpl.txt +0 -2
  63. metadata +33 -11
  64. data/vendor/choosealicense.com/_licenses/no-license.txt +0 -25
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  title: BSD 2-clause "Simplified" License
3
- nickname: Simplified BSD
4
- tab-slug: bsd
3
+ nickname: BSD 2-Clause
5
4
  redirect_from: /licenses/bsd/
6
5
  family: BSD
7
6
  variant: true
@@ -18,12 +17,12 @@ permitted:
18
17
  - commercial-use
19
18
  - modifications
20
19
  - distribution
21
- - sublicense
22
20
  - private-use
23
21
 
24
22
  forbidden:
25
23
  - no-liability
26
24
 
25
+ hidden: false
27
26
  ---
28
27
 
29
28
  Copyright (c) [year], [fullname]
@@ -1,10 +1,6 @@
1
1
  ---
2
2
  title: BSD 3-clause Clear License
3
- nickname: Clear BSD
4
- hidden: true
5
-
6
3
  family: BSD
7
- tab-slug: bsd-3-clear
8
4
  variant: true
9
5
 
10
6
  description: A permissive license that comes in two variants, the <a href="/licenses/bsd">BSD 2-Clause</a> and <a href="/licenses/bsd-3-clause">BSD 3-Clause</a>. Both have very minute differences to the MIT license. The three clause variant prohibits others from using the name of the project or its contributors to promote derivative works without written consent.
@@ -20,12 +16,10 @@ permitted:
20
16
  - commercial-use
21
17
  - modifications
22
18
  - distribution
23
- - sublicense
24
19
  - private-use
25
20
 
26
21
  forbidden:
27
22
  - no-liability
28
- - trademark-use
29
23
 
30
24
  ---
31
25
 
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  title: BSD 3-clause "New" or "Revised" License
3
- nickname: New BSD
4
- tab-slug: bsd-3
3
+ nickname: BSD 3-Clause
5
4
  family: BSD
6
5
  variant: true
7
6
  source: http://opensource.org/licenses/BSD-3-Clause
@@ -17,13 +16,12 @@ permitted:
17
16
  - commercial-use
18
17
  - modifications
19
18
  - distribution
20
- - sublicense
21
19
  - private-use
22
20
 
23
21
  forbidden:
24
22
  - no-liability
25
- - trademark-use
26
23
 
24
+ hidden: false
27
25
  ---
28
26
 
29
27
  Copyright (c) [year], [fullname]
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  title: Creative Commons Zero v1.0 Universal
3
3
  nickname: CC0 1.0 Universal
4
- tab-slug: cc0
5
4
  redirect_from: /licenses/cc0/
6
5
  family: Public Domain Dedication
7
6
  variant: true
@@ -21,9 +20,11 @@ permitted:
21
20
 
22
21
  forbidden:
23
22
  - no-liability
23
+ - trademark-use
24
24
 
25
25
  required: []
26
26
 
27
+ hidden: false
27
28
  ---
28
29
 
29
30
  CC0 1.0 Universal
@@ -18,18 +18,19 @@ using:
18
18
  required:
19
19
  - disclose-source
20
20
  - include-copyright
21
+ - same-license
21
22
 
22
23
  permitted:
23
24
  - commercial-use
24
25
  - distribution
25
26
  - modifications
26
- - sublicense
27
27
  - patent-use
28
28
  - private-use
29
29
 
30
30
  forbidden:
31
31
  - no-liability
32
32
 
33
+ hidden: false
33
34
  ---
34
35
 
35
36
  Eclipse Public License - v 1.0
@@ -0,0 +1,345 @@
1
+ ---
2
+ title: European Union Public License 1.1
3
+ nickname: EUPL-1.1
4
+ redirect_from: /licenses/eupl-v1.1/
5
+ family: EUPL
6
+ featured: false
7
+ source: https://joinup.ec.europa.eu/community/eupl/og_page/european-union-public-licence-eupl-v11
8
+
9
+ description: The “European Union Public Licence” (EUPL) is a copyleft free/open source software license created on the initiative of and approved by the European Commission in 22 official languages of the European Union.
10
+
11
+ how: Create a text file (typically named COPYING or LICENCE.txt) in the root of your source code and copy the text of the license into the file.
12
+
13
+ note: The European Commission recommends taking the additional step of adding a boilerplate notice to the top of each file. The boilerplate can be found at https://joinup.ec.europa.eu/sites/default/files/ckeditor_files/files/EUPL%201_1%20Guidelines%20EN%20Joinup.pdf
14
+
15
+ required:
16
+ - include-copyright
17
+ - disclose-source
18
+ - document-changes
19
+ - network-use-disclose
20
+ - same-license
21
+
22
+ permitted:
23
+ - commercial-use
24
+ - modifications
25
+ - distribution
26
+ - patent-use
27
+ - private-use
28
+
29
+ forbidden:
30
+ - no-liability
31
+ - trademark-use
32
+
33
+ ---
34
+
35
+ European Union Public Licence
36
+ V. 1.1
37
+
38
+
39
+ EUPL © the European Community 2007
40
+
41
+
42
+ This European Union Public Licence (the “EUPL”) applies to the
43
+ Work or Software (as defined below) which is provided under the terms of this
44
+ Licence. Any use of the Work, other than as authorised under this Licence is
45
+ prohibited (to the extent such use is covered by a right of the copyright
46
+ holder of the Work).
47
+
48
+ The Original Work is provided under the terms of this
49
+ Licence when the Licensor (as defined below) has placed the following notice
50
+ immediately following the copyright notice for the Original Work:
51
+
52
+ Licensed under the EUPL V.1.1
53
+
54
+ or has expressed by any other mean his willingness to license under the EUPL.
55
+
56
+
57
+ 1. Definitions
58
+
59
+ In this Licence, the
60
+ following terms have the following meaning:
61
+
62
+ - The Licence: this Licence.
63
+
64
+ - The Original Work or the Software: the software distributed
65
+ and/or communicated by the Licensor under this Licence, available as Source
66
+ Code and also as Executable Code as the case may be.
67
+
68
+ - Derivative Works:
69
+ the works or software that could be created by the Licensee, based upon the
70
+ Original Work or modifications thereof. This Licence does not define the
71
+ extent of modification or dependence on the Original Work required in order to
72
+ classify a work as a Derivative Work; this extent is determined by copyright
73
+ law applicable in the country mentioned in Article 15.
74
+
75
+ - The Work: the Original Work and/or its Derivative Works.
76
+
77
+ - The Source Code: the human-readable form of the Work which is the most
78
+ convenient for people to study and modify.
79
+
80
+ - The Executable Code: any code which has generally been compiled and which
81
+ is meant to be interpreted by a computer as a program.
82
+
83
+ - The Licensor: the natural or legal person that distributes and/or
84
+ communicates the Work under the Licence.
85
+
86
+ - Contributor(s): any natural or legal person who modifies the Work under the
87
+ Licence, or otherwise contributes to the creation of a Derivative Work.
88
+
89
+ - The Licensee or “You”: any natural or legal person who makes any usage of
90
+ the Software under the terms of the Licence.
91
+
92
+ - Distribution and/or Communication: any act of selling, giving, lending,
93
+ renting, distributing, communicating, transmitting, or otherwise
94
+ making available, on-line or off-line, copies of the Work or providing access
95
+ to its essential functionalities at the disposal of any other natural or legal
96
+ person.
97
+
98
+
99
+ 2. Scope of the rights granted by the Licence
100
+
101
+ The Licensor hereby grants You a world-wide, royalty-free, non-exclusive,
102
+ sub-licensable licence to do the following, for the duration of copyright
103
+ vested in the Original Work:
104
+
105
+ - use the Work in any circumstance and for all usage,
106
+ - reproduce the Work,
107
+ - modify the Original Work, and make Derivative Works
108
+ based upon the Work,
109
+ - communicate to the public, including the right to make available or display
110
+ the Work or copies thereof to the public and perform publicly, as the case
111
+ may be, the Work,
112
+ - distribute the Work or copies thereof,
113
+ - lend and rent the Work or copies thereof,
114
+ - sub-license rights in the Work or copies thereof.
115
+
116
+ Those rights can be exercised on any media, supports and formats, whether now
117
+ known or later invented, as far as the applicable law permits so.
118
+
119
+ In the countries where moral rights apply, the Licensor waives his right to
120
+ exercise his moral right to the extent allowed by law in order to make
121
+ effective the licence of the economic rights here above listed.
122
+
123
+ The Licensor grants to the Licensee royalty-free, non exclusive usage rights
124
+ to any patents held by the Licensor, to the extent necessary to make use of
125
+ the rights granted on the Work under this Licence.
126
+
127
+
128
+ 3. Communication of the Source Code
129
+
130
+ The Licensor may provide the Work either
131
+ in its Source Code form, or as Executable Code. If the Work is provided as
132
+ Executable Code, the Licensor provides in addition a machine-readable copy of
133
+ the Source Code of the Work along with each copy of the Work that the Licensor
134
+ distributes or indicates, in a notice following the copyright notice attached
135
+ to the Work, a repository where the Source Code is easily and freely
136
+ accessible for as long as the Licensor continues to distribute and/or
137
+ communicate the Work.
138
+
139
+
140
+ 4. Limitations on copyright
141
+
142
+ Nothing in this Licence is intended to deprive the Licensee of the benefits
143
+ from any exception or limitation to the exclusive rights of the rights owners
144
+ in the Original Work or Software, of the exhaustion of those rights or of
145
+ other applicable limitations thereto.
146
+
147
+
148
+ 5. Obligations of the Licensee
149
+
150
+ The grant of the rights mentioned above is subject to some restrictions and
151
+ obligations imposed on the Licensee. Those obligations are the following:
152
+
153
+ Attribution right:
154
+ the Licensee shall keep intact all copyright, patent or trademarks notices and
155
+ all notices that refer to the Licence and to the disclaimer of warranties. The
156
+ Licensee must include a copy of such notices and a copy of the Licence with
157
+ every copy of the Work he/she distributes and/or communicates. The Licensee
158
+ must cause any Derivative Work to carry prominent notices stating that the
159
+ Work has been modified and the date of modification.
160
+
161
+ Copyleft clause:
162
+ If the Licensee distributes and/or communicates copies of the Original Works
163
+ or Derivative Works based upon the Original Work, this Distribution and/or
164
+ Communication will be done under the terms of this Licence or of a later
165
+ version of this Licence unless the Original Work is expressly distributed only
166
+ under this version of the Licence. The Licensee (becoming Licensor) cannot
167
+ offer or impose any additional terms or conditions on the Work or Derivative
168
+ Work that alter or restrict the terms of the Licence.
169
+
170
+ Compatibility clause:
171
+ If the Licensee Distributes and/or Communicates Derivative Works or copies
172
+ thereof based upon both the Original Work and another work licensed under a
173
+ Compatible Licence, this Distribution and/or Communication can be done under
174
+ the terms of this Compatible Licence. For the sake of this clause,
175
+ “Compatible Licence” refers to the licences listed in the appendix
176
+ attached to this Licence. Should the Licensee’s obligations under the
177
+ Compatible Licence conflict with his/her obligations under this Licence, the
178
+ obligations of the Compatible Licence shall prevail.
179
+
180
+ Provision of Source Code:
181
+ When distributing and/or communicating copies of the Work, the Licensee
182
+ will provide a machine-readable copy of the Source Code or indicate a
183
+ repository where this Source will be easily and freely available for as long
184
+ as the Licensee continues to distribute and/or communicate the Work.
185
+
186
+ Legal Protection:
187
+ This Licence does not grant permission to use the trade names,
188
+ trademarks, service marks, or names of the Licensor, except as required for
189
+ reasonable and customary use in describing the origin of the Work and
190
+ reproducing the content of the copyright notice.
191
+
192
+
193
+ 6. Chain of Authorship
194
+
195
+ The original Licensor warrants that the copyright in the Original Work
196
+ granted hereunder is owned by him/her or licensed to him/her and
197
+ that he/she has the power and authority to grant the Licence.
198
+
199
+ Each Contributor warrants that the copyright in the modifications he/she
200
+ brings to the Work are owned by him/her or licensed to him/her and that
201
+ he/she has the power and authority to grant the Licence.
202
+
203
+ Each time You accept the Licence, the original Licensor and subsequent
204
+ Contributors grant You a licence to their contributions to the Work, under
205
+ the terms of this Licence.
206
+
207
+
208
+ 7. Disclaimer of Warranty
209
+
210
+ The Work is a work in progress, which is continuously improved by numerous
211
+ contributors. It is not a finished work and may therefore contain defects or
212
+ “bugs” inherent to this type of software development.
213
+
214
+ For the above reason, the Work is provided under the Licence on an “as is”
215
+ basis and without warranties of any kind concerning the Work, including
216
+ without limitation merchantability, fitness for a particular purpose, absence
217
+ of defects or errors, accuracy, non-infringement of intellectual property
218
+ rights other than copyright as stated in Article 6 of this Licence.
219
+
220
+ This disclaimer of warranty is an essential part of the Licence and a
221
+ condition for the grant of any rights to the Work.
222
+
223
+
224
+ 8. Disclaimer of Liability
225
+
226
+ Except in the cases of wilful misconduct or damages directly caused to
227
+ natural persons, the Licensor will in no event be liable for any direct or
228
+ indirect, material or moral, damages of any kind, arising out of the Licence
229
+ or of the use of the Work, including without limitation,
230
+ damages for loss of goodwill, work stoppage, computer failure or malfunction,
231
+ loss of data or any commercial damage, even if the Licensor has been advised
232
+ of the possibility of such damage. However, the Licensor will be liable under
233
+ statutory product liability laws as far such laws apply to the Work.
234
+
235
+
236
+ 9. Additional agreements
237
+
238
+ While distributing the Original Work or Derivative Works, You may choose
239
+ to conclude an additional agreement to offer, and charge a fee for,
240
+ acceptance of support, warranty, indemnity, or other liability
241
+ obligations and/or services consistent with this Licence. However, in
242
+ accepting such obligations, You may act only on your own behalf and on your
243
+ sole responsibility, not on behalf of the original Licensor or any other
244
+ Contributor, and only if You agree to indemnify, defend, and hold each
245
+ Contributor harmless for any liability incurred by, or claims asserted against
246
+ such Contributor by the fact You have accepted any such warranty or additional
247
+ liability.
248
+
249
+
250
+ 10. Acceptance of the Licence
251
+
252
+ The provisions of this Licence can be accepted by clicking on
253
+ an icon “I agree” placed under the bottom of a window displaying the text of
254
+ this Licence or by affirming consent in any other similar way, in accordance
255
+ with the rules of applicable law. Clicking on that icon indicates your clear
256
+ and irrevocable acceptance of this Licence and
257
+ all of its terms and conditions.
258
+
259
+ Similarly, you irrevocably accept this Licence and
260
+ all of its terms and conditions by exercising any rights granted to You
261
+ by Article 2 of this Licence, such as the use of the Work,
262
+ the creation by You of a Derivative Work or the Distribution and/or
263
+ Communication by You of the Work or copies thereof.
264
+
265
+
266
+ 11. Information to the public
267
+
268
+ In case of any Distribution and/or Communication of the Work by means of
269
+ electronic communication by You (for example, by offering to download
270
+ the Work from a remote location) the distribution channel or media (for
271
+ example, a website) must at least provide to the public the information
272
+ requested by the applicable law regarding the Licensor, the Licence and the
273
+ way it may be accessible, concluded, stored and reproduced by the
274
+ Licensee.
275
+
276
+
277
+ 12. Termination of the Licence
278
+
279
+ The Licence and the rights granted hereunder will terminate automatically
280
+ upon any breach by the Licensee of the terms of the Licence.
281
+
282
+ Such a termination will not terminate the licences of any person who has
283
+ received the Work from the Licensee under the Licence, provided such persons
284
+ remain in full compliance with the Licence.
285
+
286
+
287
+ 13. Miscellaneous
288
+
289
+ Without prejudice of Article 9 above, the Licence represents the complete
290
+ agreement between the Parties as to the Work licensed hereunder.
291
+
292
+ If any provision of the Licence is invalid or unenforceable under applicable
293
+ law, this will not affect the validity or enforceability of the Licence as a
294
+ whole. Such provision will be construed and/or reformed so as necessary
295
+ to make it valid and enforceable.
296
+
297
+ The European Commission may publish other linguistic versions and/or new
298
+ versions of this Licence, so far this is required and reasonable, without
299
+ reducing the scope of the rights granted by the Licence.
300
+ New versions of the Licence will be published with a unique version number.
301
+
302
+ All linguistic versions of this Licence, approved by the European Commission,
303
+ have identical value. Parties can take advantage of the linguistic version
304
+ of their choice.
305
+
306
+
307
+ 14. Jurisdiction
308
+
309
+ Any litigation resulting from the interpretation of this License, arising
310
+ between the European Commission, as a Licensor, and any Licensee,
311
+ will be subject to the jurisdiction of the Court of Justice of the
312
+ European Communities, as laid down in article 238 of the Treaty establishing
313
+ the European Community.
314
+
315
+ Any litigation arising between Parties, other than the European Commission,
316
+ and resulting from the interpretation of this License, will be subject to the
317
+ exclusive jurisdiction of the competent court where the Licensor resides or
318
+ conducts its primary business.
319
+
320
+
321
+ 15. Applicable Law
322
+
323
+ This Licence shall be governed by the law of the European Union country where
324
+ the Licensor resides or has his registered office.
325
+
326
+ This licence shall be governed by the Belgian law if:
327
+
328
+ - a litigation arises between the European Commission, as a Licensor, and any
329
+ Licensee;
330
+ - the Licensor, other than the European Commission, has no residence or
331
+ registered office inside a European Union country.
332
+
333
+
334
+ ===
335
+
336
+
337
+ Appendix
338
+
339
+
340
+ “Compatible Licences” according to article 5 EUPL are:
341
+ - GNU General Public License (GNU GPL) v. 2
342
+ - Open Software License (OSL) v. 2.1, v. 3.0
343
+ - Common Public License v. 1.0
344
+ - Eclipse Public License v. 1.0
345
+ - Cecill v. 2.0