geoblacklight 3.2.0 → 4.0.0.pre.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +148 -0
  3. data/.gitignore +8 -0
  4. data/.rubocop.yml +14 -10
  5. data/.rubocop_todo.yml +361 -26
  6. data/README.md +3 -3
  7. data/Rakefile +19 -12
  8. data/app/assets/images/blacklight/michigan-state-university.svg +6 -0
  9. data/app/assets/images/blacklight/pennsylvania-state-university.svg +6 -0
  10. data/app/assets/images/blacklight/purdue-university.svg +6 -0
  11. data/app/assets/images/blacklight/the-ohio-state-university.svg +7 -0
  12. data/app/assets/images/blacklight/university-of-chicago.svg +6 -0
  13. data/app/assets/images/blacklight/university-of-illinois-urbana-champaign.svg +6 -0
  14. data/app/assets/images/blacklight/university-of-iowa.svg +5 -0
  15. data/app/assets/images/blacklight/university-of-maryland.svg +5 -0
  16. data/app/assets/images/blacklight/university-of-michigan.svg +5 -0
  17. data/app/assets/images/blacklight/university-of-minnesota.svg +5 -0
  18. data/app/assets/images/blacklight/university-of-nebraska-lincoln.svg +8 -0
  19. data/app/assets/images/blacklight/university-of-wisconsin-madison.svg +5 -0
  20. data/app/assets/images/favicon.ico +0 -0
  21. data/app/assets/javascripts/geoblacklight/geoblacklight.js +18 -1
  22. data/app/assets/javascripts/geoblacklight/modules/bookmarks.js +43 -0
  23. data/app/assets/javascripts/geoblacklight/modules/metadata_download_button.js +6 -1
  24. data/app/assets/javascripts/geoblacklight/modules/results.js +7 -8
  25. data/app/assets/javascripts/geoblacklight/modules/util.js +5 -0
  26. data/app/assets/javascripts/geoblacklight/viewers/esri.js +1 -1
  27. data/app/assets/javascripts/geoblacklight/viewers/index_map.js +1 -1
  28. data/app/assets/javascripts/geoblacklight/viewers/map.js +12 -2
  29. data/app/assets/javascripts/geoblacklight/viewers/tms.js +10 -0
  30. data/app/assets/javascripts/geoblacklight/viewers/wms.js +1 -1
  31. data/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss +41 -0
  32. data/app/assets/stylesheets/geoblacklight/modules/results.scss +1 -1
  33. data/app/assets/stylesheets/geoblacklight/modules/toolbar.scss +6 -0
  34. data/app/components/geoblacklight/homepage_feature_facet_component.html.erb +11 -0
  35. data/app/components/geoblacklight/homepage_feature_facet_component.rb +13 -0
  36. data/{lib → app/helpers}/geoblacklight/geoblacklight_helper_behavior.rb +6 -4
  37. data/app/helpers/geoblacklight_helper.rb +14 -8
  38. data/app/models/concerns/geoblacklight/solr_document/citation.rb +2 -2
  39. data/app/models/concerns/geoblacklight/solr_document.rb +11 -16
  40. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +5 -5
  41. data/app/views/catalog/_arcgis.html.erb +1 -1
  42. data/app/views/catalog/_data_dictionary.html.erb +1 -2
  43. data/app/views/catalog/_document_split.html.erb +1 -1
  44. data/app/views/catalog/_header_icons.html.erb +1 -1
  45. data/app/views/catalog/_home_text.html.erb +7 -29
  46. data/app/views/catalog/_index_split_default.html.erb +1 -1
  47. data/app/views/catalog/_show_default_viewer_container.html.erb +1 -1
  48. data/app/views/catalog/_show_header_default.html.erb +1 -1
  49. data/app/views/download/hgl.html.erb +13 -11
  50. data/app/views/relation/_relations.html.erb +15 -0
  51. data/app/views/relation/index.html.erb +4 -16
  52. data/app/views/relation/index.json.jbuilder +6 -2
  53. data/babel.config.json +4 -0
  54. data/config/initializers/new_gbl_settings_defaults_3_4.yml +6 -0
  55. data/config/locales/geoblacklight.en.yml +12 -0
  56. data/geoblacklight.gemspec +5 -3
  57. data/jest.config.js +25 -0
  58. data/lib/generators/geoblacklight/install_generator.rb +1 -1
  59. data/lib/generators/geoblacklight/templates/catalog_controller.rb +78 -35
  60. data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +195 -0
  61. data/lib/generators/geoblacklight/templates/settings.yml +91 -17
  62. data/lib/geoblacklight/bounding_box.rb +1 -1
  63. data/lib/geoblacklight/constants.rb +1 -0
  64. data/lib/geoblacklight/download/geojson_download.rb +1 -1
  65. data/lib/geoblacklight/download/geotiff_download.rb +1 -1
  66. data/lib/geoblacklight/download/hgl_download.rb +1 -1
  67. data/lib/geoblacklight/download/kmz_download.rb +2 -2
  68. data/lib/geoblacklight/download/shapefile_download.rb +1 -1
  69. data/lib/geoblacklight/geometry.rb +85 -0
  70. data/lib/geoblacklight/item_viewer.rb +5 -1
  71. data/lib/geoblacklight/metadata/base.rb +1 -7
  72. data/lib/geoblacklight/references.rb +1 -1
  73. data/lib/geoblacklight/relation/ancestors.rb +4 -3
  74. data/lib/geoblacklight/relation/descendants.rb +4 -3
  75. data/lib/geoblacklight/relation/relation_response.rb +21 -6
  76. data/lib/geoblacklight/version.rb +1 -1
  77. data/lib/geoblacklight/view_helper_override.rb +1 -1
  78. data/lib/geoblacklight/wms_layer.rb +1 -4
  79. data/lib/geoblacklight.rb +1 -3
  80. data/lib/tasks/geoblacklight.rake +5 -0
  81. data/package.json +17 -1
  82. data/schema/{geoblacklight-schema.json → geoblacklight-schema-1.0.json} +1 -1
  83. data/schema/geoblacklight-schema-aardvark.json +211 -0
  84. data/setupJest.js +14 -0
  85. data/solr/conf/schema.xml +35 -29
  86. data/solr/conf/solrconfig.xml +15 -15
  87. data/spec/components/geoblacklight/homepage_feature_facet_component_spec.rb +39 -0
  88. data/spec/config/initializers/rails_config_spec.rb +15 -0
  89. data/spec/controllers/catalog_controller_spec.rb +7 -7
  90. data/spec/features/esri_viewer_spec.rb +1 -1
  91. data/spec/features/home_page_spec.rb +4 -4
  92. data/spec/features/layer_opacity_spec.rb +1 -0
  93. data/spec/features/metadata_panel_spec.rb +1 -1
  94. data/spec/features/missing_metadata_spec.rb +2 -2
  95. data/spec/features/relations_spec.rb +2 -2
  96. data/spec/features/search_results_map_spec.rb +2 -1
  97. data/spec/features/search_results_overlap_ratio_spec.rb +2 -2
  98. data/spec/features/split_view.html.erb_spec.rb +16 -12
  99. data/spec/features/tms_spec.rb +10 -0
  100. data/spec/fixtures/solr_documents/README.md +48 -36
  101. data/spec/fixtures/solr_documents/actual-papermap1.json +41 -18
  102. data/spec/fixtures/solr_documents/actual-point1.json +47 -27
  103. data/spec/fixtures/solr_documents/actual-polygon1.json +43 -18
  104. data/spec/fixtures/solr_documents/actual-raster1.json +52 -23
  105. data/spec/fixtures/solr_documents/all-relationships.json +48 -0
  106. data/spec/fixtures/solr_documents/baruch_ancestor1.json +62 -37
  107. data/spec/fixtures/solr_documents/baruch_ancestor2.json +62 -37
  108. data/spec/fixtures/solr_documents/baruch_documentation_download.json +60 -34
  109. data/spec/fixtures/solr_documents/bbox-spans-180.json +34 -16
  110. data/spec/fixtures/solr_documents/cornell_html_metadata.json +46 -26
  111. data/spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json +43 -25
  112. data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +45 -28
  113. data/spec/fixtures/solr_documents/esri-feature-layer.json +44 -34
  114. data/spec/fixtures/solr_documents/esri-image-map-layer.json +45 -31
  115. data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +42 -17
  116. data/spec/fixtures/solr_documents/esri-wms-layer.json +46 -21
  117. data/spec/fixtures/solr_documents/harvard_raster.json +55 -36
  118. data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +35 -22
  119. data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +48 -27
  120. data/spec/fixtures/solr_documents/index-map-polygon.json +48 -27
  121. data/spec/fixtures/solr_documents/index-map-stanford.json +54 -25
  122. data/spec/fixtures/solr_documents/index_map_point.json +54 -26
  123. data/spec/fixtures/solr_documents/metadata_no_geom.json +27 -0
  124. data/spec/fixtures/solr_documents/metadata_no_provider.json +39 -0
  125. data/spec/fixtures/solr_documents/multiple-downloads.json +33 -20
  126. data/spec/fixtures/solr_documents/no_locn_geometry.json +25 -0
  127. data/spec/fixtures/solr_documents/no_spatial.json +37 -19
  128. data/spec/fixtures/solr_documents/oembed.json +34 -17
  129. data/spec/fixtures/solr_documents/princeton-child1.json +45 -28
  130. data/spec/fixtures/solr_documents/princeton-child2.json +45 -28
  131. data/spec/fixtures/solr_documents/princeton-child3.json +45 -28
  132. data/spec/fixtures/solr_documents/princeton-child4.json +45 -28
  133. data/spec/fixtures/solr_documents/princeton-parent.json +46 -23
  134. data/spec/fixtures/solr_documents/public_direct_download.json +48 -21
  135. data/spec/fixtures/solr_documents/public_iiif_princeton.json +49 -24
  136. data/spec/fixtures/solr_documents/public_polygon_mit.json +31 -15
  137. data/spec/fixtures/solr_documents/restricted-line.json +52 -21
  138. data/spec/fixtures/solr_documents/the-related-record.json +27 -0
  139. data/spec/fixtures/solr_documents/tms.json +45 -0
  140. data/spec/fixtures/solr_documents/umn_metro_result1.json +44 -28
  141. data/spec/fixtures/solr_documents/umn_state_result1.json +44 -26
  142. data/spec/fixtures/solr_documents/umn_state_result2.json +45 -24
  143. data/spec/fixtures/solr_documents/uva_slug_colon.json +43 -20
  144. data/spec/{lib → helpers}/geoblacklight/geoblacklight_helper_behavior_spec.rb +1 -0
  145. data/spec/helpers/geoblacklight_helper_spec.rb +30 -4
  146. data/spec/javascripts/geoblacklight_spec.js +0 -6
  147. data/spec/javascripts/metadata_download_button_spec.js +5 -3
  148. data/spec/javascripts/util_spec.js +2 -4
  149. data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -1
  150. data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +1 -1
  151. data/spec/lib/geoblacklight/download/hgl_download_spec.rb +1 -1
  152. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +2 -2
  153. data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +1 -1
  154. data/spec/lib/geoblacklight/download_spec.rb +1 -1
  155. data/spec/lib/geoblacklight/geometry_spec.rb +59 -0
  156. data/spec/lib/geoblacklight/item_viewer_spec.rb +12 -0
  157. data/spec/lib/geoblacklight/references_spec.rb +3 -3
  158. data/spec/lib/geoblacklight/relation/ancestors_spec.rb +3 -3
  159. data/spec/lib/geoblacklight/relation/descendants_spec.rb +3 -3
  160. data/spec/lib/geoblacklight/relation/relation_response_spec.rb +32 -17
  161. data/spec/models/concerns/geoblacklight/solr_document_spec.rb +4 -4
  162. data/spec/spec_helper.rb +2 -0
  163. data/spec/support/view_component_capybara_test_helpers.rb +8 -0
  164. data/spec/test_app_templates/Gemfile.extra +1 -0
  165. data/spec/test_app_templates/lib/generators/test_app_generator.rb +0 -7
  166. data/spec/views/catalog/_document_split.html.erb_spec.rb +1 -1
  167. data/spec/views/catalog/_index_split.html.erb_spec.rb +1 -1
  168. data/template.rb +1 -0
  169. metadata +99 -51
  170. data/.circleci/config.yml +0 -256
  171. data/app/views/catalog/_document_action.html.erb +0 -6
  172. data/app/views/catalog/_facet_tag_item.html.erb +0 -3
  173. data/app/views/catalog/_facet_tag_layout.html.erb +0 -2
  174. data/app/views/relation/_ancestors.html.erb +0 -8
  175. data/app/views/relation/_descendants.html.erb +0 -15
  176. data/schema/format-values.md +0 -50
  177. data/schema/geoblacklight-schema-deprecated.md +0 -39
  178. data/schema/geoblacklight-schema.md +0 -323
  179. data/schema/geometry-type-values.md +0 -11
  180. data/schema/references.md +0 -23
  181. data/schema/schema-commentary.md +0 -198
  182. data/schema/subjects.md +0 -41
  183. data/schema/type-values.md +0 -10
  184. data/spec/fixtures/solr_documents/metadata_no_dct_provenance_s.json +0 -30
  185. data/spec/fixtures/solr_documents/metadata_no_layer_geom_type_s.json +0 -17
  186. data/spec/fixtures/solr_documents/metadata_no_solr_geom.json +0 -23
  187. data/spec/javascripts/geoblacklight/viewers/esri/tiled_map_layer_spec.js +0 -12
  188. data/spec/javascripts/spec_helper.js +0 -32
  189. data/spec/lib/geoblacklight/controller_override_spec.rb +0 -2
  190. data/spec/teaspoon_env.rb +0 -214
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e2e3a858e92e8bb0af8d6cfbb3ca9861cb55102d64ca24e73511924dde247c8d
4
- data.tar.gz: 63a4a7e376f0ffc2e420c3dcaa0fada82063e9b5da4993bc4bdf2925b21a8147
3
+ metadata.gz: 040dd47045422f5690fcbf94d66341e1a6c7f23a17f51d08c619d5735d1e8da0
4
+ data.tar.gz: 4433d184dca84709c3d448d1b37e518934f8f0504aa05008c2427754d85c37d8
5
5
  SHA512:
6
- metadata.gz: f3c1db766c32f1e62bf6d269b21ff72850c7f1472192e22b12d116374e150d00ba88d9b493bc89b774b9c7a5a5ba3471254224ebfea294479a6b9eed8dd4a686
7
- data.tar.gz: 5a2e07a485de06230e6e5ae5fc03bb5b31e66fad43bf3e9f77769e3eff99ee16ab9812fc98af9359aabd5e18ed4d085af748a25870bd0c226e07beb11b349689
6
+ metadata.gz: b3b8fc3bcf5d9796d7191d47c1d23e08426cf5d02227a4a3b8cd9325a4c404abf92c2f27935468b6c5673ca003672ab0955a95d7d1fadc8d19d8966bb9999d6b
7
+ data.tar.gz: 229378574de83e5899e25f0947de49f37e6e61946a7e2a0abe40cca934e1f8c06447aa2f86405de31ad05fe325574eb1c5f8c1350709eafb006783a324fdb73a
@@ -0,0 +1,148 @@
1
+ name: CI
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ rubocop:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v2
10
+ - name: Set up Ruby
11
+ uses: ruby/setup-ruby@v1
12
+ with:
13
+ ruby-version: 2.7
14
+ - name: Install dependencies
15
+ run: bundle install
16
+ - name: Run linter
17
+ run: bundle exec rake rubocop
18
+
19
+ coverage:
20
+ runs-on: ubuntu-latest
21
+ needs: test
22
+ steps:
23
+ - uses: actions/checkout@v2
24
+
25
+ - name: Set up Ruby
26
+ uses: ruby/setup-ruby@v1
27
+ with:
28
+ ruby-version: 2.7
29
+
30
+ - name: Install dependencies
31
+ run: bundle install
32
+
33
+ - name: Download coverage artifacts
34
+ uses: actions/download-artifact@v2
35
+ with:
36
+ name: coverage
37
+ path: coverage_results
38
+
39
+ - name: Run coverage report
40
+ run: RAILS_ENV=test bundle exec ruby ./bin/coverage.rb
41
+
42
+ test:
43
+ runs-on: ubuntu-latest
44
+ strategy:
45
+ matrix:
46
+ ruby: [2.7, 3.0]
47
+ steps:
48
+ - uses: actions/checkout@v2
49
+
50
+ - name: Set up Ruby
51
+ uses: ruby/setup-ruby@v1
52
+ with:
53
+ ruby-version: ${{ matrix.ruby }}
54
+
55
+ - name: Create Solr container
56
+ run: docker run -d -p 8983:8983 geoblacklight/solr:8.9-v1.0.0 server/scripts/ci-start.sh
57
+
58
+ - name: Install dependencies
59
+ run: bundle install
60
+
61
+ - name: Load config into solr
62
+ run: |
63
+ cd solr/conf
64
+ zip -1 -r solr_config.zip ./*
65
+ curl -H "Content-type:application/octet-stream" --data-binary @solr_config.zip "http://solr:SolrRocks@127.0.0.1:8983/solr/admin/configs?action=UPLOAD&name=blacklight"
66
+ curl -H 'Content-type: application/json' http://solr:SolrRocks@127.0.0.1:8983/api/collections/ -d '{create: {name: blacklight-core, config: blacklight, numShards: 1}}'
67
+
68
+ - name: Run tests
69
+ run: bundle exec rake ci
70
+ env:
71
+ ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test'
72
+ SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core
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: Create Solr container
94
+ run: docker run -d -p 8983:8983 geoblacklight/solr:8.9-v1.0.0 server/scripts/ci-start.sh
95
+
96
+ - name: Install dependencies
97
+ run: bundle install
98
+ env:
99
+ RAILS_VERSION: 6.0.3.4
100
+
101
+ - name: Load config into solr
102
+ run: |
103
+ cd solr/conf
104
+ zip -1 -r solr_config.zip ./*
105
+ curl -H "Content-type:application/octet-stream" --data-binary @solr_config.zip "http://solr:SolrRocks@127.0.0.1:8983/solr/admin/configs?action=UPLOAD&name=blacklight"
106
+ curl -H 'Content-type: application/json' http://solr:SolrRocks@127.0.0.1:8983/api/collections/ -d '{create: {name: blacklight-core, config: blacklight, numShards: 1}}'
107
+
108
+ - name: Run tests
109
+ run: bundle exec rake ci
110
+ env:
111
+ RAILS_VERSION: 6.0.3.4
112
+ ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test'
113
+ SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core
114
+
115
+ test_rails5_2:
116
+ runs-on: ubuntu-latest
117
+ strategy:
118
+ matrix:
119
+ ruby: [2.6]
120
+ steps:
121
+ - uses: actions/checkout@v2
122
+
123
+ - name: Set up Ruby
124
+ uses: ruby/setup-ruby@v1
125
+ with:
126
+ ruby-version: ${{ matrix.ruby }}
127
+
128
+ - name: Create Solr container
129
+ run: docker run -d -p 8983:8983 geoblacklight/solr:8.9-v1.0.0 server/scripts/ci-start.sh
130
+
131
+ - name: Install dependencies
132
+ run: bundle install
133
+ env:
134
+ RAILS_VERSION: 5.2.6
135
+
136
+ - name: Load config into solr
137
+ run: |
138
+ cd solr/conf
139
+ zip -1 -r solr_config.zip ./*
140
+ curl -H "Content-type:application/octet-stream" --data-binary @solr_config.zip "http://solr:SolrRocks@127.0.0.1:8983/solr/admin/configs?action=UPLOAD&name=blacklight"
141
+ curl -H 'Content-type: application/json' http://solr:SolrRocks@127.0.0.1:8983/api/collections/ -d '{create: {name: blacklight-core, config: blacklight, numShards: 1}}'
142
+
143
+ - name: Run tests
144
+ run: bundle exec rake ci
145
+ env:
146
+ RAILS_VERSION: 5.2.6
147
+ ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test'
148
+ SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core
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,16 +1,13 @@
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
10
+ NewCops: pending
14
11
  Exclude:
15
12
  - '.internal_test_app/**/*'
16
13
  - 'db/**/*'
@@ -19,6 +16,8 @@ AllCops:
19
16
  - 'lib/generators/geoblacklight/templates/**/*'
20
17
  - 'tmp/**/*'
21
18
  - 'vendor/**/*'
19
+ - 'Rakefile'
20
+ - 'lib/tasks/geoblacklight.rake'
22
21
 
23
22
  Layout/DotPosition:
24
23
  Description: Checks the position of the dot in multi-line method calls.
@@ -35,6 +34,8 @@ Layout/LineLength:
35
34
  - 'app/models/concerns/geoblacklight/spatial_search_behavior.rb'
36
35
  - 'bin/coverage.rb'
37
36
  - 'lib/generators/geoblacklight/install_generator.rb'
37
+ - 'lib/geoblacklight/relation/ancestors.rb'
38
+ - 'lib/geoblacklight/relation/relation_response.rb'
38
39
  - 'lib/tasks/geoblacklight.rake'
39
40
  - 'Rakefile'
40
41
  - 'spec/**/*'
@@ -73,14 +74,17 @@ RSpec/AnyInstance:
73
74
  - 'spec/models/concerns/geoblacklight/solr_document/finder_spec.rb'
74
75
  - 'spec/features/download_layer_spec.rb'
75
76
 
76
- # Rubocop bug causes view specs to fail.
77
- # https://github.com/nevir/rubocop-rspec/issues/47
78
77
  RSpec/DescribeClass:
79
- Enabled: false
78
+ Exclude:
79
+ - spec/tasks/*
80
80
 
81
81
  RSpec/ExampleLength:
82
82
  Enabled: false
83
83
 
84
+ RSpec/MultipleExpectations:
85
+ Exclude:
86
+ - 'spec/features/split_view.html.erb_spec.rb'
87
+
84
88
  RSpec/VerifiedDoubles:
85
89
  Exclude:
86
90
  - 'spec/lib/geoblacklight/download/hgl_download_spec.rb'
data/.rubocop_todo.yml CHANGED
@@ -1,24 +1,248 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-08-07 13:49:06 -0500 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/helpers/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
+
73
+ # Offense count: 1
74
+ Lint/MissingSuper:
75
+ Exclude:
76
+ - 'lib/geoblacklight/exceptions.rb'
77
+
78
+ # Offense count: 4
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/helpers/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
+
9
139
  # Offense count: 2
10
- # Configuration parameters: CustomIncludeMethods.
11
140
  RSpec/EmptyExampleGroup:
12
141
  Exclude:
13
142
  - 'spec/views/catalog/_document_split.html.erb_spec.rb'
14
143
  - 'spec/views/catalog/_index_split.html.erb_spec.rb'
15
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/helpers/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/helpers/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/InstanceVariable:
210
+ Enabled: false
211
+
212
+ # Offense count: 1
213
+ RSpec/IteratedExpectation:
214
+ Exclude:
215
+ - 'spec/lib/geoblacklight/references_spec.rb'
216
+
217
+ # Offense count: 4
218
+ RSpec/LeakyConstantDeclaration:
219
+ Exclude:
220
+ - 'spec/helpers/geoblacklight/geoblacklight_helper_behavior_spec.rb'
221
+ - 'spec/lib/geoblacklight/view_helper_override_spec.rb'
222
+ - 'spec/models/concerns/geoblacklight/solr_document/carto_spec.rb'
223
+ - 'spec/models/concerns/geoblacklight/solr_document/finder_spec.rb'
224
+
225
+ # Offense count: 2
226
+ # Cop supports --auto-correct.
227
+ RSpec/LetBeforeExamples:
228
+ Exclude:
229
+ - 'spec/models/concerns/geoblacklight/solr_document_spec.rb'
230
+
16
231
  # Offense count: 48
17
232
  # Configuration parameters: .
18
233
  # SupportedStyles: have_received, receive
19
234
  RSpec/MessageSpies:
20
235
  EnforcedStyle: receive
21
236
 
237
+ # Offense count: 119
238
+ RSpec/MultipleExpectations:
239
+ Max: 12
240
+
241
+ # Offense count: 41
242
+ # Configuration parameters: AllowSubject.
243
+ RSpec/MultipleMemoizedHelpers:
244
+ Max: 12
245
+
22
246
  # Offense count: 29
23
247
  # Configuration parameters: IgnoreSharedExamples.
24
248
  RSpec/NamedSubject:
@@ -31,23 +255,72 @@ RSpec/NamedSubject:
31
255
  - 'spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb'
32
256
  - 'spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb'
33
257
 
258
+ # Offense count: 3
259
+ RSpec/NestedGroups:
260
+ Max: 4
261
+
262
+ # Offense count: 21
263
+ # Cop supports --auto-correct.
264
+ # Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers.
265
+ # SupportedStyles: inflected, explicit
266
+ RSpec/PredicateMatcher:
267
+ Exclude:
268
+ - 'spec/lib/geoblacklight/download_spec.rb'
269
+ - 'spec/lib/geoblacklight/view_helper_override_spec.rb'
270
+ - 'spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb'
271
+ - 'spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb'
272
+ - 'spec/models/concerns/geoblacklight/solr_document_spec.rb'
273
+
274
+ # Offense count: 2
275
+ RSpec/RepeatedExampleGroupBody:
276
+ Exclude:
277
+ - 'spec/helpers/geoblacklight_helper_spec.rb'
278
+
279
+ # Offense count: 2
280
+ RSpec/RepeatedExampleGroupDescription:
281
+ Exclude:
282
+ - 'spec/helpers/geoblacklight_helper_spec.rb'
283
+
284
+ # Offense count: 34
285
+ RSpec/StubbedMock:
286
+ Exclude:
287
+ - 'spec/features/download_layer_spec.rb'
288
+ - 'spec/helpers/geoblacklight_helper_spec.rb'
289
+ - 'spec/lib/geoblacklight/download_spec.rb'
290
+ - 'spec/helpers/geoblacklight/geoblacklight_helper_behavior_spec.rb'
291
+ - 'spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb'
292
+ - 'spec/models/concerns/geoblacklight/solr_document/carto_spec.rb'
293
+ - 'spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb'
294
+ - 'spec/models/concerns/geoblacklight/solr_document_spec.rb'
295
+ - 'spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb'
296
+ - 'spec/views/catalog/_show_downloads.html.erb_spec.rb'
297
+
34
298
  # Offense count: 4
35
299
  RSpec/SubjectStub:
36
300
  Exclude:
37
301
  - 'spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb'
38
302
  - 'spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb'
39
303
 
40
- # Offense count: 9
304
+ # Offense count: 10
41
305
  # Configuration parameters: EnforcedStyle.
42
306
  # 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'
307
+ Rails/FilePath:
308
+ Exclude:
309
+ - 'lib/geoblacklight/download.rb'
310
+ - 'spec/features/metadata_panel_spec.rb'
311
+ - 'spec/lib/geoblacklight/download_spec.rb'
312
+ - 'spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb'
313
+ - 'spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb'
314
+ - 'spec/tasks/geoblacklight_spec.rb'
315
+
316
+ # Offense count: 6
317
+ # Configuration parameters: Include.
318
+ # Include: app/helpers/**/*.rb
319
+ Rails/HelperInstanceVariable:
320
+ Exclude:
321
+ - 'app/helpers/blacklight_helper.rb'
322
+ - 'app/helpers/geoblacklight_helper.rb'
323
+ - 'app/helpers/geoblacklight/geoblacklight_helper_behavior.rb'
51
324
 
52
325
  # Offense count: 6
53
326
  Rails/OutputSafety:
@@ -55,15 +328,21 @@ Rails/OutputSafety:
55
328
  - 'app/controllers/download_controller.rb'
56
329
  - 'app/helpers/geoblacklight_helper.rb'
57
330
 
58
- # Offense count: 6
331
+ # Offense count: 5
59
332
  # Cop supports --auto-correct.
60
- # Configuration parameters: Include.
61
- # Include: **/Rakefile, **/*.rake
62
- Rails/RakeEnvironment:
333
+ Style/ExpandPathArguments:
63
334
  Exclude:
64
- - 'lib/capistrano/tasks/**/*.rake'
65
- - 'Rakefile'
66
- - 'lib/tasks/geoblacklight.rake'
335
+ - 'lib/generators/geoblacklight/install_generator.rb'
336
+ - 'lib/generators/geoblacklight/webpacker_generator.rb'
337
+ - 'spec/spec_helper.rb'
338
+ - 'spec/support/features.rb'
339
+ - 'spec/test_app_templates/lib/generators/test_app_generator.rb'
340
+
341
+ # Offense count: 2
342
+ # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, IgnoredMethods.
343
+ # SupportedStyles: annotated, template, unannotated
344
+ Style/FormatStringToken:
345
+ EnforcedStyle: unannotated
67
346
 
68
347
  # Offense count: 1
69
348
  # Configuration parameters: MinBodyLength.
@@ -71,16 +350,72 @@ Style/GuardClause:
71
350
  Exclude:
72
351
  - 'lib/generators/geoblacklight/assets_generator.rb'
73
352
 
74
- # Offense count: 3
75
- # Cop supports --auto-correct.
76
- # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
77
- # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
78
- Style/HashSyntax:
79
- Exclude:
80
- - 'lib/tasks/geoblacklight.rake'
81
-
82
353
  # Offense count: 2
83
354
  Style/MissingRespondToMissing:
84
355
  Exclude:
85
356
  - 'app/models/concerns/geoblacklight/solr_document.rb'
86
357
  - 'lib/geoblacklight/references.rb'
358
+
359
+ # Offense count: 2
360
+ # Cop supports --auto-correct.
361
+ Style/RedundantAssignment:
362
+ Exclude:
363
+ - 'app/controllers/download_controller.rb'
364
+
365
+ # Offense count: 6
366
+ # Cop supports --auto-correct.
367
+ Style/RedundantRegexpEscape:
368
+ Exclude:
369
+ - 'app/models/concerns/geoblacklight/solr_document.rb'
370
+ - 'lib/generators/geoblacklight/install_generator.rb'
371
+
372
+ # Offense count: 1
373
+ # Cop supports --auto-correct.
374
+ # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
375
+ # SupportedStyles: slashes, percent_r, mixed
376
+ Style/RegexpLiteral:
377
+ Exclude:
378
+ - 'lib/geoblacklight/reference.rb'
379
+
380
+ # Offense count: 5
381
+ # Cop supports --auto-correct.
382
+ # Configuration parameters: EnforcedStyle.
383
+ # SupportedStyles: implicit, explicit
384
+ Style/RescueStandardError:
385
+ Exclude:
386
+ - 'app/helpers/geoblacklight_helper.rb'
387
+ - 'lib/geoblacklight/metadata.rb'
388
+ - 'lib/geoblacklight/metadata_transformer.rb'
389
+ - 'lib/geoblacklight/metadata_transformer/base.rb'
390
+
391
+ # Offense count: 3
392
+ # Cop supports --auto-correct.
393
+ Style/SlicingWithRange:
394
+ Exclude:
395
+ - 'spec/helpers/geoblacklight_helper_spec.rb'
396
+
397
+ # Offense count: 6
398
+ # Cop supports --auto-correct.
399
+ Style/StringConcatenation:
400
+ Exclude:
401
+ - 'app/controllers/download_controller.rb'
402
+ - 'app/helpers/arcgis_helper.rb'
403
+ - 'app/helpers/carto_helper.rb'
404
+ - 'lib/geoblacklight/download.rb'
405
+ - 'spec/lib/geoblacklight/document_presenter_spec.rb'
406
+
407
+ # Offense count: 1
408
+ # Cop supports --auto-correct.
409
+ # Configuration parameters: MinSize.
410
+ # SupportedStyles: percent, brackets
411
+ Style/SymbolArray:
412
+ EnforcedStyle: brackets
413
+
414
+ # Offense count: 6
415
+ # Cop supports --auto-correct.
416
+ # Configuration parameters: EnforcedStyle, MinSize, WordRegex.
417
+ # SupportedStyles: percent, brackets
418
+ Style/WordArray:
419
+ Exclude:
420
+ - 'app/helpers/geoblacklight_helper.rb'
421
+ - 'spec/models/concerns/geoblacklight/solr_document/finder_spec.rb'