licensee 9.10.0 → 9.13.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/bin/licensee +5 -4
  3. data/lib/licensee.rb +4 -2
  4. data/lib/licensee/commands/detect.rb +10 -5
  5. data/lib/licensee/commands/diff.rb +7 -8
  6. data/lib/licensee/commands/license_path.rb +2 -0
  7. data/lib/licensee/commands/version.rb +2 -0
  8. data/lib/licensee/content_helper.rb +234 -85
  9. data/lib/licensee/hash_helper.rb +7 -5
  10. data/lib/licensee/license.rb +32 -25
  11. data/lib/licensee/license_field.rb +4 -1
  12. data/lib/licensee/license_meta.rb +3 -0
  13. data/lib/licensee/license_rules.rb +2 -0
  14. data/lib/licensee/matchers.rb +2 -0
  15. data/lib/licensee/matchers/cabal.rb +16 -2
  16. data/lib/licensee/matchers/cargo.rb +3 -1
  17. data/lib/licensee/matchers/copyright.rb +6 -4
  18. data/lib/licensee/matchers/cran.rb +7 -3
  19. data/lib/licensee/matchers/dice.rb +6 -4
  20. data/lib/licensee/matchers/dist_zilla.rb +3 -1
  21. data/lib/licensee/matchers/exact.rb +3 -0
  22. data/lib/licensee/matchers/gemspec.rb +8 -5
  23. data/lib/licensee/matchers/matcher.rb +3 -1
  24. data/lib/licensee/matchers/npm_bower.rb +3 -1
  25. data/lib/licensee/matchers/package.rb +3 -0
  26. data/lib/licensee/matchers/reference.rb +3 -1
  27. data/lib/licensee/matchers/spdx.rb +3 -1
  28. data/lib/licensee/project_files.rb +2 -0
  29. data/lib/licensee/project_files/license_file.rb +13 -10
  30. data/lib/licensee/project_files/package_manager_file.rb +3 -0
  31. data/lib/licensee/project_files/project_file.rb +12 -4
  32. data/lib/licensee/project_files/readme_file.rb +5 -3
  33. data/lib/licensee/projects.rb +2 -0
  34. data/lib/licensee/projects/fs_project.rb +3 -0
  35. data/lib/licensee/projects/git_project.rb +19 -11
  36. data/lib/licensee/projects/github_project.rb +6 -1
  37. data/lib/licensee/projects/project.rb +16 -5
  38. data/lib/licensee/rule.rb +2 -0
  39. data/lib/licensee/version.rb +3 -1
  40. data/licensee.gemspec +47 -0
  41. data/spec/bin_spec.rb +3 -1
  42. data/spec/fixture_spec.rb +46 -0
  43. data/spec/fixtures/bsd-3-noendorseslash/LICENSE +30 -0
  44. data/spec/fixtures/cc0-cal2013/LICENSE +116 -0
  45. data/spec/fixtures/cc0-cc/LICENSE +121 -0
  46. data/spec/fixtures/detect.json +9 -7
  47. data/spec/fixtures/fixtures.yml +130 -0
  48. data/spec/fixtures/html/license.html +262 -0
  49. data/spec/fixtures/license-hashes.json +41 -0
  50. data/spec/fixtures/mit-optional/LICENSE.txt +21 -0
  51. data/spec/fixtures/multiple-arrs/LICENSE +30 -0
  52. data/spec/fixtures/unlicense-noinfo/LICENSE +22 -0
  53. data/spec/integration_spec.rb +68 -2
  54. data/spec/licensee/commands/detect_spec.rb +10 -6
  55. data/spec/licensee/commands/license_path_spec.rb +3 -1
  56. data/spec/licensee/commands/version_spec.rb +3 -1
  57. data/spec/licensee/content_helper_spec.rb +184 -67
  58. data/spec/licensee/hash_helper_spec.rb +3 -1
  59. data/spec/licensee/license_field_spec.rb +5 -3
  60. data/spec/licensee/license_meta_spec.rb +16 -12
  61. data/spec/licensee/license_rules_spec.rb +6 -2
  62. data/spec/licensee/license_spec.rb +62 -37
  63. data/spec/licensee/matchers/cabal_matcher_spec.rb +97 -2
  64. data/spec/licensee/matchers/cargo_matcher_spec.rb +5 -2
  65. data/spec/licensee/matchers/copyright_matcher_spec.rb +7 -5
  66. data/spec/licensee/matchers/cran_matcher_spec.rb +5 -2
  67. data/spec/licensee/matchers/dice_matcher_spec.rb +15 -12
  68. data/spec/licensee/matchers/dist_zilla_matcher_spec.rb +5 -2
  69. data/spec/licensee/matchers/exact_matcher_spec.rb +5 -2
  70. data/spec/licensee/matchers/gemspec_matcher_spec.rb +5 -2
  71. data/spec/licensee/matchers/matcher_spec.rb +6 -2
  72. data/spec/licensee/matchers/npm_bower_matcher_spec.rb +5 -3
  73. data/spec/licensee/matchers/package_matcher_spec.rb +6 -2
  74. data/spec/licensee/matchers/reference_matcher_spec.rb +4 -2
  75. data/spec/licensee/matchers/spdx_matcher_spec.rb +5 -2
  76. data/spec/licensee/project_files/license_file_spec.rb +20 -18
  77. data/spec/licensee/project_files/package_info_spec.rb +5 -1
  78. data/spec/licensee/project_files/project_file_spec.rb +8 -2
  79. data/spec/licensee/project_files/readme_file_spec.rb +4 -1
  80. data/spec/licensee/project_spec.rb +24 -17
  81. data/spec/licensee/projects/git_project_spec.rb +23 -0
  82. data/spec/licensee/projects/github_project_spec.rb +8 -5
  83. data/spec/licensee/rule_spec.rb +6 -3
  84. data/spec/licensee_spec.rb +12 -9
  85. data/spec/spec_helper.rb +28 -9
  86. data/spec/vendored_license_spec.rb +29 -10
  87. data/vendor/choosealicense.com/_data/meta.yml +0 -4
  88. data/vendor/choosealicense.com/_data/rules.yml +3 -0
  89. data/vendor/choosealicense.com/_licenses/0bsd.txt +39 -0
  90. data/vendor/choosealicense.com/_licenses/afl-3.0.txt +7 -6
  91. data/vendor/choosealicense.com/_licenses/agpl-3.0.txt +0 -1
  92. data/vendor/choosealicense.com/_licenses/apache-2.0.txt +1 -2
  93. data/vendor/choosealicense.com/_licenses/artistic-2.0.txt +1 -2
  94. data/vendor/choosealicense.com/_licenses/bsd-2-clause.txt +8 -6
  95. data/vendor/choosealicense.com/_licenses/bsd-3-clause-clear.txt +2 -2
  96. data/vendor/choosealicense.com/_licenses/bsd-3-clause.txt +12 -10
  97. data/vendor/choosealicense.com/_licenses/bsd-4-clause.txt +61 -0
  98. data/vendor/choosealicense.com/_licenses/bsl-1.0.txt +5 -2
  99. data/vendor/choosealicense.com/_licenses/cc-by-4.0.txt +3 -1
  100. data/vendor/choosealicense.com/_licenses/cc-by-sa-4.0.txt +3 -1
  101. data/vendor/choosealicense.com/_licenses/cc0-1.0.txt +113 -105
  102. data/vendor/choosealicense.com/_licenses/cecill-2.1.txt +579 -0
  103. data/vendor/choosealicense.com/_licenses/ecl-2.0.txt +1 -2
  104. data/vendor/choosealicense.com/_licenses/epl-1.0.txt +1 -2
  105. data/vendor/choosealicense.com/_licenses/epl-2.0.txt +3 -4
  106. data/vendor/choosealicense.com/_licenses/eupl-1.1.txt +0 -1
  107. data/vendor/choosealicense.com/_licenses/eupl-1.2.txt +0 -1
  108. data/vendor/choosealicense.com/_licenses/gpl-2.0.txt +0 -1
  109. data/vendor/choosealicense.com/_licenses/gpl-3.0.txt +1 -2
  110. data/vendor/choosealicense.com/_licenses/isc.txt +0 -1
  111. data/vendor/choosealicense.com/_licenses/lgpl-2.1.txt +0 -1
  112. data/vendor/choosealicense.com/_licenses/lgpl-3.0.txt +1 -3
  113. data/vendor/choosealicense.com/_licenses/lppl-1.3c.txt +1 -2
  114. data/vendor/choosealicense.com/_licenses/mit.txt +1 -2
  115. data/vendor/choosealicense.com/_licenses/mpl-2.0.txt +0 -1
  116. data/vendor/choosealicense.com/_licenses/ms-pl.txt +0 -1
  117. data/vendor/choosealicense.com/_licenses/ms-rl.txt +0 -1
  118. data/vendor/choosealicense.com/_licenses/ncsa.txt +21 -22
  119. data/vendor/choosealicense.com/_licenses/odbl-1.0.txt +573 -0
  120. data/vendor/choosealicense.com/_licenses/ofl-1.1.txt +4 -2
  121. data/vendor/choosealicense.com/_licenses/osl-3.0.txt +1 -2
  122. data/vendor/choosealicense.com/_licenses/postgresql.txt +4 -5
  123. data/vendor/choosealicense.com/_licenses/unlicense.txt +1 -2
  124. data/vendor/choosealicense.com/_licenses/upl-1.0.txt +4 -5
  125. data/vendor/choosealicense.com/_licenses/vim.txt +111 -0
  126. data/vendor/choosealicense.com/_licenses/wtfpl.txt +0 -1
  127. data/vendor/choosealicense.com/_licenses/zlib.txt +4 -2
  128. metadata +77 -19
@@ -0,0 +1,262 @@
1
+
2
+ <?xml version="1.0" encoding="ISO-8859-1" ?>
3
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml">
5
+
6
+ <head>
7
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
8
+ <title>Eclipse Public License - Version 1.0</title>
9
+ <style type="text/css">
10
+ body {
11
+ size: 8.5in 11.0in;
12
+ margin: 0.25in 0.5in 0.25in 0.5in;
13
+ tab-interval: 0.5in;
14
+ }
15
+ p {
16
+ margin-left: auto;
17
+ margin-top: 0.5em;
18
+ margin-bottom: 0.5em;
19
+ }
20
+ p.list {
21
+ margin-left: 0.5in;
22
+ margin-top: 0.05em;
23
+ margin-bottom: 0.05em;
24
+ }
25
+ </style>
26
+
27
+ </head>
28
+
29
+ <body lang="EN-US">
30
+
31
+ <h2>Eclipse Public License - v 1.0</h2>
32
+
33
+ <p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
34
+ PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE, REPRODUCTION OR
35
+ DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
36
+ AGREEMENT.</p>
37
+
38
+ <p><b>1. DEFINITIONS</b></p>
39
+
40
+ <p>&quot;Contribution&quot; means:</p>
41
+
42
+ <p class="list">a) in the case of the initial Contributor, the initial
43
+ code and documentation distributed under this Agreement, and</p>
44
+ <p class="list">b) in the case of each subsequent Contributor:</p>
45
+ <p class="list">i) changes to the Program, and</p>
46
+ <p class="list">ii) additions to the Program;</p>
47
+ <p class="list">where such changes and/or additions to the Program
48
+ originate from and are distributed by that particular Contributor. A
49
+ Contribution 'originates' from a Contributor if it was added to the
50
+ Program by such Contributor itself or anyone acting on such
51
+ Contributor's behalf. Contributions do not include additions to the
52
+ Program which: (i) are separate modules of software distributed in
53
+ conjunction with the Program under their own license agreement, and (ii)
54
+ are not derivative works of the Program.</p>
55
+
56
+ <p>&quot;Contributor&quot; means any person or entity that distributes
57
+ the Program.</p>
58
+
59
+ <p>&quot;Licensed Patents&quot; mean patent claims licensable by a
60
+ Contributor which are necessarily infringed by the use or sale of its
61
+ Contribution alone or when combined with the Program.</p>
62
+
63
+ <p>&quot;Program&quot; means the Contributions distributed in accordance
64
+ with this Agreement.</p>
65
+
66
+ <p>&quot;Recipient&quot; means anyone who receives the Program under
67
+ this Agreement, including all Contributors.</p>
68
+
69
+ <p><b>2. GRANT OF RIGHTS</b></p>
70
+
71
+ <p class="list">a) Subject to the terms of this Agreement, each
72
+ Contributor hereby grants Recipient a non-exclusive, worldwide,
73
+ royalty-free copyright license to reproduce, prepare derivative works
74
+ of, publicly display, publicly perform, distribute and sublicense the
75
+ Contribution of such Contributor, if any, and such derivative works, in
76
+ source code and object code form.</p>
77
+
78
+ <p class="list">b) Subject to the terms of this Agreement, each
79
+ Contributor hereby grants Recipient a non-exclusive, worldwide,
80
+ royalty-free patent license under Licensed Patents to make, use, sell,
81
+ offer to sell, import and otherwise transfer the Contribution of such
82
+ Contributor, if any, in source code and object code form. This patent
83
+ license shall apply to the combination of the Contribution and the
84
+ Program if, at the time the Contribution is added by the Contributor,
85
+ such addition of the Contribution causes such combination to be covered
86
+ by the Licensed Patents. The patent license shall not apply to any other
87
+ combinations which include the Contribution. No hardware per se is
88
+ licensed hereunder.</p>
89
+
90
+ <p class="list">c) Recipient understands that although each Contributor
91
+ grants the licenses to its Contributions set forth herein, no assurances
92
+ are provided by any Contributor that the Program does not infringe the
93
+ patent or other intellectual property rights of any other entity. Each
94
+ Contributor disclaims any liability to Recipient for claims brought by
95
+ any other entity based on infringement of intellectual property rights
96
+ or otherwise. As a condition to exercising the rights and licenses
97
+ granted hereunder, each Recipient hereby assumes sole responsibility to
98
+ secure any other intellectual property rights needed, if any. For
99
+ example, if a third party patent license is required to allow Recipient
100
+ to distribute the Program, it is Recipient's responsibility to acquire
101
+ that license before distributing the Program.</p>
102
+
103
+ <p class="list">d) Each Contributor represents that to its knowledge it
104
+ has sufficient copyright rights in its Contribution, if any, to grant
105
+ the copyright license set forth in this Agreement.</p>
106
+
107
+ <p><b>3. REQUIREMENTS</b></p>
108
+
109
+ <p>A Contributor may choose to distribute the Program in object code
110
+ form under its own license agreement, provided that:</p>
111
+
112
+ <p class="list">a) it complies with the terms and conditions of this
113
+ Agreement; and</p>
114
+
115
+ <p class="list">b) its license agreement:</p>
116
+
117
+ <p class="list">i) effectively disclaims on behalf of all Contributors
118
+ all warranties and conditions, express and implied, including warranties
119
+ or conditions of title and non-infringement, and implied warranties or
120
+ conditions of merchantability and fitness for a particular purpose;</p>
121
+
122
+ <p class="list">ii) effectively excludes on behalf of all Contributors
123
+ all liability for damages, including direct, indirect, special,
124
+ incidental and consequential damages, such as lost profits;</p>
125
+
126
+ <p class="list">iii) states that any provisions which differ from this
127
+ Agreement are offered by that Contributor alone and not by any other
128
+ party; and</p>
129
+
130
+ <p class="list">iv) states that source code for the Program is available
131
+ from such Contributor, and informs licensees how to obtain it in a
132
+ reasonable manner on or through a medium customarily used for software
133
+ exchange.</p>
134
+
135
+ <p>When the Program is made available in source code form:</p>
136
+
137
+ <p class="list">a) it must be made available under this Agreement; and</p>
138
+
139
+ <p class="list">b) a copy of this Agreement must be included with each
140
+ copy of the Program.</p>
141
+
142
+ <p>Contributors may not remove or alter any copyright notices contained
143
+ within the Program.</p>
144
+
145
+ <p>Each Contributor must identify itself as the originator of its
146
+ Contribution, if any, in a manner that reasonably allows subsequent
147
+ Recipients to identify the originator of the Contribution.</p>
148
+
149
+ <p><b>4. COMMERCIAL DISTRIBUTION</b></p>
150
+
151
+ <p>Commercial distributors of software may accept certain
152
+ responsibilities with respect to end users, business partners and the
153
+ like. While this license is intended to facilitate the commercial use of
154
+ the Program, the Contributor who includes the Program in a commercial
155
+ product offering should do so in a manner which does not create
156
+ potential liability for other Contributors. Therefore, if a Contributor
157
+ includes the Program in a commercial product offering, such Contributor
158
+ (&quot;Commercial Contributor&quot;) hereby agrees to defend and
159
+ indemnify every other Contributor (&quot;Indemnified Contributor&quot;)
160
+ against any losses, damages and costs (collectively &quot;Losses&quot;)
161
+ arising from claims, lawsuits and other legal actions brought by a third
162
+ party against the Indemnified Contributor to the extent caused by the
163
+ acts or omissions of such Commercial Contributor in connection with its
164
+ distribution of the Program in a commercial product offering. The
165
+ obligations in this section do not apply to any claims or Losses
166
+ relating to any actual or alleged intellectual property infringement. In
167
+ order to qualify, an Indemnified Contributor must: a) promptly notify
168
+ the Commercial Contributor in writing of such claim, and b) allow the
169
+ Commercial Contributor to control, and cooperate with the Commercial
170
+ Contributor in, the defense and any related settlement negotiations. The
171
+ Indemnified Contributor may participate in any such claim at its own
172
+ expense.</p>
173
+
174
+ <p>For example, a Contributor might include the Program in a commercial
175
+ product offering, Product X. That Contributor is then a Commercial
176
+ Contributor. If that Commercial Contributor then makes performance
177
+ claims, or offers warranties related to Product X, those performance
178
+ claims and warranties are such Commercial Contributor's responsibility
179
+ alone. Under this section, the Commercial Contributor would have to
180
+ defend claims against the other Contributors related to those
181
+ performance claims and warranties, and if a court requires any other
182
+ Contributor to pay any damages as a result, the Commercial Contributor
183
+ must pay those damages.</p>
184
+
185
+ <p><b>5. NO WARRANTY</b></p>
186
+
187
+ <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
188
+ PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS
189
+ OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
190
+ ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
191
+ OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
192
+ responsible for determining the appropriateness of using and
193
+ distributing the Program and assumes all risks associated with its
194
+ exercise of rights under this Agreement , including but not limited to
195
+ the risks and costs of program errors, compliance with applicable laws,
196
+ damage to or loss of data, programs or equipment, and unavailability or
197
+ interruption of operations.</p>
198
+
199
+ <p><b>6. DISCLAIMER OF LIABILITY</b></p>
200
+
201
+ <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
202
+ NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
203
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
204
+ WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
205
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
206
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
207
+ DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
208
+ HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
209
+
210
+ <p><b>7. GENERAL</b></p>
211
+
212
+ <p>If any provision of this Agreement is invalid or unenforceable under
213
+ applicable law, it shall not affect the validity or enforceability of
214
+ the remainder of the terms of this Agreement, and without further action
215
+ by the parties hereto, such provision shall be reformed to the minimum
216
+ extent necessary to make such provision valid and enforceable.</p>
217
+
218
+ <p>If Recipient institutes patent litigation against any entity
219
+ (including a cross-claim or counterclaim in a lawsuit) alleging that the
220
+ Program itself (excluding combinations of the Program with other
221
+ software or hardware) infringes such Recipient's patent(s), then such
222
+ Recipient's rights granted under Section 2(b) shall terminate as of the
223
+ date such litigation is filed.</p>
224
+
225
+ <p>All Recipient's rights under this Agreement shall terminate if it
226
+ fails to comply with any of the material terms or conditions of this
227
+ Agreement and does not cure such failure in a reasonable period of time
228
+ after becoming aware of such noncompliance. If all Recipient's rights
229
+ under this Agreement terminate, Recipient agrees to cease use and
230
+ distribution of the Program as soon as reasonably practicable. However,
231
+ Recipient's obligations under this Agreement and any licenses granted by
232
+ Recipient relating to the Program shall continue and survive.</p>
233
+
234
+ <p>Everyone is permitted to copy and distribute copies of this
235
+ Agreement, but in order to avoid inconsistency the Agreement is
236
+ copyrighted and may only be modified in the following manner. The
237
+ Agreement Steward reserves the right to publish new versions (including
238
+ revisions) of this Agreement from time to time. No one other than the
239
+ Agreement Steward has the right to modify this Agreement. The Eclipse
240
+ Foundation is the initial Agreement Steward. The Eclipse Foundation may
241
+ assign the responsibility to serve as the Agreement Steward to a
242
+ suitable separate entity. Each new version of the Agreement will be
243
+ given a distinguishing version number. The Program (including
244
+ Contributions) may always be distributed subject to the version of the
245
+ Agreement under which it was received. In addition, after a new version
246
+ of the Agreement is published, Contributor may elect to distribute the
247
+ Program (including its Contributions) under the new version. Except as
248
+ expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
249
+ rights or licenses to the intellectual property of any Contributor under
250
+ this Agreement, whether expressly, by implication, estoppel or
251
+ otherwise. All rights in the Program not expressly granted under this
252
+ Agreement are reserved.</p>
253
+
254
+ <p>This Agreement is governed by the laws of the State of New York and
255
+ the intellectual property laws of the United States of America. No party
256
+ to this Agreement will bring a legal action under this Agreement more
257
+ than one year after the cause of action arose. Each party waives its
258
+ rights to a jury trial in any resulting litigation.</p>
259
+
260
+ </body>
261
+
262
+ </html>
@@ -0,0 +1,41 @@
1
+ {
2
+ "0bsd": "7a6d7180345f015f6aaf49fac3154ed18b7db9ee",
3
+ "afl-3.0": "b991770683c71abd5c8cd8c8f10a03fedcdc76ec",
4
+ "agpl-3.0": "d445855a1f169b12cbee97d320c2e3522d053016",
5
+ "apache-2.0": "ab3901051663cb8ee5dea9ebdff406ad136910e3",
6
+ "artistic-2.0": "a2ff6e7fb76e51bda9a5350c759a824f206049d1",
7
+ "bsd-2-clause": "59f0099ff04225daf184db3fe55e478256133b1a",
8
+ "bsd-3-clause": "fa22c672927af9c7334874561198799cbf4bdf31",
9
+ "bsd-3-clause-clear": "251d4599b622d2a87b2c4bb21dfacd438c048466",
10
+ "bsd-4-clause": "c31a46c2b8764b63d73332c5e9e11f109dadee45",
11
+ "bsl-1.0": "ca8f916d00c234719956e932061f192abb2d5bf9",
12
+ "cc-by-4.0": "899872bc08626e6cf154dcf9e08ff0de82c9b3db",
13
+ "cc-by-sa-4.0": "d11590d97684231d5358252e0cc97373d62ec4f1",
14
+ "cc0-1.0": "c07f7fdd02072b9b9ddafb29c7fe556ed4d31f6a",
15
+ "cecill-2.1": "c996e4f8246fddc4fb083f72a70a85f36dffd288",
16
+ "ecl-2.0": "b24f240cd556a7764b9ace1bd763ad70c510d92a",
17
+ "epl-1.0": "e306464a81ab0e6688653c6509245b451637172c",
18
+ "epl-2.0": "b57663bc9c3f41446a8cd3f0050149221a58fe66",
19
+ "eupl-1.1": "873e30dbc5f75d076d7aecb6ceb84fb6bb765452",
20
+ "eupl-1.2": "f122f96b9f1a56e4806a89cb1cc6ca2bb956f3e5",
21
+ "gpl-2.0": "3becd209e8ed8039656c1debe01dd17b9a79208f",
22
+ "gpl-3.0": "b22f1b1f953a38a8a11686587b98831858d6468b",
23
+ "isc": "d168f98624be864548b2bbf4f198fdbf702d6743",
24
+ "lgpl-2.1": "91e779a787786276618f58d6e396a5e64a981805",
25
+ "lgpl-3.0": "bdb3c042bd84f914eacfbe4977c5e58352745809",
26
+ "lppl-1.3c": "60961652297042d28bb689c17fac47eca7348d16",
27
+ "mit": "d64f3bb4282a97b37454b5bb96a8a264a3363dc3",
28
+ "mpl-2.0": "b4db668fa7573bfdcae74eb51eafc961034f0a61",
29
+ "ms-pl": "c900293d66a241e54f7817367a8f32f7f94e12ff",
30
+ "ms-rl": "402bf344e506a8d10175c1e516b396c060ffd823",
31
+ "ncsa": "da965ab8e2094b0f0ac97a8502272b5400c29508",
32
+ "odbl-1.0": "4f4c0884535ebe8fdf1b93d2d3505e323144831f",
33
+ "ofl-1.1": "1fb0563aa1250e18a6948afde286edc95761f461",
34
+ "osl-3.0": "ab241ef932d3ac038e8ed62c860e9eba051ae7a0",
35
+ "postgresql": "87550a6bb3409db00d8552b2ac07d373ea56a024",
36
+ "unlicense": "853b375edc61b9e823da0fa5fead97c9460c3e45",
37
+ "upl-1.0": "af9efb6f7b29f8c2d486ccb28223db0aa8372c29",
38
+ "vim": "76268065cdc78dd7f3677df936cb24aa93aa14b0",
39
+ "wtfpl": "f8544c074f203d86cdcb24082fedfb2cf2fe411a",
40
+ "zlib": "576139d1f785b8f3539099b9702fc68005ee2213"
41
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016 Ben Balter
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is furnished
10
+ to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice (including the next
13
+ paragraph) shall be included in all copies or substantial portions of the
14
+ Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
19
+ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
21
+ OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,30 @@
1
+ Copyright (c) 2018, Ben Balter
2
+ All rights reserved.
3
+
4
+ Copyright (c) 2020, Alice B. Carols
5
+ All rights reserved.
6
+
7
+ Redistribution and use in source and binary forms, with or without
8
+ modification, are permitted provided that the following conditions are met:
9
+
10
+ * Redistributions of source code must retain the above copyright notice, this
11
+ list of conditions and the following disclaimer.
12
+
13
+ * Redistributions in binary form must reproduce the above copyright notice,
14
+ this list of conditions and the following disclaimer in the documentation
15
+ and/or other materials provided with the distribution.
16
+
17
+ * Neither the name of the copyright holder nor the names of its
18
+ contributors may be used to endorse or promote products derived from
19
+ this software without specific prior written permission.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,22 @@
1
+ This is free and unencumbered software released into the public domain.
2
+
3
+ Anyone is free to copy, modify, publish, use, compile, sell, or
4
+ distribute this software, either in source code form or as a compiled
5
+ binary, for any purpose, commercial or non-commercial, and by any
6
+ means.
7
+
8
+ In jurisdictions that recognize copyright laws, the author or authors
9
+ of this software dedicate any and all copyright interest in the
10
+ software to the public domain. We make this dedication for the benefit
11
+ of the public at large and to the detriment of our heirs and
12
+ successors. We intend this dedication to be an overt act of
13
+ relinquishment in perpetuity of all present and future rights to this
14
+ software under copyright law.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
@@ -1,9 +1,13 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec.describe 'integration test' do
2
4
  [
3
5
  Licensee::Projects::FSProject,
4
6
  Licensee::Projects::GitProject
5
7
  ].each do |project_type|
6
8
  context "with a #{project_type} project" do
9
+ subject { project_type.new(project_path, arguments) }
10
+
7
11
  let(:filename) { 'LICENSE' }
8
12
  let(:license) { Licensee::License.find('mit') }
9
13
  let(:other_license) { Licensee::License.find('other') }
@@ -11,8 +15,6 @@ RSpec.describe 'integration test' do
11
15
  let(:license_path) { File.expand_path(filename, project_path) }
12
16
  let(:arguments) { {} }
13
17
 
14
- subject { project_type.new(project_path, arguments) }
15
-
16
18
  context 'fixtures' do
17
19
  let(:fixture) { 'mit' }
18
20
  let(:project_path) { fixture_path(fixture) }
@@ -20,6 +22,7 @@ RSpec.describe 'integration test' do
20
22
 
21
23
  if project_type == Licensee::Projects::GitProject
22
24
  before { git_init(project_path) }
25
+
23
26
  after { FileUtils.rm_rf(git_path) }
24
27
  end
25
28
 
@@ -71,6 +74,15 @@ RSpec.describe 'integration test' do
71
74
  end
72
75
  end
73
76
 
77
+ context 'with multiple all rights reserved lines' do
78
+ let(:license) { Licensee::License.find('bsd-3-clause') }
79
+ let(:fixture) { 'multiple-arrs' }
80
+
81
+ it 'matches other' do
82
+ expect(subject.license).to eql(license)
83
+ end
84
+ end
85
+
74
86
  context 'with CC-BY-NC-SA' do
75
87
  let(:fixture) { 'cc-by-nc-sa' }
76
88
 
@@ -158,6 +170,42 @@ RSpec.describe 'integration test' do
158
170
  end
159
171
  end
160
172
 
173
+ context 'CC0 as published by CC' do
174
+ let(:license) { Licensee::License.find('cc0-1.0') }
175
+ let(:fixture) { 'cc0-cc' }
176
+
177
+ it 'returns cc0-1.0' do
178
+ expect(subject.license).to eql(license)
179
+ end
180
+ end
181
+
182
+ context 'CC0 as published on choosealicense.com 2013-2019' do
183
+ let(:license) { Licensee::License.find('cc0-1.0') }
184
+ let(:fixture) { 'cc0-cal2013' }
185
+
186
+ it 'returns cc0-1.0' do
187
+ expect(subject.license).to eql(license)
188
+ end
189
+ end
190
+
191
+ context 'Unlicense without optional line' do
192
+ let(:license) { Licensee::License.find('unlicense') }
193
+ let(:fixture) { 'unlicense-noinfo' }
194
+
195
+ it 'returns unlicense' do
196
+ expect(subject.license).to eql(license)
197
+ end
198
+ end
199
+
200
+ context 'MIT w/optional phrase' do
201
+ let(:license) { Licensee::License.find('mit') }
202
+ let(:fixture) { 'mit-optional' }
203
+
204
+ it 'returns mit' do
205
+ expect(subject.license).to eql(license)
206
+ end
207
+ end
208
+
161
209
  context 'license + README reference' do
162
210
  let(:license) { Licensee::License.find('mit') }
163
211
  let(:fixture) { 'license-with-readme-reference' }
@@ -195,6 +243,24 @@ RSpec.describe 'integration test' do
195
243
  expect(subject.license).to eql(license)
196
244
  end
197
245
  end
246
+
247
+ context 'BSD-3-Clause no-endorsement name with slashes' do
248
+ let(:license) { Licensee::License.find('bsd-3-clause') }
249
+ let(:fixture) { 'bsd-3-noendorseslash' }
250
+
251
+ it 'determines the project is BSD-3-Clause' do
252
+ expect(subject.license).to eql(license)
253
+ end
254
+ end
255
+
256
+ context 'HTML license file' do
257
+ let(:license) { Licensee::License.find('epl-1.0') }
258
+ let(:fixture) { 'html' }
259
+
260
+ it 'matches to GPL3' do
261
+ expect(subject.license).to eql(license)
262
+ end
263
+ end
198
264
  end
199
265
 
200
266
  context 'with the license file stubbed' do