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,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '<%= cmd_file_path %>'
4
+
5
+ <%- app_constantinized_parts.each_with_index do |const, i| -%>
6
+ <%= ' ' * i %>module <%= const %>
7
+ <%- end -%>
8
+ <%= app_indent %>module Commands
9
+ <%- cmd_constantinized_parts.each_with_index do |const, i| -%>
10
+ <%- if cmd_constantinized_parts.size == (i + 1) -%>
11
+ <%= app_indent %><%= ' ' * i %> class <%= const %> < <%= app_constantinized_parts.join('::') %>::Command
12
+ <%- else -%>
13
+ <%= app_indent %><%= ' ' * i %> class <%= const %>
14
+ <%- end -%>
15
+ <%- end -%>
16
+ <%= app_indent %><%= cmd_indent %> def initialize(<%= cmd_options.join(', ') %>)
17
+ <%- cmd_options.each do |option| -%>
18
+ <%= app_indent %><%= cmd_indent %> <%= "@#{option} = #{option}" %>
19
+ <%- end -%>
20
+ <%= app_indent %><%= cmd_indent %> end
21
+
22
+ <%= app_indent %><%= cmd_indent %> def execute(input: $stdin, output: $stdout)
23
+ <%= app_indent %><%= cmd_indent %> # Command logic goes here ...
24
+ <%= app_indent %><%= cmd_indent %> output.puts "OK"
25
+ <%= app_indent %><%= cmd_indent %> end
26
+ <%- (cmd_constantinized_parts.size).downto(1) do |i| -%>
27
+ <%= app_indent + (' ' * i) %>end
28
+ <%- end -%>
29
+ <%- (app_constantinized_parts.size).downto(0) do |i| -%>
30
+ <%= ' ' * i %>end
31
+ <%- end -%>
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor'
4
+
5
+ <%- app_constantinized_parts.each_with_index do |const, i| -%>
6
+ <%= ' ' * i %>module <%= const %>
7
+ <%- end -%>
8
+ <%= app_indent %>module Commands
9
+ <%= app_indent %> class <%= cmd_name_constantinized %> < Thor
10
+
11
+ <%= app_indent %> namespace :<%= cmd_name_underscored %>
12
+ <%- (cmd_constantinized_parts.size - 1).downto(1) do |i| -%>
13
+ <%= app_indent + (' ' * i) %>end
14
+ <%- end -%>
15
+ <%- (app_constantinized_parts.size).downto(0) do |i| -%>
16
+ <%= ' ' * i %>end
17
+ <%- end -%>
@@ -0,0 +1,20 @@
1
+ RSpec.describe "`<%= "#{app_name_underscored} #{cmd_name_underscored}" %>` command", type: :cli do
2
+ it "executes `<%= "#{app_name_underscored} help #{cmd_name_underscored}" %>` command successfully" do
3
+ output = `<%= "#{app_name_underscored} help #{cmd_name_underscored}" %>`
4
+ expected_output = <<-OUT
5
+ <%- if subcmd_name_underscored.to_s.empty? -%>
6
+ Usage:
7
+ <%= app_name_underscored + ' ' + cmd_name_underscored + cmd_desc_args %>
8
+
9
+ Options:
10
+ -h, [--help], [--no-help] # Display usage information
11
+
12
+ <%= cmd_desc %>
13
+ <%- else -%>
14
+ Commands:
15
+ <%- end -%>
16
+ OUT
17
+
18
+ expect(output).to eq(expected_output)
19
+ end
20
+ end
@@ -0,0 +1,16 @@
1
+ RSpec.describe "`<%= "#{app_name_underscored} #{cmd_name_underscored} #{subcmd_name_underscored}" %>` command", type: :cli do
2
+ it "executes `<%= "#{app_name_underscored} #{cmd_name_underscored} help #{subcmd_name_underscored}" %>` command successfully" do
3
+ output = `<%= "#{app_name_underscored} #{cmd_name_underscored} help #{subcmd_name_underscored}" %>`
4
+ expected_output = <<-OUT
5
+ Usage:
6
+ <%= app_name_underscored + ' ' + subcmd_name_underscored + cmd_desc_args %>
7
+
8
+ Options:
9
+ -h, [--help], [--no-help] # Display usage information
10
+
11
+ <%= cmd_desc %>
12
+ OUT
13
+
14
+ expect(output).to eq(expected_output)
15
+ end
16
+ end
@@ -0,0 +1,15 @@
1
+ require '<%= cmd_path %>'
2
+
3
+ RSpec.describe <%= object = (cmd_object_parts - [subcmd_name_constantinized]).join('::') %> do
4
+ it "executes `<%= cmd_name_underscored %>` command successfully" do
5
+ output = StringIO.new
6
+ <%- cmd_options.each do |option| -%>
7
+ <%= option %> = <%= option == 'options' ? {} : 'nil' %>
8
+ <%- end -%>
9
+ command = <%= object %>.new(<%= cmd_options.join(', ') %>)
10
+
11
+ command.execute(output: output)
12
+
13
+ expect(output.string).to eq("OK\n")
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ require '<%= subcmd_path %>'
2
+
3
+ RSpec.describe <%= object = cmd_object_parts.join('::') %> do
4
+ it "executes `<%= "#{cmd_name_underscored} #{subcmd_name_underscored}" %>` command successfully" do
5
+ output = StringIO.new
6
+ <%- cmd_options.each do |option| -%>
7
+ <%= option %> = <%= option == 'options' ? {} : 'nil' %>
8
+ <%- end -%>
9
+ command = <%= object %>.new(<%= cmd_options.join(', ') %>)
10
+
11
+ command.execute(output: output)
12
+
13
+ expect(output.string).to eq("OK\n")
14
+ end
15
+ end
@@ -0,0 +1,23 @@
1
+ require 'test_helper'
2
+ require '<%= cmd_path %>'
3
+
4
+ class <%= (cmd_object_parts - [subcmd_name_constantinized]).join('::') %>Test < Minitest::Test
5
+ def test_executes_<%= "#{app_name_underscored}_help_#{cmd_name_underscored}" %>_command_successfully
6
+ output = `<%= app_name_underscored %> help <%= cmd_name_underscored %>`
7
+ expected_output = <<-OUT
8
+ <%- if subcmd_name_underscored.to_s.empty? -%>
9
+ Usage:
10
+ <%= app_name_underscored + ' ' + cmd_name_underscored + cmd_desc_args %>
11
+
12
+ Options:
13
+ -h, [--help], [--no-help] # Display usage information
14
+
15
+ <%= cmd_desc %>
16
+ <%- else -%>
17
+ Commands:
18
+ <%- end -%>
19
+ OUT
20
+
21
+ assert_equal expected_output, output
22
+ end
23
+ end
@@ -0,0 +1,19 @@
1
+ require 'test_helper'
2
+ require '<%= subcmd_path %>'
3
+
4
+ class <%= cmd_object_parts.join('::') %>Test < Minitest::Test
5
+ def test_executes_<%= "#{app_name_underscored}_#{cmd_name_underscored}_help_#{subcmd_name_underscored}" %>_command_successfully
6
+ output = `<%= "#{app_name_underscored} #{cmd_name_underscored} help #{subcmd_name_underscored}" %>`
7
+ expect_output = <<-OUT
8
+ Usage:
9
+ <%= app_name_underscored + ' ' + subcmd_name_underscored + cmd_desc_args %>
10
+
11
+ Options:
12
+ -h, [--help], [--no-help] # Display usage information
13
+
14
+ <%= cmd_desc %>
15
+ OUT
16
+
17
+ assert_equal expected_output, output
18
+ end
19
+ end
@@ -0,0 +1,16 @@
1
+ require 'test_helper'
2
+ require '<%= cmd_path %>'
3
+
4
+ class <%= object = (cmd_object_parts - [subcmd_name_constantinized]).join('::') %>Test < Minitest::Test
5
+ def test_executes_<%= cmd_name_underscored %>_command_successfully
6
+ output = StringIO.new
7
+ <%- cmd_options.each do |option| -%>
8
+ <%= option %> = <%= option == 'options' ? {} : 'nil' %>
9
+ <%- end -%>
10
+ command = <%= object %>.new(<%= cmd_options.join(', ') %>)
11
+
12
+ command.execute(output: output)
13
+
14
+ assert_equal "OK\n", output.string
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ require 'test_helper'
2
+ require '<%= subcmd_path %>'
3
+
4
+ class <%= object = cmd_object_parts.join('::') %>Test < Minitest::Test
5
+ def test_executes_<%= "#{cmd_name_underscored}_#{subcmd_name_underscored}" %>_command_successfully
6
+ output = StringIO.new
7
+ <%- cmd_options.each do |option| -%>
8
+ <%= option %> = <%= option == 'options' ? {} : 'nil' %>
9
+ <%- end -%>
10
+ command = <%= object %>.new(<%= cmd_options.join(', ') %>)
11
+
12
+ command.execute(output: output)
13
+
14
+ assert_equal "OK\n", output.string
15
+ end
16
+ end
@@ -0,0 +1,555 @@
1
+ GNU AFFERO GENERAL PUBLIC LICENSE
2
+
3
+ Version 3, 19 November 2007
4
+
5
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
6
+
7
+ Everyone is permitted to copy and distribute verbatim copies of this license
8
+ document, but changing it is not allowed.
9
+
10
+ Preamble
11
+
12
+ The GNU Affero General Public License is a free, copyleft license for software
13
+ and other kinds of works, specifically designed to ensure cooperation with the
14
+ community in the case of network server software.
15
+
16
+ The licenses for most software and other practical works are designed to take
17
+ away your freedom to share and change the works. By contrast, our General Public
18
+ Licenses are intended to guarantee your freedom to share and change all versions
19
+ of a program--to make sure it remains free software for all its users.
20
+
21
+ When we speak of free software, we are referring to freedom, not price. Our
22
+ General Public Licenses are designed to make sure that you have the freedom to
23
+ distribute copies of free software (and charge for them if you wish), that you
24
+ receive source code or can get it if you want it, that you can change the
25
+ software or use pieces of it in new free programs, and that you know you can do
26
+ these things.
27
+
28
+ Developers that use our General Public Licenses protect your rights with two
29
+ steps: (1) assert copyright on the software, and (2) offer you this License
30
+ which gives you legal permission to copy, distribute and/or modify the software.
31
+
32
+ A secondary benefit of defending all users' freedom is that improvements made in
33
+ alternate versions of the program, if they receive widespread use, become
34
+ available for other developers to incorporate. Many developers of free software
35
+ are heartened and encouraged by the resulting cooperation. However, in the case
36
+ of software used on network servers, this result may fail to come about. The GNU
37
+ General Public License permits making a modified version and letting the public
38
+ access it on a server without ever releasing its source code to the public.
39
+
40
+ The GNU Affero General Public License is designed specifically to ensure that,
41
+ in such cases, the modified source code becomes available to the community. It
42
+ requires the operator of a network server to provide the source code of the
43
+ modified version running there to the users of that server. Therefore, public
44
+ use of a modified version, on a publicly accessible server, gives the public
45
+ access to the source code of the modified version.
46
+
47
+ An older license, called the Affero General Public License and published by
48
+ Affero, was designed to accomplish similar goals. This is a different license,
49
+ not a version of the Affero GPL, but Affero has released a new version of the
50
+ Affero GPL which permits relicensing under this license.
51
+
52
+ The precise terms and conditions for copying, distribution and modification
53
+ follow.
54
+
55
+ TERMS AND CONDITIONS
56
+
57
+ 0. Definitions.
58
+
59
+ "This License" refers to version 3 of the GNU Affero General Public License.
60
+
61
+ "Copyright" also means copyright-like laws that apply to other kinds of works,
62
+ such as semiconductor masks.
63
+
64
+ "The Program" refers to any copyrightable work licensed under this License. Each
65
+ licensee is addressed as "you". "Licensees" and "recipients" may be individuals
66
+ or organizations.
67
+
68
+ To "modify" a work means to copy from or adapt all or part of the work in a
69
+ fashion requiring copyright permission, other than the making of an exact copy.
70
+ The resulting work is called a "modified version" of the earlier work or a work
71
+ "based on" the earlier work.
72
+
73
+ A "covered work" means either the unmodified Program or a work based on the
74
+ Program.
75
+
76
+ To "propagate" a work means to do anything with it that, without permission,
77
+ would make you directly or secondarily liable for infringement under applicable
78
+ copyright law, except executing it on a computer or modifying a private copy.
79
+ Propagation includes copying, distribution (with or without modification),
80
+ making available to the public, and in some countries other activities as well.
81
+
82
+ To "convey" a work means any kind of propagation that enables other parties to
83
+ make or receive copies. Mere interaction with a user through a computer network,
84
+ with no transfer of a copy, is not conveying.
85
+
86
+ An interactive user interface displays "Appropriate Legal Notices" to the extent
87
+ that it includes a convenient and prominently visible feature that (1) displays
88
+ an appropriate copyright notice, and (2) tells the user that there is no
89
+ warranty for the work (except to the extent that warranties are provided), that
90
+ licensees may convey the work under this License, and how to view a copy of this
91
+ License. If the interface presents a list of user commands or options, such as a
92
+ menu, a prominent item in the list meets this criterion.
93
+
94
+ 1. Source Code. The "source code" for a work means the preferred form of the
95
+ work for making modifications to it. "Object code" means any non-source form of
96
+ a work.
97
+
98
+ A "Standard Interface" means an interface that either is an official standard
99
+ defined by a recognized standards body, or, in the case of interfaces specified
100
+ for a particular programming language, one that is widely used among developers
101
+ working in that language.
102
+
103
+ The "System Libraries" of an executable work include anything, other than the
104
+ work as a whole, that (a) is included in the normal form of packaging a Major
105
+ Component, but which is not part of that Major Component, and (b) serves only to
106
+ enable use of the work with that Major Component, or to implement a Standard
107
+ Interface for which an implementation is available to the public in source code
108
+ form. A "Major Component", in this context, means a major essential component
109
+ (kernel, window system, and so on) of the specific operating system (if any) on
110
+ which the executable work runs, or a compiler used to produce the work, or an
111
+ object code interpreter used to run it.
112
+
113
+ The "Corresponding Source" for a work in object code form means all the source
114
+ code needed to generate, install, and (for an executable work) run the object
115
+ code and to modify the work, including scripts to control those activities.
116
+ However, it does not include the work's System Libraries, or general-purpose
117
+ tools or generally available free programs which are used unmodified in
118
+ performing those activities but which are not part of the work. For example,
119
+ Corresponding Source includes interface definition files associated with source
120
+ files for the work, and the source code for shared libraries and dynamically
121
+ linked subprograms that the work is specifically designed to require, such as by
122
+ intimate data communication or control flow between those subprograms and other
123
+ parts of the work.
124
+
125
+ The Corresponding Source need not include anything that users can regenerate
126
+ automatically from other parts of the Corresponding Source.
127
+
128
+ The Corresponding Source for a work in source code form is that same work.
129
+
130
+ 2. Basic Permissions. All rights granted under this License are granted for the
131
+ term of copyright on the Program, and are irrevocable provided the stated
132
+ conditions are met. This License explicitly affirms your unlimited permission to
133
+ run the unmodified Program. The output from running a covered work is covered by
134
+ this License only if the output, given its content, constitutes a covered work.
135
+ This License acknowledges your rights of fair use or other equivalent, as
136
+ provided by copyright law.
137
+
138
+ You may make, run and propagate covered works that you do not convey, without
139
+ conditions so long as your license otherwise remains in force. You may convey
140
+ covered works to others for the sole purpose of having them make modifications
141
+ exclusively for you, or provide you with facilities for running those works,
142
+ provided that you comply with the terms of this License in conveying all
143
+ material for which you do not control copyright. Those thus making or running
144
+ the covered works for you must do so exclusively on your behalf, under your
145
+ direction and control, on terms that prohibit them from making any copies of
146
+ your copyrighted material outside their relationship with you.
147
+
148
+ Conveying under any other circumstances is permitted solely under the conditions
149
+ stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
150
+
151
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work
152
+ shall be deemed part of an effective technological measure under any applicable
153
+ law fulfilling obligations under article 11 of the WIPO copyright treaty adopted
154
+ on 20 December 1996, or similar laws prohibiting or restricting circumvention of
155
+ such measures.
156
+
157
+ When you convey a covered work, you waive any legal power to forbid
158
+ circumvention of technological measures to the extent such circumvention is
159
+ effected by exercising rights under this License with respect to the covered
160
+ work, and you disclaim any intention to limit operation or modification of the
161
+ work as a means of enforcing, against the work's users, your or third parties'
162
+ legal rights to forbid circumvention of technological measures.
163
+
164
+ 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's
165
+ source code as you receive it, in any medium, provided that you conspicuously
166
+ and appropriately publish on each copy an appropriate copyright notice; keep
167
+ intact all notices stating that this License and any non-permissive terms added
168
+ in accord with section 7 apply to the code; keep intact all notices of the
169
+ absence of any warranty; and give all recipients a copy of this License along
170
+ with the Program.
171
+
172
+ You may charge any price or no price for each copy that you convey, and you may
173
+ offer support or warranty protection for a fee.
174
+
175
+ 5. Conveying Modified Source Versions. You may convey a work based on the
176
+ Program, or the modifications to produce it from the Program, in the form of
177
+ source code under the terms of section 4, provided that you also meet all of
178
+ these conditions:
179
+
180
+ a) The work must carry prominent notices stating that you modified it, and
181
+ giving a relevant date.
182
+
183
+ b) The work must carry prominent notices stating that it is released under this
184
+ License and any conditions added under section 7. This requirement modifies the
185
+ requirement in section 4 to "keep intact all notices".
186
+
187
+ c) You must license the entire work, as a whole, under this License to anyone
188
+ who comes into possession of a copy. This License will therefore apply, along
189
+ with any applicable section 7 additional terms, to the whole of the work, and
190
+ all its parts, regardless of how they are packaged. This License gives no
191
+ permission to license the work in any other way, but it does not invalidate such
192
+ permission if you have separately received it.
193
+
194
+ d) If the work has interactive user interfaces, each must display Appropriate
195
+ Legal Notices; however, if the Program has interactive interfaces that do not
196
+ display Appropriate Legal Notices, your work need not make them do so.
197
+
198
+ A compilation of a covered work with other separate and independent works, which
199
+ are not by their nature extensions of the covered work, and which are not
200
+ combined with it such as to form a larger program, in or on a volume of a
201
+ storage or distribution medium, is called an "aggregate" if the compilation and
202
+ its resulting copyright are not used to limit the access or legal rights of the
203
+ compilation's users beyond what the individual works permit. Inclusion of a
204
+ covered work in an aggregate does not cause this License to apply to the other
205
+ parts of the aggregate.
206
+
207
+ 6. Conveying Non-Source Forms. You may convey a covered work in object code
208
+ form under the terms of sections 4 and 5, provided that you also convey the
209
+ machine-readable Corresponding Source under the terms of this License, in one of
210
+ these ways:
211
+
212
+ a) Convey the object code in, or embodied in, a physical product (including a
213
+ physical distribution medium), accompanied by the Corresponding Source fixed on
214
+ a durable physical medium customarily used for software interchange.
215
+
216
+ b) Convey the object code in, or embodied in, a physical product (including a
217
+ physical distribution medium), accompanied by a written offer, valid for at
218
+ least three years and valid for as long as you offer spare parts or customer
219
+ support for that product model, to give anyone who possesses the object code
220
+ either (1) a copy of the Corresponding Source for all the software in the
221
+ product that is covered by this License, on a durable physical medium
222
+ customarily used for software interchange, for a price no more than your
223
+ reasonable cost of physically performing this conveying of source, or (2) access
224
+ to copy the Corresponding Source from a network server at no charge.
225
+
226
+ c) Convey individual copies of the object code with a copy of the written offer
227
+ to provide the Corresponding Source. This alternative is allowed only
228
+ occasionally and noncommercially, and only if you received the object code with
229
+ such an offer, in accord with subsection 6b.
230
+
231
+ d) Convey the object code by offering access from a designated place (gratis or
232
+ for a charge), and offer equivalent access to the Corresponding Source in the
233
+ same way through the same place at no further charge. You need not require
234
+ recipients to copy the Corresponding Source along with the object code. If the
235
+ place to copy the object code is a network server, the Corresponding Source may
236
+ be on a different server (operated by you or a third party) that supports
237
+ equivalent copying facilities, provided you maintain clear directions next to
238
+ the object code saying where to find the Corresponding Source. Regardless of
239
+ what server hosts the Corresponding Source, you remain obligated to ensure that
240
+ it is available for as long as needed to satisfy these requirements.
241
+
242
+ e) Convey the object code using peer-to-peer transmission, provided you inform
243
+ other peers where the object code and Corresponding Source of the work are being
244
+ offered to the general public at no charge under subsection 6d.
245
+
246
+ A separable portion of the object code, whose source code is excluded from the
247
+ Corresponding Source as a System Library, need not be included in conveying the
248
+ object code work.
249
+
250
+ A "User Product" is either (1) a "consumer product", which means any tangible
251
+ personal property which is normally used for personal, family, or household
252
+ purposes, or (2) anything designed or sold for incorporation into a dwelling. In
253
+ determining whether a product is a consumer product, doubtful cases shall be
254
+ resolved in favor of coverage. For a particular product received by a particular
255
+ user, "normally used" refers to a typical or common use of that class of
256
+ product, regardless of the status of the particular user or of the way in which
257
+ the particular user actually uses, or expects or is expected to use, the
258
+ product. A product is a consumer product regardless of whether the product has
259
+ substantial commercial, industrial or non-consumer uses, unless such uses
260
+ represent the only significant mode of use of the product.
261
+
262
+ "Installation Information" for a User Product means any methods, procedures,
263
+ authorization keys, or other information required to install and execute
264
+ modified versions of a covered work in that User Product from a modified version
265
+ of its Corresponding Source. The information must suffice to ensure that the
266
+ continued functioning of the modified object code is in no case prevented or
267
+ interfered with solely because modification has been made.
268
+
269
+ If you convey an object code work under this section in, or with, or
270
+ specifically for use in, a User Product, and the conveying occurs as part of a
271
+ transaction in which the right of possession and use of the User Product is
272
+ transferred to the recipient in perpetuity or for a fixed term (regardless of
273
+ how the transaction is characterized), the Corresponding Source conveyed under
274
+ this section must be accompanied by the Installation Information. But this
275
+ requirement does not apply if neither you nor any third party retains the
276
+ ability to install modified object code on the User Product (for example, the
277
+ work has been installed in ROM).
278
+
279
+ The requirement to provide Installation Information does not include a
280
+ requirement to continue to provide support service, warranty, or updates for a
281
+ work that has been modified or installed by the recipient, or for the User
282
+ Product in which it has been modified or installed. Access to a network may be
283
+ denied when the modification itself materially and adversely affects the
284
+ operation of the network or violates the rules and protocols for communication
285
+ across the network.
286
+
287
+ Corresponding Source conveyed, and Installation Information provided, in accord
288
+ with this section must be in a format that is publicly documented (and with an
289
+ implementation available to the public in source code form), and must require no
290
+ special password or key for unpacking, reading or copying.
291
+
292
+ 7. Additional Terms. "Additional permissions" are terms that supplement the
293
+ terms of this License by making exceptions from one or more of its conditions.
294
+ Additional permissions that are applicable to the entire Program shall be
295
+ treated as though they were included in this License, to the extent that they
296
+ are valid under applicable law. If additional permissions apply only to part of
297
+ the Program, that part may be used separately under those permissions, but the
298
+ entire Program remains governed by this License without regard to the additional
299
+ permissions.
300
+
301
+ When you convey a copy of a covered work, you may at your option remove any
302
+ additional permissions from that copy, or from any part of it. (Additional
303
+ permissions may be written to require their own removal in certain cases when
304
+ you modify the work.) You may place additional permissions on material, added by
305
+ you to a covered work, for which you have or can give appropriate copyright
306
+ permission.
307
+
308
+ Notwithstanding any other provision of this License, for material you add to a
309
+ covered work, you may (if authorized by the copyright holders of that material)
310
+ supplement the terms of this License with terms:
311
+
312
+ a) Disclaiming warranty or limiting liability differently from the terms of
313
+ sections 15 and 16 of this License; or
314
+
315
+ b) Requiring preservation of specified reasonable legal notices or author
316
+ attributions in that material or in the Appropriate Legal Notices displayed by
317
+ works containing it; or
318
+
319
+ c) Prohibiting misrepresentation of the origin of that material, or requiring
320
+ that modified versions of such material be marked in reasonable ways as
321
+ different from the original version; or
322
+
323
+ d) Limiting the use for publicity purposes of names of licensors or authors of
324
+ the material; or
325
+
326
+ e) Declining to grant rights under trademark law for use of some trade names,
327
+ trademarks, or service marks; or
328
+
329
+ f) Requiring indemnification of licensors and authors of that material by anyone
330
+ who conveys the material (or modified versions of it) with contractual
331
+ assumptions of liability to the recipient, for any liability that these
332
+ contractual assumptions directly impose on those licensors and authors.
333
+
334
+ All other non-permissive additional terms are considered "further restrictions"
335
+ within the meaning of section 10. If the Program as you received it, or any part
336
+ of it, contains a notice stating that it is governed by this License along with
337
+ a term that is a further restriction, you may remove that term. If a license
338
+ document contains a further restriction but permits relicensing or conveying
339
+ under this License, you may add to a covered work material governed by the terms
340
+ of that license document, provided that the further restriction does not survive
341
+ such relicensing or conveying.
342
+
343
+ If you add terms to a covered work in accord with this section, you must place,
344
+ in the relevant source files, a statement of the additional terms that apply to
345
+ those files, or a notice indicating where to find the applicable terms.
346
+
347
+ Additional terms, permissive or non-permissive, may be stated in the form of a
348
+ separately written license, or stated as exceptions; the above requirements
349
+ apply either way.
350
+
351
+ 8. Termination.
352
+
353
+ You may not propagate or modify a covered work except as expressly provided
354
+ under this License. Any attempt otherwise to propagate or modify it is void, and
355
+ will automatically terminate your rights under this License (including any
356
+ patent licenses granted under the third paragraph of section 11).
357
+
358
+ However, if you cease all violation of this License, then your license from a
359
+ particular copyright holder is reinstated (a) provisionally, unless and until
360
+ the copyright holder explicitly and finally terminates your license, and (b)
361
+ permanently, if the copyright holder fails to notify you of the violation by
362
+ some reasonable means prior to 60 days after the cessation.
363
+
364
+ Moreover, your license from a particular copyright holder is reinstated
365
+ permanently if the copyright holder notifies you of the violation by some
366
+ reasonable means, this is the first time you have received notice of violation
367
+ of this License (for any work) from that copyright holder, and you cure the
368
+ violation prior to 30 days after your receipt of the notice.
369
+
370
+ Termination of your rights under this section does not terminate the licenses of
371
+ parties who have received copies or rights from you under this License. If your
372
+ rights have been terminated and not permanently reinstated, you do not qualify
373
+ to receive new licenses for the same material under section 10.
374
+
375
+ 9. Acceptance Not Required for Having Copies.
376
+
377
+ You are not required to accept this License in order to receive or run a copy of
378
+ the Program. Ancillary propagation of a covered work occurring solely as a
379
+ consequence of using peer-to-peer transmission to receive a copy likewise does
380
+ not require acceptance. However, nothing other than this License grants you
381
+ permission to propagate or modify any covered work. These actions infringe
382
+ copyright if you do not accept this License. Therefore, by modifying or
383
+ propagating a covered work, you indicate your acceptance of this License to do
384
+ so.
385
+
386
+ 10. Automatic Licensing of Downstream Recipients.
387
+
388
+ Each time you convey a covered work, the recipient automatically receives a
389
+ license from the original licensors, to run, modify and propagate that work,
390
+ subject to this License. You are not responsible for enforcing compliance by
391
+ third parties with this License.
392
+
393
+ An "entity transaction" is a transaction transferring control of an
394
+ organization, or substantially all assets of one, or subdividing an
395
+ organization, or merging organizations. If propagation of a covered work results
396
+ from an entity transaction, each party to that transaction who receives a copy
397
+ of the work also receives whatever licenses to the work the party's predecessor
398
+ in interest had or could give under the previous paragraph, plus a right to
399
+ possession of the Corresponding Source of the work from the predecessor in
400
+ interest, if the predecessor has it or can get it with reasonable efforts.
401
+
402
+ You may not impose any further restrictions on the exercise of the rights
403
+ granted or affirmed under this License. For example, you may not impose a
404
+ license fee, royalty, or other charge for exercise of rights granted under this
405
+ License, and you may not initiate litigation (including a cross-claim or
406
+ counterclaim in a lawsuit) alleging that any patent claim is infringed by
407
+ making, using, selling, offering for sale, or importing the Program or any
408
+ portion of it.
409
+
410
+ 11. Patents.
411
+
412
+ A "contributor" is a copyright holder who authorizes use under this License of
413
+ the Program or a work on which the Program is based. The work thus licensed is
414
+ called the contributor's "contributor version".
415
+
416
+ A contributor's "essential patent claims" are all patent claims owned or
417
+ controlled by the contributor, whether already acquired or hereafter acquired,
418
+ that would be infringed by some manner, permitted by this License, of making,
419
+ using, or selling its contributor version, but do not include claims that would
420
+ be infringed only as a consequence of further modification of the contributor
421
+ version. For purposes of this definition, "control" includes the right to grant
422
+ patent sublicenses in a manner consistent with the requirements of this License.
423
+
424
+ Each contributor grants you a non-exclusive, worldwide, royalty-free patent
425
+ license under the contributor's essential patent claims, to make, use, sell,
426
+ offer for sale, import and otherwise run, modify and propagate the contents of
427
+ its contributor version.
428
+
429
+ In the following three paragraphs, a "patent license" is any express agreement
430
+ or commitment, however denominated, not to enforce a patent (such as an express
431
+ permission to practice a patent or covenant not to s ue for patent
432
+ infringement). To "grant" such a patent license to a party means to make such an
433
+ agreement or commitment not to enforce a patent against the party.
434
+
435
+ If you convey a covered work, knowingly relying on a patent license, and the
436
+ Corresponding Source of the work is not available for anyone to copy, free of
437
+ charge and under the terms of this License, through a publicly available network
438
+ server or other readily accessible means, then you must either (1) cause the
439
+ Corresponding Source to be so available, or (2) arrange to deprive yourself of
440
+ the benefit of the patent license for this particular work, or (3) arrange, in a
441
+ manner consistent with the requirements of this License, to extend the patent
442
+ license to downstream recipients. "Knowingly relying" means you have actual
443
+ knowledge that, but for the patent license, your conveying the covered work in a
444
+ country, or your recipient's use of the covered work in a country, would
445
+ infringe one or more identifiable patents in that country that you have reason
446
+ to believe are valid.
447
+
448
+ If, pursuant to or in connection with a single transaction or arrangement, you
449
+ convey, or propagate by procuring conveyance of, a covered work, and grant a
450
+ patent license to some of the parties receiving the covered work authorizing
451
+ them to use, propagate, modify or convey a specific copy of the covered work,
452
+ then the patent license you grant is automatically extended to all recipients of
453
+ the covered work and works based on it.
454
+
455
+ A patent license is "discriminatory" if it does not include within the scope of
456
+ its coverage, prohibits the exercise of, or is conditioned on the non-exercise
457
+ of one or more of the rights that are specifically granted under this License.
458
+ You may not convey a covered work if you are a party to an arrangement with a
459
+ third party that is in the business of distributing software, under which you
460
+ make payment to the third party based on the extent of your activity of
461
+ conveying the work, and under which the third party grants, to any of the
462
+ parties who would receive the covered work from you, a discriminatory patent
463
+ license (a) in connection with copies of the covered work conveyed by you (or
464
+ copies made from those copies), or (b) primarily for and in connection with
465
+ specific products or compilations that contain the covered work, unless you
466
+ entered into that arrangement, or that patent license was granted, prior to 28
467
+ March 2007.
468
+
469
+ Nothing in this License shall be construed as excluding or limiting any implied
470
+ license or other defenses to infringement that may otherwise be available to you
471
+ under applicable patent law.
472
+
473
+ 12. No Surrender of Others' Freedom.
474
+
475
+ If conditions are imposed on you (whether by court order, agreement or
476
+ otherwise) that contradict the conditions of this License, they do not excuse
477
+ you from the conditions of this License. If you cannot convey a covered work so
478
+ as to satisfy simultaneously your obligations under this License and any other
479
+ pertinent obligations, then as a consequence you may not convey it at all. For
480
+ example, if you agree to terms that obligate you to collect a royalty for
481
+ further conveying from those to whom you convey the Program, the only way you
482
+ could satisfy both those terms and this License would be to refrain entirely
483
+ from conveying the Program.
484
+
485
+ 13. Remote Network Interaction; Use with the GNU General Public License.
486
+
487
+ Notwithstanding any other provision of this License, if you modify the Program,
488
+ your modified version must prominently offer all users interacting with it
489
+ remotely through a computer network (if your version supports such interaction)
490
+ an opportunity to receive the Corresponding Source of your version by providing
491
+ access to the Corresponding Source from a network server at no charge, through
492
+ some standard or customary means of facilitating copying of software. This
493
+ Corresponding Source shall include the Corresponding Source for any work covered
494
+ by version 3 of the GNU General Public License that is incorporated pursuant to
495
+ the following paragraph.
496
+
497
+ Notwithstanding any other provision of this License, you have permission to link
498
+ or combine any covered work with a work licensed under version 3 of the GNU
499
+ General Public License into a single combined work, and to convey the resulting
500
+ work. The terms of this License will continue to apply to the part which is the
501
+ covered work, but the work with which it is combined will remain governed by
502
+ version 3 of the GNU General Public License.
503
+
504
+ 14. Revised Versions of this License.
505
+
506
+ The Free Software Foundation may publish revised and/or new versions of the GNU
507
+ Affero General Public License from time to time. Such new versions will be
508
+ similar in spirit to the present version, but may differ in detail to address
509
+ new problems or concerns.
510
+
511
+ Each version is given a distinguishing version number. If the Program specifies
512
+ that a certain numbered version of the GNU Affero General Public License "or any
513
+ later version" applies to it, you have the option of following the terms and
514
+ conditions either of that numbered version or of any later version published by
515
+ the Free Software Foundation. If the Program does not specify a version number
516
+ of the GNU Affero General Public License, you may choose any version ever
517
+ published by the Free Software Foundation.
518
+
519
+ If the Program specifies that a proxy can decide which future versions of the
520
+ GNU Affero General Public License can be used, that proxy's public statement of
521
+ acceptance of a version permanently authorizes you to choose that version for
522
+ the Program.
523
+
524
+ Later license versions may give you additional or different permissions.
525
+ However, no additional obligations are imposed on any author or copyright holder
526
+ as a result of your choosing to follow a later version.
527
+
528
+ 15. Disclaimer of Warranty.
529
+
530
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
531
+ EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
532
+ PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
533
+ EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
534
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
535
+ QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
536
+ DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
537
+
538
+ 16. Limitation of Liability.
539
+
540
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
541
+ COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS
542
+ PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
543
+ INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
544
+ THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
545
+ INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
546
+ PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY
547
+ HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
548
+
549
+ 17. Interpretation of Sections 15 and 16.
550
+
551
+ If the disclaimer of warranty and limitation of liability provided above cannot
552
+ be given local legal effect according to their terms, reviewing courts shall
553
+ apply local law that most closely approximates an absolute waiver of all civil
554
+ liability in connection with the Program, unless a warranty or assumption of
555
+ liability accompanies a copy of the Program in return for a fee.