tty 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +2 -2
  3. data/.travis.yml +15 -4
  4. data/CHANGELOG.md +22 -0
  5. data/Gemfile +4 -7
  6. data/README.md +648 -58
  7. data/appveyor.yml +3 -4
  8. data/exe/teletype +18 -0
  9. data/lib/tty.rb +7 -4
  10. data/lib/tty/cli.rb +140 -0
  11. data/lib/tty/cmd.rb +132 -0
  12. data/lib/tty/commands/add.rb +321 -0
  13. data/lib/tty/commands/new.rb +256 -0
  14. data/lib/tty/gemspec.rb +30 -0
  15. data/lib/tty/licenses.rb +34 -0
  16. data/lib/tty/path_helpers.rb +38 -0
  17. data/lib/tty/plugins.rb +20 -12
  18. data/lib/tty/templater.rb +54 -0
  19. data/lib/tty/templates/add/command.rb.tt +31 -0
  20. data/lib/tty/templates/add/gitkeep.tt +1 -0
  21. data/lib/tty/templates/add/namespace.rb.tt +17 -0
  22. data/lib/tty/templates/add/spec/integration/command_spec.rb.tt +20 -0
  23. data/lib/tty/templates/add/spec/integration/sub_command_spec.rb.tt +16 -0
  24. data/lib/tty/templates/add/spec/unit/command_spec.rb.tt +15 -0
  25. data/lib/tty/templates/add/spec/unit/sub_command_spec.rb.tt +15 -0
  26. data/lib/tty/templates/add/test/integration/command_test.rb.tt +23 -0
  27. data/lib/tty/templates/add/test/integration/sub_command_test.rb.tt +19 -0
  28. data/lib/tty/templates/add/test/unit/command_test.rb.tt +16 -0
  29. data/lib/tty/templates/add/test/unit/sub_command_test.rb.tt +16 -0
  30. data/lib/tty/templates/new/agplv3_LICENSE.txt.tt +555 -0
  31. data/lib/tty/templates/new/apache_LICENSE.txt.tt +157 -0
  32. data/lib/tty/templates/new/bsd2_LICENSE.txt.tt +22 -0
  33. data/lib/tty/templates/new/bsd3_LICENSE.txt.tt +26 -0
  34. data/lib/tty/templates/new/exe/newcli.tt +18 -0
  35. data/lib/tty/templates/new/gitkeep.tt +1 -0
  36. data/lib/tty/templates/new/gplv2_LICENSE.txt.tt +255 -0
  37. data/lib/tty/templates/new/gplv3_LICENSE.txt.tt +543 -0
  38. data/lib/tty/templates/new/lgplv3_LICENSE.txt.tt +143 -0
  39. data/lib/tty/templates/new/lib/newcli/cli.rb.tt +24 -0
  40. data/lib/tty/templates/new/lib/newcli/command.rb.tt +124 -0
  41. data/lib/tty/templates/new/mit_LICENSE.txt.tt +20 -0
  42. data/lib/tty/templates/new/mplv2_LICENSE.txt.tt +277 -0
  43. data/lib/tty/version.rb +1 -1
  44. data/spec/fixtures/foo-0.0.1.gemspec +4 -4
  45. data/spec/integration/add_desc_args_spec.rb +341 -0
  46. data/spec/integration/add_force_spec.rb +98 -0
  47. data/spec/integration/add_namespaced_spec.rb +291 -0
  48. data/spec/integration/add_spec.rb +535 -0
  49. data/spec/integration/add_subcommand_spec.rb +259 -0
  50. data/spec/integration/new_author_spec.rb +19 -0
  51. data/spec/integration/new_license_spec.rb +39 -0
  52. data/spec/integration/new_namespaced_spec.rb +228 -0
  53. data/spec/integration/new_spec.rb +354 -0
  54. data/spec/integration/new_test_spec.rb +21 -0
  55. data/spec/integration/start_spec.rb +21 -0
  56. data/spec/spec_helper.rb +47 -16
  57. data/spec/unit/gemspec_spec.rb +17 -0
  58. data/spec/{tty/plugins/load_spec.rb → unit/plugins/activate_spec.rb} +2 -4
  59. data/spec/unit/plugins/load_from_spec.rb +28 -0
  60. data/spec/{tty → unit}/plugins/plugin/load_spec.rb +1 -3
  61. data/spec/{tty → unit}/plugins/plugin/new_spec.rb +1 -3
  62. data/spec/{tty → unit}/tty_spec.rb +1 -3
  63. data/tty.gemspec +25 -15
  64. metadata +186 -49
  65. data/spec/tty/plugins/find_spec.rb +0 -20
  66. data/tasks/metrics/cane.rake +0 -14
  67. data/tasks/metrics/flog.rake +0 -17
  68. data/tasks/metrics/heckle.rake +0 -15
  69. data/tasks/metrics/reek.rake +0 -13
@@ -0,0 +1,157 @@
1
+ Apache License
2
+
3
+ Version 2.0, January 2004 http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
13
+ owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities
16
+ that control, are controlled by, or are under common control with that entity.
17
+ For the purposes of this definition, "control" means (i) the power, direct or
18
+ indirect, to cause the direction or management of such entity, whether by
19
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
23
+ permissions granted by this License.
24
+
25
+ "Source" form shall mean the preferred form for making modifications, including
26
+ but not limited to software source code, documentation source, and configuration
27
+ files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical transformation or
30
+ translation of a Source form, including but not limited to compiled object code,
31
+ generated documentation, and conversions to other media types.
32
+
33
+ "Work" shall mean the work of authorship, whether in Source or Object form, made
34
+ available under the License, as indicated by a copyright notice that is included
35
+ in or attached to the work (an example is provided in the Appendix below).
36
+
37
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
38
+ is based on (or derived from) the Work and for which the editorial revisions,
39
+ annotations, elaborations, or other modifications represent, as a whole, an
40
+ original work of authorship. For the purposes of this License, Derivative Works
41
+ shall not include works that remain separable from, or merely link (or bind by
42
+ name) to the interfaces of, the Work and Derivative Works thereof.
43
+
44
+ "Contribution" shall mean any work of authorship, including the original version
45
+ of the Work and any modifications or additions to that Work or Derivative Works
46
+ thereof, that is intentionally submitted to Licensor for inclusion in the Work
47
+ by the copyright owner or by an individual or Legal Entity authorized to submit
48
+ on behalf of the copyright owner. For the purposes of this definition,
49
+ "submitted" means any form of electronic, verbal, or written communication sent
50
+ to the Licensor or its representatives, including but not limited to
51
+ communication on electronic mailing lists, source code control systems, and
52
+ issue tracking systems that are managed by, or on behalf of, the Licensor for
53
+ the purpose of discussing and improving the Work, but excluding communication
54
+ that is conspicuously marked or otherwise designated in writing by the copyright
55
+ owner as "Not a Contribution."
56
+
57
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
58
+ of whom a Contribution has been received by Licensor and subsequently
59
+ incorporated within the Work.
60
+
61
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
62
+ License, each Contributor hereby grants to You a perpetual, worldwide,
63
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
64
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
65
+ sublicense, and distribute the Work and such Derivative Works in Source or
66
+ Object form.
67
+
68
+ 3. Grant of Patent License. Subject to the terms and conditions of this License,
69
+ each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
70
+ no-charge, royalty-free, irrevocable (except as stated in this section) patent
71
+ license to make, have made, use, offer to sell, sell, import, and otherwise
72
+ transfer the Work, where such license applies only to those patent claims
73
+ licensable by such Contributor that are necessarily infringed by their
74
+ Contribution(s) alone or by combination of their Contribution(s) with the Work
75
+ to which such Contribution(s) was submitted. If You institute patent litigation
76
+ against any entity (including a cross-claim or counterclaim in a lawsuit)
77
+ alleging that the Work or a Contribution incorporated within the Work
78
+ constitutes direct or contributory patent infringement, then any patent licenses
79
+ granted to You under this License for that Work shall terminate as of the date
80
+ such litigation is filed.
81
+
82
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
83
+ Derivative Works thereof in any medium, with or without modifications, and in
84
+ Source or Object form, provided that You meet the following conditions:
85
+
86
+ (a) You must give any other recipients of the Work or Derivative Works a copy of
87
+ this License; and
88
+
89
+ (b) You must cause any modified files to carry prominent notices stating that
90
+ You changed the files; and
91
+
92
+ (c) You must retain, in the Source form of any Derivative Works that You
93
+ distribute, all copyright, patent, trademark, and attribution notices from the
94
+ Source form of the Work, excluding those notices that do not pertain to any part
95
+ of the Derivative Works; and
96
+
97
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then
98
+ any Derivative Works that You distribute must include a readable copy of the
99
+ attribution notices contained within such NOTICE file, excluding those notices
100
+ that do not pertain to any part of the Derivative Works, in at least one of the
101
+ following places: within a NOTICE text file distributed as part of the
102
+ Derivative Works; within the Source form or documentation, if provided along
103
+ with the Derivative Works; or, within a display generated by the Derivative
104
+ Works, if and wherever such third-party notices normally appear. The contents of
105
+ the NOTICE file are for informational purposes only and do not modify the
106
+ License. You may add Your own attribution notices within Derivative Works that
107
+ You distribute, alongside or as an addendum to the NOTICE text from the Work,
108
+ provided that such additional attribution notices cannot be construed as
109
+ modifying the License.
110
+
111
+ You may add Your own copyright statement to Your modifications and may provide
112
+ additional or different license terms and conditions for use, reproduction, or
113
+ distribution of Your modifications, or for any such Derivative Works as a whole,
114
+ provided Your use, reproduction, and distribution of the Work otherwise complies
115
+ with the conditions stated in this License.
116
+
117
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
118
+ Contribution intentionally submitted for inclusion in the Work by You to the
119
+ Licensor shall be under the terms and conditions of this License, without any
120
+ additional terms or conditions. Notwithstanding the above, nothing herein shall
121
+ supersede or modify the terms of any separate license agreement you may have
122
+ executed with Licensor regarding such Contributions.
123
+
124
+ 6. Trademarks. This License does not grant permission to use the trade names,
125
+ trademarks, service marks, or product names of the Licensor, except as required
126
+ for reasonable and customary use in describing the origin of the Work and
127
+ reproducing the content of the NOTICE file.
128
+
129
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
130
+ writing, Licensor provides the Work (and each Contributor provides its
131
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
132
+ KIND, either express or implied, including, without limitation, any warranties
133
+ or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
134
+ PARTICULAR PURPOSE. You are solely responsible for determining the
135
+ appropriateness of using or redistributing the Work and assume any risks
136
+ associated with Your exercise of permissions under this License.
137
+
138
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
139
+ tort (including negligence), contract, or otherwise, unless required by
140
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
141
+ writing, shall any Contributor be liable to You for damages, including any
142
+ direct, indirect, special, incidental, or consequential damages of any character
143
+ arising as a result of this License or out of the use or inability to use the
144
+ Work (including but not limited to damages for loss of goodwill, work stoppage,
145
+ computer failure or malfunction, or any and all other commercial damages or
146
+ losses), even if such Contributor has been advised of the possibility of such
147
+ damages.
148
+
149
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
150
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
151
+ acceptance of support, warranty, indemnity, or other liability obligations
152
+ and/or rights consistent with this License. However, in accepting such
153
+ obligations, You may act only on Your own behalf and on Your sole
154
+ responsibility, not on behalf of any other Contributor, and only if You agree to
155
+ indemnify, defend, and hold each Contributor harmless for any liability incurred
156
+ by, or claims asserted against, such Contributor by reason of your accepting any
157
+ such warranty or additional liability.
@@ -0,0 +1,22 @@
1
+ Copyright <%= Time.now.year %> <%= author %>
2
+
3
+ Redistribution and use in source and binary forms, with or without modification,
4
+ are permitted provided that the following conditions are met:
5
+
6
+ 1. Redistributions of source code must retain the above copyright notice, this
7
+ list of conditions and the following disclaimer.
8
+
9
+ 2. Redistributions in binary form must reproduce the above copyright notice,
10
+ this list of conditions and the following disclaimer in the documentation and/or
11
+ other materials provided with the distribution.
12
+
13
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
14
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
17
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,26 @@
1
+ Copyright <%= Time.now.year %> <%= author %>
2
+
3
+ Redistribution and use in source and binary forms, with or without modification,
4
+ are permitted provided that the following conditions are met:
5
+
6
+ 1. Redistributions of source code must retain the above copyright notice, this
7
+ list of conditions and the following disclaimer.
8
+
9
+ 2. Redistributions in binary form must reproduce the above copyright notice,
10
+ this list of conditions and the following disclaimer in the documentation and/or
11
+ other materials provided with the distribution.
12
+
13
+ 3. Neither the name of the copyright holder nor the names of its contributors
14
+ may be used to endorse or promote products derived from this software without
15
+ specific prior written permission.
16
+
17
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env <%= RbConfig::CONFIG["ruby_install_name"] %>
2
+ # frozen_string_literal: true
3
+
4
+ lib_path = File.expand_path('../lib', __dir__)
5
+ $:.unshift(lib_path) if !$:.include?(lib_path)
6
+ require '<%= namespaced_path %>/cli'
7
+
8
+ Signal.trap('INT') do
9
+ warn("\n#{caller.join("\n")}: interrupted")
10
+ exit(1)
11
+ end
12
+
13
+ begin
14
+ <%= constantinized_name %>::CLI.start
15
+ rescue <%= constantinized_name %>::CLI::Error => err
16
+ puts "ERROR: #{err.message}"
17
+ exit 1
18
+ end
@@ -0,0 +1,255 @@
1
+ GNU GENERAL PUBLIC LICENSE
2
+
3
+ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51
4
+ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
5
+
6
+ Everyone is permitted to copy and distribute verbatim copies of this license
7
+ document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your freedom to share
12
+ and change it. By contrast, the GNU General Public License is intended to
13
+ guarantee your freedom to share and change free software--to make sure the
14
+ software is free for all its users. This General Public License applies to most
15
+ of the Free Software Foundation's software and to any other program whose
16
+ authors commit to using it. (Some other Free Software Foundation software is
17
+ covered by the GNU Lesser General Public License instead.) You can apply it to
18
+ your programs, too.
19
+
20
+ When we speak of free software, we are referring to freedom, not price. Our
21
+ General Public Licenses are designed to make sure that you have the freedom to
22
+ distribute copies of free software (and charge for this service if you wish),
23
+ that you receive source code or can get it if you want it, that you can change
24
+ the software or use pieces of it in new free programs; and that you know you can
25
+ do these things.
26
+
27
+ To protect your rights, we need to make restrictions that forbid anyone to deny
28
+ you these rights or to ask you to surrender the rights. These restrictions
29
+ translate to certain responsibilities for you if you distribute copies of the
30
+ software, or if you modify it.
31
+
32
+ For example, if you distribute copies of such a program, whether gratis or for a
33
+ fee, you must give the recipients all the rights that you have. You must make
34
+ sure that they, too, receive or can get the source code. And you must show them
35
+ these terms so they know their rights.
36
+
37
+ We protect your rights with two steps: (1) copyright the software, and (2) offer
38
+ you this license which gives you legal permission to copy, distribute and/or
39
+ modify the software.
40
+
41
+ Also, for each author's protection and ours, we want to make certain that
42
+ everyone understands that there is no warranty for this free software. If the
43
+ software is modified by someone else and passed on, we want its recipients to
44
+ know that what they have is not the original, so that any problems introduced by
45
+ others will not reflect on the original authors' reputations.
46
+
47
+ Finally, any free program is threatened constantly by software patents. We wish
48
+ to avoid the danger that redistributors of a free program will individually
49
+ obtain patent licenses, in effect making the program proprietary. To prevent
50
+ this, we have made it clear that any patent must be licensed for everyone's free
51
+ use or not licensed at all.
52
+
53
+ The precise terms and conditions for copying, distribution and modification
54
+ follow.
55
+
56
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
57
+
58
+ 0. This License applies to any program or other work which contains a notice
59
+ placed by the copyright holder saying it may be distributed under the terms of
60
+ this General Public License. The "Program", below, refers to any such program or
61
+ work, and a "work based on the Program" means either the Program or any
62
+ derivative work under copyright law: that is to say, a work containing the
63
+ Program or a portion of it, either verbatim or with modifications and/or
64
+ translated into another language. (Hereinafter, translation is included without
65
+ limitation in the term "modification".) Each licensee is addressed as "you".
66
+
67
+ Activities other than copying, distribution and modification are not covered by
68
+ this License; they are outside its scope. The act of running the Program is not
69
+ restricted, and the output from the Program is covered only if its contents
70
+ constitute a work based on the Program (independent of having been made by
71
+ running the Program). Whether that is true depends on what the Program does.
72
+
73
+ 1. You may copy and distribute verbatim copies of the Program's source code as
74
+ you receive it, in any medium, provided that you conspicuously and appropriately
75
+ publish on each copy an appropriate copyright notice and disclaimer of warranty;
76
+ keep intact all the notices that refer to this License and to the absence of any
77
+ warranty; and give any other recipients of the Program a copy of this License
78
+ along with the Program.
79
+
80
+ You may charge a fee for the physical act of transferring a copy, and you may at
81
+ your option offer warranty protection in exchange for a fee.
82
+
83
+ 2. You may modify your copy or copies of the Program or any portion of it, thus
84
+ forming a work based on the Program, and copy and distribute such modifications
85
+ or work under the terms of Section 1 above, provided that you also meet all of
86
+ these conditions:
87
+
88
+ a) You must cause the modified files to carry prominent notices stating that you
89
+ changed the files and the date of any change.
90
+
91
+ b) You must cause any work that you distribute or publish, that in whole or in
92
+ part contains or is derived from the Program or any part thereof, to be licensed
93
+ as a whole at no charge to all third parties under the terms of this License.
94
+
95
+ c) If the modified program normally reads commands interactively when run, you
96
+ must cause it, when started running for such interactive use in the most
97
+ ordinary way, to print or display an announcement including an appropriate
98
+ copyright notice and a notice that there is no warranty (or else, saying that
99
+ you provide a warranty) and that users may redistribute the program under these
100
+ conditions, and telling the user how to view a copy of this License. (Exception:
101
+ if the Program itself is interactive but does not normally print such an
102
+ announcement, your work based on the Program is not required to print an
103
+ announcement.)
104
+
105
+ These requirements apply to the modified work as a whole. If identifiable
106
+ sections of that work are not derived from the Program, and can be reasonably
107
+ considered independent and separate works in themselves, then this License, and
108
+ its terms, do not apply to those sections when you distribute them as separate
109
+ works. But when you distribute the same sections as part of a whole which is a
110
+ work based on the Program, the distribution of the whole must be on the terms of
111
+ this License, whose permissions for other licensees extend to the entire whole,
112
+ and thus to each and every part regardless of who wrote it.
113
+
114
+ Thus, it is not the intent of this section to claim rights or contest your
115
+ rights to work written entirely by you; rather, the intent is to exercise the
116
+ right to control the distribution of derivative or collective works based on the
117
+ Program.
118
+
119
+ In addition, mere aggregation of another work not based on the Program with the
120
+ Program (or with a work based on the Program) on a volume of a storage or
121
+ distribution medium does not bring the other work under the scope of this
122
+ License.
123
+
124
+ 3. You may copy and distribute the Program (or a work based on it, under Section
125
+ 2) in object code or executable form under the terms of Sections 1 and 2 above
126
+ provided that you also do one of the following:
127
+
128
+ a) Accompany it with the complete corresponding machine-readable source code,
129
+ which must be distributed under the terms of Sections 1 and 2 above on a medium
130
+ customarily used for software interchange; or,
131
+
132
+ b) Accompany it with a written offer, valid for at least three years, to give
133
+ any third party, for a charge no more than your cost of physically performing
134
+ source distribution, a complete machine-readable copy of the corresponding
135
+ source code, to be distributed under the terms of Sections 1 and 2 above on a
136
+ medium customarily used for software interchange; or,
137
+
138
+ c) Accompany it with the information you received as to the offer to distribute
139
+ corresponding source code. (This alternative is allowed only for noncommercial
140
+ distribution and only if you received the program in object code or executable
141
+ form with such an offer, in accord with Subsection b above.)
142
+
143
+ The source code for a work means the preferred form of the work for making
144
+ modifications to it. For an executable work, complete source code means all the
145
+ source code for all modules it contains, plus any associated interface
146
+ definition files, plus the scripts used to control compilation and installation
147
+ of the executable. However, as a special exception, the source code distributed
148
+ need not include anything that is normally distributed (in either source or
149
+ binary form) with the major components (compiler, kernel, and so on) of the
150
+ operating system on which the executable runs, unless that component itself
151
+ accompanies the executable.
152
+
153
+ If distribution of executable or object code is made by offering access to copy
154
+ from a designated place, then offering equivalent access to copy the source code
155
+ from the same place counts as distribution of the source code, even though third
156
+ parties are not compelled to copy the source along with the object code.
157
+
158
+ 4. You may not copy, modify, sublicense, or distribute the Program except as
159
+ expressly provided under this License. Any attempt otherwise to copy, modify,
160
+ sublicense or distribute the Program is void, and will automatically terminate
161
+ your rights under this License. However, parties who have received copies, or
162
+ rights, from you under this License will not have their licenses terminated so
163
+ long as such parties remain in full compliance.
164
+
165
+ 5. You are not required to accept this License, since you have not signed it.
166
+ However, nothing else grants you permission to modify or distribute the Program
167
+ or its derivative works. These actions are prohibited by law if you do not
168
+ accept this License. Therefore, by modifying or distributing the Program (or any
169
+ work based on the Program), you indicate your acceptance of this License to do
170
+ so, and all its terms and conditions for copying, distributing or modifying the
171
+ Program or works based on it.
172
+
173
+ 6. Each time you redistribute the Program (or any work based on the Program),
174
+ the recipient automatically receives a license from the original licensor to
175
+ copy, distribute or modify the Program subject to these terms and conditions.
176
+ You may not impose any further restrictions on the recipients' exercise of the
177
+ rights granted herein. You are not responsible for enforcing compliance by third
178
+ parties to this License.
179
+
180
+ 7. If, as a consequence of a court judgment or allegation of patent infringement
181
+ or for any other reason (not limited to patent issues), conditions are imposed
182
+ on you (whether by court order, agreement or otherwise) that contradict the
183
+ conditions of this License, they do not excuse you from the conditions of this
184
+ License. If you cannot distribute so as to satisfy simultaneously your
185
+ obligations under this License and any other pertinent obligations, then as a
186
+ consequence you may not distribute the Program at all. For example, if a patent
187
+ license would not permit royalty-free redistribution of the Program by all those
188
+ who receive copies directly or indirectly through you, then the only way you
189
+ could satisfy both it and this License would be to refrain entirely from
190
+ distribution of the Program.
191
+
192
+ If any portion of this section is held invalid or unenforceable under any
193
+ particular circumstance, the balance of the section is intended to apply and the
194
+ section as a whole is intended to apply in other circumstances.
195
+
196
+ It is not the purpose of this section to induce you to infringe any patents or
197
+ other property right claims or to contest validity of any such claims; this
198
+ section has the sole purpose of protecting the integrity of the free software
199
+ distribution system, which is implemented by public license practices. Many
200
+ people have made generous contributions to the wide range of software
201
+ distributed through that system in reliance on consistent application of that
202
+ system; it is up to the author/donor to decide if he or she is willing to
203
+ distribute software through any other system and a licensee cannot impose that
204
+ choice.
205
+
206
+ This section is intended to make thoroughly clear what is believed to be a
207
+ consequence of the rest of this License.
208
+
209
+ 8. If the distribution and/or use of the Program is restricted in certain
210
+ countries either by patents or by copyrighted interfaces, the original copyright
211
+ holder who places the Program under this License may add an explicit
212
+ geographical distribution limitation excluding those countries, so that
213
+ distribution is permitted only in or among countries not thus excluded. In such
214
+ case, this License incorporates the limitation as if written in the body of this
215
+ License.
216
+
217
+ 9. The Free Software Foundation may publish revised and/or new versions of the
218
+ General Public License from time to time. Such new versions will be similar in
219
+ spirit to the present version, but may differ in detail to address new problems
220
+ or concerns.
221
+
222
+ Each version is given a distinguishing version number. If the Program specifies
223
+ a version number of this License which applies to it and "any later version",
224
+ you have the option of following the terms and conditions either of that version
225
+ or of any later version published by the Free Software Foundation. If the
226
+ Program does not specify a version number of this License, you may choose any
227
+ version ever published by the Free Software Foundation.
228
+
229
+ 10. If you wish to incorporate parts of the Program into other free programs
230
+ whose distribution conditions are different, write to the author to ask for
231
+ permission. For software which is copyrighted by the Free Software Foundation,
232
+ write to the Free Software Foundation; we sometimes make exceptions for this.
233
+ Our decision will be guided by the two goals of preserving the free status of
234
+ all derivatives of our free software and of promoting the sharing and reuse of
235
+ software generally.
236
+
237
+ NO WARRANTY
238
+
239
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE
240
+ PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED
241
+ IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS
242
+ IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
243
+ NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
244
+ PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
245
+ PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
246
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
247
+
248
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
249
+ ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
250
+ PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
251
+ SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY
252
+ TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
253
+ RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
254
+ THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
255
+ PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.