geoblacklight 2.4.0 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ecb6ab2a7b58e2b177571c19ae7a50c699a409e8f1a561fd626732246959fc1a
4
- data.tar.gz: d9d965e335b0132e5980705e7edc13c961efeb4746148c64d887cfdefdc3808a
3
+ metadata.gz: 2ab9ad53c121ecb11786eda411ef17204fc5583f0509163d1d67410d71c200a4
4
+ data.tar.gz: 5e42344b9e36065ff2fd1e3016d660dd16e0c96c76926a2fd7dc46cbea2839a0
5
5
  SHA512:
6
- metadata.gz: 5804c2bbf9122569450a7312b5046174913669fcf4b2162241f2541d7efea1e619f8554f97c7644871ca3088ce60d6a835d92c6836c1b46485b812d5d1ad1539
7
- data.tar.gz: 1cacc9916d3f886093ece062ac7677ce7b83f64340494221ae7dba054c0c9ce89832b032c7b477c2d0e1f0be88ce5f2e77b6167bd28896a72f6e03013019c9bc
6
+ metadata.gz: 3eccb9b116840387fbcb0fa90b5f54026804b15ecee88d02732dc24cf39295c51ffc9b434f6a92c0c2d090265ea59a9d554a96b5d58ea350fbfb258bf4eea6c2
7
+ data.tar.gz: 6f1506bcd876c7977f717a6bbd04a7abc4aad119bb76051bce22c984f10376649aa2f11a3c36000d001e94c63c10207fe8abc9e4f3dcb87fae184e9b355dce76
@@ -0,0 +1,142 @@
1
+ name: CI
2
+
3
+ on: [push]
4
+
5
+ env:
6
+ cache-prefix: '02-24-2021-A'
7
+
8
+ jobs:
9
+ rubocop:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ - name: Set up Ruby
14
+ uses: ruby/setup-ruby@v1
15
+ with:
16
+ ruby-version: 2.7
17
+ - name: Install dependencies
18
+ run: bundle install
19
+ - name: Run linter
20
+ run: bundle exec rake rubocop
21
+
22
+ coverage:
23
+ runs-on: ubuntu-latest
24
+ needs: test
25
+ steps:
26
+ - uses: actions/checkout@v2
27
+
28
+ - name: Set up Ruby
29
+ uses: ruby/setup-ruby@v1
30
+ with:
31
+ ruby-version: 2.7
32
+
33
+ - name: Install dependencies
34
+ run: bundle install
35
+
36
+ - name: Download coverage artifacts
37
+ uses: actions/download-artifact@v2
38
+ with:
39
+ name: coverage
40
+ path: coverage_results
41
+
42
+ - name: Run coverage report
43
+ run: RAILS_ENV=test bundle exec ruby ./bin/coverage.rb
44
+
45
+ test:
46
+ runs-on: ubuntu-latest
47
+ strategy:
48
+ matrix:
49
+ ruby: [2.7]
50
+ steps:
51
+ - uses: actions/checkout@v2
52
+
53
+ - name: Set up Ruby
54
+ uses: ruby/setup-ruby@v1
55
+ with:
56
+ ruby-version: ${{ matrix.ruby }}
57
+
58
+ - name: Cache solr download
59
+ uses: actions/cache@v2
60
+ env:
61
+ cache-name: cache-solr-download
62
+ with:
63
+ path: ./tmp/solr
64
+ key: ${{ env.cache-name }}-${{ env.cache-prefix }}
65
+
66
+ - name: Install dependencies
67
+ run: bundle install
68
+
69
+ - name: Run tests
70
+ run: bundle exec rake ci
71
+ env:
72
+ ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test'
73
+
74
+ - name: Upload coverage artifacts
75
+ uses: actions/upload-artifact@v2
76
+ with:
77
+ name: coverage
78
+ path: coverage/
79
+
80
+ test_rails6_0:
81
+ runs-on: ubuntu-latest
82
+ strategy:
83
+ matrix:
84
+ ruby: [2.6]
85
+ steps:
86
+ - uses: actions/checkout@v2
87
+
88
+ - name: Set up Ruby
89
+ uses: ruby/setup-ruby@v1
90
+ with:
91
+ ruby-version: ${{ matrix.ruby }}
92
+
93
+ - name: Cache solr download
94
+ uses: actions/cache@v2
95
+ env:
96
+ cache-name: cache-solr-download
97
+ with:
98
+ path: ./tmp/solr
99
+ key: ${{ env.cache-name }}-${{ env.cache-prefix }}
100
+
101
+ - name: Install dependencies
102
+ run: bundle install
103
+ env:
104
+ RAILS_VERSION: 6.0.3.4
105
+
106
+ - name: Run tests
107
+ run: bundle exec rake ci
108
+ env:
109
+ RAILS_VERSION: 6.0.3.4
110
+ ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test'
111
+
112
+ test_rails5_2:
113
+ runs-on: ubuntu-latest
114
+ strategy:
115
+ matrix:
116
+ ruby: [2.5]
117
+ steps:
118
+ - uses: actions/checkout@v2
119
+
120
+ - name: Set up Ruby
121
+ uses: ruby/setup-ruby@v1
122
+ with:
123
+ ruby-version: ${{ matrix.ruby }}
124
+
125
+ - name: Cache solr download
126
+ uses: actions/cache@v2
127
+ env:
128
+ cache-name: cache-solr-download
129
+ with:
130
+ path: ./tmp/solr
131
+ key: ${{ env.cache-name }}-${{ env.cache-prefix }}
132
+
133
+ - name: Install dependencies
134
+ run: bundle install
135
+ env:
136
+ RAILS_VERSION: 5.2.4.2
137
+
138
+ - name: Run tests
139
+ run: bundle exec rake ci
140
+ env:
141
+ RAILS_VERSION: 5.2.4.2
142
+ ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test'
data/.gitignore CHANGED
@@ -19,3 +19,11 @@ jetty
19
19
  .internal_test_app
20
20
  # Ignore byebug history
21
21
  .byebug_history
22
+ .DS_Store
23
+
24
+ # Setup local GeoBlacklight JavaScript ignores
25
+ /node_modules
26
+ /yarn-error.log
27
+ yarn-debug.log*
28
+ .yarn-integrity
29
+ yarn.lock
data/.rubocop.yml CHANGED
@@ -1,25 +1,23 @@
1
- require: rubocop-rspec
2
-
3
- inherit_gem:
4
- bixby: bixby_default.yml
1
+ require:
2
+ - rubocop-rails
3
+ - rubocop-rspec
5
4
 
6
5
  inherit_from: .rubocop_todo.yml
7
6
 
8
- Rails:
9
- Enabled: true
10
-
11
7
  AllCops:
12
8
  TargetRubyVersion: 2.7
13
9
  DisplayCopNames: true
14
- Include:
15
- - '**/Rakefile'
10
+ NewCops: pending
16
11
  Exclude:
17
- - 'db/**/*'
18
- - 'vendor/**/*'
19
12
  - '.internal_test_app/**/*'
20
- - 'lib/generators/geoblacklight/templates/**/*'
13
+ - 'db/**/*'
21
14
  - 'geoblacklight.gemspec'
22
15
  - 'Gemfile'
16
+ - 'lib/generators/geoblacklight/templates/**/*'
17
+ - 'tmp/**/*'
18
+ - 'vendor/**/*'
19
+ - 'Rakefile'
20
+ - 'lib/tasks/geoblacklight.rake'
23
21
 
24
22
  Layout/DotPosition:
25
23
  Description: Checks the position of the dot in multi-line method calls.
@@ -30,18 +28,22 @@ Layout/DotPosition:
30
28
  - leading
31
29
  - trailing
32
30
 
33
- Metrics/BlockLength:
34
- Exclude:
35
- - 'spec/helpers/geoblacklight_helper_spec.rb'
36
-
37
- Metrics/LineLength:
31
+ Layout/LineLength:
38
32
  Max: 115
39
33
  Exclude:
40
- - 'spec/**/*'
41
- - 'Rakefile'
34
+ - 'app/models/concerns/geoblacklight/spatial_search_behavior.rb'
35
+ - 'bin/coverage.rb'
42
36
  - 'lib/generators/geoblacklight/install_generator.rb'
37
+ - 'lib/geoblacklight/relation/ancestors.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
@@ -71,10 +73,9 @@ RSpec/AnyInstance:
71
73
  - 'spec/models/concerns/geoblacklight/solr_document/finder_spec.rb'
72
74
  - 'spec/features/download_layer_spec.rb'
73
75
 
74
- # Rubocop bug causes view specs to fail.
75
- # https://github.com/nevir/rubocop-rspec/issues/47
76
76
  RSpec/DescribeClass:
77
- Enabled: false
77
+ Exclude:
78
+ - spec/tasks/*
78
79
 
79
80
  RSpec/ExampleLength:
80
81
  Enabled: false
data/.rubocop_todo.yml CHANGED
@@ -1,30 +1,416 @@
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 2021-02-24 20:30:24 UTC using RuboCop version 1.10.0.
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: 3
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
12
+ # SupportedStyles: with_first_argument, with_fixed_indentation
13
+ Layout/ArgumentAlignment:
14
+ Exclude:
15
+ - 'app/controllers/download_controller.rb'
16
+ - 'lib/geoblacklight/metadata/html.rb'
17
+
18
+ # Offense count: 12
19
+ # Cop supports --auto-correct.
20
+ Layout/EmptyLineAfterGuardClause:
21
+ Exclude:
22
+ - 'app/helpers/geoblacklight_helper.rb'
23
+ - 'app/models/concerns/geoblacklight/solr_document.rb'
24
+ - 'app/models/concerns/geoblacklight/solr_document/arcgis.rb'
25
+ - 'app/models/concerns/geoblacklight/solr_document/carto.rb'
26
+ - 'bin/coverage.rb'
27
+ - 'lib/geoblacklight/bounding_box.rb'
28
+ - 'lib/geoblacklight/download.rb'
29
+ - 'lib/geoblacklight/item_viewer.rb'
30
+ - 'lib/geoblacklight/metadata/base.rb'
31
+ - 'lib/geoblacklight/references.rb'
32
+ - 'lib/geoblacklight/view_helper_override.rb'
33
+
34
+ # Offense count: 141
35
+ # Cop supports --auto-correct.
36
+ Layout/EmptyLineAfterMagicComment:
37
+ Enabled: false
38
+
39
+ # Offense count: 5
40
+ # Cop supports --auto-correct.
41
+ # Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
42
+ Layout/EmptyLineBetweenDefs:
43
+ Exclude:
44
+ - 'lib/geoblacklight/exceptions.rb'
45
+ - 'lib/geoblacklight/metadata_transformer.rb'
46
+
47
+ # Offense count: 3
48
+ # Cop supports --auto-correct.
49
+ # Configuration parameters: AllowAliasSyntax, AllowedMethods.
50
+ # AllowedMethods: alias_method, public, protected, private
51
+ Layout/EmptyLinesAroundAttributeAccessor:
52
+ Exclude:
53
+ - 'lib/geoblacklight/metadata/base.rb'
54
+ - 'lib/geoblacklight/references.rb'
55
+ - 'lib/geoblacklight/relation/relation_response.rb'
56
+
57
+ # Offense count: 1
58
+ # Cop supports --auto-correct.
59
+ Lint/BooleanSymbol:
60
+ Exclude:
61
+ - 'spec/features/metadata_panel_spec.rb'
62
+
63
+ # Offense count: 4
64
+ # Configuration parameters: AllowedMethods.
65
+ # AllowedMethods: enums
66
+ Lint/ConstantDefinitionInBlock:
67
+ Exclude:
68
+ - 'spec/lib/geoblacklight/geoblacklight_helper_behavior_spec.rb'
69
+ - 'spec/lib/geoblacklight/view_helper_override_spec.rb'
70
+ - 'spec/models/concerns/geoblacklight/solr_document/carto_spec.rb'
71
+ - 'spec/models/concerns/geoblacklight/solr_document/finder_spec.rb'
72
+
9
73
  # Offense count: 1
10
- # Configuration parameters: CountComments, ExcludedMethods.
11
- # ExcludedMethods: refine
12
- Metrics/BlockLength:
13
- Max: 66
74
+ Lint/MissingSuper:
75
+ Exclude:
76
+ - 'lib/geoblacklight/exceptions.rb'
14
77
 
15
78
  # Offense count: 4
16
79
  # Cop supports --auto-correct.
80
+ Lint/SendWithMixinArgument:
81
+ Exclude:
82
+ - 'lib/geoblacklight.rb'
83
+ - 'lib/geoblacklight/engine.rb'
84
+
85
+ # Offense count: 5
86
+ # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
87
+ Metrics/AbcSize:
88
+ Max: 27
89
+
90
+ # Offense count: 1
91
+ # Configuration parameters: EnforcedStyleForLeadingUnderscores.
92
+ # SupportedStylesForLeadingUnderscores: disallowed, required, optional
93
+ Naming/MemoizedInstanceVariableName:
94
+ Exclude:
95
+ - 'app/models/concerns/geoblacklight/solr_document/finder.rb'
96
+
97
+ # Offense count: 2
98
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
99
+ # AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
100
+ Naming/MethodParameterName:
101
+ Exclude:
102
+ - 'lib/geoblacklight/references.rb'
103
+
104
+ # Offense count: 5
105
+ # Cop supports --auto-correct.
106
+ # Configuration parameters: PreferredName.
107
+ Naming/RescuedExceptionsVariableName:
108
+ Exclude:
109
+ - 'app/helpers/geoblacklight_helper.rb'
110
+ - 'lib/geoblacklight/download.rb'
111
+ - 'lib/geoblacklight/metadata/base.rb'
112
+ - 'lib/geoblacklight/wms_layer.rb'
113
+
114
+ # Offense count: 133
115
+ # Cop supports --auto-correct.
116
+ # Configuration parameters: EnabledMethods.
117
+ RSpec/Capybara/FeatureMethods:
118
+ Enabled: false
119
+
120
+ # Offense count: 18
121
+ RSpec/Capybara/VisibilityMatcher:
122
+ Exclude:
123
+ - 'spec/features/esri_viewer_spec.rb'
124
+ - 'spec/features/iiif_viewer_spec.rb'
125
+ - 'spec/features/split_view.html.erb_spec.rb'
126
+ - 'spec/features/tms_spec.rb'
127
+
128
+ # Offense count: 13
129
+ # Configuration parameters: Prefixes.
130
+ # Prefixes: when, with, without
131
+ RSpec/ContextWording:
132
+ Exclude:
133
+ - 'spec/helpers/geoblacklight_helper_spec.rb'
134
+ - 'spec/lib/geoblacklight/geoblacklight_helper_behavior_spec.rb'
135
+ - 'spec/lib/geoblacklight/item_viewer_spec.rb'
136
+ - 'spec/lib/geoblacklight/reference_spec.rb'
137
+ - 'spec/views/catalog/_show_downloads.html.erb_spec.rb'
138
+
139
+ # Offense count: 2
140
+ RSpec/EmptyExampleGroup:
141
+ Exclude:
142
+ - 'spec/views/catalog/_document_split.html.erb_spec.rb'
143
+ - 'spec/views/catalog/_index_split.html.erb_spec.rb'
144
+
145
+ # Offense count: 75
146
+ # Cop supports --auto-correct.
147
+ # Configuration parameters: AllowConsecutiveOneLiners.
148
+ RSpec/EmptyLineAfterExample:
149
+ Enabled: false
150
+
151
+ # Offense count: 77
152
+ # Cop supports --auto-correct.
153
+ RSpec/EmptyLineAfterExampleGroup:
154
+ Enabled: false
155
+
156
+ # Offense count: 65
157
+ # Cop supports --auto-correct.
158
+ RSpec/EmptyLineAfterFinalLet:
159
+ Enabled: false
160
+
161
+ # Offense count: 17
162
+ # Cop supports --auto-correct.
163
+ RSpec/EmptyLineAfterHook:
164
+ Exclude:
165
+ - 'spec/features/configurable_basemap_spec.rb'
166
+ - 'spec/features/empty_search_spec.rb'
167
+ - 'spec/features/home_page_spec.rb'
168
+ - 'spec/helpers/geoblacklight_helper_spec.rb'
169
+ - 'spec/lib/geoblacklight/download_spec.rb'
170
+ - 'spec/lib/geoblacklight/geoblacklight_helper_behavior_spec.rb'
171
+ - 'spec/lib/geoblacklight/metadata_spec.rb'
172
+ - 'spec/lib/geoblacklight/metadata_transformer/base_spec.rb'
173
+ - 'spec/lib/geoblacklight/references_spec.rb'
174
+ - 'spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb'
175
+ - 'spec/views/catalog/_show_downloads.html.erb_spec.rb'
176
+
177
+ # Offense count: 9
178
+ # Cop supports --auto-correct.
179
+ RSpec/EmptyLineAfterSubject:
180
+ Exclude:
181
+ - 'spec/lib/geoblacklight/document_presenter_spec.rb'
182
+ - 'spec/lib/geoblacklight/metadata_transformer/base_spec.rb'
183
+ - 'spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb'
184
+ - 'spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb'
185
+ - 'spec/lib/geoblacklight/metadata_transformer_spec.rb'
186
+ - 'spec/lib/geoblacklight/wms_layer_spec.rb'
187
+
188
+ # Offense count: 5
189
+ RSpec/ExpectInHook:
190
+ Exclude:
191
+ - 'spec/lib/geoblacklight/geoblacklight_helper_behavior_spec.rb'
192
+ - 'spec/lib/geoblacklight/metadata/base_spec.rb'
193
+ - 'spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb'
194
+ - 'spec/views/catalog/_show_downloads.html.erb_spec.rb'
195
+
196
+ # Offense count: 6
197
+ # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
198
+ # Include: **/*_spec*rb*, **/spec/**/*
199
+ RSpec/FilePath:
200
+ Exclude:
201
+ - 'spec/lib/geoblacklight/download/geojson_download_spec.rb'
202
+ - 'spec/lib/geoblacklight/download/geotiff_download_spec.rb'
203
+ - 'spec/lib/geoblacklight/download/hgl_download_spec.rb'
204
+ - 'spec/lib/geoblacklight/download/kmz_download_spec.rb'
205
+ - 'spec/lib/geoblacklight/download/shapefile_download_spec.rb'
206
+ - 'spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb'
207
+
208
+ # Offense count: 1
209
+ RSpec/IteratedExpectation:
210
+ Exclude:
211
+ - 'spec/lib/geoblacklight/references_spec.rb'
212
+
213
+ # Offense count: 4
214
+ RSpec/LeakyConstantDeclaration:
215
+ Exclude:
216
+ - 'spec/lib/geoblacklight/geoblacklight_helper_behavior_spec.rb'
217
+ - 'spec/lib/geoblacklight/view_helper_override_spec.rb'
218
+ - 'spec/models/concerns/geoblacklight/solr_document/carto_spec.rb'
219
+ - 'spec/models/concerns/geoblacklight/solr_document/finder_spec.rb'
220
+
221
+ # Offense count: 2
222
+ # Cop supports --auto-correct.
223
+ RSpec/LetBeforeExamples:
224
+ Exclude:
225
+ - 'spec/models/concerns/geoblacklight/solr_document_spec.rb'
226
+
227
+ # Offense count: 48
228
+ # Configuration parameters: .
229
+ # SupportedStyles: have_received, receive
230
+ RSpec/MessageSpies:
231
+ EnforcedStyle: receive
232
+
233
+ # Offense count: 119
234
+ RSpec/MultipleExpectations:
235
+ Max: 12
236
+
237
+ # Offense count: 41
238
+ # Configuration parameters: AllowSubject.
239
+ RSpec/MultipleMemoizedHelpers:
240
+ Max: 12
241
+
242
+ # Offense count: 29
243
+ # Configuration parameters: IgnoreSharedExamples.
244
+ RSpec/NamedSubject:
245
+ Exclude:
246
+ - 'spec/lib/geoblacklight/metadata/base_spec.rb'
247
+ - 'spec/lib/geoblacklight/metadata_transformer/base_spec.rb'
248
+ - 'spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb'
249
+ - 'spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb'
250
+ - 'spec/lib/geoblacklight/metadata_transformer_spec.rb'
251
+ - 'spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb'
252
+ - 'spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb'
253
+
254
+ # Offense count: 3
255
+ RSpec/NestedGroups:
256
+ Max: 4
257
+
258
+ # Offense count: 21
259
+ # Cop supports --auto-correct.
260
+ # Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers.
261
+ # SupportedStyles: inflected, explicit
262
+ RSpec/PredicateMatcher:
263
+ Exclude:
264
+ - 'spec/lib/geoblacklight/download_spec.rb'
265
+ - 'spec/lib/geoblacklight/view_helper_override_spec.rb'
266
+ - 'spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb'
267
+ - 'spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb'
268
+ - 'spec/models/concerns/geoblacklight/solr_document_spec.rb'
269
+
270
+ # Offense count: 2
271
+ RSpec/RepeatedExampleGroupBody:
272
+ Exclude:
273
+ - 'spec/helpers/geoblacklight_helper_spec.rb'
274
+
275
+ # Offense count: 2
276
+ RSpec/RepeatedExampleGroupDescription:
277
+ Exclude:
278
+ - 'spec/helpers/geoblacklight_helper_spec.rb'
279
+
280
+ # Offense count: 34
281
+ RSpec/StubbedMock:
282
+ Exclude:
283
+ - 'spec/features/download_layer_spec.rb'
284
+ - 'spec/helpers/geoblacklight_helper_spec.rb'
285
+ - 'spec/lib/geoblacklight/download_spec.rb'
286
+ - 'spec/lib/geoblacklight/geoblacklight_helper_behavior_spec.rb'
287
+ - 'spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb'
288
+ - 'spec/models/concerns/geoblacklight/solr_document/carto_spec.rb'
289
+ - 'spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb'
290
+ - 'spec/models/concerns/geoblacklight/solr_document_spec.rb'
291
+ - 'spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb'
292
+ - 'spec/views/catalog/_show_downloads.html.erb_spec.rb'
293
+
294
+ # Offense count: 4
295
+ RSpec/SubjectStub:
296
+ Exclude:
297
+ - 'spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb'
298
+ - 'spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb'
299
+
300
+ # Offense count: 10
301
+ # Configuration parameters: EnforcedStyle.
302
+ # SupportedStyles: slashes, arguments
303
+ Rails/FilePath:
304
+ Exclude:
305
+ - 'lib/geoblacklight/download.rb'
306
+ - 'spec/features/metadata_panel_spec.rb'
307
+ - 'spec/lib/geoblacklight/download_spec.rb'
308
+ - 'spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb'
309
+ - 'spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb'
310
+ - 'spec/tasks/geoblacklight_spec.rb'
311
+
312
+ # Offense count: 6
17
313
  # Configuration parameters: Include.
18
- # Include: **/Rakefile, **/*.rake
19
- Rails/RakeEnvironment:
314
+ # Include: app/helpers/**/*.rb
315
+ Rails/HelperInstanceVariable:
20
316
  Exclude:
21
- - 'lib/capistrano/tasks/**/*.rake'
22
- - 'Rakefile'
317
+ - 'app/helpers/blacklight_helper.rb'
318
+ - 'app/helpers/geoblacklight_helper.rb'
319
+
320
+ # Offense count: 6
321
+ Rails/OutputSafety:
322
+ Exclude:
323
+ - 'app/controllers/download_controller.rb'
324
+ - 'app/helpers/geoblacklight_helper.rb'
325
+
326
+ # Offense count: 5
327
+ # Cop supports --auto-correct.
328
+ Style/ExpandPathArguments:
329
+ Exclude:
330
+ - 'lib/generators/geoblacklight/install_generator.rb'
331
+ - 'lib/generators/geoblacklight/webpacker_generator.rb'
332
+ - 'spec/spec_helper.rb'
333
+ - 'spec/support/features.rb'
334
+ - 'spec/test_app_templates/lib/generators/test_app_generator.rb'
335
+
336
+ # Offense count: 2
337
+ # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, IgnoredMethods.
338
+ # SupportedStyles: annotated, template, unannotated
339
+ Style/FormatStringToken:
340
+ EnforcedStyle: unannotated
23
341
 
24
342
  # Offense count: 1
343
+ # Configuration parameters: MinBodyLength.
344
+ Style/GuardClause:
345
+ Exclude:
346
+ - 'lib/generators/geoblacklight/assets_generator.rb'
347
+
348
+ # Offense count: 2
349
+ Style/MissingRespondToMissing:
350
+ Exclude:
351
+ - 'app/models/concerns/geoblacklight/solr_document.rb'
352
+ - 'lib/geoblacklight/references.rb'
353
+
354
+ # Offense count: 2
355
+ # Cop supports --auto-correct.
356
+ Style/RedundantAssignment:
357
+ Exclude:
358
+ - 'app/controllers/download_controller.rb'
359
+
360
+ # Offense count: 6
361
+ # Cop supports --auto-correct.
362
+ Style/RedundantRegexpEscape:
363
+ Exclude:
364
+ - 'app/models/concerns/geoblacklight/solr_document.rb'
365
+ - 'lib/generators/geoblacklight/install_generator.rb'
366
+
367
+ # Offense count: 1
368
+ # Cop supports --auto-correct.
369
+ # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
370
+ # SupportedStyles: slashes, percent_r, mixed
371
+ Style/RegexpLiteral:
372
+ Exclude:
373
+ - 'lib/geoblacklight/reference.rb'
374
+
375
+ # Offense count: 5
25
376
  # Cop supports --auto-correct.
26
377
  # Configuration parameters: EnforcedStyle.
27
- # SupportedStyles: always, always_true, never
28
- Style/FrozenStringLiteralComment:
378
+ # SupportedStyles: implicit, explicit
379
+ Style/RescueStandardError:
380
+ Exclude:
381
+ - 'app/helpers/geoblacklight_helper.rb'
382
+ - 'lib/geoblacklight/metadata.rb'
383
+ - 'lib/geoblacklight/metadata_transformer.rb'
384
+ - 'lib/geoblacklight/metadata_transformer/base.rb'
385
+
386
+ # Offense count: 3
387
+ # Cop supports --auto-correct.
388
+ Style/SlicingWithRange:
389
+ Exclude:
390
+ - 'spec/helpers/geoblacklight_helper_spec.rb'
391
+
392
+ # Offense count: 6
393
+ # Cop supports --auto-correct.
394
+ Style/StringConcatenation:
395
+ Exclude:
396
+ - 'app/controllers/download_controller.rb'
397
+ - 'app/helpers/arcgis_helper.rb'
398
+ - 'app/helpers/carto_helper.rb'
399
+ - 'lib/geoblacklight/download.rb'
400
+ - 'spec/lib/geoblacklight/document_presenter_spec.rb'
401
+
402
+ # Offense count: 1
403
+ # Cop supports --auto-correct.
404
+ # Configuration parameters: MinSize.
405
+ # SupportedStyles: percent, brackets
406
+ Style/SymbolArray:
407
+ EnforcedStyle: brackets
408
+
409
+ # Offense count: 6
410
+ # Cop supports --auto-correct.
411
+ # Configuration parameters: EnforcedStyle, MinSize, WordRegex.
412
+ # SupportedStyles: percent, brackets
413
+ Style/WordArray:
29
414
  Exclude:
30
- - 'Rakefile'
415
+ - 'app/helpers/geoblacklight_helper.rb'
416
+ - 'spec/models/concerns/geoblacklight/solr_document/finder_spec.rb'