geo_works 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (336) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +34 -0
  3. data/.csslintrc +2 -0
  4. data/.engine_cart.yml +1 -0
  5. data/.eslintignore +1 -0
  6. data/.eslintrc +8 -0
  7. data/.fcrepo_wrapper +3 -0
  8. data/.gitignore +14 -0
  9. data/.rubocop.yml +105 -0
  10. data/.solr_wrapper +7 -0
  11. data/.travis.yml +33 -0
  12. data/CONTRIBUTING.md +159 -0
  13. data/Gemfile +48 -0
  14. data/LICENSE +202 -0
  15. data/README.md +143 -0
  16. data/Rakefile +25 -0
  17. data/app/assets/images/geo_works/.keep +0 -0
  18. data/app/assets/images/geo_works/images/geocoder.png +0 -0
  19. data/app/assets/images/geo_works/images/move-handle.png +0 -0
  20. data/app/assets/images/geo_works/images/resize-handle.png +0 -0
  21. data/app/assets/images/geo_works/images/throbber.gif +0 -0
  22. data/app/assets/javascripts/geo_works/Control.Geocoder.js +1056 -0
  23. data/app/assets/javascripts/geo_works/application.js +4 -0
  24. data/app/assets/javascripts/geo_works/bounding_box_selector.js +107 -0
  25. data/app/assets/javascripts/geo_works/es6-modules.js +7 -0
  26. data/app/assets/javascripts/geo_works/geo_works_boot.es6 +8 -0
  27. data/app/assets/javascripts/geo_works/leaflet-boundingbox.js +467 -0
  28. data/app/assets/javascripts/geo_works/relationships.js +3 -0
  29. data/app/assets/javascripts/geo_works/relationships/child_works.es6 +20 -0
  30. data/app/assets/javascripts/geo_works/relationships/parent_works.es6 +20 -0
  31. data/app/assets/javascripts/geo_works/relationships/related_works.es6 +187 -0
  32. data/app/assets/stylesheets/geo_works/Control.Geocoder.scss +104 -0
  33. data/app/assets/stylesheets/geo_works/application.css +18 -0
  34. data/app/assets/stylesheets/geo_works/bounding_box.scss +15 -0
  35. data/app/assets/stylesheets/geo_works/leaflet-boundingbox.scss +17 -0
  36. data/app/assets/stylesheets/geo_works/related_works.scss +29 -0
  37. data/app/assets/stylesheets/geo_works/thumbnails.scss +13 -0
  38. data/app/controllers/concerns/geo_works/events_behavior.rb +29 -0
  39. data/app/controllers/concerns/geo_works/file_sets_controller_behavior.rb +31 -0
  40. data/app/controllers/concerns/geo_works/geoblacklight_controller_behavior.rb +29 -0
  41. data/app/controllers/concerns/geo_works/image_works_controller_behavior.rb +9 -0
  42. data/app/controllers/concerns/geo_works/raster_works_controller_behavior.rb +9 -0
  43. data/app/controllers/concerns/geo_works/vector_works_controller_behavior.rb +9 -0
  44. data/app/forms/geo_works/basic_geo_metadata_form.rb +9 -0
  45. data/app/forms/geo_works/external_metadata_file_form.rb +8 -0
  46. data/app/forms/geo_works/georeferenced_form.rb +9 -0
  47. data/app/forms/hyrax/image_work_form.rb +7 -0
  48. data/app/forms/hyrax/raster_work_form.rb +8 -0
  49. data/app/forms/hyrax/vector_work_form.rb +8 -0
  50. data/app/helpers/geo_works/application_helper.rb +4 -0
  51. data/app/helpers/geo_works/bounding_box_helper.rb +73 -0
  52. data/app/helpers/geo_works/file_set_actions_helper.rb +31 -0
  53. data/app/helpers/geo_works/geo_works_helper.rb +22 -0
  54. data/app/helpers/geo_works/populate_metadata_helper.rb +7 -0
  55. data/app/jobs/geoblacklight_job.rb +10 -0
  56. data/app/jobs/geoserver_delivery_job.rb +36 -0
  57. data/app/models/concerns/geo_works/ability.rb +12 -0
  58. data/app/models/concerns/geo_works/basic_geo_metadata.rb +21 -0
  59. data/app/models/concerns/geo_works/external_metadata_file_behavior.rb +31 -0
  60. data/app/models/concerns/geo_works/extractors/fgdc_helper.rb +9 -0
  61. data/app/models/concerns/geo_works/extractors/fgdc_metadata_extractor.rb +114 -0
  62. data/app/models/concerns/geo_works/extractors/iso19139_helper.rb +50 -0
  63. data/app/models/concerns/geo_works/extractors/mods_helper.rb +15 -0
  64. data/app/models/concerns/geo_works/file_set_metadata.rb +15 -0
  65. data/app/models/concerns/geo_works/file_set_presenter_behavior.rb +7 -0
  66. data/app/models/concerns/geo_works/geo_file_format_behavior.rb +37 -0
  67. data/app/models/concerns/geo_works/geo_file_set_behavior.rb +11 -0
  68. data/app/models/concerns/geo_works/georeferenced_behavior.rb +18 -0
  69. data/app/models/concerns/geo_works/image_file_behavior.rb +14 -0
  70. data/app/models/concerns/geo_works/image_work_behavior.rb +69 -0
  71. data/app/models/concerns/geo_works/metadata_extraction_helper.rb +27 -0
  72. data/app/models/concerns/geo_works/raster_file_behavior.rb +14 -0
  73. data/app/models/concerns/geo_works/raster_work_behavior.rb +82 -0
  74. data/app/models/concerns/geo_works/solr_document_behavior.rb +46 -0
  75. data/app/models/concerns/geo_works/vector_file_behavior.rb +14 -0
  76. data/app/models/concerns/geo_works/vector_work_behavior.rb +78 -0
  77. data/app/presenters/geo_works/geo_works_show_presenter.rb +48 -0
  78. data/app/presenters/geo_works/image_work_show_presenter.rb +5 -0
  79. data/app/presenters/geo_works/raster_work_show_presenter.rb +5 -0
  80. data/app/presenters/geo_works/vector_work_show_presenter.rb +5 -0
  81. data/app/processors/geo_works/geoblacklight_event_processor.rb +29 -0
  82. data/app/processors/geo_works/geoblacklight_event_processor/delete_processor.rb +13 -0
  83. data/app/processors/geo_works/geoblacklight_event_processor/processor.rb +28 -0
  84. data/app/processors/geo_works/geoblacklight_event_processor/unknown_event.rb +15 -0
  85. data/app/processors/geo_works/geoblacklight_event_processor/update_processor.rb +15 -0
  86. data/app/processors/geo_works/processors/base_geo_processor.rb +81 -0
  87. data/app/processors/geo_works/processors/gdal.rb +49 -0
  88. data/app/processors/geo_works/processors/image.rb +66 -0
  89. data/app/processors/geo_works/processors/ogr.rb +19 -0
  90. data/app/processors/geo_works/processors/raster.rb +26 -0
  91. data/app/processors/geo_works/processors/raster/aig.rb +40 -0
  92. data/app/processors/geo_works/processors/raster/base.rb +41 -0
  93. data/app/processors/geo_works/processors/raster/dem.rb +29 -0
  94. data/app/processors/geo_works/processors/raster/info.rb +52 -0
  95. data/app/processors/geo_works/processors/rendering.rb +79 -0
  96. data/app/processors/geo_works/processors/vector.rb +24 -0
  97. data/app/processors/geo_works/processors/vector/base.rb +44 -0
  98. data/app/processors/geo_works/processors/vector/info.rb +84 -0
  99. data/app/processors/geo_works/processors/vector/shapefile.rb +20 -0
  100. data/app/processors/geo_works/processors/zip.rb +29 -0
  101. data/app/renderers/geo_works/coverage_renderer.rb +39 -0
  102. data/app/runners/geo_works/runners/raster_derivatives.rb +9 -0
  103. data/app/runners/geo_works/runners/vector_derivatives.rb +9 -0
  104. data/app/schemas/geo_works/basic_geo_metadata_optional.rb +40 -0
  105. data/app/schemas/geo_works/basic_geo_metadata_required.rb +25 -0
  106. data/app/schemas/geo_works/file_set_metadata_required.rb +5 -0
  107. data/app/services/geo_works/authority_service.rb +29 -0
  108. data/app/services/geo_works/delivery/geoserver.rb +118 -0
  109. data/app/services/geo_works/delivery_service.rb +11 -0
  110. data/app/services/geo_works/discovery.rb +4 -0
  111. data/app/services/geo_works/discovery/abstract_document.rb +37 -0
  112. data/app/services/geo_works/discovery/document_builder.rb +46 -0
  113. data/app/services/geo_works/discovery/document_builder/basic_metadata_builder.rb +71 -0
  114. data/app/services/geo_works/discovery/document_builder/composite_builder.rb +21 -0
  115. data/app/services/geo_works/discovery/document_builder/date_builder.rb +53 -0
  116. data/app/services/geo_works/discovery/document_builder/document_helper.rb +10 -0
  117. data/app/services/geo_works/discovery/document_builder/document_path.rb +91 -0
  118. data/app/services/geo_works/discovery/document_builder/layer_info_builder.rb +65 -0
  119. data/app/services/geo_works/discovery/document_builder/references_builder.rb +101 -0
  120. data/app/services/geo_works/discovery/document_builder/slug_builder.rb +24 -0
  121. data/app/services/geo_works/discovery/document_builder/spatial_builder.rb +37 -0
  122. data/app/services/geo_works/discovery/document_builder/wxs.rb +76 -0
  123. data/app/services/geo_works/discovery/geoblacklight_document.rb +152 -0
  124. data/app/services/geo_works/events_generator.rb +24 -0
  125. data/app/services/geo_works/events_generator/composite_generator.rb +18 -0
  126. data/app/services/geo_works/events_generator/geoblacklight_event_generator.rb +53 -0
  127. data/app/services/geo_works/events_generator/geoserver_event_generator.rb +33 -0
  128. data/app/services/geo_works/file_set_derivatives_service.rb +67 -0
  129. data/app/services/geo_works/image_format_service.rb +6 -0
  130. data/app/services/geo_works/metadata_format_service.rb +6 -0
  131. data/app/services/geo_works/raster_format_service.rb +6 -0
  132. data/app/services/geo_works/vector_format_service.rb +6 -0
  133. data/app/services/hyrax/curation_concern.rb +18 -0
  134. data/app/values/geo_works/coverage.rb +36 -0
  135. data/app/values/geo_works/time_period.rb +30 -0
  136. data/app/views/geo_works/_attribute_rows.html.erb +4 -0
  137. data/app/views/geo_works/_form_progress.html.erb +50 -0
  138. data/app/views/geo_works/_guts4form.html.erb +47 -0
  139. data/app/views/geo_works/_member.html.erb +11 -0
  140. data/app/views/geo_works/_metadata.html.erb +13 -0
  141. data/app/views/geo_works/_relationships.html.erb +12 -0
  142. data/app/views/geo_works/_representative_media.html.erb +5 -0
  143. data/app/views/geo_works/file_sets/_form.html.erb +48 -0
  144. data/app/views/geo_works/file_sets/actions/_default_actions.html.erb +16 -0
  145. data/app/views/geo_works/file_sets/actions/_image_actions.html.erb +22 -0
  146. data/app/views/geo_works/file_sets/actions/_metadata_actions.html.erb +16 -0
  147. data/app/views/geo_works/file_sets/actions/_raster_actions.html.erb +25 -0
  148. data/app/views/geo_works/file_sets/actions/_vector_actions.html.erb +25 -0
  149. data/app/views/geo_works/file_sets/media_display/_geo.html.erb +16 -0
  150. data/app/views/geo_works/file_sets/new.html.erb +12 -0
  151. data/app/views/geo_works/related/_child_member.html.erb +13 -0
  152. data/app/views/geo_works/related/_child_works.html.erb +24 -0
  153. data/app/views/geo_works/related/_external_metadata_file_member.html.erb +11 -0
  154. data/app/views/geo_works/related/_external_metadata_files.html.erb +24 -0
  155. data/app/views/geo_works/related/_geo_files.html.erb +24 -0
  156. data/app/views/geo_works/related/_new_child_member.html.erb +22 -0
  157. data/app/views/geo_works/related/_new_parent_member.html.erb +13 -0
  158. data/app/views/geo_works/related/_parent_member.html.erb +13 -0
  159. data/app/views/geo_works/related/_parent_works.html.erb +22 -0
  160. data/app/views/hyrax/image_works/_file_actions.html.erb +8 -0
  161. data/app/views/hyrax/image_works/_form.html.erb +16 -0
  162. data/app/views/hyrax/image_works/_image_actions.html.erb +11 -0
  163. data/app/views/hyrax/image_works/_image_work.html.erb +2 -0
  164. data/app/views/hyrax/image_works/_show_actions.html.erb +22 -0
  165. data/app/views/hyrax/image_works/show.html.erb +31 -0
  166. data/app/views/hyrax/raster_works/_file_actions.html.erb +8 -0
  167. data/app/views/hyrax/raster_works/_form.html.erb +16 -0
  168. data/app/views/hyrax/raster_works/_raster_actions.html.erb +11 -0
  169. data/app/views/hyrax/raster_works/_raster_work.html.erb +2 -0
  170. data/app/views/hyrax/raster_works/_show_actions.html.erb +22 -0
  171. data/app/views/hyrax/raster_works/show.html.erb +31 -0
  172. data/app/views/hyrax/vector_works/_file_actions.html.erb +8 -0
  173. data/app/views/hyrax/vector_works/_form.html.erb +16 -0
  174. data/app/views/hyrax/vector_works/_show_actions.html.erb +22 -0
  175. data/app/views/hyrax/vector_works/_vector_actions.html.erb +11 -0
  176. data/app/views/hyrax/vector_works/_vector_work.html.erb +2 -0
  177. data/app/views/hyrax/vector_works/show.html.erb +31 -0
  178. data/app/views/records/edit_fields/_coverage.html.erb +3 -0
  179. data/app/views/records/edit_fields/_should_populate_metadata.html.erb +10 -0
  180. data/app/vocabs/geo_works/geo_terms.rb +12 -0
  181. data/config/discovery/geoblacklight-schema.json +214 -0
  182. data/config/fcrepo_wrapper_test.yml +3 -0
  183. data/config/geoblacklight.yml +12 -0
  184. data/config/geoserver.yml +27 -0
  185. data/config/initializers/geo_server.rb +17 -0
  186. data/config/initializers/geoblacklight_config.rb +18 -0
  187. data/config/initializers/simpler_tiles.rb +65 -0
  188. data/config/locales/image_work.en.yml +8 -0
  189. data/config/locales/raster_work.en.yml +8 -0
  190. data/config/locales/vector_work.en.yml +8 -0
  191. data/config/routes.rb +24 -0
  192. data/config/simpler_tiles.yml +24 -0
  193. data/config/solr_wrapper_test.yml +7 -0
  194. data/docker-compose-full.yml +30 -0
  195. data/docker-compose.yml +9 -0
  196. data/geo_works.gemspec +44 -0
  197. data/lib/generators/geo_works/install_generator.rb +152 -0
  198. data/lib/generators/geo_works/templates/actors/hyrax/actors/image_work_actor.rb +6 -0
  199. data/lib/generators/geo_works/templates/actors/hyrax/actors/raster_work_actor.rb +6 -0
  200. data/lib/generators/geo_works/templates/actors/hyrax/actors/vector_work_actor.rb +6 -0
  201. data/lib/generators/geo_works/templates/config/authorities/image_formats.yml +7 -0
  202. data/lib/generators/geo_works/templates/config/authorities/metadata_formats.yml +7 -0
  203. data/lib/generators/geo_works/templates/config/authorities/raster_formats.yml +13 -0
  204. data/lib/generators/geo_works/templates/config/authorities/vector_formats.yml +7 -0
  205. data/lib/generators/geo_works/templates/config/initializers/hyrax_derivative_path_monkey_patch.rb +18 -0
  206. data/lib/generators/geo_works/templates/controllers/hyrax/file_sets_controller.rb +7 -0
  207. data/lib/generators/geo_works/templates/controllers/hyrax/image_works_controller.rb +7 -0
  208. data/lib/generators/geo_works/templates/controllers/hyrax/raster_works_controller.rb +8 -0
  209. data/lib/generators/geo_works/templates/controllers/hyrax/vector_works_controller.rb +8 -0
  210. data/lib/generators/geo_works/templates/geo_works.js +1 -0
  211. data/lib/generators/geo_works/templates/geo_works.scss +3 -0
  212. data/lib/generators/geo_works/templates/models/file_set.rb +4 -0
  213. data/lib/generators/geo_works/templates/models/image_work.rb +7 -0
  214. data/lib/generators/geo_works/templates/models/raster_work.rb +8 -0
  215. data/lib/generators/geo_works/templates/models/vector_work.rb +8 -0
  216. data/lib/generators/geo_works/templates/presenters/file_set_presenter.rb +3 -0
  217. data/lib/generators/geo_works/templates/spec/actor_spec.rb.erb +9 -0
  218. data/lib/generators/geo_works/templates/spec/controller_spec.rb.erb +9 -0
  219. data/lib/generators/geo_works/templates/spec/model_spec.rb.erb +9 -0
  220. data/lib/geo_works.rb +9 -0
  221. data/lib/geo_works/engine.rb +4 -0
  222. data/lib/geo_works/version.rb +3 -0
  223. data/lib/tasks/geo_works_tasks.rake +4 -0
  224. data/run-docker.sh +16 -0
  225. data/solr/config/_rest_managed.json +3 -0
  226. data/solr/config/admin-extra.html +31 -0
  227. data/solr/config/elevate.xml +36 -0
  228. data/solr/config/mapping-ISOLatin1Accent.txt +246 -0
  229. data/solr/config/protwords.txt +21 -0
  230. data/solr/config/schema.xml +372 -0
  231. data/solr/config/scripts.conf +24 -0
  232. data/solr/config/solrconfig.xml +321 -0
  233. data/solr/config/spellings.txt +2 -0
  234. data/solr/config/stopwords.txt +58 -0
  235. data/solr/config/stopwords_en.txt +58 -0
  236. data/solr/config/synonyms.txt +31 -0
  237. data/solr/config/xslt/example.xsl +132 -0
  238. data/solr/config/xslt/example_atom.xsl +67 -0
  239. data/solr/config/xslt/example_rss.xsl +66 -0
  240. data/solr/config/xslt/luke.xsl +337 -0
  241. data/spec/controllers/file_sets_controller_spec.rb +70 -0
  242. data/spec/controllers/image_works_controller_spec.rb +40 -0
  243. data/spec/controllers/raster_works_controller_spec.rb +36 -0
  244. data/spec/controllers/vector_works_controller_spec.rb +69 -0
  245. data/spec/factories/collections.rb +17 -0
  246. data/spec/factories/external_metadata_files.rb +20 -0
  247. data/spec/factories/image_files.rb +32 -0
  248. data/spec/factories/image_works.rb +69 -0
  249. data/spec/factories/permission_templates.rb +41 -0
  250. data/spec/factories/raster_files.rb +35 -0
  251. data/spec/factories/raster_works.rb +88 -0
  252. data/spec/factories/sipity_entities.rb +7 -0
  253. data/spec/factories/users.rb +26 -0
  254. data/spec/factories/vector_files.rb +31 -0
  255. data/spec/factories/vector_works.rb +84 -0
  256. data/spec/factories/workflow_states.rb +6 -0
  257. data/spec/factories/workflows.rb +6 -0
  258. data/spec/features/create_image_work_spec.rb +34 -0
  259. data/spec/features/create_raster_work_spec.rb +35 -0
  260. data/spec/features/create_vector_work_spec.rb +34 -0
  261. data/spec/features/image_work_show_spec.rb +62 -0
  262. data/spec/features/raster_work_show_spec.rb +62 -0
  263. data/spec/features/vector_work_show_spec.rb +61 -0
  264. data/spec/forms/geo_works/basic_geo_metadata_form_spec.rb +31 -0
  265. data/spec/forms/geo_works/external_metadata_file_form_spec.rb +30 -0
  266. data/spec/forms/geo_works/georeferenced_form_spec.rb +33 -0
  267. data/spec/forms/hyrax/image_work_form_spec.rb +11 -0
  268. data/spec/forms/hyrax/raster_work_form_spec.rb +17 -0
  269. data/spec/forms/hyrax/vector_work_form_spec.rb +17 -0
  270. data/spec/helpers/bounding_box_helper_spec.rb +39 -0
  271. data/spec/helpers/geo_works/file_set_actions_helper_spec.rb +70 -0
  272. data/spec/helpers/geo_works/populate_metadata_helper_spec.rb +31 -0
  273. data/spec/helpers/geo_works_helper_spec.rb +30 -0
  274. data/spec/jobs/geoblacklight_job_spec.rb +18 -0
  275. data/spec/jobs/geoserver_delivery_job_spec.rb +45 -0
  276. data/spec/models/concerns/basic_geo_metadata_spec.rb +21 -0
  277. data/spec/models/concerns/geo_works/file_set/derivatives_spec.rb +102 -0
  278. data/spec/models/concerns/geo_works/file_set/geo_file_format_behavior_spec.rb +56 -0
  279. data/spec/models/external_metadata_file_spec.rb +118 -0
  280. data/spec/models/file_set_spec.rb +9 -0
  281. data/spec/models/image_file_spec.rb +48 -0
  282. data/spec/models/image_work_spec.rb +71 -0
  283. data/spec/models/raster_file_spec.rb +48 -0
  284. data/spec/models/raster_work_spec.rb +122 -0
  285. data/spec/models/solr_document_spec.rb +41 -0
  286. data/spec/models/vector_file_spec.rb +48 -0
  287. data/spec/models/vector_work_spec.rb +109 -0
  288. data/spec/presenters/file_set_presenter_spec.rb +13 -0
  289. data/spec/presenters/geo_works_show_presenter_spec.rb +46 -0
  290. data/spec/presenters/image_work_show_presenter_spec.rb +51 -0
  291. data/spec/presenters/raster_work_show_presenter_spec.rb +74 -0
  292. data/spec/presenters/vector_work_show_presenter_spec.rb +41 -0
  293. data/spec/processors/geo_works/geoblacklight_event_processor_spec.rb +80 -0
  294. data/spec/processors/geo_works/processors/base_geo_processor_spec.rb +115 -0
  295. data/spec/processors/geo_works/processors/gdal_spec.rb +59 -0
  296. data/spec/processors/geo_works/processors/image_spec.rb +64 -0
  297. data/spec/processors/geo_works/processors/ogr_spec.rb +36 -0
  298. data/spec/processors/geo_works/processors/raster/aig_spec.rb +35 -0
  299. data/spec/processors/geo_works/processors/raster/base_spec.rb +54 -0
  300. data/spec/processors/geo_works/processors/raster/dem_spec.rb +30 -0
  301. data/spec/processors/geo_works/processors/raster/info_spec.rb +35 -0
  302. data/spec/processors/geo_works/processors/raster/processor_spec.rb +39 -0
  303. data/spec/processors/geo_works/processors/rendering_spec.rb +64 -0
  304. data/spec/processors/geo_works/processors/vector/base_spec.rb +54 -0
  305. data/spec/processors/geo_works/processors/vector/info_spec.rb +50 -0
  306. data/spec/processors/geo_works/processors/vector/processor_spec.rb +28 -0
  307. data/spec/processors/geo_works/processors/vector/shapefile_spec.rb +17 -0
  308. data/spec/processors/geo_works/processors/zip_spec.rb +39 -0
  309. data/spec/renderers/geo_works/coverage_renderer_spec.rb +21 -0
  310. data/spec/services/geo_works/delivery/geoserver_spec.rb +117 -0
  311. data/spec/services/geo_works/delivery_service_spec.rb +24 -0
  312. data/spec/services/geo_works/discovery/abstract_document_spec.rb +23 -0
  313. data/spec/services/geo_works/discovery/document_builder/basic_metadata_builder_spec.rb +35 -0
  314. data/spec/services/geo_works/discovery/document_builder/wxs_spec.rb +71 -0
  315. data/spec/services/geo_works/discovery/document_builder_spec.rb +220 -0
  316. data/spec/services/geo_works/discovery/geoblacklight_document_spec.rb +20 -0
  317. data/spec/services/geo_works/event_generator_spec.rb +18 -0
  318. data/spec/services/geo_works/events_generator/geoblacklight_event_generator_spec.rb +84 -0
  319. data/spec/services/geo_works/events_generator/geoserver_event_generator_spec.rb +22 -0
  320. data/spec/services/geo_works/raster_format_service_spec.rb +13 -0
  321. data/spec/services/hyrax/derivative_path_spec.rb +26 -0
  322. data/spec/spec_helper.rb +77 -0
  323. data/spec/support/backport_test.rb +14 -0
  324. data/spec/support/controllers/engine_helpers.rb +7 -0
  325. data/spec/support/database_cleaner.rb +18 -0
  326. data/spec/support/factory_girl.rb +3 -0
  327. data/spec/support/features.rb +14 -0
  328. data/spec/support/features/session_helpers.rb +40 -0
  329. data/spec/support/fixture_reader.rb +7 -0
  330. data/spec/support/helpers/controller_level_helpers.rb +27 -0
  331. data/spec/support/views/test_view_helpers.rb +10 -0
  332. data/spec/test_app_templates/lib/generators/test_app_generator.rb +24 -0
  333. data/spec/values/coverage_spec.rb +40 -0
  334. data/tasks/geo_works.rake +39 -0
  335. data/template.rb +10 -0
  336. metadata +789 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4a1737df47d44ca90d1543e68d4da11a9e8d52fb
4
+ data.tar.gz: c2b0f3541af157a7693b51121e3cd62b8246c7a0
5
+ SHA512:
6
+ metadata.gz: cc4d0aac4f4db6adf7c47911a6a0cd35ee331d7550b479713235284c78ea13f8830fcf0341bf49675a49332eedb731b382638a508844b2aadbbc288cea26416f
7
+ data.tar.gz: 70babb163d2742eae1cbe84636b4f459c6dcd84218143d50b0e565d67a7dd923c0568ffc9da9c3752a165b7f174266c8a0167998fac37239aafdfd70b8c9fb64
data/.codeclimate.yml ADDED
@@ -0,0 +1,34 @@
1
+ ---
2
+ engines:
3
+ brakeman:
4
+ enabled: true
5
+ csslint:
6
+ enabled: true
7
+ duplication:
8
+ enabled: true
9
+ config:
10
+ languages:
11
+ - ruby
12
+ - javascript
13
+ eslint:
14
+ enabled: true
15
+ fixme:
16
+ enabled: true
17
+ rubocop:
18
+ enabled: true
19
+ ratings:
20
+ paths:
21
+ - Gemfile.lock
22
+ - "**.erb"
23
+ - "**.haml"
24
+ - "**.rb"
25
+ - "**.rhtml"
26
+ - "**.slim"
27
+ - "**.css"
28
+ - "**.inc"
29
+ - "**.js"
30
+ - "**.jsx"
31
+ - "**.module"
32
+ exclude_paths:
33
+ - config/
34
+ - spec/
data/.csslintrc ADDED
@@ -0,0 +1,2 @@
1
+ --exclude-exts=.min.css
2
+ --ignore=adjoining-classes,box-model,ids,order-alphabetical,unqualified-attributes
data/.engine_cart.yml ADDED
@@ -0,0 +1 @@
1
+ rails_options: "<%= '--skip-listen' if ENV.fetch('RAILS_VERSION', '') < '5.0' %>"
data/.eslintignore ADDED
@@ -0,0 +1 @@
1
+ **/*{.,-}min.js
data/.eslintrc ADDED
@@ -0,0 +1,8 @@
1
+ // Use this file as a starting point for your project's .eslintrc.
2
+ // Copy this file, and add rule overrides as needed.
3
+ {
4
+ "extends": "airbnb",
5
+ "env": {
6
+ "jquery": true
7
+ }
8
+ }
data/.fcrepo_wrapper ADDED
@@ -0,0 +1,3 @@
1
+ # Place any default configuration for fcrepo_wrapper here
2
+ port: 8984
3
+ enable_jms: false
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ .bundle/
2
+ log/*.log
3
+ pkg/
4
+ test/dummy/db/*.sqlite3
5
+ test/dummy/db/*.sqlite3-journal
6
+ test/dummy/log/*.log
7
+ test/dummy/tmp/
8
+ test/dummy/.sass-cache
9
+
10
+ .internal_test_app
11
+ fcrepo4*-data
12
+ Gemfile.lock
13
+ coverage
14
+ dump.rdb
data/.rubocop.yml ADDED
@@ -0,0 +1,105 @@
1
+ require: rubocop-rspec
2
+
3
+ Rails:
4
+ Enabled: true
5
+
6
+ AllCops:
7
+ UseCache: false
8
+ DisplayCopNames: true
9
+ Include:
10
+ - '**/Rakefile'
11
+ - '**/config.ru'
12
+ Exclude:
13
+ - 'db/**/*'
14
+ - 'script/**/*'
15
+ - 'vendor/**/*'
16
+ - 'bin/**/*'
17
+ - 'spec/internal/**/*'
18
+ - 'misc/**/*'
19
+
20
+ Lint/UselessAssignment:
21
+ Exclude:
22
+ - 'spec/factories/*.rb'
23
+
24
+ Metrics/LineLength:
25
+ Max: 100
26
+ Exclude:
27
+ - 'app/models/concerns/geo_works/extractors/iso19139_helper.rb'
28
+ - 'app/helpers/metadata_extraction_helper.rb'
29
+ - 'app/models/concerns/file_set/image_file_behavior.rb'
30
+ - 'app/models/concerns/file_set/raster_file_behavior.rb'
31
+ - 'app/models/concerns/file_set/vector_file_behavior.rb'
32
+ - 'app/models/concerns/georeferenced_behavior.rb'
33
+ - 'app/models/solr_document.rb'
34
+ - 'app/schemas/geo_works/basic_geo_metadata_required.rb'
35
+ - 'app/services/geo_works/discovery/geoblacklight_document.rb'
36
+ - 'config/**/*.rb'
37
+ - 'app/values/geo_works/coverage.rb'
38
+ - 'app/values/geo_works/time_period.rb'
39
+ - 'lib/geo_works/fgdc_metadata_extractor.rb'
40
+ - 'lib/generators/geo_works/install_generator.rb'
41
+ - 'spec/**/*.rb'
42
+
43
+ Metrics/AbcSize:
44
+ Exclude:
45
+ - 'app/models/concerns/geo_works/extractors/iso19139_helper.rb'
46
+ - 'lib/geo_works/fgdc_metadata_extractor.rb'
47
+
48
+ Metrics/MethodLength:
49
+ Exclude:
50
+ - 'Rakefile'
51
+ - 'app/models/concerns/geo_works/extractors/iso19139_helper.rb'
52
+ - 'app/services/geo_works/file_set_derivatives_service.rb'
53
+
54
+ Metrics/ClassLength:
55
+ Exclude:
56
+ - 'app/controllers/catalog_controller.rb'
57
+ - 'lib/generators/geo_works/install_generator.rb'
58
+
59
+ Style/BlockDelimiters:
60
+ Exclude:
61
+ - 'spec/**/*'
62
+
63
+ Style/MultilineBlockLayout:
64
+ Exclude:
65
+ - 'spec/**/*'
66
+
67
+ Style/IndentationConsistency:
68
+ EnforcedStyle: rails
69
+
70
+ Style/CollectionMethods:
71
+ PreferredMethods:
72
+ collect: 'map'
73
+ collect!: 'map!'
74
+ inject: 'reduce'
75
+ detect: 'find'
76
+ find_all: 'select'
77
+
78
+ Style/WordArray:
79
+ Enabled: false
80
+
81
+ Style/StringLiterals:
82
+ Enabled: false
83
+
84
+ Style/Documentation:
85
+ Enabled: false
86
+
87
+ Style/GlobalVars:
88
+ Exclude:
89
+ - 'spec/spec_helper.rb'
90
+
91
+ RSpec/ExampleWording:
92
+ CustomTransform:
93
+ be: is
94
+ have: has
95
+ not: does not
96
+ NOT: does NOT
97
+ IgnoredWords:
98
+ - only
99
+
100
+ RSpec/FilePath:
101
+ Enabled: false
102
+
103
+ RSpec/DescribeClass:
104
+ Exclude:
105
+ - 'spec/features/**/*'
data/.solr_wrapper ADDED
@@ -0,0 +1,7 @@
1
+ # Place any default configuration for solr_wrapper here
2
+ version: 6.2.0
3
+ port: 8983
4
+ collection:
5
+ persist: true
6
+ dir: solr/config/
7
+ name: hydra-development
data/.travis.yml ADDED
@@ -0,0 +1,33 @@
1
+ language: ruby
2
+ cache: bundler
3
+ sudo: true
4
+ rvm:
5
+ - 2.3.1 # latest release
6
+ jdk:
7
+ - oraclejdk8
8
+ env:
9
+ global:
10
+ - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
11
+ matrix:
12
+ - RAILS_VERSION=5.0.0.1
13
+ RDF_VERSION=2.1.0
14
+ before_install:
15
+ - git clone https://github.com/propublica/simple-tiles.git
16
+ - cd simple-tiles
17
+ - ./configure && make
18
+ - sudo make install
19
+ - cd ..
20
+ - gem install bundler -v 1.13.1 # hopefully temporary
21
+ install: bundle install --jobs=3 --retry=3
22
+ before_script:
23
+ - gdalinfo --version
24
+ services:
25
+ - redis-server
26
+ addons:
27
+ apt:
28
+ packages:
29
+ - libgdal1h
30
+ - libgdal-dev
31
+ - gdal-bin
32
+ - libcairo2-dev
33
+ - libpango1.0-dev
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,159 @@
1
+ # How to Contribute
2
+
3
+ We want your help to make Project Hydra great.
4
+ There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
5
+
6
+ ## Code of Conduct
7
+
8
+ The Hydra community is dedicated to providing a welcoming and positive experience for all its
9
+ members, whether they are at a formal gathering, in a social setting, or taking part in activities
10
+ online. Please see our [Code of Conduct](https://wiki.duraspace.org/display/hydra/Code+of+Conduct)
11
+ for more information.
12
+
13
+ ## Hydra Project Intellectual Property Licensing and Ownership
14
+
15
+ All code contributors must have an Individual Contributor License Agreement (iCLA) on file with the Hydra Project Steering Group.
16
+ If the contributor works for an institution, the institution must have a Corporate Contributor License Agreement (cCLA) on file.
17
+
18
+ https://wiki.duraspace.org/display/hydra/Hydra+Project+Intellectual+Property+Licensing+and+Ownership
19
+
20
+ You should also add yourself to the `CONTRIBUTORS.md` file in the root of the project.
21
+
22
+ ## Contribution Tasks
23
+
24
+ * Reporting Issues
25
+ * Making Changes
26
+ * Documenting Code
27
+ * Committing Changes
28
+ * Submitting Changes
29
+ * Reviewing and Merging Changes
30
+
31
+ ### Reporting Issues
32
+
33
+ * Make sure you have a [GitHub account](https://github.com/signup/free)
34
+ * Submit a [Github issue](./issues) by:
35
+ * Clearly describing the issue
36
+ * Provide a descriptive summary
37
+ * Explain the expected behavior
38
+ * Explain the actual behavior
39
+ * Provide steps to reproduce the actual behavior
40
+
41
+ ### Making Changes
42
+
43
+ * Fork the repository on GitHub
44
+ * Create a topic branch from where you want to base your work.
45
+ * This is usually the master branch.
46
+ * To quickly create a topic branch based on master; `git branch fix/master/my_contribution master`
47
+ * Then checkout the new branch with `git checkout fix/master/my_contribution`.
48
+ * Please avoid working directly on the `master` branch.
49
+ * You may find the [hub suite of commands](https://github.com/defunkt/hub) helpful
50
+ * Make sure you have added sufficient tests and documentation for your changes.
51
+ * Test functionality with RSpec; est features / UI with Capybara.
52
+ * Run _all_ the tests to assure nothing else was accidentally broken.
53
+
54
+ ### Documenting Code
55
+
56
+ * All new public methods, modules, and classes should include inline documentation in [YARD](http://yardoc.org/).
57
+ * Documentation should seek to answer the question "why does this code exist?"
58
+ * Document private / protected methods as desired.
59
+ * If you are working in a file with no prior documentation, do try to document as you gain understanding of the code.
60
+ * If you don't know exactly what a bit of code does, it is extra likely that it needs to be documented. Take a stab at it and ask for feedback in your pull request. You can use the 'blame' button on GitHub to identify the original developer of the code and @mention them in your comment.
61
+ * This work greatly increases the usability of the code base and supports the on-ramping of new committers.
62
+ * We will all be understanding of one another's time constraints in this area.
63
+ * YARD examples:
64
+ * [Hydra::Works::RemoveGenericFile](https://github.com/projecthydra-labs/hydra-works/blob/master/lib/hydra/works/services/generic_work/remove_generic_file.rb)
65
+ * [ActiveTriples::LocalName::Minter](https://github.com/ActiveTriples/active_triples-local_name/blob/master/lib/active_triples/local_name/minter.rb)
66
+ * [Getting started with YARD](http://www.rubydoc.info/gems/yard/file/docs/GettingStarted.md)
67
+
68
+ ### Committing changes
69
+
70
+ * Make commits of logical units.
71
+ * Your commit should include a high level description of your work in HISTORY.textile
72
+ * Check for unnecessary whitespace with `git diff --check` before committing.
73
+ * Make sure your commit messages are [well formed](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
74
+ * If you created an issue, you can close it by including "Closes #issue" in your commit message. See [Github's blog post for more details](https://github.com/blog/1386-closing-issues-via-commit-messages)
75
+
76
+ ```
77
+ Present tense short summary (50 characters or less)
78
+
79
+ More detailed description, if necessary. It should be wrapped to 72
80
+ characters. Try to be as descriptive as you can, even if you think that
81
+ the commit content is obvious, it may not be obvious to others. You
82
+ should add such description also if it's already present in bug tracker,
83
+ it should not be necessary to visit a webpage to check the history.
84
+
85
+ Include Closes #<issue-number> when relavent.
86
+
87
+ Description can have multiple paragraphs and you can use code examples
88
+ inside, just indent it with 4 spaces:
89
+
90
+ class PostsController
91
+ def index
92
+ respond_to do |wants|
93
+ wants.html { render 'index' }
94
+ end
95
+ end
96
+ end
97
+
98
+ You can also add bullet points:
99
+
100
+ - you can use dashes or asterisks
101
+
102
+ - also, try to indent next line of a point for readability, if it's too
103
+ long to fit in 72 characters
104
+ ```
105
+
106
+ ### Submitting Changes
107
+
108
+ * Read the article ["Using Pull Requests"](https://help.github.com/articles/using-pull-requests) on GitHub.
109
+ * Make sure your branch is up to date with its parent branch (i.e. master)
110
+ * `git checkout master`
111
+ * `git pull --rebase`
112
+ * `git checkout <your-branch>`
113
+ * `git rebase master`
114
+ * It is a good idea to run your tests again.
115
+ * If you've made more than one commit take a moment to consider whether squashing commits together would help improve their logical grouping.
116
+ * [Detailed Walkthrough of One Pull Request per Commit](http://ndlib.github.io/practices/one-commit-per-pull-request/)
117
+ * `git rebase --interactive master` ([See Github help](https://help.github.com/articles/interactive-rebase))
118
+ * Squashing your branch's changes into one commit is "good form" and helps the person merging your request to see everything that is going on.
119
+ * Push your changes to a topic branch in your fork of the repository.
120
+ * Submit a pull request from your fork to the project.
121
+
122
+ ### Reviewing and Merging Changes
123
+
124
+ We adopted [Github's Pull Request Review](https://help.github.com/articles/about-pull-request-reviews/) for our repositories.
125
+ Common checks that may occur in our repositories:
126
+
127
+ 1. Travis CI - where our automated tests are running
128
+ 2. Hound CI - where we check for style violations
129
+ 3. Approval Required - Github enforces at least one person approve a pull request. Also, all reviewers that have chimed in must approve.
130
+ 4. CodeClimate - is our code remaining healthy (at least according to static code analysis)
131
+
132
+ If one or more of the required checks failed (or are incomplete), the code should not be merged (and the UI will not allow it). If all of the checks have passed, then anyone on the project (including the pull request submitter) may merge the code.
133
+
134
+ *Example: Carolyn submits a pull request, Justin reviews the pull request and approves. However, Justin is still waiting on other checks (Travis CI is usually the culprit), so he does not merge the pull request. Eventually, all of the checks pass. At this point, Carolyn or anyone else may merge the pull request.*
135
+
136
+ #### Things to Consider When Reviewing
137
+
138
+ First, the person contributing the code is putting themselves out there. Be mindful of what you say in a review.
139
+
140
+ * Ask clarifying questions
141
+ * State your understanding and expectations
142
+ * Provide example code or alternate solutions, and explain why
143
+
144
+ This is your chance for a mentoring moment of another developer. Take time to give an honest and thorough review of what has changed. Things to consider:
145
+
146
+ * Does the commit message explain what is going on?
147
+ * Does the code changes have tests? _Not all changes need new tests, some changes are refactors_
148
+ * Do new or changed methods, modules, and classes have documentation?
149
+ * Does the commit contain more than it should? Are two separate concerns being addressed in one commit?
150
+ * Does the description of the new/changed specs match your understanding of what the spec is doing?
151
+
152
+ If you are uncertain, bring other contributors into the conversation by assigning them as a reviewer.
153
+
154
+ # Additional Resources
155
+
156
+ * [General GitHub documentation](http://help.github.com/)
157
+ * [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
158
+ * [Pro Git](http://git-scm.com/book) is both a free and excellent book about Git.
159
+ * [A Git Config for Contributing](http://ndlib.github.io/practices/my-typical-per-project-git-config/)
data/Gemfile ADDED
@@ -0,0 +1,48 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Declare your gem's dependencies in geo_works.gemspec.
4
+ # Bundler will treat runtime dependencies like base dependencies, and
5
+ # development dependencies will be added by default to the :development group.
6
+ gemspec
7
+
8
+ group :development, :test do
9
+ # Peg simplecov to < 0.8 until this is resolved:
10
+ # https://github.com/colszowka/simplecov/issues/281
11
+ gem 'simplecov', '~> 0.9', require: false
12
+ gem 'coveralls', require: false
13
+ end
14
+
15
+ # BEGIN ENGINE_CART BLOCK
16
+ # engine_cart: 1.0.0
17
+ # engine_cart stanza: 0.10.0
18
+ # the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app.
19
+ file = File.expand_path('Gemfile', ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path('.internal_test_app', File.dirname(__FILE__)))
20
+ if File.exist?(file)
21
+ begin
22
+ eval_gemfile file
23
+ rescue Bundler::GemfileError => e
24
+ Bundler.ui.warn '[EngineCart] Skipping Rails application dependencies:'
25
+ Bundler.ui.warn e.message
26
+ end
27
+ else
28
+ Bundler.ui.warn "[EngineCart] Unable to find test application dependencies in #{file}, using placeholder dependencies"
29
+
30
+ if ENV['RAILS_VERSION']
31
+ if ENV['RAILS_VERSION'] == 'edge'
32
+ gem 'rails', github: 'rails/rails'
33
+ ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks'
34
+ else
35
+ gem 'rails', ENV['RAILS_VERSION']
36
+ end
37
+ end
38
+
39
+ case ENV['RAILS_VERSION']
40
+ when /^4.2/
41
+ gem 'responders', '~> 2.0'
42
+ gem 'sass-rails', '>= 5.0'
43
+ gem 'coffee-rails', '~> 4.1.0'
44
+ when /^4.[01]/
45
+ gem 'sass-rails', '< 5.0'
46
+ end
47
+ end
48
+ # END ENGINE_CART BLOCK
data/LICENSE ADDED
@@ -0,0 +1,202 @@
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.
202
+