license-generator 0.4.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: cc7797cddef15bef30ce84f1ce0c096841178552
4
+ data.tar.gz: dcb70647e25a5feca27ee3aaba695f55f3519168
5
+ SHA512:
6
+ metadata.gz: 5cb2de0375c0923e9118073b29fd254f6cc3bcd59dea6b88b7f716141504b58aa9b177dca6ce92f3b8a7e7eba1850147f0a9ae83dfae392ffee3632d5ae172c6
7
+ data.tar.gz: f9125274a11c89257aad51cb4dc9d660d1da87c7f6cbb380fd7b1e6afd2b46f1048874b9fe07a02413c2052439af32553af92184a78ff8eff2139a4de4827d31
@@ -1,3 +1,11 @@
1
+ # Version 1.0.0 (2017-03-02)
2
+
3
+ * Improved SIGINT handling
4
+ * Add newlines to the ends of Apache 2.0 and GPL* templates
5
+ * Add Creative Commons Attribution 4.0 Open Source Licenses
6
+ * Specify BSD license version number
7
+ * Improved help output
8
+
1
9
  # Version 0.4.1 (2013-03-16)
2
10
 
3
11
  * New licenses:
@@ -8,8 +8,7 @@ Then /^the file "([^"]*)" should contain a copyright notice for "([^"]*)"$/ do |
8
8
  end
9
9
 
10
10
  Then /^I should see the generic help output$/ do
11
- assert_partial_output("licgen help [TASK]", all_output)
11
+ assert_partial_output("licgen <license> [<author1>, [<author2> ...]]", all_output)
12
+ assert_partial_output("licgen help [COMMAND]", all_output)
12
13
  assert_partial_output("licgen list", all_output)
13
- assert_partial_output("licgen bsd", all_output)
14
- assert_partial_output("licgen mit", all_output)
15
14
  end
@@ -5,6 +5,8 @@ rescue LoadError
5
5
  # oh well!
6
6
  end
7
7
 
8
+ require 'nice-sigint'
9
+
8
10
  module LicenseGenerator
9
11
  autoload :App, "license-generator/app"
10
12
  end
@@ -22,15 +22,17 @@ module LicenseGenerator
22
22
  template "#{meth}.erb", "LICENSE"
23
23
  end
24
24
 
25
- # Override Thor#help to include templates.
26
25
  def help(task = nil)
27
- super
28
26
  unless task
29
- say "Templates:"
30
- templates.each do |template|
31
- say " licgen #{template}\t# Generate #{template} license"
32
- end
27
+ say "Generate an open source license for your project."
28
+ say ""
29
+ say "Usage:"
30
+ say " licgen <license> [<author1>, [<author2> ...]]"
31
+ say ""
32
+
33
+ say "Other "
33
34
  end
35
+ super
34
36
  end
35
37
 
36
38
  no_tasks do
@@ -1,5 +1,5 @@
1
1
  module License
2
2
  module Generator
3
- VERSION = "0.4.1"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -16,6 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.rubyforge_project = "license-generator"
17
17
 
18
18
  s.add_dependency "thor"
19
+ s.add_dependency "nice-sigint"
19
20
 
20
21
  s.add_development_dependency "rake"
21
22
  s.add_development_dependency "rspec"
@@ -32,12 +32,6 @@ describe LicenseGenerator::App do
32
32
  @app.list
33
33
  end
34
34
 
35
- it "displays the templates in the help command output" do
36
- @app.should_receive(:say).with('Templates:')
37
- @app.should_receive(:say).exactly(@app.templates.size).times.with(/^\s{2}licgen ([A-Za-z0-9\-\._]+)\b\s{1,}#\sGenerate\s([A-Za-z0-9\-\._]+)\slicense/)
38
- @app.help
39
- end
40
-
41
35
  it "generates a template with a valid template name" do
42
36
  @app.should_receive(:template).with('mit.erb', 'LICENSE')
43
37
  @app.mit('Justin Blake')
@@ -199,4 +199,4 @@
199
199
  distributed under the License is distributed on an "AS IS" BASIS,
200
200
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
201
  See the License for the specific language governing permissions and
202
- limitations under the License.
202
+ limitations under the License.
File without changes
@@ -0,0 +1,395 @@
1
+ <%= option(:work) %> (c) by <%= authors %>
2
+
3
+ Attribution 4.0 International
4
+
5
+ =======================================================================
6
+
7
+ Creative Commons Corporation ("Creative Commons") is not a law firm and
8
+ does not provide legal services or legal advice. Distribution of
9
+ Creative Commons public licenses does not create a lawyer-client or
10
+ other relationship. Creative Commons makes its licenses and related
11
+ information available on an "as-is" basis. Creative Commons gives no
12
+ warranties regarding its licenses, any material licensed under their
13
+ terms and conditions, or any related information. Creative Commons
14
+ disclaims all liability for damages resulting from their use to the
15
+ fullest extent possible.
16
+
17
+ Using Creative Commons Public Licenses
18
+
19
+ Creative Commons public licenses provide a standard set of terms and
20
+ conditions that creators and other rights holders may use to share
21
+ original works of authorship and other material subject to copyright
22
+ and certain other rights specified in the public license below. The
23
+ following considerations are for informational purposes only, are not
24
+ exhaustive, and do not form part of our licenses.
25
+
26
+ Considerations for licensors: Our public licenses are
27
+ intended for use by those authorized to give the public
28
+ permission to use material in ways otherwise restricted by
29
+ copyright and certain other rights. Our licenses are
30
+ irrevocable. Licensors should read and understand the terms
31
+ and conditions of the license they choose before applying it.
32
+ Licensors should also secure all rights necessary before
33
+ applying our licenses so that the public can reuse the
34
+ material as expected. Licensors should clearly mark any
35
+ material not subject to the license. This includes other CC-
36
+ licensed material, or material used under an exception or
37
+ limitation to copyright. More considerations for licensors:
38
+ wiki.creativecommons.org/Considerations_for_licensors
39
+
40
+ Considerations for the public: By using one of our public
41
+ licenses, a licensor grants the public permission to use the
42
+ licensed material under specified terms and conditions. If
43
+ the licensor's permission is not necessary for any reason--for
44
+ example, because of any applicable exception or limitation to
45
+ copyright--then that use is not regulated by the license. Our
46
+ licenses grant only permissions under copyright and certain
47
+ other rights that a licensor has authority to grant. Use of
48
+ the licensed material may still be restricted for other
49
+ reasons, including because others have copyright or other
50
+ rights in the material. A licensor may make special requests,
51
+ such as asking that all changes be marked or described.
52
+ Although not required by our licenses, you are encouraged to
53
+ respect those requests where reasonable. More_considerations
54
+ for the public:
55
+ wiki.creativecommons.org/Considerations_for_licensees
56
+
57
+ =======================================================================
58
+
59
+ Creative Commons Attribution 4.0 International Public License
60
+
61
+ By exercising the Licensed Rights (defined below), You accept and agree
62
+ to be bound by the terms and conditions of this Creative Commons
63
+ Attribution 4.0 International Public License ("Public License"). To the
64
+ extent this Public License may be interpreted as a contract, You are
65
+ granted the Licensed Rights in consideration of Your acceptance of
66
+ these terms and conditions, and the Licensor grants You such rights in
67
+ consideration of benefits the Licensor receives from making the
68
+ Licensed Material available under these terms and conditions.
69
+
70
+
71
+ Section 1 -- Definitions.
72
+
73
+ a. Adapted Material means material subject to Copyright and Similar
74
+ Rights that is derived from or based upon the Licensed Material
75
+ and in which the Licensed Material is translated, altered,
76
+ arranged, transformed, or otherwise modified in a manner requiring
77
+ permission under the Copyright and Similar Rights held by the
78
+ Licensor. For purposes of this Public License, where the Licensed
79
+ Material is a musical work, performance, or sound recording,
80
+ Adapted Material is always produced where the Licensed Material is
81
+ synched in timed relation with a moving image.
82
+
83
+ b. Adapter's License means the license You apply to Your Copyright
84
+ and Similar Rights in Your contributions to Adapted Material in
85
+ accordance with the terms and conditions of this Public License.
86
+
87
+ c. Copyright and Similar Rights means copyright and/or similar rights
88
+ closely related to copyright including, without limitation,
89
+ performance, broadcast, sound recording, and Sui Generis Database
90
+ Rights, without regard to how the rights are labeled or
91
+ categorized. For purposes of this Public License, the rights
92
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
93
+ Rights.
94
+
95
+ d. Effective Technological Measures means those measures that, in the
96
+ absence of proper authority, may not be circumvented under laws
97
+ fulfilling obligations under Article 11 of the WIPO Copyright
98
+ Treaty adopted on December 20, 1996, and/or similar international
99
+ agreements.
100
+
101
+ e. Exceptions and Limitations means fair use, fair dealing, and/or
102
+ any other exception or limitation to Copyright and Similar Rights
103
+ that applies to Your use of the Licensed Material.
104
+
105
+ f. Licensed Material means the artistic or literary work, database,
106
+ or other material to which the Licensor applied this Public
107
+ License.
108
+
109
+ g. Licensed Rights means the rights granted to You subject to the
110
+ terms and conditions of this Public License, which are limited to
111
+ all Copyright and Similar Rights that apply to Your use of the
112
+ Licensed Material and that the Licensor has authority to license.
113
+
114
+ h. Licensor means the individual(s) or entity(ies) granting rights
115
+ under this Public License.
116
+
117
+ i. Share means to provide material to the public by any means or
118
+ process that requires permission under the Licensed Rights, such
119
+ as reproduction, public display, public performance, distribution,
120
+ dissemination, communication, or importation, and to make material
121
+ available to the public including in ways that members of the
122
+ public may access the material from a place and at a time
123
+ individually chosen by them.
124
+
125
+ j. Sui Generis Database Rights means rights other than copyright
126
+ resulting from Directive 96/9/EC of the European Parliament and of
127
+ the Council of 11 March 1996 on the legal protection of databases,
128
+ as amended and/or succeeded, as well as other essentially
129
+ equivalent rights anywhere in the world.
130
+
131
+ k. You means the individual or entity exercising the Licensed Rights
132
+ under this Public License. Your has a corresponding meaning.
133
+
134
+
135
+ Section 2 -- Scope.
136
+
137
+ a. License grant.
138
+
139
+ 1. Subject to the terms and conditions of this Public License,
140
+ the Licensor hereby grants You a worldwide, royalty-free,
141
+ non-sublicensable, non-exclusive, irrevocable license to
142
+ exercise the Licensed Rights in the Licensed Material to:
143
+
144
+ a. reproduce and Share the Licensed Material, in whole or
145
+ in part; and
146
+
147
+ b. produce, reproduce, and Share Adapted Material.
148
+
149
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
150
+ Exceptions and Limitations apply to Your use, this Public
151
+ License does not apply, and You do not need to comply with
152
+ its terms and conditions.
153
+
154
+ 3. Term. The term of this Public License is specified in Section
155
+ 6(a).
156
+
157
+ 4. Media and formats; technical modifications allowed. The
158
+ Licensor authorizes You to exercise the Licensed Rights in
159
+ all media and formats whether now known or hereafter created,
160
+ and to make technical modifications necessary to do so. The
161
+ Licensor waives and/or agrees not to assert any right or
162
+ authority to forbid You from making technical modifications
163
+ necessary to exercise the Licensed Rights, including
164
+ technical modifications necessary to circumvent Effective
165
+ Technological Measures. For purposes of this Public License,
166
+ simply making modifications authorized by this Section 2(a)
167
+ (4) never produces Adapted Material.
168
+
169
+ 5. Downstream recipients.
170
+
171
+ a. Offer from the Licensor -- Licensed Material. Every
172
+ recipient of the Licensed Material automatically
173
+ receives an offer from the Licensor to exercise the
174
+ Licensed Rights under the terms and conditions of this
175
+ Public License.
176
+
177
+ b. No downstream restrictions. You may not offer or impose
178
+ any additional or different terms or conditions on, or
179
+ apply any Effective Technological Measures to, the
180
+ Licensed Material if doing so restricts exercise of the
181
+ Licensed Rights by any recipient of the Licensed
182
+ Material.
183
+
184
+ 6. No endorsement. Nothing in this Public License constitutes or
185
+ may be construed as permission to assert or imply that You
186
+ are, or that Your use of the Licensed Material is, connected
187
+ with, or sponsored, endorsed, or granted official status by,
188
+ the Licensor or others designated to receive attribution as
189
+ provided in Section 3(a)(1)(A)(i).
190
+
191
+ b. Other rights.
192
+
193
+ 1. Moral rights, such as the right of integrity, are not
194
+ licensed under this Public License, nor are publicity,
195
+ privacy, and/or other similar personality rights; however, to
196
+ the extent possible, the Licensor waives and/or agrees not to
197
+ assert any such rights held by the Licensor to the limited
198
+ extent necessary to allow You to exercise the Licensed
199
+ Rights, but not otherwise.
200
+
201
+ 2. Patent and trademark rights are not licensed under this
202
+ Public License.
203
+
204
+ 3. To the extent possible, the Licensor waives any right to
205
+ collect royalties from You for the exercise of the Licensed
206
+ Rights, whether directly or through a collecting society
207
+ under any voluntary or waivable statutory or compulsory
208
+ licensing scheme. In all other cases the Licensor expressly
209
+ reserves any right to collect such royalties.
210
+
211
+
212
+ Section 3 -- License Conditions.
213
+
214
+ Your exercise of the Licensed Rights is expressly made subject to the
215
+ following conditions.
216
+
217
+ a. Attribution.
218
+
219
+ 1. If You Share the Licensed Material (including in modified
220
+ form), You must:
221
+
222
+ a. retain the following if it is supplied by the Licensor
223
+ with the Licensed Material:
224
+
225
+ i. identification of the creator(s) of the Licensed
226
+ Material and any others designated to receive
227
+ attribution, in any reasonable manner requested by
228
+ the Licensor (including by pseudonym if
229
+ designated);
230
+
231
+ ii. a copyright notice;
232
+
233
+ iii. a notice that refers to this Public License;
234
+
235
+ iv. a notice that refers to the disclaimer of
236
+ warranties;
237
+
238
+ v. a URI or hyperlink to the Licensed Material to the
239
+ extent reasonably practicable;
240
+
241
+ b. indicate if You modified the Licensed Material and
242
+ retain an indication of any previous modifications; and
243
+
244
+ c. indicate the Licensed Material is licensed under this
245
+ Public License, and include the text of, or the URI or
246
+ hyperlink to, this Public License.
247
+
248
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
249
+ reasonable manner based on the medium, means, and context in
250
+ which You Share the Licensed Material. For example, it may be
251
+ reasonable to satisfy the conditions by providing a URI or
252
+ hyperlink to a resource that includes the required
253
+ information.
254
+
255
+ 3. If requested by the Licensor, You must remove any of the
256
+ information required by Section 3(a)(1)(A) to the extent
257
+ reasonably practicable.
258
+
259
+ 4. If You Share Adapted Material You produce, the Adapter's
260
+ License You apply must not prevent recipients of the Adapted
261
+ Material from complying with this Public License.
262
+
263
+
264
+ Section 4 -- Sui Generis Database Rights.
265
+
266
+ Where the Licensed Rights include Sui Generis Database Rights that
267
+ apply to Your use of the Licensed Material:
268
+
269
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
270
+ to extract, reuse, reproduce, and Share all or a substantial
271
+ portion of the contents of the database;
272
+
273
+ b. if You include all or a substantial portion of the database
274
+ contents in a database in which You have Sui Generis Database
275
+ Rights, then the database in which You have Sui Generis Database
276
+ Rights (but not its individual contents) is Adapted Material; and
277
+
278
+ c. You must comply with the conditions in Section 3(a) if You Share
279
+ all or a substantial portion of the contents of the database.
280
+
281
+ For the avoidance of doubt, this Section 4 supplements and does not
282
+ replace Your obligations under this Public License where the Licensed
283
+ Rights include other Copyright and Similar Rights.
284
+
285
+
286
+ Section 5 -- Disclaimer of Warranties and Limitation of Liability.
287
+
288
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
289
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
290
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
291
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
292
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
293
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
294
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
295
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
296
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
297
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
298
+
299
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
300
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
301
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
302
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
303
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
304
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
305
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
306
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
307
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
308
+
309
+ c. The disclaimer of warranties and limitation of liability provided
310
+ above shall be interpreted in a manner that, to the extent
311
+ possible, most closely approximates an absolute disclaimer and
312
+ waiver of all liability.
313
+
314
+
315
+ Section 6 -- Term and Termination.
316
+
317
+ a. This Public License applies for the term of the Copyright and
318
+ Similar Rights licensed here. However, if You fail to comply with
319
+ this Public License, then Your rights under this Public License
320
+ terminate automatically.
321
+
322
+ b. Where Your right to use the Licensed Material has terminated under
323
+ Section 6(a), it reinstates:
324
+
325
+ 1. automatically as of the date the violation is cured, provided
326
+ it is cured within 30 days of Your discovery of the
327
+ violation; or
328
+
329
+ 2. upon express reinstatement by the Licensor.
330
+
331
+ For the avoidance of doubt, this Section 6(b) does not affect any
332
+ right the Licensor may have to seek remedies for Your violations
333
+ of this Public License.
334
+
335
+ c. For the avoidance of doubt, the Licensor may also offer the
336
+ Licensed Material under separate terms or conditions or stop
337
+ distributing the Licensed Material at any time; however, doing so
338
+ will not terminate this Public License.
339
+
340
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
341
+ License.
342
+
343
+
344
+ Section 7 -- Other Terms and Conditions.
345
+
346
+ a. The Licensor shall not be bound by any additional or different
347
+ terms or conditions communicated by You unless expressly agreed.
348
+
349
+ b. Any arrangements, understandings, or agreements regarding the
350
+ Licensed Material not stated herein are separate from and
351
+ independent of the terms and conditions of this Public License.
352
+
353
+
354
+ Section 8 -- Interpretation.
355
+
356
+ a. For the avoidance of doubt, this Public License does not, and
357
+ shall not be interpreted to, reduce, limit, restrict, or impose
358
+ conditions on any use of the Licensed Material that could lawfully
359
+ be made without permission under this Public License.
360
+
361
+ b. To the extent possible, if any provision of this Public License is
362
+ deemed unenforceable, it shall be automatically reformed to the
363
+ minimum extent necessary to make it enforceable. If the provision
364
+ cannot be reformed, it shall be severed from this Public License
365
+ without affecting the enforceability of the remaining terms and
366
+ conditions.
367
+
368
+ c. No term or condition of this Public License will be waived and no
369
+ failure to comply consented to unless expressly agreed to by the
370
+ Licensor.
371
+
372
+ d. Nothing in this Public License constitutes or may be interpreted
373
+ as a limitation upon, or waiver of, any privileges and immunities
374
+ that apply to the Licensor or You, including from the legal
375
+ processes of any jurisdiction or authority.
376
+
377
+
378
+ =======================================================================
379
+
380
+ Creative Commons is not a party to its public licenses.
381
+ Notwithstanding, Creative Commons may elect to apply one of its public
382
+ licenses to material it publishes and in those instances will be
383
+ considered the "Licensor." Except for the limited purpose of indicating
384
+ that material is shared under a Creative Commons public license or as
385
+ otherwise permitted by the Creative Commons policies published at
386
+ creativecommons.org/policies, Creative Commons does not authorize the
387
+ use of the trademark "Creative Commons" or any other trademark or logo
388
+ of Creative Commons without its prior written consent including,
389
+ without limitation, in connection with any unauthorized modifications
390
+ to any of its public licenses or any other arrangements,
391
+ understandings, or agreements concerning use of licensed material. For
392
+ the avoidance of doubt, this paragraph does not form part of the public
393
+ licenses.
394
+
395
+ Creative Commons may be contacted at creativecommons.org.