geoblacklight 2.4.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +142 -0
  3. data/.gitignore +8 -0
  4. data/.rubocop.yml +24 -23
  5. data/.rubocop_todo.yml +398 -12
  6. data/README.md +3 -3
  7. data/Rakefile +13 -4
  8. data/app/assets/images/favicon.ico +0 -0
  9. data/app/assets/javascripts/geoblacklight/downloaders/downloader.js +1 -1
  10. data/app/assets/javascripts/geoblacklight/geoblacklight.js +18 -1
  11. data/app/assets/javascripts/geoblacklight/modules/bookmarks.js +43 -0
  12. data/app/assets/javascripts/geoblacklight/modules/metadata_download_button.js +6 -1
  13. data/app/assets/javascripts/geoblacklight/modules/results.js +7 -8
  14. data/app/assets/javascripts/geoblacklight/modules/svg_tooltips.js +31 -0
  15. data/app/assets/javascripts/geoblacklight/modules/util.js +5 -0
  16. data/app/assets/javascripts/geoblacklight/viewers/esri.js +3 -3
  17. data/app/assets/javascripts/geoblacklight/viewers/esri/tiled_map_layer.js +1 -1
  18. data/app/assets/javascripts/geoblacklight/viewers/index_map.js +1 -1
  19. data/app/assets/javascripts/geoblacklight/viewers/map.js +12 -2
  20. data/app/assets/javascripts/geoblacklight/viewers/tms.js +10 -0
  21. data/app/assets/javascripts/geoblacklight/viewers/wms.js +3 -3
  22. data/app/assets/stylesheets/geoblacklight/geoblacklight.scss +2 -0
  23. data/app/assets/stylesheets/geoblacklight/modules/_base.scss +33 -0
  24. data/app/assets/stylesheets/geoblacklight/{_blacklight_overrides.scss → modules/_blacklight_overrides.scss} +1 -1
  25. data/app/assets/stylesheets/geoblacklight/{_styles.scss → modules/_styles.scss} +1 -0
  26. data/app/assets/stylesheets/geoblacklight/modules/downloads.scss +37 -54
  27. data/app/assets/stylesheets/geoblacklight/modules/item.scss +1 -0
  28. data/app/assets/stylesheets/geoblacklight/modules/results.scss +17 -29
  29. data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +12 -42
  30. data/app/assets/stylesheets/geoblacklight/modules/toolbar.scss +17 -59
  31. data/app/controllers/download_controller.rb +12 -12
  32. data/app/controllers/relation_controller.rb +1 -0
  33. data/app/controllers/wms_controller.rb +1 -0
  34. data/app/helpers/arcgis_helper.rb +1 -0
  35. data/app/helpers/blacklight_helper.rb +1 -0
  36. data/app/helpers/carto_helper.rb +1 -0
  37. data/app/helpers/geoblacklight_helper.rb +37 -72
  38. data/app/models/concerns/geoblacklight/solr_document.rb +15 -19
  39. data/app/models/concerns/geoblacklight/solr_document/arcgis.rb +2 -1
  40. data/app/models/concerns/geoblacklight/solr_document/carto.rb +1 -13
  41. data/app/models/concerns/geoblacklight/solr_document/citation.rb +1 -0
  42. data/app/models/concerns/geoblacklight/solr_document/finder.rb +1 -0
  43. data/app/models/concerns/geoblacklight/solr_document/inspection.rb +2 -1
  44. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +6 -4
  45. data/app/presenters/geoblacklight/document_presenter.rb +2 -1
  46. data/app/views/catalog/_arcgis.html.erb +4 -0
  47. data/app/views/catalog/_carto.html.erb +4 -0
  48. data/app/views/catalog/_document_split.html.erb +1 -1
  49. data/app/views/catalog/_downloads_primary.html.erb +8 -1
  50. data/app/views/catalog/_header_icons.html.erb +3 -3
  51. data/app/views/catalog/_home_text.html.erb +3 -0
  52. data/app/views/catalog/_index_split_default.html.erb +21 -21
  53. data/app/views/catalog/_show_default_viewer_container.html.erb +1 -1
  54. data/app/views/download/hgl.html.erb +13 -11
  55. data/app/views/relation/_ancestors.html.erb +3 -6
  56. data/app/views/relation/_descendants.html.erb +4 -7
  57. data/app/views/relation/index.html.erb +20 -8
  58. data/app/views/relation/index.json.jbuilder +2 -1
  59. data/app/views/shared/_header_navbar.html.erb +0 -2
  60. data/babel.config.json +4 -0
  61. data/bin/coverage.rb +36 -0
  62. data/config/initializers/new_gbl_settings_defaults_3_3.yml +10 -0
  63. data/config/initializers/rails_config.rb +5 -0
  64. data/config/locales/geoblacklight.en.yml +7 -2
  65. data/geoblacklight.gemspec +7 -9
  66. data/jest.config.js +25 -0
  67. data/lib/generators/geoblacklight/assets_generator.rb +46 -0
  68. data/lib/generators/geoblacklight/install_generator.rb +4 -10
  69. data/lib/generators/geoblacklight/templates/assets/_blacklight.scss +1 -0
  70. data/lib/generators/geoblacklight/templates/assets/_customizations.scss +28 -0
  71. data/{app/assets/stylesheets/geoblacklight/application.scss → lib/generators/geoblacklight/templates/assets/_geoblacklight.scss} +0 -1
  72. data/lib/generators/geoblacklight/templates/assets/application.scss +7 -0
  73. data/lib/generators/geoblacklight/templates/{geoblacklight.js → assets/geoblacklight.js} +0 -0
  74. data/lib/generators/geoblacklight/templates/catalog_controller.rb +5 -3
  75. data/lib/generators/geoblacklight/templates/settings.yml +20 -17
  76. data/lib/generators/geoblacklight/webpacker_generator.rb +1 -0
  77. data/lib/geoblacklight.rb +2 -2
  78. data/lib/geoblacklight/bounding_box.rb +2 -1
  79. data/lib/geoblacklight/catalog_helper_override.rb +1 -0
  80. data/lib/geoblacklight/constants.rb +2 -0
  81. data/lib/geoblacklight/download.rb +2 -1
  82. data/lib/geoblacklight/download/geojson_download.rb +1 -0
  83. data/lib/geoblacklight/download/geotiff_download.rb +1 -0
  84. data/lib/geoblacklight/download/hgl_download.rb +1 -0
  85. data/lib/geoblacklight/download/kmz_download.rb +3 -2
  86. data/lib/geoblacklight/download/shapefile_download.rb +1 -0
  87. data/lib/geoblacklight/engine.rb +2 -2
  88. data/lib/geoblacklight/exceptions.rb +1 -0
  89. data/lib/geoblacklight/geoblacklight_helper_behavior.rb +1 -0
  90. data/lib/geoblacklight/geometry.rb +70 -0
  91. data/lib/geoblacklight/item_viewer.rb +6 -1
  92. data/lib/geoblacklight/metadata.rb +1 -0
  93. data/lib/geoblacklight/metadata/base.rb +2 -7
  94. data/lib/geoblacklight/metadata/fgdc.rb +1 -0
  95. data/lib/geoblacklight/metadata/html.rb +2 -2
  96. data/lib/geoblacklight/metadata/iso19139.rb +1 -0
  97. data/lib/geoblacklight/metadata_transformer.rb +1 -0
  98. data/lib/geoblacklight/metadata_transformer/base.rb +1 -0
  99. data/lib/geoblacklight/metadata_transformer/fgdc.rb +1 -0
  100. data/lib/geoblacklight/metadata_transformer/iso19139.rb +1 -0
  101. data/lib/geoblacklight/reference.rb +1 -0
  102. data/lib/geoblacklight/references.rb +7 -3
  103. data/lib/geoblacklight/relation/ancestors.rb +3 -2
  104. data/lib/geoblacklight/relation/descendants.rb +2 -1
  105. data/lib/geoblacklight/relation/relation_response.rb +2 -1
  106. data/lib/geoblacklight/routes.rb +1 -0
  107. data/lib/geoblacklight/routes/downloadable.rb +1 -0
  108. data/lib/geoblacklight/routes/exportable.rb +1 -0
  109. data/lib/geoblacklight/routes/wms.rb +1 -0
  110. data/lib/geoblacklight/version.rb +2 -1
  111. data/lib/geoblacklight/view_helper_override.rb +1 -0
  112. data/lib/geoblacklight/wms_layer.rb +2 -4
  113. data/lib/geoblacklight/wms_layer/feature_info_response.rb +1 -0
  114. data/lib/tasks/geoblacklight.rake +38 -32
  115. data/package.json +17 -1
  116. data/setupJest.js +14 -0
  117. data/solr/conf/schema.xml +1 -3
  118. data/spec/config/initializers/rails_config_spec.rb +14 -0
  119. data/spec/controllers/catalog_controller_spec.rb +7 -6
  120. data/spec/controllers/download_controller_spec.rb +1 -0
  121. data/spec/controllers/relation_controller_spec.rb +1 -0
  122. data/spec/controllers/wms_controller_spec.rb +1 -0
  123. data/spec/factories/user.rb +1 -0
  124. data/spec/features/bookmarks_spec.rb +1 -0
  125. data/spec/features/configurable_basemap_spec.rb +1 -0
  126. data/spec/features/data_dictionary_download_spec.rb +1 -0
  127. data/spec/features/download_layer_spec.rb +2 -1
  128. data/spec/features/empty_search_spec.rb +1 -0
  129. data/spec/features/esri_viewer_spec.rb +1 -5
  130. data/spec/features/exports_spec.rb +4 -12
  131. data/spec/features/help_text_spec.rb +1 -0
  132. data/spec/features/home_page_spec.rb +6 -0
  133. data/spec/features/iiif_viewer_spec.rb +1 -0
  134. data/spec/features/index_map_spec.rb +1 -0
  135. data/spec/features/layer_inspection_spec.rb +1 -0
  136. data/spec/features/layer_opacity_spec.rb +1 -0
  137. data/spec/features/layer_preview_spec.rb +1 -0
  138. data/spec/features/layer_with_no_references_spec.rb +1 -0
  139. data/spec/features/linkified_attribute_table_spec.rb +1 -0
  140. data/spec/features/metadata_panel_spec.rb +1 -0
  141. data/spec/features/missing_metadata_spec.rb +1 -0
  142. data/spec/features/multiple_downloads_spec.rb +15 -0
  143. data/spec/features/oembed_spec.rb +1 -0
  144. data/spec/features/relations_spec.rb +10 -29
  145. data/spec/features/saved_searches_spec.rb +1 -0
  146. data/spec/features/search_bar_spec.rb +1 -0
  147. data/spec/features/search_results_map_spec.rb +1 -6
  148. data/spec/features/search_results_overlap_ratio_spec.rb +6 -5
  149. data/spec/features/search_spec.rb +1 -0
  150. data/spec/features/show_page_metadata_spec.rb +1 -0
  151. data/spec/features/sms_spec.rb +1 -0
  152. data/spec/features/split_view.html.erb_spec.rb +3 -2
  153. data/spec/features/suppressed_records_spec.rb +1 -0
  154. data/spec/features/tms_spec.rb +10 -0
  155. data/spec/features/web_services_modal_spec.rb +1 -0
  156. data/spec/fixtures/solr_documents/multiple-downloads.json +30 -0
  157. data/spec/fixtures/solr_documents/public_iiif_princeton.json +1 -1
  158. data/spec/fixtures/solr_documents/tms.json +29 -0
  159. data/spec/helpers/arcgis_helper_spec.rb +1 -0
  160. data/spec/helpers/carto_helper_spec.rb +1 -0
  161. data/spec/helpers/geoblacklight_helper_spec.rb +73 -14
  162. data/spec/javascripts/geoblacklight_spec.js +0 -6
  163. data/spec/javascripts/metadata_download_button_spec.js +5 -3
  164. data/spec/javascripts/util_spec.js +2 -4
  165. data/spec/lib/geoblacklight/bounding_box_spec.rb +1 -0
  166. data/spec/lib/geoblacklight/document_presenter_spec.rb +3 -2
  167. data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -0
  168. data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +1 -0
  169. data/spec/lib/geoblacklight/download/hgl_download_spec.rb +1 -0
  170. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +3 -2
  171. data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +1 -0
  172. data/spec/lib/geoblacklight/download_spec.rb +3 -2
  173. data/spec/lib/geoblacklight/geoblacklight_helper_behavior_spec.rb +1 -0
  174. data/spec/lib/geoblacklight/geometry_spec.rb +48 -0
  175. data/spec/lib/geoblacklight/item_viewer_spec.rb +13 -0
  176. data/spec/lib/geoblacklight/metadata/base_spec.rb +1 -0
  177. data/spec/lib/geoblacklight/metadata/html_spec.rb +1 -0
  178. data/spec/lib/geoblacklight/metadata_spec.rb +1 -0
  179. data/spec/lib/geoblacklight/metadata_transformer/base_spec.rb +3 -2
  180. data/spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb +3 -2
  181. data/spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb +3 -2
  182. data/spec/lib/geoblacklight/metadata_transformer_spec.rb +4 -3
  183. data/spec/lib/geoblacklight/reference_spec.rb +1 -0
  184. data/spec/lib/geoblacklight/references_spec.rb +3 -4
  185. data/spec/lib/geoblacklight/relation/ancestors_spec.rb +2 -1
  186. data/spec/lib/geoblacklight/relation/descendants_spec.rb +2 -1
  187. data/spec/lib/geoblacklight/relation/relation_response_spec.rb +1 -0
  188. data/spec/lib/geoblacklight/view_helper_override_spec.rb +1 -0
  189. data/spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb +5 -4
  190. data/spec/lib/geoblacklight/wms_layer_spec.rb +1 -0
  191. data/spec/models/concerns/geoblacklight/solr_document/carto_spec.rb +1 -20
  192. data/spec/models/concerns/geoblacklight/solr_document/citation_spec.rb +1 -0
  193. data/spec/models/concerns/geoblacklight/solr_document/finder_spec.rb +1 -0
  194. data/spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb +1 -0
  195. data/spec/models/concerns/geoblacklight/solr_document_spec.rb +1 -0
  196. data/spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb +15 -2
  197. data/spec/routing/catalog_routing_spec.rb +1 -0
  198. data/spec/spec_helper.rb +12 -9
  199. data/spec/support/backport_test_helpers.rb +1 -0
  200. data/spec/support/features.rb +1 -0
  201. data/spec/support/features/session_helpers.rb +1 -0
  202. data/spec/support/fixtures.rb +1 -0
  203. data/spec/tasks/geoblacklight_spec.rb +4 -3
  204. data/spec/test_app_templates/Gemfile.extra +1 -0
  205. data/spec/test_app_templates/lib/generators/test_app_generator.rb +2 -8
  206. data/spec/views/catalog/_document_split.html.erb_spec.rb +2 -1
  207. data/spec/views/catalog/_index_split.html.erb_spec.rb +2 -1
  208. data/spec/views/catalog/_results_pagination.html.erb_spec.rb +1 -0
  209. data/spec/views/catalog/_show_downloads.html.erb_spec.rb +1 -0
  210. data/spec/views/catalog/_show_tools.html.erb_spec.rb +3 -5
  211. data/template.rb +4 -2
  212. metadata +74 -78
  213. data/.circleci/config.yml +0 -164
  214. data/app/assets/stylesheets/geoblacklight/_geoblacklight.scss +0 -36
  215. data/app/assets/stylesheets/geoblacklight/modules/relations.scss +0 -15
  216. data/app/views/catalog/_exports.html.erb +0 -3
  217. data/app/views/catalog/_show_tools.html.erb +0 -25
  218. data/lib/generators/geoblacklight/templates/geoblacklight.scss +0 -4
  219. data/spec/javascripts/spec_helper.js +0 -32
  220. data/spec/lib/geoblacklight/controller_override_spec.rb +0 -1
  221. data/spec/teaspoon_env.rb +0 -213
  222. data/vendor/assets/javascripts/readmore.js +0 -0
  223. data/vendor/assets/javascripts/readmore.min.js +0 -0
data/.circleci/config.yml DELETED
@@ -1,164 +0,0 @@
1
- ---
2
- version: 2.1
3
- jobs:
4
- build:
5
- working_directory: ~/geoblacklight
6
- parameters:
7
- ruby_version:
8
- type: string
9
- default: '2.5.7'
10
- solr_port:
11
- type: string
12
- default: '8983'
13
- rails_version:
14
- type: string
15
- default: '5.2.4.3'
16
- docker:
17
- - image: circleci/ruby:<< parameters.ruby_version >>-node-browsers
18
- - image: solr:7-alpine
19
- command: bin/solr -cloud -noprompt -f -p <<parameters.solr_port>>
20
- environment:
21
- GEM_HOME: /home/circleci/geoblacklight/vendor/bundle
22
- BUNDLE_PATH: /home/circleci/geoblacklight/vendor/bundle
23
- BUNDLE_JOBS: 4
24
- BUNDLE_RETRY: 3
25
- RAILS_ENV: test
26
- RACK_ENV: test
27
- RAILS_VERSION: <<parameters.rails_version>>
28
- COVERAGE: true
29
- parallelism: 4
30
- steps:
31
- - checkout
32
- # Restore bundle and internal test app from the cache
33
- - restore_cache:
34
- keys:
35
- - cachebust-2020-07-02-geoblacklight-bundle-{{ checksum "geoblacklight.gemspec" }}-{{ checksum "Gemfile" }}-<< parameters.ruby_version >>-<< parameters.rails_version >>
36
- # Install gems
37
- - run: bundle check || bundle install
38
- # Store bundle cache
39
- - save_cache:
40
- key: cachebust-2020-07-02-geoblacklight-bundle-{{ checksum "geoblacklight.gemspec" }}-{{ checksum "Gemfile" }}-<< parameters.ruby_version >>-<< parameters.rails_version >>
41
- paths:
42
- - /home/circleci/geoblacklight/vendor/bundle
43
- # Restore internal test app from the cache
44
- - restore_cache:
45
- keys:
46
- - cachebust-2020-07-02-geoblacklight-internal-test-app-{{ checksum "geoblacklight.gemspec" }}-{{ checksum "Gemfile" }}-{{ checksum "spec/test_app_templates/Gemfile.extra" }}-<< parameters.ruby_version >>-<< parameters.rails_version >>
47
- # Generate the internal test app
48
- - run:
49
- name: Generate test app
50
- command: |
51
- [ -e ./.internal_test_app ] || bundle exec rake engine_cart:generate
52
- - save_cache:
53
- name: Save test app cache
54
- key: cachebust-2020-07-02-geoblacklight-internal-test-app-{{ checksum "geoblacklight.gemspec" }}-{{ checksum "Gemfile" }}-{{ checksum "spec/test_app_templates/Gemfile.extra" }}-<< parameters.ruby_version >>-<< parameters.rails_version >>
55
- paths:
56
- - ./.internal_test_app
57
- - run:
58
- name: Wait for Solr
59
- command: dockerize -wait tcp://localhost:<<parameters.solr_port>> -timeout 1m
60
- - run:
61
- name: Load config into solr
62
- command: |
63
- cd .internal_test_app/solr/conf
64
- zip -1 -r solr_config.zip ./*
65
- curl -H "Content-type:application/octet-stream" --data-binary @solr_config.zip "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=solrconfig"
66
- curl -H 'Content-type: application/json' http://localhost:<<parameters.solr_port>>/api/collections/ -d '{create: {name: blacklight-core, config: solrconfig, numShards: 1}}'
67
- - run:
68
- name: Seed Solr
69
- command: |
70
- cd .internal_test_app
71
- bundle check || bundle install
72
- bundle exec rake geoblacklight:index:seed
73
- bundle exec rake geoblacklight:downloads:mkdir
74
- - run:
75
- name: Compile the assets for Webpack
76
- command: |
77
- cd .internal_test_app
78
- rm config/webpacker.yml
79
- bundle exec rails webpacker:install
80
- bundle exec rails webpacker:compile
81
- - run:
82
- name: Run the RSpec test suites
83
- command: bundle exec rspec $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
84
- - run:
85
- name: Run the Teaspoon test suites
86
- command: bundle exec rake teaspoon
87
-
88
- rubocop:
89
- working_directory: ~/geoblacklight
90
- parameters:
91
- ruby_version:
92
- type: string
93
- default: '2.5.7'
94
- rails_version:
95
- type: string
96
- default: '5.2.4.3'
97
- docker:
98
- - image: circleci/ruby:<< parameters.ruby_version >>-node-browsers
99
- environment:
100
- GEM_HOME: /home/circleci/geoblacklight/vendor/bundle
101
- BUNDLE_PATH: /home/circleci/geoblacklight/vendor/bundle
102
- BUNDLE_JOBS: 4
103
- BUNDLE_RETRY: 3
104
- RAILS_ENV: test
105
- RACK_ENV: test
106
- RAILS_VERSION: <<parameters.rails_version>>
107
- steps:
108
- - checkout
109
- # Restore bundle cache
110
- - restore_cache:
111
- keys:
112
- - cachebust-2020-07-02-geoblacklight-bundle-{{ checksum "geoblacklight.gemspec" }}-{{ checksum "Gemfile" }}-<< parameters.ruby_version >>-<< parameters.rails_version >>
113
- paths:
114
- - /home/circleci/geoblacklight/vendor/bundle
115
- # Install gems and run rubocop
116
- - run: bundle check || bundle install
117
- - run: bundle exec rake rubocop
118
-
119
- workflows:
120
- version: 2
121
- build:
122
- jobs:
123
- - build:
124
- ruby_version: 2.6.5
125
- rails_version: 5.2.4.3
126
- name: "ruby2-6_rails5-2"
127
- - build:
128
- ruby_version: 2.5.7
129
- rails_version: 5.2.4.3
130
- name: "ruby2-5_rails5-2"
131
- - rubocop:
132
- ruby_version: 2.6.5
133
- rails_version: 5.2.4.3
134
- name: "rubocop_ruby2-6_rails5-2"
135
- - rubocop:
136
- ruby_version: 2.5.7
137
- rails_version: 5.2.4.3
138
- name: "rubocop_ruby2-5_rails5-2"
139
-
140
- nightly:
141
- triggers:
142
- - schedule:
143
- cron: "0 0 * * *"
144
- filters:
145
- branches:
146
- only:
147
- - master
148
- jobs:
149
- - build:
150
- ruby_version: 2.6.5
151
- rails_version: 5.2.4.3
152
- name: "ruby2-6_rails5-2"
153
- - build:
154
- ruby_version: 2.5.7
155
- rails_version: 5.2.4.3
156
- name: "ruby2-5_rails5-2"
157
- - rubocop:
158
- ruby_version: 2.6.5
159
- rails_version: 5.2.4.3
160
- name: "rubocop_ruby2-6_rails5-2"
161
- - rubocop:
162
- ruby_version: 2.5.7
163
- rails_version: 5.2.4.3
164
- name: "rubocop_ruby2-5_rails5-2"
@@ -1,36 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
10
- *
11
- */
12
- @import 'leaflet';
13
- @import 'geoblacklight-icons-rails';
14
- @import 'font-awesome';
15
- @import 'geoblacklight/styles';
16
- @import 'modules/facets';
17
- @import 'modules/mixins';
18
- @import 'modules/icon-customization';
19
- @import 'modules/home';
20
- @import 'modules/index_maps';
21
- @import 'modules/item';
22
- @import 'modules/layer_opacity';
23
- @import 'modules/metadata';
24
- @import 'modules/metadata_content';
25
- @import 'modules/metadata_missing';
26
- @import 'modules/metadata_markup';
27
- @import 'modules/modal';
28
- @import 'modules/results';
29
- @import 'modules/geosearch';
30
- @import 'modules/search_widgets';
31
- @import 'modules/sidebar';
32
- @import 'modules/toolbar';
33
- @import 'modules/relations';
34
- @import 'modules/web_services';
35
- @import 'blacklight_overrides';
36
- @import 'modules/downloads';
@@ -1,15 +0,0 @@
1
- .relations {
2
- @include sidebar-children;
3
-
4
- .list-group {
5
- .relations-ancestors {
6
- padding-left: 16px;
7
- padding-right: 16px;
8
- }
9
-
10
- .relations-descendants {
11
- padding-left: 16px;
12
- padding-right: 16px;
13
- }
14
- }
15
- }
@@ -1,3 +0,0 @@
1
- <% document ||= @document %>
2
- <%= display_carto %>
3
- <%= display_arcgis %>
@@ -1,25 +0,0 @@
1
- <%-
2
- # Compare with render_document_functions_partial helper, and
3
- # _document_functions partial. BL actually has two groups
4
- # of document-related tools. "document functions" by default
5
- # contains Bookmark functionality shown on both results and
6
- # item view. While "document tools" contains external export type
7
- # functions by default only on detail.
8
- -%>
9
- <% if show_doc_actions? %>
10
- <div class="card show-tools">
11
- <div class="card-header">
12
- <h2><%= t('blacklight.tools.title') %></h2>
13
- </div>
14
-
15
- <ul class="list-group list-group-flush">
16
- <%= render_show_doc_actions @document do |config, inner| %>
17
- <% if inner.present? %>
18
- <li class="list-group-item <%= config.key %>">
19
- <%= inner %>
20
- </li>
21
- <% end %>
22
- <% end %>
23
- </ul>
24
- </div>
25
- <% end %>
@@ -1,4 +0,0 @@
1
- /*
2
- *= require geoblacklight/application
3
- *= require leaflet-label
4
- */
@@ -1,32 +0,0 @@
1
- // Teaspoon includes some support files, but you can use anything from your own support path too.
2
- // require support/jasmine-jquery-1.7.0
3
- // require support/jasmine-jquery-2.0.0
4
- // require support/jasmine-jquery-2.1.0
5
- // require support/sinon
6
- // require support/your-support-file
7
- //
8
- // PhantomJS (Teaspoons default driver) doesn't have support for Function.prototype.bind, which has caused confusion.
9
- // Use this polyfill to avoid the confusion.
10
- //= require support/bind-poly
11
- //
12
- // You can require your own javascript files here. By default this will include everything in application, however you
13
- // may get better load performance if you require the specific files that are being used in the spec that tests them.
14
- //= require application
15
- //
16
- // Deferring execution
17
- // If you're using CommonJS, RequireJS or some other asynchronous library you can defer execution. Call
18
- // Teaspoon.execute() after everything has been loaded. Simple example of a timeout:
19
- //
20
- // Teaspoon.defer = true
21
- // setTimeout(Teaspoon.execute, 1000)
22
- //
23
- // Matching files
24
- // By default Teaspoon will look for files that match _spec.{js,js.coffee,.coffee}. Add a filename_spec.js file in your
25
- // spec path and it'll be included in the default suite automatically. If you want to customize suites, check out the
26
- // configuration in teaspoon_env.rb
27
- //
28
- // Manifest
29
- // If you'd rather require your spec files manually (to control order for instance) you can disable the suite matcher in
30
- // the configuration and use this file as a manifest.
31
- //
32
- // For more information: http://github.com/modeset/teaspoon
@@ -1 +0,0 @@
1
- require 'spec_helper'
data/spec/teaspoon_env.rb DELETED
@@ -1,213 +0,0 @@
1
- unless defined?(Rails)
2
- ENV['RAILS_ROOT'] = File.expand_path('../../', __FILE__)
3
- require File.expand_path('../../config/environment', __FILE__)
4
- end
5
-
6
- # Teaspoon doesn't allow you to pass client driver options to the Selenium WebDriver. This monkey patch
7
- # is a temporary fix until this PR is merged: https://github.com/jejacks0n/teaspoon/pull/519.
8
- require 'teaspoon/driver/selenium'
9
-
10
- Teaspoon::Driver::Selenium.class_eval do
11
- def run_specs(runner, url)
12
- driver = ::Selenium::WebDriver.for(
13
- driver_options[:client_driver],
14
- **driver_options[:selenium_options].to_hash.to_options
15
- )
16
- driver.navigate.to(url)
17
-
18
- ::Selenium::WebDriver::Wait.new(driver_options).until do
19
- done = driver.execute_script('return window.Teaspoon && window.Teaspoon.finished')
20
- driver.execute_script('return window.Teaspoon && window.Teaspoon.getMessages() || []').each do |line|
21
- runner.process("#{line}\n")
22
- end
23
- done
24
- end
25
- ensure
26
- driver&.quit
27
- end
28
- end
29
-
30
- Teaspoon.configure do |config|
31
- # Determines where the Teaspoon routes will be mounted. Changing this to "/jasmine" would allow you to browse to
32
- # `http://localhost:3000/jasmine` to run your tests.
33
- config.mount_at = '/teaspoon'
34
-
35
- # Specifies the root where Teaspoon will look for files. If you're testing an engine using a dummy application it can
36
- # be useful to set this to your engines root (e.g. `Teaspoon::Engine.root`).
37
- # Note: Defaults to `Rails.root` if nil.
38
- config.root = Geoblacklight::Engine.root
39
-
40
- # Paths that will be appended to the Rails assets paths
41
- # Note: Relative to `config.root`.
42
- config.asset_paths = ['spec/javascripts', 'spec/javascripts/stylesheets']
43
-
44
- # Fixtures are rendered through a controller, which allows using HAML, RABL/JBuilder, etc. Files in these paths will
45
- # be rendered as fixtures.
46
- config.fixture_paths = ['spec/javascripts/fixtures']
47
-
48
- # SUITES
49
- #
50
- # You can modify the default suite configuration and create new suites here. Suites are isolated from one another.
51
- #
52
- # When defining a suite you can provide a name and a block. If the name is left blank, :default is assumed. You can
53
- # omit various directives and the ones defined in the default suite will be used.
54
- #
55
- # To run a specific suite
56
- # - in the browser: http://localhost/teaspoon/[suite_name]
57
- # - with the rake task: rake teaspoon suite=[suite_name]
58
- # - with the cli: teaspoon --suite=[suite_name]
59
- config.suite do |suite|
60
- # Specify the framework you would like to use. This allows you to select versions, and will do some basic setup for
61
- # you -- which you can override with the directives below. This should be specified first, as it can override other
62
- # directives.
63
- # Note: If no version is specified, the latest is assumed.
64
- #
65
- # Versions: 1.3.1, 2.0.3, 2.1.3, 2.2.0
66
- suite.use_framework :jasmine, '2.2.0'
67
-
68
- # Specify a file matcher as a regular expression and all matching files will be loaded when the suite is run. These
69
- # files need to be within an asset path. You can add asset paths using the `config.asset_paths`.
70
- suite.matcher = '{spec/javascripts,app/assets}/**/*_spec.{js,js.coffee,coffee}'
71
-
72
- # Load additional JS files, but requiring them in your spec helper is the preferred way to do this.
73
- # suite.javascripts = []
74
-
75
- # You can include your own stylesheets if you want to change how Teaspoon looks.
76
- # Note: Spec related CSS can and should be loaded using fixtures.
77
- # suite.stylesheets = ["teaspoon"]
78
-
79
- # This suites spec helper, which can require additional support files. This file is loaded before any of your test
80
- # files are loaded.
81
- suite.helper = 'spec_helper'
82
-
83
- # Partial to be rendered in the head tag of the runner. You can use the provided ones or define your own by creating
84
- # a `_boot.html.erb` in your fixtures path, and adjust the config to `"/boot"` for instance.
85
- #
86
- # Available: boot, boot_require_js
87
- suite.boot_partial = 'boot'
88
-
89
- # Partial to be rendered in the body tag of the runner. You can define your own to create a custom body structure.
90
- suite.body_partial = 'body'
91
-
92
- # Hooks allow you to use `Teaspoon.hook("fixtures")` before, after, or during your spec run. This will make a
93
- # synchronous Ajax request to the server that will call all of the blocks you've defined for that hook name.
94
- # suite.hook :fixtures, &proc{}
95
-
96
- # Determine whether specs loaded into the test harness should be embedded as individual script tags or concatenated
97
- # into a single file. Similar to Rails' asset `debug: true` and `config.assets.debug = true` options. By default,
98
- # Teaspoon expands all assets to provide more valuable stack traces that reference individual source files.
99
- # suite.expand_assets = true
100
- end
101
-
102
- # Example suite. Since we're just filtering to files already within the root test/javascripts, these files will also
103
- # be run in the default suite -- but can be focused into a more specific suite.
104
- # config.suite :targeted do |suite|
105
- # suite.matcher = "spec/javascripts/targeted/*_spec.{js,js.coffee,coffee}"
106
- # end
107
-
108
- # CONSOLE RUNNER SPECIFIC
109
- #
110
- # These configuration directives are applicable only when running via the rake task or command line interface. These
111
- # directives can be overridden using the command line interface arguments or with ENV variables when using the rake
112
- # task.
113
- #
114
- # Command Line Interface:
115
- # teaspoon --driver=phantomjs --server-port=31337 --fail-fast=true --format=junit --suite=my_suite /spec/file_spec.js
116
- #
117
- # Rake:
118
- # teaspoon DRIVER=phantomjs SERVER_PORT=31337 FAIL_FAST=true FORMATTERS=junit suite=my_suite
119
-
120
- # Specify which headless driver to use. Supports PhantomJS and Selenium Webdriver.
121
- #
122
- # Available: :phantomjs, :selenium, :capybara_webkit
123
- # PhantomJS: https://github.com/modeset/teaspoon/wiki/Using-PhantomJS
124
- # Selenium Webdriver: https://github.com/modeset/teaspoon/wiki/Using-Selenium-WebDriver
125
- # Capybara Webkit: https://github.com/modeset/teaspoon/wiki/Using-Capybara-Webkit
126
- config.driver = :selenium
127
- config.driver_options = {
128
- client_driver: :chrome,
129
- selenium_options: {
130
- options: Selenium::WebDriver::Chrome::Options.new(args: ['headless', 'disable-gpu'])
131
- }
132
- }
133
-
134
- # Specify additional options for the driver.
135
- #
136
- # PhantomJS: https://github.com/modeset/teaspoon/wiki/Using-PhantomJS
137
- # Selenium Webdriver: https://github.com/modeset/teaspoon/wiki/Using-Selenium-WebDriver
138
- # Capybara Webkit: https://github.com/modeset/teaspoon/wiki/Using-Capybara-Webkit
139
- # config.driver_options = nil
140
-
141
- # Specify the timeout for the driver. Specs are expected to complete within this time frame or the run will be
142
- # considered a failure. This is to avoid issues that can arise where tests stall.
143
- # config.driver_timeout = 180
144
-
145
- # Specify a server to use with Rack (e.g. thin, mongrel). If nil is provided Rack::Server is used.
146
- # config.server = nil
147
-
148
- # Specify a port to run on a specific port, otherwise Teaspoon will use a random available port.
149
- # config.server_port = nil
150
-
151
- # Timeout for starting the server in seconds. If your server is slow to start you may have to bump this, or you may
152
- # want to lower this if you know it shouldn't take long to start.
153
- # config.server_timeout = 20
154
-
155
- # Force Teaspoon to fail immediately after a failing suite. Can be useful to make Teaspoon fail early if you have
156
- # several suites, but in environments like CI this may not be desirable.
157
- # config.fail_fast = true
158
-
159
- # Specify the formatters to use when outputting the results.
160
- # Note: Output files can be specified by using `"junit>/path/to/output.xml"`.
161
- #
162
- # Available: :dot, :clean, :documentation, :json, :junit, :pride, :rspec_html, :snowday, :swayze_or_oprah, :tap, :tap_y, :teamcity
163
- # config.formatters = [:dot]
164
-
165
- # Specify if you want color output from the formatters.
166
- # config.color = true
167
-
168
- # Teaspoon pipes all console[log/debug/error] to $stdout. This is useful to catch places where you've forgotten to
169
- # remove them, but in verbose applications this may not be desirable.
170
- # config.suppress_log = false
171
-
172
- # COVERAGE REPORTS / THRESHOLD ASSERTIONS
173
- #
174
- # Coverage reports requires Istanbul (https://github.com/gotwarlost/istanbul) to add instrumentation to your code and
175
- # display coverage statistics.
176
- #
177
- # Coverage configurations are similar to suites. You can define several, and use different ones under different
178
- # conditions.
179
- #
180
- # To run with a specific coverage configuration
181
- # - with the rake task: rake teaspoon USE_COVERAGE=[coverage_name]
182
- # - with the cli: teaspoon --coverage=[coverage_name]
183
-
184
- # Specify that you always want a coverage configuration to be used. Otherwise, specify that you want coverage
185
- # on the CLI.
186
- # Set this to "true" or the name of your coverage config.
187
- # config.use_coverage = nil
188
-
189
- # You can have multiple coverage configs by passing a name to config.coverage.
190
- # e.g. config.coverage :ci do |coverage|
191
- # The default coverage config name is :default.
192
- config.coverage do |coverage|
193
- # Which coverage reports Istanbul should generate. Correlates directly to what Istanbul supports.
194
- #
195
- # Available: text-summary, text, html, lcov, lcovonly, cobertura, teamcity
196
- # coverage.reports = ["text-summary", "html"]
197
-
198
- # The path that the coverage should be written to - when there's an artifact to write to disk.
199
- # Note: Relative to `config.root`.
200
- # coverage.output_path = "coverage"
201
-
202
- # Assets to be ignored when generating coverage reports. Accepts an array of filenames or regular expressions. The
203
- # default excludes assets from vendor, gems and support libraries.
204
- # coverage.ignore = [%r{/lib/ruby/gems/}, %r{/vendor/assets/}, %r{/support/}, %r{/(.+)_helper.}]
205
-
206
- # Various thresholds requirements can be defined, and those thresholds will be checked at the end of a run. If any
207
- # aren't met the run will fail with a message. Thresholds can be defined as a percentage (0-100), or nil.
208
- # coverage.statements = nil
209
- # coverage.functions = nil
210
- # coverage.branches = nil
211
- # coverage.lines = nil
212
- end
213
- end