geoblacklight 3.0.0 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +142 -0
  3. data/.gitignore +8 -0
  4. data/.rubocop.yml +9 -10
  5. data/.rubocop_todo.yml +356 -26
  6. data/README.md +2 -2
  7. data/Rakefile +12 -4
  8. data/app/assets/images/favicon.ico +0 -0
  9. data/app/assets/javascripts/geoblacklight/geoblacklight.js +18 -1
  10. data/app/assets/javascripts/geoblacklight/modules/bookmarks.js +43 -0
  11. data/app/assets/javascripts/geoblacklight/modules/metadata_download_button.js +6 -1
  12. data/app/assets/javascripts/geoblacklight/modules/results.js +7 -8
  13. data/app/assets/javascripts/geoblacklight/modules/util.js +5 -0
  14. data/app/assets/javascripts/geoblacklight/viewers/esri.js +1 -1
  15. data/app/assets/javascripts/geoblacklight/viewers/index_map.js +1 -1
  16. data/app/assets/javascripts/geoblacklight/viewers/map.js +12 -2
  17. data/app/assets/javascripts/geoblacklight/viewers/tms.js +10 -0
  18. data/app/assets/javascripts/geoblacklight/viewers/wms.js +1 -1
  19. data/app/assets/stylesheets/geoblacklight/modules/_blacklight_overrides.scss +1 -1
  20. data/app/assets/stylesheets/geoblacklight/modules/results.scss +1 -1
  21. data/app/helpers/geoblacklight_helper.rb +14 -2
  22. data/app/models/concerns/geoblacklight/solr_document.rb +8 -13
  23. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +3 -3
  24. data/app/views/catalog/_document_split.html.erb +1 -1
  25. data/app/views/catalog/_home_text.html.erb +1 -1
  26. data/app/views/catalog/_index_split_default.html.erb +1 -1
  27. data/app/views/catalog/_show_default_viewer_container.html.erb +1 -1
  28. data/app/views/download/hgl.html.erb +13 -11
  29. data/app/views/relation/_ancestors.html.erb +2 -2
  30. data/app/views/relation/_descendants.html.erb +2 -2
  31. data/babel.config.json +4 -0
  32. data/bin/coverage.rb +2 -2
  33. data/config/initializers/new_gbl_settings_defaults_3_3.yml +10 -0
  34. data/config/initializers/rails_config.rb +4 -0
  35. data/config/locales/geoblacklight.en.yml +4 -0
  36. data/geoblacklight.gemspec +6 -5
  37. data/jest.config.js +25 -0
  38. data/lib/generators/geoblacklight/install_generator.rb +1 -1
  39. data/lib/generators/geoblacklight/templates/catalog_controller.rb +2 -1
  40. data/lib/generators/geoblacklight/templates/settings.yml +20 -11
  41. data/lib/geoblacklight.rb +1 -2
  42. data/lib/geoblacklight/bounding_box.rb +1 -1
  43. data/lib/geoblacklight/constants.rb +1 -0
  44. data/lib/geoblacklight/download/kmz_download.rb +1 -1
  45. data/lib/geoblacklight/engine.rb +1 -0
  46. data/lib/geoblacklight/geometry.rb +85 -0
  47. data/lib/geoblacklight/item_viewer.rb +5 -1
  48. data/lib/geoblacklight/metadata/base.rb +1 -7
  49. data/lib/geoblacklight/relation/ancestors.rb +2 -2
  50. data/lib/geoblacklight/relation/descendants.rb +1 -1
  51. data/lib/geoblacklight/version.rb +1 -1
  52. data/lib/geoblacklight/wms_layer.rb +1 -4
  53. data/lib/tasks/geoblacklight.rake +5 -0
  54. data/package.json +17 -1
  55. data/setupJest.js +14 -0
  56. data/solr/conf/schema.xml +1 -3
  57. data/spec/config/initializers/rails_config_spec.rb +14 -0
  58. data/spec/controllers/catalog_controller_spec.rb +6 -6
  59. data/spec/features/download_layer_spec.rb +1 -1
  60. data/spec/features/relations_spec.rb +1 -1
  61. data/spec/features/search_results_overlap_ratio_spec.rb +2 -2
  62. data/spec/features/split_view.html.erb_spec.rb +1 -1
  63. data/spec/features/tms_spec.rb +10 -0
  64. data/spec/fixtures/solr_documents/public_iiif_princeton.json +1 -1
  65. data/spec/fixtures/solr_documents/tms.json +29 -0
  66. data/spec/helpers/geoblacklight_helper_spec.rb +30 -4
  67. data/spec/javascripts/geoblacklight_spec.js +0 -6
  68. data/spec/javascripts/metadata_download_button_spec.js +5 -3
  69. data/spec/javascripts/util_spec.js +2 -4
  70. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +2 -2
  71. data/spec/lib/geoblacklight/download_spec.rb +1 -1
  72. data/spec/lib/geoblacklight/geometry_spec.rb +59 -0
  73. data/spec/lib/geoblacklight/item_viewer_spec.rb +12 -0
  74. data/spec/lib/geoblacklight/references_spec.rb +1 -1
  75. data/spec/lib/geoblacklight/relation/ancestors_spec.rb +1 -1
  76. data/spec/lib/geoblacklight/relation/descendants_spec.rb +1 -1
  77. data/spec/test_app_templates/Gemfile.extra +1 -0
  78. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -8
  79. data/spec/views/catalog/_document_split.html.erb_spec.rb +1 -1
  80. data/spec/views/catalog/_index_split.html.erb_spec.rb +1 -1
  81. data/spec/views/catalog/_show_tools.html.erb_spec.rb +1 -1
  82. data/template.rb +3 -2
  83. metadata +58 -36
  84. data/.circleci/config.yml +0 -252
  85. data/spec/javascripts/geoblacklight/viewers/esri/tiled_map_layer_spec.js +0 -12
  86. data/spec/javascripts/spec_helper.js +0 -32
  87. data/spec/lib/geoblacklight/controller_override_spec.rb +0 -2
  88. data/spec/teaspoon_env.rb +0 -214
@@ -14,9 +14,7 @@ class TestAppGenerator < Rails::Generators::Base
14
14
 
15
15
  def add_gems
16
16
  gem 'blacklight'
17
- gem 'teaspoon'
18
- gem 'teaspoon-jasmine'
19
- gem 'webpacker'
17
+ gem 'webpacker' unless Rails.version.to_s.start_with? '6.1.'
20
18
  Bundler.with_clean_env do
21
19
  run 'bundle install'
22
20
  end
@@ -42,9 +40,4 @@ class TestAppGenerator < Rails::Generators::Base
42
40
  FileUtils.mkdir_p 'spec/fixtures/metadata'
43
41
  directory 'metadata', 'spec/fixtures/metadata'
44
42
  end
45
-
46
- def install_teaspoon
47
- # Implicit copy of GeoBlacklight checked-in teaspoon_env.rb
48
- copy_file '../teaspoon_env.rb', 'spec/teaspoon_env.rb'
49
- end
50
43
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  require 'spec_helper'
3
3
 
4
- describe 'catalog/_document_split.html.erb' do
4
+ describe 'catalog/_document_split.html.erb', type: :view do
5
5
  # TODO: js plugin refactor really needs to be redone so that the views can be testable
6
6
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  require 'spec_helper'
3
3
 
4
- describe 'catalog/_document_split.html.erb' do
4
+ describe 'catalog/_document_split.html.erb', type: :view do
5
5
  # TODO: js plugin refactor really needs to be redone so that the views can be testable
6
6
  end
@@ -17,7 +17,7 @@ describe 'catalog/_show_tools.html.erb', type: :view do
17
17
 
18
18
  it 'renders a document action' do
19
19
  allow(view).to receive(:some_action_solr_document_path).with(document, any_args).and_return 'x'
20
- document_actions[:some_action] = Blacklight::Configuration::ToolConfig.new partial: 'document_action'
20
+ document_actions[:some_action] = Blacklight::Configuration::ToolConfig.new key: :some_action, name: :some_action, partial: 'document_action'
21
21
  render partial: 'catalog/show_tools'
22
22
  expect(rendered).to have_link 'Some action', href: 'x'
23
23
  end
data/template.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
  gem 'blacklight', '~> 7.0'
3
- gem 'geoblacklight', '~> 2.0'
4
- gem 'webpacker'
3
+ gem 'geoblacklight', '~> 3.0'
4
+ gem 'webpacker' unless Rails.version.to_s.start_with? '6.1.'
5
+ gem 'sprockets', '< 4.0' # Use sprockets less than 4.0, let webpacker users set this up themselves
5
6
 
6
7
  # Hack for https://github.com/rails/rails/issues/35153
7
8
  # Adapted from https://github.com/projectblacklight/blacklight/pull/2065
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geoblacklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Graves
8
8
  - Darren Hardy
9
9
  - Eliot Jordan
10
10
  - Jack Reed
11
- autorequire:
11
+ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2020-08-17 00:00:00.000000000 Z
14
+ date: 2021-05-27 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -22,7 +22,7 @@ dependencies:
22
22
  version: 5.2.4
23
23
  - - "<"
24
24
  - !ruby/object:Gem::Version
25
- version: '6.1'
25
+ version: '6.2'
26
26
  type: :runtime
27
27
  prerelease: false
28
28
  version_requirements: !ruby/object:Gem::Requirement
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 5.2.4
33
33
  - - "<"
34
34
  - !ruby/object:Gem::Version
35
- version: '6.1'
35
+ version: '6.2'
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: blacklight
38
38
  requirement: !ruby/object:Gem::Requirement
@@ -160,19 +160,19 @@ dependencies:
160
160
  - !ruby/object:Gem::Version
161
161
  version: '0'
162
162
  - !ruby/object:Gem::Dependency
163
- name: webpacker
163
+ name: rgeo-geojson
164
164
  requirement: !ruby/object:Gem::Requirement
165
165
  requirements:
166
- - - "~>"
166
+ - - ">="
167
167
  - !ruby/object:Gem::Version
168
- version: '4.0'
168
+ version: '0'
169
169
  type: :runtime
170
170
  prerelease: false
171
171
  version_requirements: !ruby/object:Gem::Requirement
172
172
  requirements:
173
- - - "~>"
173
+ - - ">="
174
174
  - !ruby/object:Gem::Version
175
- version: '4.0'
175
+ version: '0'
176
176
  - !ruby/object:Gem::Dependency
177
177
  name: solr_wrapper
178
178
  requirement: !ruby/object:Gem::Requirement
@@ -286,7 +286,21 @@ dependencies:
286
286
  - !ruby/object:Gem::Version
287
287
  version: '1.3'
288
288
  - !ruby/object:Gem::Dependency
289
- name: bixby
289
+ name: simplecov
290
+ requirement: !ruby/object:Gem::Requirement
291
+ requirements:
292
+ - - "~>"
293
+ - !ruby/object:Gem::Version
294
+ version: 0.17.1
295
+ type: :development
296
+ prerelease: false
297
+ version_requirements: !ruby/object:Gem::Requirement
298
+ requirements:
299
+ - - "~>"
300
+ - !ruby/object:Gem::Version
301
+ version: 0.17.1
302
+ - !ruby/object:Gem::Dependency
303
+ name: foreman
290
304
  requirement: !ruby/object:Gem::Requirement
291
305
  requirements:
292
306
  - - ">="
@@ -300,47 +314,47 @@ dependencies:
300
314
  - !ruby/object:Gem::Version
301
315
  version: '0'
302
316
  - !ruby/object:Gem::Dependency
303
- name: simplecov
317
+ name: rubocop
304
318
  requirement: !ruby/object:Gem::Requirement
305
319
  requirements:
306
320
  - - "~>"
307
321
  - !ruby/object:Gem::Version
308
- version: '0.16'
322
+ version: '1.10'
309
323
  type: :development
310
324
  prerelease: false
311
325
  version_requirements: !ruby/object:Gem::Requirement
312
326
  requirements:
313
327
  - - "~>"
314
328
  - !ruby/object:Gem::Version
315
- version: '0.16'
329
+ version: '1.10'
316
330
  - !ruby/object:Gem::Dependency
317
- name: foreman
331
+ name: rubocop-rails
318
332
  requirement: !ruby/object:Gem::Requirement
319
333
  requirements:
320
- - - ">="
334
+ - - "~>"
321
335
  - !ruby/object:Gem::Version
322
- version: '0'
336
+ version: '2.9'
323
337
  type: :development
324
338
  prerelease: false
325
339
  version_requirements: !ruby/object:Gem::Requirement
326
340
  requirements:
327
- - - ">="
341
+ - - "~>"
328
342
  - !ruby/object:Gem::Version
329
- version: '0'
343
+ version: '2.9'
330
344
  - !ruby/object:Gem::Dependency
331
- name: teaspoon
345
+ name: rubocop-rspec
332
346
  requirement: !ruby/object:Gem::Requirement
333
347
  requirements:
334
- - - ">="
348
+ - - "~>"
335
349
  - !ruby/object:Gem::Version
336
- version: '0'
350
+ version: '2.2'
337
351
  type: :development
338
352
  prerelease: false
339
353
  version_requirements: !ruby/object:Gem::Requirement
340
354
  requirements:
341
- - - ">="
355
+ - - "~>"
342
356
  - !ruby/object:Gem::Version
343
- version: '0'
357
+ version: '2.2'
344
358
  description: GeoBlacklight provides a world-class discovery platform for geospatial
345
359
  (GIS) holdings. It is an open collaborative project aiming to build off of the successes
346
360
  of the Blacklight Solr-powered discovery interface and the multi-institutional OpenGeoportal
@@ -355,8 +369,8 @@ executables:
355
369
  extensions: []
356
370
  extra_rdoc_files: []
357
371
  files:
358
- - ".circleci/config.yml"
359
372
  - ".github/ISSUE_TEMPLATE.md"
373
+ - ".github/workflows/ruby.yml"
360
374
  - ".gitignore"
361
375
  - ".gitmodules"
362
376
  - ".hound.yml"
@@ -433,6 +447,7 @@ files:
433
447
  - app/assets/images/blacklight/uva.svg
434
448
  - app/assets/images/blacklight/web_services.svg
435
449
  - app/assets/images/blacklight/wisconsin.svg
450
+ - app/assets/images/favicon.ico
436
451
  - app/assets/javascripts/geoblacklight/basemaps.js
437
452
  - app/assets/javascripts/geoblacklight/controls.js
438
453
  - app/assets/javascripts/geoblacklight/controls/opacity.js
@@ -441,6 +456,7 @@ files:
441
456
  - app/assets/javascripts/geoblacklight/downloaders/hgl_downloader.js
442
457
  - app/assets/javascripts/geoblacklight/geoblacklight.js
443
458
  - app/assets/javascripts/geoblacklight/modules.js
459
+ - app/assets/javascripts/geoblacklight/modules/bookmarks.js
444
460
  - app/assets/javascripts/geoblacklight/modules/download.js
445
461
  - app/assets/javascripts/geoblacklight/modules/geosearch.js
446
462
  - app/assets/javascripts/geoblacklight/modules/help_text.js
@@ -465,6 +481,7 @@ files:
465
481
  - app/assets/javascripts/geoblacklight/viewers/index_map.js
466
482
  - app/assets/javascripts/geoblacklight/viewers/map.js
467
483
  - app/assets/javascripts/geoblacklight/viewers/oembed.js
484
+ - app/assets/javascripts/geoblacklight/viewers/tms.js
468
485
  - app/assets/javascripts/geoblacklight/viewers/viewer.js
469
486
  - app/assets/javascripts/geoblacklight/viewers/wms.js
470
487
  - app/assets/stylesheets/geoblacklight/geoblacklight.scss
@@ -547,10 +564,13 @@ files:
547
564
  - app/views/relation/index.html.erb
548
565
  - app/views/relation/index.json.jbuilder
549
566
  - app/views/shared/_header_navbar.html.erb
567
+ - babel.config.json
550
568
  - bin/coverage.rb
569
+ - config/initializers/new_gbl_settings_defaults_3_3.yml
551
570
  - config/initializers/rails_config.rb
552
571
  - config/locales/geoblacklight.en.yml
553
572
  - geoblacklight.gemspec
573
+ - jest.config.js
554
574
  - lib/generators/geoblacklight/assets_generator.rb
555
575
  - lib/generators/geoblacklight/install_generator.rb
556
576
  - lib/generators/geoblacklight/templates/Procfile
@@ -577,6 +597,7 @@ files:
577
597
  - lib/geoblacklight/engine.rb
578
598
  - lib/geoblacklight/exceptions.rb
579
599
  - lib/geoblacklight/geoblacklight_helper_behavior.rb
600
+ - lib/geoblacklight/geometry.rb
580
601
  - lib/geoblacklight/item_viewer.rb
581
602
  - lib/geoblacklight/metadata.rb
582
603
  - lib/geoblacklight/metadata/base.rb
@@ -611,6 +632,7 @@ files:
611
632
  - schema/schema-commentary.md
612
633
  - schema/subjects.md
613
634
  - schema/type-values.md
635
+ - setupJest.js
614
636
  - solr/conf/_rest_managed.json
615
637
  - solr/conf/admin-extra.html
616
638
  - solr/conf/core.properties
@@ -628,6 +650,7 @@ files:
628
650
  - solr/conf/xslt/example_atom.xsl
629
651
  - solr/conf/xslt/example_rss.xsl
630
652
  - solr/conf/xslt/luke.xsl
653
+ - spec/config/initializers/rails_config_spec.rb
631
654
  - spec/controllers/catalog_controller_spec.rb
632
655
  - spec/controllers/download_controller_spec.rb
633
656
  - spec/controllers/relation_controller_spec.rb
@@ -663,6 +686,7 @@ files:
663
686
  - spec/features/sms_spec.rb
664
687
  - spec/features/split_view.html.erb_spec.rb
665
688
  - spec/features/suppressed_records_spec.rb
689
+ - spec/features/tms_spec.rb
666
690
  - spec/features/web_services_modal_spec.rb
667
691
  - spec/fixtures/fgdc/harvard-g7064-s2-1834-k3.xml
668
692
  - spec/fixtures/iso19139/stanford-cg357zz0321.xml
@@ -705,6 +729,7 @@ files:
705
729
  - spec/fixtures/solr_documents/public_iiif_princeton.json
706
730
  - spec/fixtures/solr_documents/public_polygon_mit.json
707
731
  - spec/fixtures/solr_documents/restricted-line.json
732
+ - spec/fixtures/solr_documents/tms.json
708
733
  - spec/fixtures/solr_documents/umn_metro_result1.json
709
734
  - spec/fixtures/solr_documents/umn_state_result1.json
710
735
  - spec/fixtures/solr_documents/umn_state_result2.json
@@ -712,13 +737,10 @@ files:
712
737
  - spec/helpers/arcgis_helper_spec.rb
713
738
  - spec/helpers/carto_helper_spec.rb
714
739
  - spec/helpers/geoblacklight_helper_spec.rb
715
- - spec/javascripts/geoblacklight/viewers/esri/tiled_map_layer_spec.js
716
740
  - spec/javascripts/geoblacklight_spec.js
717
741
  - spec/javascripts/metadata_download_button_spec.js
718
- - spec/javascripts/spec_helper.js
719
742
  - spec/javascripts/util_spec.js
720
743
  - spec/lib/geoblacklight/bounding_box_spec.rb
721
- - spec/lib/geoblacklight/controller_override_spec.rb
722
744
  - spec/lib/geoblacklight/document_presenter_spec.rb
723
745
  - spec/lib/geoblacklight/download/geojson_download_spec.rb
724
746
  - spec/lib/geoblacklight/download/geotiff_download_spec.rb
@@ -727,6 +749,7 @@ files:
727
749
  - spec/lib/geoblacklight/download/shapefile_download_spec.rb
728
750
  - spec/lib/geoblacklight/download_spec.rb
729
751
  - spec/lib/geoblacklight/geoblacklight_helper_behavior_spec.rb
752
+ - spec/lib/geoblacklight/geometry_spec.rb
730
753
  - spec/lib/geoblacklight/item_viewer_spec.rb
731
754
  - spec/lib/geoblacklight/metadata/base_spec.rb
732
755
  - spec/lib/geoblacklight/metadata/html_spec.rb
@@ -756,7 +779,6 @@ files:
756
779
  - spec/support/features/session_helpers.rb
757
780
  - spec/support/fixtures.rb
758
781
  - spec/tasks/geoblacklight_spec.rb
759
- - spec/teaspoon_env.rb
760
782
  - spec/test_app_templates/Gemfile.extra
761
783
  - spec/test_app_templates/lib/generators/test_app_generator.rb
762
784
  - spec/test_app_templates/metadata/fgdc.html
@@ -787,7 +809,7 @@ homepage: http://github.com/geoblacklight/geoblacklight
787
809
  licenses:
788
810
  - Apache 2.0
789
811
  metadata: {}
790
- post_install_message:
812
+ post_install_message:
791
813
  rdoc_options: []
792
814
  require_paths:
793
815
  - lib
@@ -802,11 +824,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
802
824
  - !ruby/object:Gem::Version
803
825
  version: 2.5.2
804
826
  requirements: []
805
- rubygems_version: 3.1.2
806
- signing_key:
827
+ rubygems_version: 3.0.3
828
+ signing_key:
807
829
  specification_version: 4
808
830
  summary: A discovery platform for geospatial holdings
809
831
  test_files:
832
+ - spec/config/initializers/rails_config_spec.rb
810
833
  - spec/controllers/catalog_controller_spec.rb
811
834
  - spec/controllers/download_controller_spec.rb
812
835
  - spec/controllers/relation_controller_spec.rb
@@ -842,6 +865,7 @@ test_files:
842
865
  - spec/features/sms_spec.rb
843
866
  - spec/features/split_view.html.erb_spec.rb
844
867
  - spec/features/suppressed_records_spec.rb
868
+ - spec/features/tms_spec.rb
845
869
  - spec/features/web_services_modal_spec.rb
846
870
  - spec/fixtures/fgdc/harvard-g7064-s2-1834-k3.xml
847
871
  - spec/fixtures/iso19139/stanford-cg357zz0321.xml
@@ -884,6 +908,7 @@ test_files:
884
908
  - spec/fixtures/solr_documents/public_iiif_princeton.json
885
909
  - spec/fixtures/solr_documents/public_polygon_mit.json
886
910
  - spec/fixtures/solr_documents/restricted-line.json
911
+ - spec/fixtures/solr_documents/tms.json
887
912
  - spec/fixtures/solr_documents/umn_metro_result1.json
888
913
  - spec/fixtures/solr_documents/umn_state_result1.json
889
914
  - spec/fixtures/solr_documents/umn_state_result2.json
@@ -891,13 +916,10 @@ test_files:
891
916
  - spec/helpers/arcgis_helper_spec.rb
892
917
  - spec/helpers/carto_helper_spec.rb
893
918
  - spec/helpers/geoblacklight_helper_spec.rb
894
- - spec/javascripts/geoblacklight/viewers/esri/tiled_map_layer_spec.js
895
919
  - spec/javascripts/geoblacklight_spec.js
896
920
  - spec/javascripts/metadata_download_button_spec.js
897
- - spec/javascripts/spec_helper.js
898
921
  - spec/javascripts/util_spec.js
899
922
  - spec/lib/geoblacklight/bounding_box_spec.rb
900
- - spec/lib/geoblacklight/controller_override_spec.rb
901
923
  - spec/lib/geoblacklight/document_presenter_spec.rb
902
924
  - spec/lib/geoblacklight/download/geojson_download_spec.rb
903
925
  - spec/lib/geoblacklight/download/geotiff_download_spec.rb
@@ -906,6 +928,7 @@ test_files:
906
928
  - spec/lib/geoblacklight/download/shapefile_download_spec.rb
907
929
  - spec/lib/geoblacklight/download_spec.rb
908
930
  - spec/lib/geoblacklight/geoblacklight_helper_behavior_spec.rb
931
+ - spec/lib/geoblacklight/geometry_spec.rb
909
932
  - spec/lib/geoblacklight/item_viewer_spec.rb
910
933
  - spec/lib/geoblacklight/metadata/base_spec.rb
911
934
  - spec/lib/geoblacklight/metadata/html_spec.rb
@@ -935,7 +958,6 @@ test_files:
935
958
  - spec/support/features/session_helpers.rb
936
959
  - spec/support/fixtures.rb
937
960
  - spec/tasks/geoblacklight_spec.rb
938
- - spec/teaspoon_env.rb
939
961
  - spec/test_app_templates/Gemfile.extra
940
962
  - spec/test_app_templates/lib/generators/test_app_generator.rb
941
963
  - spec/test_app_templates/metadata/fgdc.html
data/.circleci/config.yml DELETED
@@ -1,252 +0,0 @@
1
- ---
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
41
- jobs:
42
- build:
43
- working_directory: ~/geoblacklight
44
- parameters:
45
- ruby_version:
46
- type: string
47
- default: '2.7.1'
48
- solr_port:
49
- type: string
50
- default: '8983'
51
- rails_version:
52
- type: string
53
- default: '6.0.3.2'
54
- coverage:
55
- type: boolean
56
- default: false
57
- docker:
58
- - image: circleci/ruby:<< parameters.ruby_version >>-node-browsers
59
- - image: solr:7-alpine
60
- command: bin/solr -cloud -noprompt -f -p <<parameters.solr_port>>
61
- environment:
62
- GEM_HOME: /home/circleci/geoblacklight/vendor/bundle
63
- BUNDLE_PATH: /home/circleci/geoblacklight/vendor/bundle
64
- BUNDLE_JOBS: 4
65
- BUNDLE_RETRY: 3
66
- RAILS_ENV: test
67
- RACK_ENV: test
68
- RAILS_VERSION: <<parameters.rails_version>>
69
- steps:
70
- - checkout
71
- - restore_bundle_cache:
72
- ruby_version: << parameters.ruby_version >>
73
- rails_version: << parameters.rails_version >>
74
- # Install gems
75
- - run: bundle check || bundle install
76
- # Generate the internal test app
77
- - run:
78
- name: Generate test app
79
- command: |
80
- [ -e ./.internal_test_app ] || bundle exec rake engine_cart:generate
81
- - save_bundle_cache:
82
- ruby_version: << parameters.ruby_version >>
83
- rails_version: << parameters.rails_version >>
84
- - run:
85
- name: Wait for Solr
86
- command: dockerize -wait tcp://localhost:<<parameters.solr_port>> -timeout 1m
87
- - run:
88
- name: Load config into solr
89
- command: |
90
- cd .internal_test_app/solr/conf
91
- zip -1 -r solr_config.zip ./*
92
- curl -H "Content-type:application/octet-stream" --data-binary @solr_config.zip "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=solrconfig"
93
- curl -H 'Content-type: application/json' http://localhost:<<parameters.solr_port>>/api/collections/ -d '{create: {name: blacklight-core, config: solrconfig, numShards: 1}}'
94
- - run:
95
- name: Seed Solr
96
- command: |
97
- cd .internal_test_app
98
- bundle check || bundle install
99
- bundle exec rake geoblacklight:index:seed
100
- bundle exec rake geoblacklight:downloads:mkdir
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
126
- - run:
127
- name: Run the Teaspoon test suites
128
- command: bundle exec rake teaspoon
129
-
130
- rubocop:
131
- working_directory: ~/geoblacklight
132
- parameters:
133
- ruby_version:
134
- type: string
135
- default: '2.7.1'
136
- rails_version:
137
- type: string
138
- default: '6.0.3.2'
139
- docker:
140
- - image: circleci/ruby:<< parameters.ruby_version >>-node-browsers
141
- environment:
142
- GEM_HOME: /home/circleci/geoblacklight/vendor/bundle
143
- BUNDLE_PATH: /home/circleci/geoblacklight/vendor/bundle
144
- BUNDLE_JOBS: 4
145
- BUNDLE_RETRY: 3
146
- RAILS_ENV: test
147
- RACK_ENV: test
148
- RAILS_VERSION: <<parameters.rails_version>>
149
- steps:
150
- - checkout
151
- - restore_bundle_cache:
152
- ruby_version: << parameters.ruby_version >>
153
- rails_version: << parameters.rails_version >>
154
- # Install gems and run rubocop
155
- - run: bundle check || bundle install
156
- - run: bundle exec rake rubocop
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
-
194
- workflows:
195
- version: 2.1
196
- build:
197
- jobs:
198
- - build:
199
- ruby_version: 2.7.1
200
- rails_version: 6.0.3.2
201
- coverage: true
202
- name: "ruby2-7_rails6-0"
203
- - build:
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
209
- rails_version: 5.2.4.3
210
- name: "ruby2-7_rails5-2"
211
- - build:
212
- ruby_version: 2.6.6
213
- rails_version: 5.2.4.3
214
- name: "ruby2-6_rails5-2"
215
- - rubocop:
216
- requires:
217
- - ruby2-7_rails6-0
218
- - coverage_report:
219
- requires:
220
- - ruby2-7_rails6-0
221
- nightly:
222
- triggers:
223
- - schedule:
224
- cron: "0 0 * * *"
225
- filters:
226
- branches:
227
- only:
228
- - master
229
- jobs:
230
- - build:
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"
239
- - build:
240
- ruby_version: 2.7.1
241
- rails_version: 5.2.4.3
242
- name: "ruby2-7_rails5-2"
243
- - build:
244
- ruby_version: 2.6.6
245
- rails_version: 5.2.4.3
246
- name: "ruby2-6_rails5-2"
247
- - rubocop:
248
- requires:
249
- - ruby2-7_rails6-0
250
- - coverage_report:
251
- requires:
252
- - ruby2-7_rails6-0