geoblacklight 2.4.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +152 -64
  3. data/.rubocop.yml +15 -13
  4. data/.rubocop_todo.yml +66 -10
  5. data/README.md +1 -1
  6. data/Rakefile +1 -0
  7. data/app/assets/javascripts/geoblacklight/downloaders/downloader.js +1 -1
  8. data/app/assets/javascripts/geoblacklight/modules/svg_tooltips.js +31 -0
  9. data/app/assets/javascripts/geoblacklight/viewers/esri.js +2 -2
  10. data/app/assets/javascripts/geoblacklight/viewers/esri/tiled_map_layer.js +1 -1
  11. data/app/assets/javascripts/geoblacklight/viewers/wms.js +2 -2
  12. data/app/assets/stylesheets/geoblacklight/geoblacklight.scss +2 -0
  13. data/app/assets/stylesheets/geoblacklight/modules/_base.scss +33 -0
  14. data/app/assets/stylesheets/geoblacklight/{_blacklight_overrides.scss → modules/_blacklight_overrides.scss} +0 -0
  15. data/app/assets/stylesheets/geoblacklight/{_styles.scss → modules/_styles.scss} +1 -0
  16. data/app/assets/stylesheets/geoblacklight/modules/downloads.scss +37 -54
  17. data/app/assets/stylesheets/geoblacklight/modules/item.scss +1 -0
  18. data/app/assets/stylesheets/geoblacklight/modules/results.scss +16 -28
  19. data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +12 -42
  20. data/app/assets/stylesheets/geoblacklight/modules/toolbar.scss +17 -59
  21. data/app/controllers/download_controller.rb +12 -12
  22. data/app/controllers/relation_controller.rb +1 -0
  23. data/app/controllers/wms_controller.rb +1 -0
  24. data/app/helpers/arcgis_helper.rb +1 -0
  25. data/app/helpers/blacklight_helper.rb +1 -0
  26. data/app/helpers/carto_helper.rb +1 -0
  27. data/app/helpers/geoblacklight_helper.rb +25 -72
  28. data/app/models/concerns/geoblacklight/solr_document.rb +7 -6
  29. data/app/models/concerns/geoblacklight/solr_document/arcgis.rb +2 -1
  30. data/app/models/concerns/geoblacklight/solr_document/carto.rb +1 -13
  31. data/app/models/concerns/geoblacklight/solr_document/citation.rb +1 -0
  32. data/app/models/concerns/geoblacklight/solr_document/finder.rb +1 -0
  33. data/app/models/concerns/geoblacklight/solr_document/inspection.rb +2 -1
  34. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +3 -1
  35. data/app/presenters/geoblacklight/document_presenter.rb +2 -1
  36. data/app/views/catalog/_arcgis.html.erb +4 -0
  37. data/app/views/catalog/_carto.html.erb +4 -0
  38. data/app/views/catalog/_downloads_primary.html.erb +8 -1
  39. data/app/views/catalog/_header_icons.html.erb +3 -3
  40. data/app/views/catalog/_home_text.html.erb +3 -0
  41. data/app/views/catalog/_index_split_default.html.erb +21 -21
  42. data/app/views/relation/_ancestors.html.erb +1 -4
  43. data/app/views/relation/_descendants.html.erb +2 -5
  44. data/app/views/relation/index.html.erb +20 -8
  45. data/app/views/relation/index.json.jbuilder +2 -1
  46. data/app/views/shared/_header_navbar.html.erb +0 -2
  47. data/bin/coverage.rb +36 -0
  48. data/config/initializers/rails_config.rb +1 -0
  49. data/config/locales/geoblacklight.en.yml +3 -2
  50. data/geoblacklight.gemspec +3 -6
  51. data/lib/generators/geoblacklight/assets_generator.rb +46 -0
  52. data/lib/generators/geoblacklight/install_generator.rb +3 -9
  53. data/lib/generators/geoblacklight/templates/assets/_blacklight.scss +1 -0
  54. data/lib/generators/geoblacklight/templates/assets/_customizations.scss +28 -0
  55. data/{app/assets/stylesheets/geoblacklight/application.scss → lib/generators/geoblacklight/templates/assets/_geoblacklight.scss} +0 -1
  56. data/lib/generators/geoblacklight/templates/assets/application.scss +7 -0
  57. data/lib/generators/geoblacklight/templates/{geoblacklight.js → assets/geoblacklight.js} +0 -0
  58. data/lib/generators/geoblacklight/templates/catalog_controller.rb +3 -2
  59. data/lib/generators/geoblacklight/templates/settings.yml +0 -6
  60. data/lib/generators/geoblacklight/webpacker_generator.rb +1 -0
  61. data/lib/geoblacklight.rb +1 -0
  62. data/lib/geoblacklight/bounding_box.rb +1 -0
  63. data/lib/geoblacklight/catalog_helper_override.rb +1 -0
  64. data/lib/geoblacklight/constants.rb +1 -0
  65. data/lib/geoblacklight/download.rb +2 -1
  66. data/lib/geoblacklight/download/geojson_download.rb +1 -0
  67. data/lib/geoblacklight/download/geotiff_download.rb +1 -0
  68. data/lib/geoblacklight/download/hgl_download.rb +1 -0
  69. data/lib/geoblacklight/download/kmz_download.rb +2 -1
  70. data/lib/geoblacklight/download/shapefile_download.rb +1 -0
  71. data/lib/geoblacklight/engine.rb +1 -2
  72. data/lib/geoblacklight/exceptions.rb +1 -0
  73. data/lib/geoblacklight/geoblacklight_helper_behavior.rb +1 -0
  74. data/lib/geoblacklight/item_viewer.rb +1 -0
  75. data/lib/geoblacklight/metadata.rb +1 -0
  76. data/lib/geoblacklight/metadata/base.rb +1 -0
  77. data/lib/geoblacklight/metadata/fgdc.rb +1 -0
  78. data/lib/geoblacklight/metadata/html.rb +2 -2
  79. data/lib/geoblacklight/metadata/iso19139.rb +1 -0
  80. data/lib/geoblacklight/metadata_transformer.rb +1 -0
  81. data/lib/geoblacklight/metadata_transformer/base.rb +1 -0
  82. data/lib/geoblacklight/metadata_transformer/fgdc.rb +1 -0
  83. data/lib/geoblacklight/metadata_transformer/iso19139.rb +1 -0
  84. data/lib/geoblacklight/reference.rb +1 -0
  85. data/lib/geoblacklight/references.rb +7 -3
  86. data/lib/geoblacklight/relation/ancestors.rb +1 -0
  87. data/lib/geoblacklight/relation/descendants.rb +1 -0
  88. data/lib/geoblacklight/relation/relation_response.rb +2 -1
  89. data/lib/geoblacklight/routes.rb +1 -0
  90. data/lib/geoblacklight/routes/downloadable.rb +1 -0
  91. data/lib/geoblacklight/routes/exportable.rb +1 -0
  92. data/lib/geoblacklight/routes/wms.rb +1 -0
  93. data/lib/geoblacklight/version.rb +2 -1
  94. data/lib/geoblacklight/view_helper_override.rb +1 -0
  95. data/lib/geoblacklight/wms_layer.rb +1 -0
  96. data/lib/geoblacklight/wms_layer/feature_info_response.rb +1 -0
  97. data/lib/tasks/geoblacklight.rake +33 -32
  98. data/spec/controllers/catalog_controller_spec.rb +1 -0
  99. data/spec/controllers/download_controller_spec.rb +1 -0
  100. data/spec/controllers/relation_controller_spec.rb +1 -0
  101. data/spec/controllers/wms_controller_spec.rb +1 -0
  102. data/spec/factories/user.rb +1 -0
  103. data/spec/features/bookmarks_spec.rb +1 -0
  104. data/spec/features/configurable_basemap_spec.rb +1 -0
  105. data/spec/features/data_dictionary_download_spec.rb +1 -0
  106. data/spec/features/download_layer_spec.rb +1 -0
  107. data/spec/features/empty_search_spec.rb +1 -0
  108. data/spec/features/esri_viewer_spec.rb +1 -5
  109. data/spec/features/exports_spec.rb +4 -12
  110. data/spec/features/help_text_spec.rb +1 -0
  111. data/spec/features/home_page_spec.rb +6 -0
  112. data/spec/features/iiif_viewer_spec.rb +1 -0
  113. data/spec/features/index_map_spec.rb +1 -0
  114. data/spec/features/layer_inspection_spec.rb +1 -0
  115. data/spec/features/layer_opacity_spec.rb +1 -0
  116. data/spec/features/layer_preview_spec.rb +1 -0
  117. data/spec/features/layer_with_no_references_spec.rb +1 -0
  118. data/spec/features/linkified_attribute_table_spec.rb +1 -0
  119. data/spec/features/metadata_panel_spec.rb +1 -0
  120. data/spec/features/missing_metadata_spec.rb +1 -0
  121. data/spec/features/multiple_downloads_spec.rb +15 -0
  122. data/spec/features/oembed_spec.rb +1 -0
  123. data/spec/features/relations_spec.rb +10 -29
  124. data/spec/features/saved_searches_spec.rb +1 -0
  125. data/spec/features/search_bar_spec.rb +1 -0
  126. data/spec/features/search_results_map_spec.rb +1 -6
  127. data/spec/features/search_results_overlap_ratio_spec.rb +4 -3
  128. data/spec/features/search_spec.rb +1 -0
  129. data/spec/features/show_page_metadata_spec.rb +1 -0
  130. data/spec/features/sms_spec.rb +1 -0
  131. data/spec/features/split_view.html.erb_spec.rb +2 -1
  132. data/spec/features/suppressed_records_spec.rb +1 -0
  133. data/spec/features/web_services_modal_spec.rb +1 -0
  134. data/spec/fixtures/solr_documents/multiple-downloads.json +30 -0
  135. data/spec/helpers/arcgis_helper_spec.rb +1 -0
  136. data/spec/helpers/carto_helper_spec.rb +1 -0
  137. data/spec/helpers/geoblacklight_helper_spec.rb +47 -14
  138. data/spec/javascripts/geoblacklight/viewers/esri/tiled_map_layer_spec.js +12 -0
  139. data/spec/lib/geoblacklight/bounding_box_spec.rb +1 -0
  140. data/spec/lib/geoblacklight/controller_override_spec.rb +1 -0
  141. data/spec/lib/geoblacklight/document_presenter_spec.rb +3 -2
  142. data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -0
  143. data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +1 -0
  144. data/spec/lib/geoblacklight/download/hgl_download_spec.rb +1 -0
  145. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +1 -0
  146. data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +1 -0
  147. data/spec/lib/geoblacklight/download_spec.rb +2 -1
  148. data/spec/lib/geoblacklight/geoblacklight_helper_behavior_spec.rb +1 -0
  149. data/spec/lib/geoblacklight/item_viewer_spec.rb +1 -0
  150. data/spec/lib/geoblacklight/metadata/base_spec.rb +1 -0
  151. data/spec/lib/geoblacklight/metadata/html_spec.rb +1 -0
  152. data/spec/lib/geoblacklight/metadata_spec.rb +1 -0
  153. data/spec/lib/geoblacklight/metadata_transformer/base_spec.rb +3 -2
  154. data/spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb +3 -2
  155. data/spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb +3 -2
  156. data/spec/lib/geoblacklight/metadata_transformer_spec.rb +4 -3
  157. data/spec/lib/geoblacklight/reference_spec.rb +1 -0
  158. data/spec/lib/geoblacklight/references_spec.rb +2 -3
  159. data/spec/lib/geoblacklight/relation/ancestors_spec.rb +1 -0
  160. data/spec/lib/geoblacklight/relation/descendants_spec.rb +1 -0
  161. data/spec/lib/geoblacklight/relation/relation_response_spec.rb +1 -0
  162. data/spec/lib/geoblacklight/view_helper_override_spec.rb +1 -0
  163. data/spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb +5 -4
  164. data/spec/lib/geoblacklight/wms_layer_spec.rb +1 -0
  165. data/spec/models/concerns/geoblacklight/solr_document/carto_spec.rb +1 -20
  166. data/spec/models/concerns/geoblacklight/solr_document/citation_spec.rb +1 -0
  167. data/spec/models/concerns/geoblacklight/solr_document/finder_spec.rb +1 -0
  168. data/spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb +1 -0
  169. data/spec/models/concerns/geoblacklight/solr_document_spec.rb +1 -0
  170. data/spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb +15 -2
  171. data/spec/routing/catalog_routing_spec.rb +1 -0
  172. data/spec/spec_helper.rb +12 -9
  173. data/spec/support/backport_test_helpers.rb +1 -0
  174. data/spec/support/features.rb +1 -0
  175. data/spec/support/features/session_helpers.rb +1 -0
  176. data/spec/support/fixtures.rb +1 -0
  177. data/spec/tasks/geoblacklight_spec.rb +4 -3
  178. data/spec/teaspoon_env.rb +1 -0
  179. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -0
  180. data/spec/views/catalog/_document_split.html.erb_spec.rb +1 -0
  181. data/spec/views/catalog/_index_split.html.erb_spec.rb +1 -0
  182. data/spec/views/catalog/_results_pagination.html.erb_spec.rb +1 -0
  183. data/spec/views/catalog/_show_downloads.html.erb_spec.rb +1 -0
  184. data/spec/views/catalog/_show_tools.html.erb_spec.rb +2 -4
  185. data/template.rb +1 -0
  186. metadata +42 -68
  187. data/app/assets/stylesheets/geoblacklight/_geoblacklight.scss +0 -36
  188. data/app/assets/stylesheets/geoblacklight/modules/relations.scss +0 -15
  189. data/app/views/catalog/_exports.html.erb +0 -3
  190. data/app/views/catalog/_show_tools.html.erb +0 -25
  191. data/lib/generators/geoblacklight/templates/geoblacklight.scss +0 -4
  192. data/vendor/assets/javascripts/readmore.js +0 -0
  193. data/vendor/assets/javascripts/readmore.min.js +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ecb6ab2a7b58e2b177571c19ae7a50c699a409e8f1a561fd626732246959fc1a
4
- data.tar.gz: d9d965e335b0132e5980705e7edc13c961efeb4746148c64d887cfdefdc3808a
3
+ metadata.gz: 8b6da8bdd22d9bb963b6a62ffbc47b51169c003515007b414aa05d15d6239e09
4
+ data.tar.gz: 3b2f2e52352474379e3428bce9b4dec2113991e457a41e1b58795c56039d8687
5
5
  SHA512:
6
- metadata.gz: 5804c2bbf9122569450a7312b5046174913669fcf4b2162241f2541d7efea1e619f8554f97c7644871ca3088ce60d6a835d92c6836c1b46485b812d5d1ad1539
7
- data.tar.gz: 1cacc9916d3f886093ece062ac7677ce7b83f64340494221ae7dba054c0c9ce89832b032c7b477c2d0e1f0be88ce5f2e77b6167bd28896a72f6e03013019c9bc
6
+ metadata.gz: 0fa98bbc2a5d93c3b03ef2f04bc83a19621452433600b345a7c48fcff108dabb58159a243fa73f6f955ada943ae377fb252a54302a38262c7175a60321b94e93
7
+ data.tar.gz: 342425a8b399ddedc409245910141f723d88952e145bac45ee2074eb8cc78287b7845dcb0d9c89ae9a012ba3f35ee5b982a9b34a860b07b3f541ac7608968d2c
@@ -1,18 +1,59 @@
1
1
  ---
2
2
  version: 2.1
3
+ commands:
4
+ restore_bundle_cache:
5
+ description: "Restore gems installed by bundler"
6
+ parameters:
7
+ # Use this parameter to bust the cache, if needed
8
+ cache_prefix:
9
+ type: string
10
+ default: "8-6-2020-A"
11
+ ruby_version:
12
+ type: string
13
+ default: '2.7.1'
14
+ rails_version:
15
+ type: string
16
+ default: '6.0.3.2'
17
+ steps:
18
+ - restore_cache:
19
+ keys:
20
+ - << parameters.cache_prefix >>-{{ checksum "geoblacklight.gemspec" }}-{{ checksum "Gemfile" }}-<< parameters.ruby_version >>-<< parameters.rails_version >>
21
+ paths:
22
+ - /home/circleci/geoblacklight/vendor/bundle
23
+ save_bundle_cache:
24
+ description: "Save gems installed by bundler"
25
+ parameters:
26
+ # Use this parameter to bust the cache, if needed
27
+ cache_prefix:
28
+ type: string
29
+ default: "8-6-2020-A"
30
+ ruby_version:
31
+ type: string
32
+ default: '2.7.1'
33
+ rails_version:
34
+ type: string
35
+ default: '6.0.3.2'
36
+ steps:
37
+ - save_cache:
38
+ key: << parameters.cache_prefix >>-{{ checksum "geoblacklight.gemspec" }}-{{ checksum "Gemfile" }}-<< parameters.ruby_version >>-<< parameters.rails_version >>
39
+ paths:
40
+ - /home/circleci/geoblacklight/vendor/bundle
3
41
  jobs:
4
42
  build:
5
43
  working_directory: ~/geoblacklight
6
44
  parameters:
7
45
  ruby_version:
8
46
  type: string
9
- default: '2.5.7'
47
+ default: '2.7.1'
10
48
  solr_port:
11
49
  type: string
12
50
  default: '8983'
13
51
  rails_version:
14
52
  type: string
15
- default: '5.2.4.3'
53
+ default: '6.0.3.2'
54
+ coverage:
55
+ type: boolean
56
+ default: false
16
57
  docker:
17
58
  - image: circleci/ruby:<< parameters.ruby_version >>-node-browsers
18
59
  - image: solr:7-alpine
@@ -25,35 +66,21 @@ jobs:
25
66
  RAILS_ENV: test
26
67
  RACK_ENV: test
27
68
  RAILS_VERSION: <<parameters.rails_version>>
28
- COVERAGE: true
29
- parallelism: 4
30
69
  steps:
31
70
  - 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 >>
71
+ - restore_bundle_cache:
72
+ ruby_version: << parameters.ruby_version >>
73
+ rails_version: << parameters.rails_version >>
36
74
  # Install gems
37
75
  - 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
76
  # Generate the internal test app
48
77
  - run:
49
78
  name: Generate test app
50
79
  command: |
51
80
  [ -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
81
+ - save_bundle_cache:
82
+ ruby_version: << parameters.ruby_version >>
83
+ rails_version: << parameters.rails_version >>
57
84
  - run:
58
85
  name: Wait for Solr
59
86
  command: dockerize -wait tcp://localhost:<<parameters.solr_port>> -timeout 1m
@@ -71,16 +98,31 @@ jobs:
71
98
  bundle check || bundle install
72
99
  bundle exec rake geoblacklight:index:seed
73
100
  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)
101
+ - when:
102
+ condition: <<parameters.coverage>>
103
+ steps:
104
+ - run:
105
+ name: Ensure simplecov is installed
106
+ command: gem install simplecov
107
+ - run:
108
+ name: Run the RSpec test suites
109
+ command: bundle exec rspec
110
+ - run:
111
+ name: Stash Coverage Results
112
+ command: |
113
+ cp -R coverage/ coverage_results/
114
+ cp -R coverage/ /tmp/coverage_results/
115
+ - persist_to_workspace:
116
+ root: '~/geoblacklight'
117
+ paths: 'coverage_results'
118
+ - store_artifacts:
119
+ path: /tmp/coverage_results/
120
+ - unless:
121
+ condition: <<parameters.coverage>>
122
+ steps:
123
+ - run:
124
+ name: Run the RSpec test suites
125
+ command: bundle exec rspec
84
126
  - run:
85
127
  name: Run the Teaspoon test suites
86
128
  command: bundle exec rake teaspoon
@@ -90,10 +132,10 @@ jobs:
90
132
  parameters:
91
133
  ruby_version:
92
134
  type: string
93
- default: '2.5.7'
135
+ default: '2.7.1'
94
136
  rails_version:
95
137
  type: string
96
- default: '5.2.4.3'
138
+ default: '6.0.3.2'
97
139
  docker:
98
140
  - image: circleci/ruby:<< parameters.ruby_version >>-node-browsers
99
141
  environment:
@@ -106,37 +148,76 @@ jobs:
106
148
  RAILS_VERSION: <<parameters.rails_version>>
107
149
  steps:
108
150
  - 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
151
+ - restore_bundle_cache:
152
+ ruby_version: << parameters.ruby_version >>
153
+ rails_version: << parameters.rails_version >>
115
154
  # Install gems and run rubocop
116
155
  - run: bundle check || bundle install
117
156
  - run: bundle exec rake rubocop
118
157
 
158
+ coverage_report:
159
+ working_directory: ~/geoblacklight
160
+ parameters:
161
+ ruby_version:
162
+ type: string
163
+ default: '2.7.1'
164
+ rails_version:
165
+ type: string
166
+ default: '6.0.3.2'
167
+ docker:
168
+ - image: circleci/ruby:<< parameters.ruby_version >>-node-browsers
169
+ environment:
170
+ GEM_HOME: /home/circleci/geoblacklight/vendor/bundle
171
+ BUNDLE_PATH: /home/circleci/geoblacklight/vendor/bundle
172
+ BUNDLE_JOBS: 4
173
+ BUNDLE_RETRY: 3
174
+ RAILS_ENV: test
175
+ RACK_ENV: test
176
+ RAILS_VERSION: <<parameters.rails_version>>
177
+ steps:
178
+ - checkout
179
+ - attach_workspace:
180
+ at: '~/geoblacklight'
181
+ - restore_bundle_cache:
182
+ ruby_version: << parameters.ruby_version >>
183
+ rails_version: << parameters.rails_version >>
184
+ # Install gems and check coverage
185
+ - run: bundle check || bundle install
186
+ - run:
187
+ name: Merge and check coverage
188
+ command: |
189
+ RAILS_ENV=test bundle exec ruby ./bin/coverage.rb
190
+ - store_artifacts:
191
+ path: ~/geoblacklight/coverage
192
+ destination: coverage
193
+
119
194
  workflows:
120
- version: 2
195
+ version: 2.1
121
196
  build:
122
197
  jobs:
123
198
  - build:
124
- ruby_version: 2.6.5
125
- rails_version: 5.2.4.3
126
- name: "ruby2-6_rails5-2"
199
+ ruby_version: 2.7.1
200
+ rails_version: 6.0.3.2
201
+ coverage: true
202
+ name: "ruby2-7_rails6-0"
127
203
  - build:
128
- ruby_version: 2.5.7
204
+ ruby_version: 2.6.6
205
+ rails_version: 6.0.3.2
206
+ name: "ruby2-6_rails6-0"
207
+ - build:
208
+ ruby_version: 2.7.1
129
209
  rails_version: 5.2.4.3
130
- name: "ruby2-5_rails5-2"
131
- - rubocop:
132
- ruby_version: 2.6.5
210
+ name: "ruby2-7_rails5-2"
211
+ - build:
212
+ ruby_version: 2.6.6
133
213
  rails_version: 5.2.4.3
134
- name: "rubocop_ruby2-6_rails5-2"
214
+ name: "ruby2-6_rails5-2"
135
215
  - rubocop:
136
- ruby_version: 2.5.7
137
- rails_version: 5.2.4.3
138
- name: "rubocop_ruby2-5_rails5-2"
139
-
216
+ requires:
217
+ - ruby2-7_rails6-0
218
+ - coverage_report:
219
+ requires:
220
+ - ruby2-7_rails6-0
140
221
  nightly:
141
222
  triggers:
142
223
  - schedule:
@@ -147,18 +228,25 @@ workflows:
147
228
  - master
148
229
  jobs:
149
230
  - build:
150
- ruby_version: 2.6.5
151
- rails_version: 5.2.4.3
152
- name: "ruby2-6_rails5-2"
231
+ ruby_version: 2.7.1
232
+ rails_version: 6.0.3.2
233
+ coverage: true
234
+ name: "ruby2-7_rails6-0"
235
+ - build:
236
+ ruby_version: 2.6.6
237
+ rails_version: 6.0.3.2
238
+ name: "ruby2-6_rails6-0"
153
239
  - build:
154
- ruby_version: 2.5.7
240
+ ruby_version: 2.7.1
155
241
  rails_version: 5.2.4.3
156
- name: "ruby2-5_rails5-2"
157
- - rubocop:
158
- ruby_version: 2.6.5
242
+ name: "ruby2-7_rails5-2"
243
+ - build:
244
+ ruby_version: 2.6.6
159
245
  rails_version: 5.2.4.3
160
- name: "rubocop_ruby2-6_rails5-2"
246
+ name: "ruby2-6_rails5-2"
161
247
  - rubocop:
162
- ruby_version: 2.5.7
163
- rails_version: 5.2.4.3
164
- name: "rubocop_ruby2-5_rails5-2"
248
+ requires:
249
+ - ruby2-7_rails6-0
250
+ - coverage_report:
251
+ requires:
252
+ - ruby2-7_rails6-0
@@ -11,15 +11,14 @@ Rails:
11
11
  AllCops:
12
12
  TargetRubyVersion: 2.7
13
13
  DisplayCopNames: true
14
- Include:
15
- - '**/Rakefile'
16
14
  Exclude:
17
- - 'db/**/*'
18
- - 'vendor/**/*'
19
15
  - '.internal_test_app/**/*'
20
- - 'lib/generators/geoblacklight/templates/**/*'
16
+ - 'db/**/*'
21
17
  - 'geoblacklight.gemspec'
22
18
  - 'Gemfile'
19
+ - 'lib/generators/geoblacklight/templates/**/*'
20
+ - 'tmp/**/*'
21
+ - 'vendor/**/*'
23
22
 
24
23
  Layout/DotPosition:
25
24
  Description: Checks the position of the dot in multi-line method calls.
@@ -30,18 +29,21 @@ Layout/DotPosition:
30
29
  - leading
31
30
  - trailing
32
31
 
33
- Metrics/BlockLength:
34
- Exclude:
35
- - 'spec/helpers/geoblacklight_helper_spec.rb'
36
-
37
- Metrics/LineLength:
32
+ Layout/LineLength:
38
33
  Max: 115
39
34
  Exclude:
40
- - 'spec/**/*'
41
- - 'Rakefile'
35
+ - 'app/models/concerns/geoblacklight/spatial_search_behavior.rb'
36
+ - 'bin/coverage.rb'
42
37
  - 'lib/generators/geoblacklight/install_generator.rb'
43
38
  - 'lib/tasks/geoblacklight.rake'
44
- - 'app/models/concerns/geoblacklight/spatial_search_behavior.rb'
39
+ - 'Rakefile'
40
+ - 'spec/**/*'
41
+
42
+ Metrics/BlockLength:
43
+ Exclude:
44
+ - 'lib/tasks/geoblacklight.rake'
45
+ - 'Rakefile'
46
+ - 'spec/**/*'
45
47
 
46
48
  Metrics/MethodLength:
47
49
  Max: 16
@@ -1,18 +1,61 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-06-23 08:31:16 -0600 using RuboCop version 0.85.1.
3
+ # on 2020-08-07 13:49:06 -0500 using RuboCop version 0.85.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 1
10
- # Configuration parameters: CountComments, ExcludedMethods.
11
- # ExcludedMethods: refine
12
- Metrics/BlockLength:
13
- Max: 66
9
+ # Offense count: 2
10
+ # Configuration parameters: CustomIncludeMethods.
11
+ RSpec/EmptyExampleGroup:
12
+ Exclude:
13
+ - 'spec/views/catalog/_document_split.html.erb_spec.rb'
14
+ - 'spec/views/catalog/_index_split.html.erb_spec.rb'
15
+
16
+ # Offense count: 48
17
+ # Configuration parameters: .
18
+ # SupportedStyles: have_received, receive
19
+ RSpec/MessageSpies:
20
+ EnforcedStyle: receive
21
+
22
+ # Offense count: 29
23
+ # Configuration parameters: IgnoreSharedExamples.
24
+ RSpec/NamedSubject:
25
+ Exclude:
26
+ - 'spec/lib/geoblacklight/metadata/base_spec.rb'
27
+ - 'spec/lib/geoblacklight/metadata_transformer/base_spec.rb'
28
+ - 'spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb'
29
+ - 'spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb'
30
+ - 'spec/lib/geoblacklight/metadata_transformer_spec.rb'
31
+ - 'spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb'
32
+ - 'spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb'
14
33
 
15
34
  # Offense count: 4
35
+ RSpec/SubjectStub:
36
+ Exclude:
37
+ - 'spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb'
38
+ - 'spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb'
39
+
40
+ # Offense count: 9
41
+ # Configuration parameters: EnforcedStyle.
42
+ # SupportedStyles: slashes, arguments
43
+ # Rails/FilePath:
44
+ # Exclude:
45
+ # - 'lib/geoblacklight/download.rb'
46
+ # - 'lib/tasks/geoblacklight.rake'
47
+ # - 'spec/lib/geoblacklight/download_spec.rb'
48
+ # - 'spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb'
49
+ # - 'spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb'
50
+ # - 'spec/tasks/geoblacklight_spec.rb'
51
+
52
+ # Offense count: 6
53
+ Rails/OutputSafety:
54
+ Exclude:
55
+ - 'app/controllers/download_controller.rb'
56
+ - 'app/helpers/geoblacklight_helper.rb'
57
+
58
+ # Offense count: 6
16
59
  # Cop supports --auto-correct.
17
60
  # Configuration parameters: Include.
18
61
  # Include: **/Rakefile, **/*.rake
@@ -20,11 +63,24 @@ Rails/RakeEnvironment:
20
63
  Exclude:
21
64
  - 'lib/capistrano/tasks/**/*.rake'
22
65
  - 'Rakefile'
66
+ - 'lib/tasks/geoblacklight.rake'
23
67
 
24
68
  # Offense count: 1
69
+ # Configuration parameters: MinBodyLength.
70
+ Style/GuardClause:
71
+ Exclude:
72
+ - 'lib/generators/geoblacklight/assets_generator.rb'
73
+
74
+ # Offense count: 3
25
75
  # Cop supports --auto-correct.
26
- # Configuration parameters: EnforcedStyle.
27
- # SupportedStyles: always, always_true, never
28
- Style/FrozenStringLiteralComment:
76
+ # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
77
+ # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
78
+ Style/HashSyntax:
29
79
  Exclude:
30
- - 'Rakefile'
80
+ - 'lib/tasks/geoblacklight.rake'
81
+
82
+ # Offense count: 2
83
+ Style/MissingRespondToMissing:
84
+ Exclude:
85
+ - 'app/models/concerns/geoblacklight/solr_document.rb'
86
+ - 'lib/geoblacklight/references.rb'
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # GeoBlacklight
2
2
 
3
- [![CircleCI](https://circleci.com/gh/geoblacklight/geoblacklight.svg?style=svg)](https://circleci.com/gh/geoblacklight/geoblacklight) | [![Coverage Status](https://img.shields.io/coveralls/geoblacklight/geoblacklight.svg)](https://coveralls.io/r/geoblacklight/geoblacklight?branch=coveralls) | [![Gem Version](https://img.shields.io/gem/v/geoblacklight.svg)](https://github.com/geoblacklight/geoblacklight/releases)
3
+ [![CircleCI](https://circleci.com/gh/geoblacklight/geoblacklight.svg?style=svg)](https://circleci.com/gh/geoblacklight/geoblacklight) | [![Coverage Status](https://raw.githubusercontent.com/geoblacklight/geoblacklight/coverage-badge/coverage.svg)]() | [![Gem Version](https://img.shields.io/gem/v/geoblacklight.svg)](https://github.com/geoblacklight/geoblacklight/releases)
4
4
 
5
5
  GeoBlacklight is a world-class discovery platform for geospatial (GIS) holdings. It
6
6
  is an open collaborative project aiming to build off of the successes