rib 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/.gitignore +6 -0
  2. data/.gitmodules +3 -0
  3. data/.travis.yml +9 -0
  4. data/2011-02-28.md +203 -0
  5. data/CHANGES +86 -0
  6. data/CONTRIBUTORS +2 -0
  7. data/Gemfile +4 -0
  8. data/LICENSE +201 -0
  9. data/README +190 -0
  10. data/README.md +190 -0
  11. data/Rakefile +20 -0
  12. data/TODO +6 -0
  13. data/lib/rib.rb +42 -0
  14. data/lib/rib/all.rb +4 -0
  15. data/lib/rib/api.rb +105 -0
  16. data/lib/rib/core.rb +5 -0
  17. data/lib/rib/core/completion.rb +22 -0
  18. data/lib/rib/core/history_file.rb +38 -0
  19. data/lib/rib/core/readline.rb +19 -0
  20. data/lib/rib/core/underscore.rb +53 -0
  21. data/lib/rib/debug.rb +3 -0
  22. data/lib/rib/more.rb +12 -0
  23. data/lib/rib/more/color.rb +98 -0
  24. data/lib/rib/more/multiline.rb +77 -0
  25. data/lib/rib/more/multiline_history.rb +31 -0
  26. data/lib/rib/more/multiline_history_file.rb +37 -0
  27. data/lib/rib/more/squeeze_history.rb +37 -0
  28. data/lib/rib/more/strip_backtrace.rb +43 -0
  29. data/lib/rib/plugin.rb +56 -0
  30. data/lib/rib/runner.rb +106 -0
  31. data/lib/rib/shell.rb +43 -0
  32. data/lib/rib/test.rb +25 -0
  33. data/lib/rib/version.rb +4 -0
  34. data/lib/rib/zore.rb +3 -0
  35. data/lib/rib/zore/anchor.rb +69 -0
  36. data/lib/rib/zore/edit.rb +33 -0
  37. data/rib.gemspec +104 -0
  38. data/screenshot.png +0 -0
  39. data/task/.gitignore +1 -0
  40. data/task/gemgem.rb +182 -0
  41. data/test/core/test_completion.rb +18 -0
  42. data/test/core/test_history_file.rb +57 -0
  43. data/test/core/test_readline.rb +21 -0
  44. data/test/core/test_underscore.rb +41 -0
  45. data/test/more/test_color.rb +28 -0
  46. data/test/more/test_squeeze_history.rb +43 -0
  47. data/test/test_api.rb +20 -0
  48. data/test/test_plugin.rb +38 -0
  49. data/test/test_shell.rb +82 -0
  50. metadata +77 -13
@@ -0,0 +1,6 @@
1
+ pkg
2
+ rdoc
3
+ *.rbc
4
+ .bundle
5
+ .yardoc
6
+ Gemfile.lock
@@ -0,0 +1,3 @@
1
+ [submodule "task"]
2
+ path = task
3
+ url = git://github.com/godfat/gemgem.git
@@ -0,0 +1,9 @@
1
+ script: 'git submodule update --init; bundle exec rake test'
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - ruby-head
6
+ - rbx
7
+ - rbx-2.0
8
+ - jruby
9
+ - ree
@@ -0,0 +1,203 @@
1
+ [original text](http://blogger.godfat.org/2011/02/ripl-rc-1-ripl-irb-replacement.html)
2
+
3
+ # ripl, an irb replacement
4
+
5
+ <p></p><a href="http://www.urbandictionary.com/define.php?term=TL%3BDR">TL;DR</a>: see the <a href="#comparison">comparison table/list</a> on
6
+ the bottom of this post. Still TL;DR?
7
+ <pre><code>&gt; gem install ripl
8
+ &gt; ripl rc</code></pre>
9
+ <img src="https://github.com/godfat/ripl-rc/raw/ripl-rc-0.1.3/screenshot.png"/>
10
+
11
+ Use it in rails console?
12
+ <pre><code>&gt; gem install ripl-rails
13
+ &gt; ripl rc rails</code></pre>
14
+
15
+ # ripl
16
+
17
+ Days ago when I was using <a href="https://github.com/banister/pry">pry</a> to debug heroku-scaler,
18
+ (which is a <a href="https://github.com/Ramaze/ramaze">ramaze</a> and <a href="https://github.com/igrigorik/em-http-request">em-http-request</a> application),
19
+ I wanted to make pry use irb history to easy debugging,
20
+ and then I found it was talking about something like
21
+ pry is not an irb replacement, to find an irb replacement,
22
+ see <a href="https://github.com/cldwalker/ripl">ripl</a>. That's where I started playing around with ripl.
23
+
24
+ At first, I didn't think I need an replacement for irb,
25
+ because it worked for me. But as always, we don't know
26
+ if we need a better tool until we're really using a better
27
+ tool. ripl is this kind of story for me, and so do <a href="https://github.com/lsegal/yard">yard</a> to
28
+ <a href="https://github.com/rdoc/rdoc">rdoc</a> and so on so forth. Interestingly, this is not always
29
+ true for all tools. For example, I like <a href="https://github.com/jimweirich/rake">rake</a> better than
30
+ <a href="https://github.com/wycats/thor">thor</a> (though I didn't really try thor), and didn't really
31
+ need the power of <a href="http://www.kuwata-lab.com/erubis/">erubis</a> over erb.
32
+
33
+ One can think that, using thor/erubis might force others
34
+ to do the same (though erubis could be used as a drop-in
35
+ replacement for erb), but irb/ripl is just a personal tool
36
+ instead of really a library that once you used it in the
37
+ application, all developers would be forced to use or test
38
+ against it, too. Just like a text editor. Personal taste only..
39
+
40
+ Back to topic...
41
+
42
+ So what would we benefit from switching irb to ripl? If
43
+ we're only using the core functionality of ripl, then not
44
+ even talking about gains, but we'll lose some features
45
+ that irb provides but ripl doesn't. What good is, according
46
+ to the <a href="https://github.com/cldwalker/ripl/blob/v0.3.2/README.rdoc">README</a> of ripl, the code size was about ~270
47
+ lines vs 5,000+ lines, so we can expect that ripl is a lot
48
+ easier to extend and customize, and this is also a fact.
49
+
50
+ ripl is designed to be extended and customized from the
51
+ beginning, and since the code is very modular and
52
+ lightweight, it's very easy to replicate irb's behavior
53
+ and features that are missing in ripl. You can take a look
54
+ at ripl-irb. It might grow to be fat after installing many
55
+ plugins and extensions, but I guess it will never reach
56
+ the size of irb, since irb *has its own ruby parser*...
57
+ <a href="https://github.com/janlelis/ripl-multi_line">ripl-multi_line</a> uses a trick that catches syntax error
58
+ exception to achieve multiline support. This might be
59
+ tricky because it depends on the error message coming
60
+ from syntax error; however irb's own ruby parser might
61
+ not be accurate as well... as long as it's not using ruby's
62
+ own parser.
63
+
64
+ At first I was trying to add some simple patches with only
65
+ a few of lines to the core of ripl to make it better, but the
66
+ author only accepted my bug fix patches instead of features
67
+ patches, even it's only a few of lines and I don't see why
68
+ others won't want that features. Sometimes this make me
69
+ feel like vim or bash, you'll definitely want some personal
70
+ (might not be so personal though) config files instead of
71
+ using the defaults, which is very different than GUI
72
+ applications, which always try to provide the best defaults.
73
+ I think both have their strength, and I don't mind as long
74
+ as it could be customized to suit my flavor, and that's why
75
+ I've written <a href="https://github.com/godfat/ripl-rc">ripl-rc</a>.
76
+
77
+ ripl-rc is a ripl plugins collection, each of its require is a
78
+ different plugin. For example:
79
+ <pre><code>require 'ripl/rc/color'
80
+ require 'ripl/rc/anchor'</code></pre>
81
+ The first line would enable colorizing plugin, and the latter
82
+ would enable pry session like plugin. The reason I do this
83
+ instead of releasing ripl-color, ripl-anchor, etc., is I think
84
+ it's a lot easier to maintain and install as a plugin collection,
85
+ since each plugin has only a few of codes. We can take
86
+ advantage of fixing plugins at the same time, too, since
87
+ some plugins would work with other plugins. (e.g.
88
+ ripl/rc/anchor and ripl/rc/color) It would be tedious for
89
+ users and developers to release or update a bunch of new
90
+ releases... I really hate rails doing that, though the code
91
+ base is not the same level. It might be a must for rails
92
+ somehow...
93
+
94
+ Enough of rubbish, let's see the comparison.<a id="comparison"></a>
95
+
96
+ # Comparison
97
+
98
+ ripl has:
99
+
100
+ * a lot fewer codes and is a lot easier to customize
101
+ * better auto-complete (from <a href="https://github.com/cldwalker/bond">bond</a>)
102
+
103
+ irb has:
104
+
105
+ * multiline support (ripl uses ripl-multi_line)
106
+ * subsessions and workspaces (actually I don't know
107
+ what are they, never used. ripl uses <a href="https://github.com/cldwalker/ripl-commands">ripl-commands</a>)
108
+
109
+ ripl-rc has, upon session ends:
110
+
111
+ * <span style="color:gold">require 'ripl/rc/squeeze_history'</span>
112
+
113
+ which squeezes the same input in history, both in memory
114
+ and history file.
115
+
116
+ * <span style="color:gold">require 'ripl/rc/mkdir_history'</span>
117
+
118
+ which calls `mkdir -p` on directory which contains history
119
+ file. For example, I put my irb_history in an directory
120
+ might not exist before use: `~/.config/irb/irb_history`
121
+
122
+ * <span style="color:gold">require 'ripl/rc/ctrld_newline'</span>
123
+
124
+ ruby 1.9.2 has no this problem in irb, but 1.8 and ripl do.
125
+ When hitting ctrl+d to exit ripl, it would print a newline
126
+ instead of messing up with shell prompt.
127
+
128
+ upon formatting output:
129
+
130
+ * <span style="color:gold">require 'ripl/rc/strip_backtrace'</span>
131
+
132
+ ripl prints the full backtrace upon exceptions, even the
133
+ exceptions come from interactive environment, making it
134
+ very verbose. This ripl plugin strips those backtrace.
135
+
136
+ * <span style="color:gold">require 'ripl/rc/color'</span>
137
+
138
+ There's ripl-color_result that make use of <a href="https://github.com/michaeldv/awesome_print">awesome_print</a>,
139
+ <a href="http://coderay.rubychan.de/">coderay</a>, or <a href="https://github.com/janlelis/wirb">wirb</a>. The problem of awesome_print is it's too
140
+ awesome and too verbose, and the problem of coderay and
141
+ wirb is that they are both parser based. In ripl, this should
142
+ be as simple as just print different colors upon different
143
+ objects, instead of inspecting it and parsing it.
144
+
145
+ ripl/rc/color just uses a hash with Class to color mapping
146
+ to pick up which color should be used upon a ruby object.
147
+
148
+ To customize the color schema, inspect `Ripl.config[:rc_color]`
149
+
150
+ upon input:
151
+
152
+ * <span style="color:gold">require 'ripl/rc/multiline'</span>
153
+
154
+ I need some modification on ripl-multi_line to make prompt
155
+ work better, but not sure if I can come up a good fix and
156
+ try to convince the author to accept those patches. So I
157
+ just bundle and maintain it on my own. If you're using
158
+ ripl-rc, you could use this plugin, otherwise, keep using
159
+ ripl-multi_line.
160
+
161
+ * <span style="color:gold">require 'ripl/rc/eat_whites'</span>
162
+
163
+ irb will just give you another prompt upon an empty input,
164
+ while ripl would show you that your input is nil. I don't like
165
+ this, because sometimes I'll keep hitting enter to separate
166
+ between inspects. This plugin would skip inspect if the input
167
+ is empty just like irb.
168
+
169
+ special tool:
170
+
171
+ * <span style="color:gold">require 'ripl/rc/anchor'</span>
172
+
173
+ So this is my attempt to emulate pry in ripl. Instead
174
+ trying to make pry support irb_history, colorizing, etc.,
175
+ I think implement pry like feature in ripl is a lot easier.
176
+ No need to be fancy, I just need the basic functionality.
177
+
178
+ To use it, use:
179
+ <pre><code>Ripl.anchor your_object_want_to_be_viewed_as_self</code></pre>
180
+ or
181
+ <pre><code>Ripl.anchor binding</code></pre>
182
+ in your code. Other than pry ripl support, you might be
183
+ interested in <a href="https://github.com/cldwalker/ripl-rails">ripl-rails</a> and <a href="https://github.com/cldwalker/ripl-hijack">ripl-hijack</a>, too.
184
+
185
+ about config:
186
+
187
+ * <span style="color:gold">require 'ripl/rc/noirbrc'</span>
188
+
189
+ By default ripl is reading `~/.irbrc`. I don't think this
190
+ is what people still using irb would want, because the
191
+ configuration is totally different. This suppress that,
192
+ make it only read `~/.riplrc`
193
+
194
+ for lazies:
195
+
196
+ * <span style="color:gold">require 'ripl/rc'</span>
197
+
198
+ This requires anything above for you, and is what `ripl rc`
199
+ and `ripl rc rails` shell commands did.
200
+
201
+ So that's all at the moment for <a href="https://github.com/godfat/ripl-rc/tree/ripl-rc-0.1.3">ripl-rc 0.1.3</a>. Enjoy,
202
+
203
+ 2010-02-28 (16:36~21:49)
data/CHANGES ADDED
@@ -0,0 +1,86 @@
1
+ = ripl-rc changes history
2
+
3
+ == ripl-rc 0.2.4 -- 2011-08-03
4
+
5
+ * [ensure_after_loop] A plugin which would make sure after_loop is called.
6
+ (Some plugins need to do cleaning up in after_loop)
7
+
8
+ * [ anchor] Fixed a bug for buggy EditLine, which would raise
9
+ weird exception upon calling `HISTORY == nil`.
10
+ Now we use `.nil?` to lookup if it's nil or not.
11
+
12
+ * [multiline_history] Fixed a bug when multiline evaluation raised an
13
+ exception, it wouldn't handle the history correctly.
14
+ Moving the handling to an ensure block fixed this.
15
+
16
+ * [ squeeze_history] (Internal) Take the advantage of the new history API
17
+
18
+ == ripl-rc 0.2.3 -- 2011-06-16
19
+
20
+ Please read this for detail:
21
+ http://blogger.godfat.org/2011/06/new-feature-mainly-for-anchor-in-ripl.html
22
+
23
+ * [ripl-rc] Ripl.enable/disable_??? now accepts a block to ease switching.
24
+ * [ debug] This plugin is simply calling Ripl.disable_anchor at the
25
+ beginning, make it easier to use [anchor] to inspect a certain
26
+ place under a certain condition. See the blog post for detail.
27
+
28
+ == ripl-rc 0.2.2 -- 2011-06-01
29
+
30
+ * [multiline_history ] fixed multiline_history
31
+ * [multiline_history_file] now we have persistent multiline_history
32
+
33
+ == ripl-rc 0.2.1 -- 2011-04-11
34
+
35
+ * [multiline] fixed history with editline (e.g. mac's build-in ruby)
36
+
37
+ == ripl-rc 0.2.0 -- 2011-04-10
38
+
39
+ * [ ripl-rc] tested with MRI 1.8.7, 1.9.2 and Rubinius 1.2.3, JRuby 1.6.0
40
+ * [ ripl-rc] fixed some conflicts with bundler
41
+ * [ ripl-rc] internal structure rearrangement
42
+ * [ ripl-rc] all plugins now have runtime enable/disable ability
43
+ e.g. run `Ripl.disable_color` to disable coloring,
44
+ `Ripl.enable_color` to enable again.
45
+ * [multiline] some tweak to make it more accurate
46
+ * [last_exception] save last exception in Ripl.last_exception
47
+
48
+ == ripl-rc 0.1.5 -- 2011-03-26
49
+
50
+ * [ bin] shows a better error message when ripl-rails can't be found
51
+ * [ ripl-rc] made require 'ripl-rc' works like require 'ripl/rc'
52
+ * [multiline] fixed regexp warning on ruby 1.8.7
53
+ * [multiline] fixed history when using multiline
54
+
55
+ == ripl-rc 0.1.4 -- 2011-03-01
56
+
57
+ * [ color] fix syntax error; sorry, i definitely need tests.. :s
58
+
59
+ == ripl-rc 0.1.3 -- 2011-02-28
60
+
61
+ * [ bin] added `ripl rc` and `ripl rc rails` commands
62
+ * [noirbrc] added that don't read ~/.irbrc by default
63
+ * [ anchor] use short_inspect
64
+ * [ anchor] fixed a bug that cannot display nil
65
+ * [ color] fixed a bug that displaying some values as Object. see [9a64495]
66
+ * [ color] colorize error output as well
67
+ * [squeeze_history] max 500 items
68
+ * [strip_backtrace] fixed cwd, don't trace if it's a syntax error
69
+
70
+ == ripl-rc 0.1.2 -- 2011-02-25
71
+
72
+ * [ rc] rearranged require order
73
+ * [ plugin] added anchor, like pry. usage: Ripl.anchor(binding) # or obj
74
+ * [ plugin] added multiline, which works better with anchor
75
+ * [ plugin] added mkdir_history, which tries to mkdir -p on history directory
76
+ * [strip_backtrace] fix functionality for custom name (anchor)
77
+
78
+ == ripl-rc 0.1.1 -- 2011-02-24
79
+
80
+ * [ plugin] added strip_backtrace
81
+ * [general] now use Ripl::Rc::U.include(YourExtension) to customize details
82
+ * [ color] use Ripl.config[:rc_color] to configure color schema
83
+
84
+ == ripl-rc 0.1.0 -- 2011-02-23
85
+
86
+ * release early, release often
@@ -0,0 +1,2 @@
1
+ Lin Jen-Shin (godfat)
2
+ miaout17 (miaout17)
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+
2
+ source 'http://rubygems.org'
3
+
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ 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,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.