distribot-ui 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +13 -0
  3. data/.rspec +3 -0
  4. data/.travis.yml +12 -0
  5. data/Dockerfile +9 -0
  6. data/Gemfile +14 -0
  7. data/Gemfile.lock +270 -0
  8. data/LICENSE +201 -0
  9. data/README.md +25 -0
  10. data/Rakefile +21 -0
  11. data/app/assets/images/.keep +0 -0
  12. data/app/assets/images/distribot-70x70.png +0 -0
  13. data/app/assets/javascripts/application.js +28 -0
  14. data/app/assets/javascripts/jquery.sparkline.min.js +5 -0
  15. data/app/assets/javascripts/signin/signin.js +30 -0
  16. data/app/assets/stylesheets/application.css.scss +17 -0
  17. data/app/controllers/admin_controller.rb +15 -0
  18. data/app/controllers/application_controller.rb +22 -0
  19. data/app/controllers/concerns/.keep +0 -0
  20. data/app/controllers/flow_controller.rb +64 -0
  21. data/app/controllers/handler_controller.rb +17 -0
  22. data/app/controllers/signin_controller.rb +22 -0
  23. data/app/controllers/worker_controller.rb +17 -0
  24. data/app/helpers/application_helper.rb +16 -0
  25. data/app/mailers/.keep +0 -0
  26. data/app/models/.keep +0 -0
  27. data/app/models/concerns/.keep +0 -0
  28. data/app/models/user.rb +83 -0
  29. data/app/views/admin/home.html.erb +14 -0
  30. data/app/views/flow/create.html.erb +22 -0
  31. data/app/views/flow/empty_list.html.erb +21 -0
  32. data/app/views/flow/list.html.erb +54 -0
  33. data/app/views/flow/show.html.erb +1 -0
  34. data/app/views/handler/list.html.erb +35 -0
  35. data/app/views/handler/show.html.erb +1 -0
  36. data/app/views/layouts/application.html.erb +72 -0
  37. data/app/views/signin/signin.html.erb +32 -0
  38. data/app/views/worker/list.html.erb +31 -0
  39. data/app/views/worker/show.html.erb +1 -0
  40. data/bin/bundle +3 -0
  41. data/bin/distribot-ui +13 -0
  42. data/bin/distribot-ui-restart +12 -0
  43. data/bin/rails +4 -0
  44. data/bin/rake +4 -0
  45. data/bin/setup +29 -0
  46. data/config.ru +4 -0
  47. data/config/application.rb +33 -0
  48. data/config/boot.rb +3 -0
  49. data/config/environment.rb +5 -0
  50. data/config/environments/development.rb +39 -0
  51. data/config/environments/production.rb +76 -0
  52. data/config/environments/test.rb +42 -0
  53. data/config/initializers/assets.rb +17 -0
  54. data/config/initializers/backtrace_silencers.rb +7 -0
  55. data/config/initializers/cookies_serializer.rb +3 -0
  56. data/config/initializers/filter_parameter_logging.rb +4 -0
  57. data/config/initializers/inflections.rb +16 -0
  58. data/config/initializers/mime_types.rb +4 -0
  59. data/config/initializers/session_store.rb +3 -0
  60. data/config/initializers/wrap_parameters.rb +9 -0
  61. data/config/locales/en.yml +23 -0
  62. data/config/routes.rb +36 -0
  63. data/config/secrets.yml +22 -0
  64. data/db/seeds.rb +9 -0
  65. data/distribot-ui.gemspec +45 -0
  66. data/docker-compose.yml +32 -0
  67. data/docs/distribot-ui-screenshot.png +0 -0
  68. data/lib/assets/.keep +0 -0
  69. data/lib/distribot-ui.rb +3 -0
  70. data/lib/distribot-ui/command.rb +62 -0
  71. data/lib/distribot-ui/version.rb +4 -0
  72. data/lib/redis_model.rb +109 -0
  73. data/lib/tasks/.keep +0 -0
  74. data/provision/distribot-ui.sh +52 -0
  75. data/public/404.html +67 -0
  76. data/public/422.html +67 -0
  77. data/public/500.html +66 -0
  78. data/public/favicon.ico +0 -0
  79. data/public/robots.txt +5 -0
  80. data/spec/controllers/admin_controller_spec.rb +27 -0
  81. data/spec/controllers/flow_controller_spec.rb +87 -0
  82. data/spec/controllers/handler_controller_spec.rb +12 -0
  83. data/spec/controllers/signin_controller_spec.rb +88 -0
  84. data/spec/controllers/worker_controller_spec.rb +12 -0
  85. data/spec/factories/users.rb +7 -0
  86. data/spec/helpers/application_helper_spec.rb +24 -0
  87. data/spec/models/user_spec.rb +32 -0
  88. data/spec/spec_helper.rb +80 -0
  89. metadata +351 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: bd391954722ff4730f044afb93045e2b687295ed
4
+ data.tar.gz: 7ac9c731d9e90d63b0433a7ce0b10462a7be7f8e
5
+ SHA512:
6
+ metadata.gz: acd3b651b360cdd877c6dc815a0804d0e58db02c0d2a2d30a3ab48df5799f988a0483a7343af0caf20ad6ef14c84189497f15c1d19a6fd433450b25d5f4c4448
7
+ data.tar.gz: baa998cbb2073a84837383b9f5d7e192350b9a20d84698dc55e5a41fe07eee25e5a9294fca2a65cc11b67b469d076e5d8c831d766f6b29e23d9105a2495b916f
@@ -0,0 +1,13 @@
1
+ coverage/
2
+ .vagrant
3
+ .byebug_history
4
+ cool/
5
+ ws/
6
+ bin/killer.rb
7
+ channel.rb
8
+ log/
9
+ tmp/
10
+ .env
11
+ *.gem
12
+
13
+ public/assets/*
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --format doc
3
+
@@ -0,0 +1,12 @@
1
+ ---
2
+
3
+ language: ruby
4
+ rvm: 2.0.0
5
+ before_install:
6
+ - sudo apt-get install -y redis-server
7
+ - sudo service redis-server restart
8
+ - gem install bundler --no-ri --no-rdoc
9
+ script: CODECLIMATE_REPO_TOKEN=738946435e63f735bd2c64052a5c04859d9628644c4183e3c25944455e4fb015 bundle && bundle exec rspec
10
+ addons:
11
+ code_climate:
12
+ repo_token: 738946435e63f735bd2c64052a5c04859d9628644c4183e3c25944455e4fb015
@@ -0,0 +1,9 @@
1
+
2
+ FROM ubuntu:14.04
3
+ RUN useradd -d /home/ubuntu -m -s /bin/bash ubuntu
4
+ ADD ./ /var/www/distribot-ui
5
+ RUN echo "ubuntu:changeme" | chpasswd
6
+ RUN echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
7
+ RUN sed -i s#/home/ubuntu:/bin/false#/home/ubuntu:/bin/bash# /etc/passwd
8
+ USER ubuntu
9
+ WORKDIR /var/www/distribot
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'distribot', git: 'https://github.com/jdrago999/distribot.git'
4
+
5
+
6
+ gem 'factory_girl_rails', group: :test
7
+ gem 'codeclimate-test-reporter', group: :test, require: nil
8
+ gem 'jquery-rails'
9
+ gem 'jquery-ui-rails'
10
+ gem 'underscore-rails'
11
+ gem 'semantic-ui-sass'
12
+
13
+ gemspec
14
+
@@ -0,0 +1,270 @@
1
+ GIT
2
+ remote: https://github.com/jdrago999/distribot.git
3
+ revision: ef324b63875d32697a6f2950e4bfe967e5e1a2ba
4
+ specs:
5
+ distribot (0.1.0)
6
+ activesupport
7
+ bunny
8
+ concurrent-ruby
9
+ dotenv
10
+ eye
11
+ logstash-logger
12
+ redis
13
+ semantic
14
+ wrest
15
+
16
+ PATH
17
+ remote: .
18
+ specs:
19
+ distribot-ui (0.1.0)
20
+ bcrypt (~> 3.1)
21
+ bundler
22
+ font-awesome-rails
23
+ puma
24
+ rails (= 4.2.5)
25
+ sass-rails (~> 5.0)
26
+ sprockets
27
+ thor
28
+ tubesock
29
+
30
+ GEM
31
+ remote: https://rubygems.org/
32
+ specs:
33
+ actionmailer (4.2.5)
34
+ actionpack (= 4.2.5)
35
+ actionview (= 4.2.5)
36
+ activejob (= 4.2.5)
37
+ mail (~> 2.5, >= 2.5.4)
38
+ rails-dom-testing (~> 1.0, >= 1.0.5)
39
+ actionpack (4.2.5)
40
+ actionview (= 4.2.5)
41
+ activesupport (= 4.2.5)
42
+ rack (~> 1.6)
43
+ rack-test (~> 0.6.2)
44
+ rails-dom-testing (~> 1.0, >= 1.0.5)
45
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
46
+ actionview (4.2.5)
47
+ activesupport (= 4.2.5)
48
+ builder (~> 3.1)
49
+ erubis (~> 2.7.0)
50
+ rails-dom-testing (~> 1.0, >= 1.0.5)
51
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
52
+ activejob (4.2.5)
53
+ activesupport (= 4.2.5)
54
+ globalid (>= 0.3.0)
55
+ activemodel (4.2.5)
56
+ activesupport (= 4.2.5)
57
+ builder (~> 3.1)
58
+ activerecord (4.2.5)
59
+ activemodel (= 4.2.5)
60
+ activesupport (= 4.2.5)
61
+ arel (~> 6.0)
62
+ activesupport (4.2.5)
63
+ i18n (~> 0.7)
64
+ json (~> 1.7, >= 1.7.7)
65
+ minitest (~> 5.1)
66
+ thread_safe (~> 0.3, >= 0.3.4)
67
+ tzinfo (~> 1.1)
68
+ addressable (2.4.0)
69
+ amq-protocol (2.0.1)
70
+ arel (6.0.3)
71
+ bcrypt (3.1.10)
72
+ binding_of_caller (0.7.2)
73
+ debug_inspector (>= 0.0.1)
74
+ builder (3.2.2)
75
+ bunny (2.2.2)
76
+ amq-protocol (>= 2.0.1)
77
+ byebug (8.2.1)
78
+ celluloid (0.17.2)
79
+ celluloid-essentials
80
+ celluloid-extras
81
+ celluloid-fsm
82
+ celluloid-pool
83
+ celluloid-supervision
84
+ timers (>= 4.1.1)
85
+ celluloid-essentials (0.20.5)
86
+ timers (>= 4.1.1)
87
+ celluloid-extras (0.20.5)
88
+ timers (>= 4.1.1)
89
+ celluloid-fsm (0.20.5)
90
+ timers (>= 4.1.1)
91
+ celluloid-io (0.17.2)
92
+ celluloid (>= 0.17.2)
93
+ nio4r (>= 1.1)
94
+ timers (>= 4.1.1)
95
+ celluloid-pool (0.20.5)
96
+ timers (>= 4.1.1)
97
+ celluloid-supervision (0.20.5)
98
+ timers (>= 4.1.1)
99
+ codeclimate-test-reporter (0.4.8)
100
+ simplecov (>= 0.7.1, < 1.0.0)
101
+ concurrent-ruby (1.0.0)
102
+ crack (0.4.3)
103
+ safe_yaml (~> 1.0.0)
104
+ debug_inspector (0.0.2)
105
+ diff-lcs (1.2.5)
106
+ docile (1.1.5)
107
+ dotenv (2.0.2)
108
+ erubis (2.7.0)
109
+ eye (0.8)
110
+ celluloid (~> 0.17.2)
111
+ celluloid-io (~> 0.17.0)
112
+ sigar (~> 0.7.3)
113
+ state_machine
114
+ thor
115
+ factory_girl (4.5.0)
116
+ activesupport (>= 3.0.0)
117
+ factory_girl_rails (4.5.0)
118
+ factory_girl (~> 4.5.0)
119
+ railties (>= 3.0.0)
120
+ font-awesome-rails (4.5.0.0)
121
+ railties (>= 3.2, < 5.0)
122
+ globalid (0.3.6)
123
+ activesupport (>= 4.1.0)
124
+ hashdiff (0.2.3)
125
+ hitimes (1.2.3)
126
+ i18n (0.7.0)
127
+ jquery-rails (4.0.5)
128
+ rails-dom-testing (~> 1.0)
129
+ railties (>= 4.2.0)
130
+ thor (>= 0.14, < 2.0)
131
+ jquery-ui-rails (5.0.5)
132
+ railties (>= 3.2.16)
133
+ json (1.8.3)
134
+ logstash-event (1.2.02)
135
+ logstash-logger (0.15.2)
136
+ logstash-event (~> 1.2)
137
+ stud
138
+ loofah (2.0.3)
139
+ nokogiri (>= 1.5.9)
140
+ mail (2.6.3)
141
+ mime-types (>= 1.16, < 3)
142
+ mime-types (2.99)
143
+ mini_portile2 (2.0.0)
144
+ minitest (5.8.3)
145
+ multi_json (1.11.2)
146
+ nio4r (1.2.0)
147
+ nokogiri (1.6.7.1)
148
+ mini_portile2 (~> 2.0.0.rc2)
149
+ puma (2.15.3)
150
+ rack (1.6.4)
151
+ rack-test (0.6.3)
152
+ rack (>= 1.0)
153
+ rails (4.2.5)
154
+ actionmailer (= 4.2.5)
155
+ actionpack (= 4.2.5)
156
+ actionview (= 4.2.5)
157
+ activejob (= 4.2.5)
158
+ activemodel (= 4.2.5)
159
+ activerecord (= 4.2.5)
160
+ activesupport (= 4.2.5)
161
+ bundler (>= 1.3.0, < 2.0)
162
+ railties (= 4.2.5)
163
+ sprockets-rails
164
+ rails-deprecated_sanitizer (1.0.3)
165
+ activesupport (>= 4.2.0.alpha)
166
+ rails-dom-testing (1.0.7)
167
+ activesupport (>= 4.2.0.beta, < 5.0)
168
+ nokogiri (~> 1.6.0)
169
+ rails-deprecated_sanitizer (>= 1.0.1)
170
+ rails-html-sanitizer (1.0.2)
171
+ loofah (~> 2.0)
172
+ railties (4.2.5)
173
+ actionpack (= 4.2.5)
174
+ activesupport (= 4.2.5)
175
+ rake (>= 0.8.7)
176
+ thor (>= 0.18.1, < 2.0)
177
+ rake (10.4.2)
178
+ redis (3.2.2)
179
+ rspec-core (3.4.1)
180
+ rspec-support (~> 3.4.0)
181
+ rspec-expectations (3.4.0)
182
+ diff-lcs (>= 1.2.0, < 2.0)
183
+ rspec-support (~> 3.4.0)
184
+ rspec-mocks (3.4.0)
185
+ diff-lcs (>= 1.2.0, < 2.0)
186
+ rspec-support (~> 3.4.0)
187
+ rspec-rails (3.4.0)
188
+ actionpack (>= 3.0, < 4.3)
189
+ activesupport (>= 3.0, < 4.3)
190
+ railties (>= 3.0, < 4.3)
191
+ rspec-core (~> 3.4.0)
192
+ rspec-expectations (~> 3.4.0)
193
+ rspec-mocks (~> 3.4.0)
194
+ rspec-support (~> 3.4.0)
195
+ rspec-support (3.4.1)
196
+ safe_yaml (1.0.4)
197
+ sass (3.4.20)
198
+ sass-rails (5.0.4)
199
+ railties (>= 4.0.0, < 5.0)
200
+ sass (~> 3.1)
201
+ sprockets (>= 2.8, < 4.0)
202
+ sprockets-rails (>= 2.0, < 4.0)
203
+ tilt (>= 1.1, < 3)
204
+ semantic (1.4.1)
205
+ semantic-ui-sass (2.1.6.0)
206
+ sass (>= 3.2)
207
+ shoulda-matchers (3.0.1)
208
+ activesupport (>= 4.0.0)
209
+ sigar (0.7.3)
210
+ simplecov (0.11.1)
211
+ docile (~> 1.1.0)
212
+ json (~> 1.8)
213
+ simplecov-html (~> 0.10.0)
214
+ simplecov-html (0.10.0)
215
+ sprockets (3.5.2)
216
+ concurrent-ruby (~> 1.0)
217
+ rack (> 1, < 3)
218
+ sprockets-rails (3.0.0)
219
+ actionpack (>= 4.0)
220
+ activesupport (>= 4.0)
221
+ sprockets (>= 3.0.0)
222
+ state_machine (1.2.0)
223
+ stud (0.0.22)
224
+ thor (0.19.1)
225
+ thread_safe (0.3.5)
226
+ tilt (2.0.1)
227
+ timers (4.1.1)
228
+ hitimes
229
+ tubesock (0.2.5)
230
+ rack (>= 1.5.0)
231
+ websocket (>= 1.1.0)
232
+ tzinfo (1.2.2)
233
+ thread_safe (~> 0.1)
234
+ underscore-rails (1.8.3)
235
+ web-console (2.2.1)
236
+ activemodel (>= 4.0)
237
+ binding_of_caller (>= 0.7.2)
238
+ railties (>= 4.0)
239
+ sprockets-rails (>= 2.0, < 4.0)
240
+ webmock (1.22.3)
241
+ addressable (>= 2.3.6)
242
+ crack (>= 0.3.2)
243
+ hashdiff
244
+ websocket (1.2.2)
245
+ wrest (2.1.2)
246
+ activesupport (~> 4)
247
+ builder (> 2.0)
248
+ multi_json (~> 1.0)
249
+
250
+ PLATFORMS
251
+ ruby
252
+
253
+ DEPENDENCIES
254
+ byebug
255
+ codeclimate-test-reporter
256
+ distribot!
257
+ distribot-ui!
258
+ factory_girl_rails
259
+ jquery-rails
260
+ jquery-ui-rails
261
+ rspec-rails
262
+ semantic-ui-sass
263
+ shoulda-matchers
264
+ simplecov
265
+ underscore-rails
266
+ web-console (~> 2.0)
267
+ webmock
268
+
269
+ BUNDLED WITH
270
+ 1.11.2
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.