apisonator 2.100.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +317 -0
  3. data/Gemfile +11 -0
  4. data/Gemfile.base +65 -0
  5. data/Gemfile.lock +319 -0
  6. data/Gemfile.on_prem +1 -0
  7. data/Gemfile.on_prem.lock +297 -0
  8. data/LICENSE +202 -0
  9. data/NOTICE +15 -0
  10. data/README.md +230 -0
  11. data/Rakefile +287 -0
  12. data/apisonator.gemspec +47 -0
  13. data/app/api/api.rb +13 -0
  14. data/app/api/internal/alert_limits.rb +32 -0
  15. data/app/api/internal/application_keys.rb +49 -0
  16. data/app/api/internal/application_referrer_filters.rb +43 -0
  17. data/app/api/internal/applications.rb +77 -0
  18. data/app/api/internal/errors.rb +54 -0
  19. data/app/api/internal/events.rb +42 -0
  20. data/app/api/internal/internal.rb +104 -0
  21. data/app/api/internal/metrics.rb +40 -0
  22. data/app/api/internal/service_tokens.rb +46 -0
  23. data/app/api/internal/services.rb +58 -0
  24. data/app/api/internal/stats.rb +42 -0
  25. data/app/api/internal/usagelimits.rb +62 -0
  26. data/app/api/internal/utilization.rb +23 -0
  27. data/bin/3scale_backend +223 -0
  28. data/bin/3scale_backend_worker +26 -0
  29. data/config.ru +4 -0
  30. data/config/puma.rb +192 -0
  31. data/config/schedule.rb +9 -0
  32. data/ext/mkrf_conf.rb +64 -0
  33. data/lib/3scale/backend.rb +67 -0
  34. data/lib/3scale/backend/alert_limit.rb +56 -0
  35. data/lib/3scale/backend/alerts.rb +137 -0
  36. data/lib/3scale/backend/analytics/kinesis.rb +3 -0
  37. data/lib/3scale/backend/analytics/kinesis/adapter.rb +180 -0
  38. data/lib/3scale/backend/analytics/kinesis/exporter.rb +86 -0
  39. data/lib/3scale/backend/analytics/kinesis/job.rb +135 -0
  40. data/lib/3scale/backend/analytics/redshift.rb +3 -0
  41. data/lib/3scale/backend/analytics/redshift/adapter.rb +367 -0
  42. data/lib/3scale/backend/analytics/redshift/importer.rb +83 -0
  43. data/lib/3scale/backend/analytics/redshift/job.rb +33 -0
  44. data/lib/3scale/backend/application.rb +330 -0
  45. data/lib/3scale/backend/application_events.rb +76 -0
  46. data/lib/3scale/backend/background_job.rb +65 -0
  47. data/lib/3scale/backend/configurable.rb +20 -0
  48. data/lib/3scale/backend/configuration.rb +151 -0
  49. data/lib/3scale/backend/configuration/loader.rb +42 -0
  50. data/lib/3scale/backend/constants.rb +19 -0
  51. data/lib/3scale/backend/cors.rb +84 -0
  52. data/lib/3scale/backend/distributed_lock.rb +67 -0
  53. data/lib/3scale/backend/environment.rb +21 -0
  54. data/lib/3scale/backend/error_storage.rb +52 -0
  55. data/lib/3scale/backend/errors.rb +343 -0
  56. data/lib/3scale/backend/event_storage.rb +120 -0
  57. data/lib/3scale/backend/experiment.rb +84 -0
  58. data/lib/3scale/backend/extensions.rb +5 -0
  59. data/lib/3scale/backend/extensions/array.rb +19 -0
  60. data/lib/3scale/backend/extensions/hash.rb +26 -0
  61. data/lib/3scale/backend/extensions/nil_class.rb +13 -0
  62. data/lib/3scale/backend/extensions/redis.rb +44 -0
  63. data/lib/3scale/backend/extensions/string.rb +13 -0
  64. data/lib/3scale/backend/extensions/time.rb +110 -0
  65. data/lib/3scale/backend/failed_jobs_scheduler.rb +141 -0
  66. data/lib/3scale/backend/job_fetcher.rb +122 -0
  67. data/lib/3scale/backend/listener.rb +728 -0
  68. data/lib/3scale/backend/listener_metrics.rb +99 -0
  69. data/lib/3scale/backend/logging.rb +48 -0
  70. data/lib/3scale/backend/logging/external.rb +44 -0
  71. data/lib/3scale/backend/logging/external/impl.rb +93 -0
  72. data/lib/3scale/backend/logging/external/impl/airbrake.rb +66 -0
  73. data/lib/3scale/backend/logging/external/impl/bugsnag.rb +69 -0
  74. data/lib/3scale/backend/logging/external/impl/default.rb +18 -0
  75. data/lib/3scale/backend/logging/external/resque.rb +57 -0
  76. data/lib/3scale/backend/logging/logger.rb +18 -0
  77. data/lib/3scale/backend/logging/middleware.rb +62 -0
  78. data/lib/3scale/backend/logging/middleware/json_writer.rb +21 -0
  79. data/lib/3scale/backend/logging/middleware/text_writer.rb +60 -0
  80. data/lib/3scale/backend/logging/middleware/writer.rb +143 -0
  81. data/lib/3scale/backend/logging/worker.rb +107 -0
  82. data/lib/3scale/backend/manifest.rb +80 -0
  83. data/lib/3scale/backend/memoizer.rb +277 -0
  84. data/lib/3scale/backend/metric.rb +275 -0
  85. data/lib/3scale/backend/metric/collection.rb +91 -0
  86. data/lib/3scale/backend/oauth.rb +4 -0
  87. data/lib/3scale/backend/oauth/token.rb +26 -0
  88. data/lib/3scale/backend/oauth/token_key.rb +30 -0
  89. data/lib/3scale/backend/oauth/token_storage.rb +313 -0
  90. data/lib/3scale/backend/oauth/token_value.rb +25 -0
  91. data/lib/3scale/backend/period.rb +3 -0
  92. data/lib/3scale/backend/period/boundary.rb +107 -0
  93. data/lib/3scale/backend/period/cache.rb +28 -0
  94. data/lib/3scale/backend/period/period.rb +402 -0
  95. data/lib/3scale/backend/queue_storage.rb +16 -0
  96. data/lib/3scale/backend/rack.rb +49 -0
  97. data/lib/3scale/backend/rack/exception_catcher.rb +136 -0
  98. data/lib/3scale/backend/rack/internal_error_catcher.rb +23 -0
  99. data/lib/3scale/backend/rack/prometheus.rb +19 -0
  100. data/lib/3scale/backend/saas.rb +6 -0
  101. data/lib/3scale/backend/saas_analytics.rb +4 -0
  102. data/lib/3scale/backend/server.rb +30 -0
  103. data/lib/3scale/backend/server/falcon.rb +52 -0
  104. data/lib/3scale/backend/server/puma.rb +71 -0
  105. data/lib/3scale/backend/service.rb +317 -0
  106. data/lib/3scale/backend/service_token.rb +97 -0
  107. data/lib/3scale/backend/stats.rb +8 -0
  108. data/lib/3scale/backend/stats/aggregator.rb +170 -0
  109. data/lib/3scale/backend/stats/aggregators/base.rb +72 -0
  110. data/lib/3scale/backend/stats/aggregators/response_code.rb +58 -0
  111. data/lib/3scale/backend/stats/aggregators/usage.rb +34 -0
  112. data/lib/3scale/backend/stats/bucket_reader.rb +135 -0
  113. data/lib/3scale/backend/stats/bucket_storage.rb +108 -0
  114. data/lib/3scale/backend/stats/cleaner.rb +195 -0
  115. data/lib/3scale/backend/stats/codes_commons.rb +14 -0
  116. data/lib/3scale/backend/stats/delete_job_def.rb +60 -0
  117. data/lib/3scale/backend/stats/key_generator.rb +73 -0
  118. data/lib/3scale/backend/stats/keys.rb +104 -0
  119. data/lib/3scale/backend/stats/partition_eraser_job.rb +58 -0
  120. data/lib/3scale/backend/stats/partition_generator_job.rb +46 -0
  121. data/lib/3scale/backend/stats/period_commons.rb +34 -0
  122. data/lib/3scale/backend/stats/stats_parser.rb +141 -0
  123. data/lib/3scale/backend/stats/storage.rb +113 -0
  124. data/lib/3scale/backend/statsd.rb +14 -0
  125. data/lib/3scale/backend/storable.rb +35 -0
  126. data/lib/3scale/backend/storage.rb +40 -0
  127. data/lib/3scale/backend/storage_async.rb +4 -0
  128. data/lib/3scale/backend/storage_async/async_redis.rb +21 -0
  129. data/lib/3scale/backend/storage_async/client.rb +205 -0
  130. data/lib/3scale/backend/storage_async/pipeline.rb +79 -0
  131. data/lib/3scale/backend/storage_async/resque_extensions.rb +30 -0
  132. data/lib/3scale/backend/storage_helpers.rb +278 -0
  133. data/lib/3scale/backend/storage_key_helpers.rb +9 -0
  134. data/lib/3scale/backend/storage_sync.rb +43 -0
  135. data/lib/3scale/backend/transaction.rb +62 -0
  136. data/lib/3scale/backend/transactor.rb +177 -0
  137. data/lib/3scale/backend/transactor/limit_headers.rb +54 -0
  138. data/lib/3scale/backend/transactor/notify_batcher.rb +139 -0
  139. data/lib/3scale/backend/transactor/notify_job.rb +47 -0
  140. data/lib/3scale/backend/transactor/process_job.rb +33 -0
  141. data/lib/3scale/backend/transactor/report_job.rb +84 -0
  142. data/lib/3scale/backend/transactor/status.rb +236 -0
  143. data/lib/3scale/backend/transactor/usage_report.rb +182 -0
  144. data/lib/3scale/backend/usage.rb +63 -0
  145. data/lib/3scale/backend/usage_limit.rb +115 -0
  146. data/lib/3scale/backend/use_cases/provider_key_change_use_case.rb +60 -0
  147. data/lib/3scale/backend/util.rb +17 -0
  148. data/lib/3scale/backend/validators.rb +26 -0
  149. data/lib/3scale/backend/validators/base.rb +36 -0
  150. data/lib/3scale/backend/validators/key.rb +17 -0
  151. data/lib/3scale/backend/validators/limits.rb +57 -0
  152. data/lib/3scale/backend/validators/oauth_key.rb +15 -0
  153. data/lib/3scale/backend/validators/oauth_setting.rb +15 -0
  154. data/lib/3scale/backend/validators/redirect_uri.rb +33 -0
  155. data/lib/3scale/backend/validators/referrer.rb +60 -0
  156. data/lib/3scale/backend/validators/service_state.rb +15 -0
  157. data/lib/3scale/backend/validators/state.rb +15 -0
  158. data/lib/3scale/backend/version.rb +5 -0
  159. data/lib/3scale/backend/views/oauth_access_tokens.builder +14 -0
  160. data/lib/3scale/backend/views/oauth_app_id_by_token.builder +4 -0
  161. data/lib/3scale/backend/worker.rb +87 -0
  162. data/lib/3scale/backend/worker_async.rb +88 -0
  163. data/lib/3scale/backend/worker_metrics.rb +44 -0
  164. data/lib/3scale/backend/worker_sync.rb +32 -0
  165. data/lib/3scale/bundler_shim.rb +17 -0
  166. data/lib/3scale/prometheus_server.rb +10 -0
  167. data/lib/3scale/tasks/connectivity.rake +41 -0
  168. data/lib/3scale/tasks/helpers.rb +3 -0
  169. data/lib/3scale/tasks/helpers/environment.rb +23 -0
  170. data/lib/3scale/tasks/stats.rake +131 -0
  171. data/lib/3scale/tasks/swagger.rake +46 -0
  172. data/licenses.xml +1215 -0
  173. metadata +227 -0
@@ -0,0 +1 @@
1
+ eval_gemfile(File.expand_path('../Gemfile.base', __FILE__))
@@ -0,0 +1,297 @@
1
+ GIT
2
+ remote: https://github.com/3scale/puma
3
+ revision: b034371406690d3e6c2a9301c4a48bd721f3efc3
4
+ ref: b034371406690d3e6c2a9301c4a48bd721f3efc3
5
+ specs:
6
+ puma (2.15.3)
7
+
8
+ GIT
9
+ remote: https://github.com/3scale/resque
10
+ revision: 88839e71756ea9b6edfc9426a0af71e94109c135
11
+ branch: 3scale
12
+ specs:
13
+ resque (1.27.4)
14
+ mono_logger (~> 1.0)
15
+ multi_json (~> 1.0)
16
+ redis-namespace (~> 1.3)
17
+ sinatra (>= 0.9.2)
18
+ vegas (~> 0.1.2)
19
+
20
+ GIT
21
+ remote: https://github.com/3scale/source2swagger
22
+ revision: 9a787007577fc58b5822b55720e977cc063057fd
23
+ branch: backend
24
+ specs:
25
+ source2swagger (0.0.2)
26
+ json
27
+
28
+ PATH
29
+ remote: .
30
+ specs:
31
+ apisonator (2.100.0)
32
+
33
+ GEM
34
+ remote: https://rubygems.org/
35
+ specs:
36
+ activesupport (5.1.4)
37
+ concurrent-ruby (~> 1.0, >= 1.0.2)
38
+ i18n (~> 0.7)
39
+ minitest (~> 5.1)
40
+ tzinfo (~> 1.1)
41
+ async (1.24.2)
42
+ console (~> 1.0)
43
+ nio4r (~> 2.3)
44
+ timers (~> 4.1)
45
+ async-container (0.16.4)
46
+ async (~> 1.0)
47
+ async-io (~> 1.26)
48
+ process-group
49
+ async-http (0.50.7)
50
+ async (~> 1.23)
51
+ async-io (~> 1.27.0)
52
+ async-pool (~> 0.2)
53
+ protocol-http (~> 0.15.1)
54
+ protocol-http1 (~> 0.10.0)
55
+ protocol-http2 (~> 0.11.0)
56
+ async-http-cache (0.1.5)
57
+ async-http
58
+ protocol-http (~> 0.14)
59
+ async-io (1.27.5)
60
+ async (~> 1.14)
61
+ async-pool (0.2.0)
62
+ async (~> 1.8)
63
+ async-redis (0.4.1)
64
+ async (~> 1.8)
65
+ async-io (~> 1.10)
66
+ protocol-redis (~> 0.2.0)
67
+ async-rspec (1.13.0)
68
+ rspec (~> 3.0)
69
+ rspec-files (~> 1.0)
70
+ rspec-memory (~> 1.0)
71
+ backports (3.11.3)
72
+ benchmark-ips (2.7.2)
73
+ bugsnag (6.6.4)
74
+ concurrent-ruby (~> 1.0)
75
+ build-environment (1.13.0)
76
+ builder (3.2.3)
77
+ byebug (9.1.0)
78
+ codeclimate-test-reporter (0.6.0)
79
+ simplecov (>= 0.7.1, < 1.0.0)
80
+ coderay (1.1.2)
81
+ concurrent-ruby (1.0.5)
82
+ console (1.8.2)
83
+ daemons (1.2.4)
84
+ diff-lcs (1.3)
85
+ docile (1.1.5)
86
+ dry-initializer (3.0.3)
87
+ falcon (0.35.6)
88
+ async (~> 1.13)
89
+ async-container (~> 0.16.0)
90
+ async-http (~> 0.50.4)
91
+ async-http-cache (~> 0.1.0)
92
+ async-io (~> 1.22)
93
+ build-environment (~> 1.13)
94
+ localhost (~> 1.1)
95
+ process-metrics (~> 0.1.0)
96
+ rack (>= 1.0)
97
+ samovar (~> 2.1)
98
+ faraday (0.13.1)
99
+ multipart-post (>= 1.2, < 3)
100
+ ffi (1.12.2)
101
+ geminabox (0.13.11)
102
+ builder
103
+ faraday
104
+ httpclient (>= 2.2.7)
105
+ nesty
106
+ reentrant_flock
107
+ sinatra (>= 1.2.7)
108
+ gli (2.16.1)
109
+ hiredis (0.6.1)
110
+ httpclient (2.8.3)
111
+ i18n (0.9.1)
112
+ concurrent-ruby (~> 1.0)
113
+ json (2.1.0)
114
+ license_finder (5.9.2)
115
+ bundler
116
+ rubyzip
117
+ thor
118
+ toml (= 0.2.0)
119
+ with_env (= 1.1.0)
120
+ xml-simple
121
+ localhost (1.1.6)
122
+ mapping (1.1.1)
123
+ metaclass (0.0.4)
124
+ method_source (0.9.0)
125
+ mini_portile2 (2.4.0)
126
+ minitest (5.10.3)
127
+ mocha (1.3.0)
128
+ metaclass (~> 0.0.1)
129
+ mono_logger (1.1.0)
130
+ multi_json (1.13.1)
131
+ multipart-post (2.0.0)
132
+ mustache (1.0.5)
133
+ mustermann (1.0.2)
134
+ nesty (1.0.2)
135
+ net-scp (1.2.1)
136
+ net-ssh (>= 2.6.5)
137
+ net-ssh (4.2.0)
138
+ nio4r (2.5.2)
139
+ nokogiri (1.10.9)
140
+ mini_portile2 (~> 2.4.0)
141
+ parslet (1.8.2)
142
+ pkg-config (1.1.9)
143
+ power_assert (1.1.1)
144
+ process-group (1.2.1)
145
+ process-terminal (~> 0.2.0)
146
+ process-metrics (0.1.1)
147
+ process-terminal (0.2.0)
148
+ ffi
149
+ prometheus-client (1.0.0)
150
+ protocol-hpack (1.4.2)
151
+ protocol-http (0.15.1)
152
+ protocol-http1 (0.10.3)
153
+ protocol-http (~> 0.15)
154
+ protocol-http2 (0.11.6)
155
+ protocol-hpack (~> 1.4)
156
+ protocol-http (~> 0.15)
157
+ protocol-redis (0.2.0)
158
+ pry (0.11.3)
159
+ coderay (~> 1.1.0)
160
+ method_source (~> 0.9.0)
161
+ pry-byebug (3.5.1)
162
+ byebug (~> 9.1)
163
+ pry (~> 0.10)
164
+ pry-doc (0.11.1)
165
+ pry (~> 0.9)
166
+ yard (~> 0.9)
167
+ rack (2.0.9)
168
+ rack-protection (2.0.3)
169
+ rack
170
+ rack-test (0.8.2)
171
+ rack (>= 1.0, < 3)
172
+ rake (13.0.1)
173
+ redis (4.1.1)
174
+ redis-namespace (1.6.0)
175
+ redis (>= 3.0.4)
176
+ reentrant_flock (0.1.1)
177
+ resque_spec (0.17.0)
178
+ resque (>= 1.19.0)
179
+ rspec-core (>= 3.0.0)
180
+ rspec-expectations (>= 3.0.0)
181
+ rspec-mocks (>= 3.0.0)
182
+ resque_unit (0.4.8)
183
+ json (>= 1.4.6)
184
+ rspec (3.7.0)
185
+ rspec-core (~> 3.7.0)
186
+ rspec-expectations (~> 3.7.0)
187
+ rspec-mocks (~> 3.7.0)
188
+ rspec-core (3.7.0)
189
+ rspec-support (~> 3.7.0)
190
+ rspec-expectations (3.7.0)
191
+ diff-lcs (>= 1.2.0, < 2.0)
192
+ rspec-support (~> 3.7.0)
193
+ rspec-files (1.0.1)
194
+ rspec (~> 3.0)
195
+ rspec-memory (1.0.1)
196
+ rspec (~> 3.0)
197
+ rspec-mocks (3.7.0)
198
+ diff-lcs (>= 1.2.0, < 2.0)
199
+ rspec-support (~> 3.7.0)
200
+ rspec-support (3.7.0)
201
+ rspec_api_documentation (5.1.0)
202
+ activesupport (>= 3.0.0)
203
+ mustache (~> 1.0, >= 0.99.4)
204
+ rspec (~> 3.0)
205
+ rubyzip (2.0.0)
206
+ samovar (2.1.4)
207
+ console (~> 1.0)
208
+ mapping (~> 1.0)
209
+ simplecov (0.15.1)
210
+ docile (~> 1.1.0)
211
+ json (>= 1.8, < 3)
212
+ simplecov-html (~> 0.10.0)
213
+ simplecov-html (0.10.2)
214
+ sinatra (2.0.3)
215
+ mustermann (~> 1.0)
216
+ rack (~> 2.0)
217
+ rack-protection (= 2.0.3)
218
+ tilt (~> 2.0)
219
+ sinatra-contrib (2.0.3)
220
+ activesupport (>= 4.0.0)
221
+ backports (>= 2.8.2)
222
+ multi_json
223
+ mustermann (~> 1.0)
224
+ rack-protection (= 2.0.3)
225
+ sinatra (= 2.0.3)
226
+ tilt (>= 1.3, < 3)
227
+ sshkit (1.15.1)
228
+ net-scp (>= 1.1.2)
229
+ net-ssh (>= 2.8.0)
230
+ test-unit (3.2.6)
231
+ power_assert
232
+ thor (0.20.3)
233
+ thread_safe (0.3.6)
234
+ tilt (2.0.8)
235
+ timecop (0.9.1)
236
+ timers (4.3.0)
237
+ toml (0.2.0)
238
+ parslet (~> 1.8.0)
239
+ tzinfo (1.2.4)
240
+ thread_safe (~> 0.1)
241
+ vegas (0.1.11)
242
+ rack (>= 1.0.0)
243
+ with_env (1.1.0)
244
+ xml-simple (1.1.5)
245
+ yabeda (0.5.0)
246
+ concurrent-ruby
247
+ dry-initializer
248
+ yabeda-prometheus (0.5.0)
249
+ prometheus-client (~> 1.0)
250
+ yabeda (~> 0.5)
251
+ yajl-ruby (1.3.1)
252
+ yard (0.9.20)
253
+
254
+ PLATFORMS
255
+ ruby
256
+
257
+ DEPENDENCIES
258
+ apisonator!
259
+ async-redis (~> 0.4.1)
260
+ async-rspec
261
+ benchmark-ips (~> 2.7.2)
262
+ bugsnag (~> 6)
263
+ builder (= 3.2.3)
264
+ codeclimate-test-reporter (~> 0.6.0)
265
+ daemons (= 1.2.4)
266
+ falcon (~> 0.35)
267
+ geminabox (~> 0.13.11)
268
+ gli (~> 2.16.1)
269
+ hiredis (= 0.6.1)
270
+ license_finder (~> 5)
271
+ mocha (~> 1.3)
272
+ nokogiri (~> 1.10.8)
273
+ pkg-config (~> 1.1.7)
274
+ pry (~> 0.11.3)
275
+ pry-byebug (~> 3.5.1)
276
+ pry-doc (~> 0.11.1)
277
+ puma!
278
+ rack (~> 2.0.8)
279
+ rack-test (~> 0.8.2)
280
+ rake (~> 13.0)
281
+ redis (= 4.1.1)
282
+ resque!
283
+ resque_spec (~> 0.17.0)
284
+ resque_unit (~> 0.4.4)!
285
+ rspec (~> 3.7.0)
286
+ rspec_api_documentation (~> 5.0)
287
+ sinatra (~> 2.0.3)
288
+ sinatra-contrib (~> 2.0.3)
289
+ source2swagger!
290
+ sshkit
291
+ test-unit (~> 3.2.6)
292
+ timecop (~> 0.9.1)
293
+ yabeda-prometheus (~> 0.5.0)
294
+ yajl-ruby (~> 1.3.1)
295
+
296
+ BUNDLED WITH
297
+ 1.16.6
data/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.